Skip to content

feat: add editorial review tasks for structure and prose#1307

Merged
bmadcode merged 5 commits intobmad-code-org:mainfrom
alexeyv:feat/editorial-review-task
Jan 12, 2026
Merged

feat: add editorial review tasks for structure and prose#1307
bmadcode merged 5 commits intobmad-code-org:mainfrom
alexeyv:feat/editorial-review-task

Conversation

@alexeyv
Copy link
Copy Markdown
Collaborator

@alexeyv alexeyv commented Jan 11, 2026

Summary

Adds two complementary editorial review tasks for document improvement:

  • editorial-review-structure.xml - Structural editor that proposes cuts, reorganization, and simplification. Run this BEFORE copy editing.
  • editorial-review-prose.xml - Clinical copy-editor for prose improvements. Run this AFTER structural review.

Both tasks support humans and llm target audiences with different review principles.

Features

Structure Task

  • 5 document archetype models (Tutorial, Reference, Explanation, Prompt, Strategic)
  • Model-based structural evaluation for targeted recommendations
  • Categories: CUT, MERGE, MOVE, CONDENSE, QUESTION, PRESERVE
  • Human-reader principles (visual aids, warmth, engagement)
  • LLM-reader principles (precision, unambiguity, dependency-first)

Prose Task

  • Microsoft Writing Style Guide as baseline
  • Three-column output table (Original | Revised | Changes)
  • Skips code blocks, frontmatter, structural markup
  • Deduplication of repeated issues

Test plan

  • Manual test structure task with various document types
  • Manual test prose task with clean and error-containing text
  • Verify model selection matches document purpose
  • Verify human vs LLM principles apply correctly

@alexeyv alexeyv force-pushed the feat/editorial-review-task branch 3 times, most recently from f772388 to fcf26a1 Compare January 11, 2026 13:27
@alexeyv alexeyv changed the title feat: add editorial-review task for clinical copy-editing feat: add editorial review tasks for structure and prose Jan 11, 2026
Add two complementary editorial review tasks:

- editorial-review-structure.xml: Structural editor that proposes cuts,
  reorganization, and simplification. Includes 5 document archetype models
  (Tutorial, Reference, Explanation, Prompt, Strategic) for targeted evaluation.

- editorial-review-prose.xml: Clinical copy-editor for prose improvements
  using Microsoft Writing Style Guide as baseline.

Both tasks support humans and llm target audiences with different principles.
@alexeyv alexeyv force-pushed the feat/editorial-review-task branch from fcf26a1 to 917a32f Compare January 11, 2026 13:34
@alexeyv alexeyv marked this pull request as ready for review January 11, 2026 13:35
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jan 11, 2026

📝 Walkthrough

Walkthrough

This change introduces two new editorial review tasks with XML workflow definitions for prose copy-editing and structural document editing. It adds governance constraints to an existing adversarial review task and extends the CIS module configuration to expose additional core config variables for downstream use.

Changes

Cohort / File(s) Summary
Editorial Review Tasks
src/core/tasks/editorial-review-prose.xml, src/core/tasks/editorial-review-structure.xml
Introduces two new task definitions: Editorial Review - Prose (+89 lines) for clinical copy-editing with input validation, style analysis, and deduplicated fix suggestions; Editorial Review - Structure (+197 lines) for document restructuring with purpose/audience analysis, multiple reader-type models, and prioritized recommendations (CUT/MERGE/MOVE/CONDENSE/QUESTION/PRESERVE classification). Both include ordered step sequences, halt conditions, and formatted output schemas.
Task Governance
src/core/tasks/review-adversarial-general.xml
Adds mandatory governance text (+5 lines) within llm block enforcing strict step ordering, non-skippable execution, halt-condition enforcement, and required action completion per step.
Module Configuration
src/modules/cis/module.yaml
Expands exposed core-config variables (+1 line) to include document_output_language and output_folder alongside existing user_name and communication_language.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • bmadcode
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and accurately summarizes the main change: adding two new editorial review tasks for structure and prose to the codebase.
Description check ✅ Passed The description is directly related to the changeset, providing a comprehensive overview of the two new editorial review tasks, their features, and test plan.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/core/tasks/editorial-review-structure.xml (1)

17-22: Inconsistent parameter naming between editorial tasks.

This task uses reader_type (lines 20-22) for the humans/llm distinction, while editorial-review-prose.xml uses target_audience for the same purpose. This inconsistency may confuse users invoking both tasks in sequence (structure → prose as intended per line 10's objective).

Consider aligning the naming:

  • Use reader_type in both tasks for the humans/llm optimization flag
  • Keep target_audience for the audience description (who reads the doc) as used here
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d4f6642 and 917a32f.

📒 Files selected for processing (4)
  • src/core/tasks/editorial-review-prose.xml
  • src/core/tasks/editorial-review-structure.xml
  • src/core/tasks/review-adversarial-general.xml
  • src/modules/cis/module.yaml
🧰 Additional context used
📓 Path-based instructions (1)
**/*

⚙️ CodeRabbit configuration file

**/*: Focus on inconsistencies, contradictions, edge cases and serious issues.
Avoid commenting on minor issues such as linting, formatting and style issues.
When providing code suggestions, use GitHub's suggestion format:

<code changes>

Files:

  • src/core/tasks/editorial-review-structure.xml
  • src/core/tasks/editorial-review-prose.xml
  • src/core/tasks/review-adversarial-general.xml
  • src/modules/cis/module.yaml
🔇 Additional comments (5)
src/modules/cis/module.yaml (1)

7-12: LGTM!

The addition of document_output_language and output_folder variables follows the existing pattern and expands the core-config accessibility for downstream tasks, which aligns with the new editorial tasks being introduced.

src/core/tasks/review-adversarial-general.xml (1)

12-16: LGTM!

The governance policy additions are clear and consistent with the existing task structure. The halt-conditions section (lines 41-44) properly backs the "HALT immediately when halt-conditions are met" instruction.

src/core/tasks/editorial-review-prose.xml (1)

1-88: LGTM!

The task definition is well-structured with consistent terminology between inputs, flow actions, and halt-conditions. The target_audience parameter is properly validated and used throughout the flow. The deduplication and merging principles (lines 29-30) are appropriately reflected in the editorial review step (lines 58-59). The output format with the three-column table is clearly specified with a helpful example.

src/core/tasks/editorial-review-structure.xml (2)

73-103: Well-designed structure models.

The five document archetypes (Tutorial, Reference, Explanation, Prompt, Strategic) provide clear evaluation criteria. The MECE principle (Mutually Exclusive, Collectively Exhaustive) mentioned for Reference and Strategic models is a good structural validation approach.


147-160: Good categorization system for recommendations.

The CUT/MERGE/MOVE/CONDENSE/QUESTION/PRESERVE categories provide actionable, non-overlapping classification. The explicit PRESERVE category for elements that "might seem cuttable but serve comprehension" is a thoughtful addition that prevents over-aggressive editing, especially given the human-reader-principles guidance.

alexeyv and others added 4 commits January 11, 2026 06:03
Both editorial review tasks (prose and structure) were missing the key
constraint that reviewers should never challenge the ideas/knowledge
themselves—only how clearly they are communicated. This restores the
original design intent.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Prose task was using 'target_audience' for the humans/llm optimization
flag while structure task correctly separates 'target_audience' (who
reads) from 'reader_type' (optimization mode). Aligns to reader_type.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@bmadcode bmadcode merged commit d419ac8 into bmad-code-org:main Jan 12, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants