feat(plan-feature): add documentation task generation#200
Conversation
Reviewer's GuideAdds structured documentation signal extraction and automatic documentation task generation to the plan-feature skill, wires these behaviors into the global constraints/traceability docs, and extends the plan-feature evals to assert correct behavior when documentation signals are present or absent. Flow diagram for documentation signal extraction and task generationflowchart TD
A[Feature_description] --> B[Step1_extract_documentation_signals]
B --> C{Documentation_Considerations_section_present?}
C -- No --> D[Record_no_doc_signals]
D --> G[Step5_skip_doc_task_generation]
C -- Yes --> E[Parse_doc_impact_type_and_details]
E --> F[Store_documentation_signals]
F --> H[Step5_check_for_doc_signals]
H --> I{Doc_signals_present?}
I -- No --> G
I -- Yes --> J{Doc_impact_type_is_No_Doc_Impact?}
J -- Yes --> G
J -- No --> K[Generate_doc_task_from_task_description_template]
K --> L[Doc_task_includes_required_sections]
G --> M[Constraint_1_60_satisfied]
K --> N[Constraint_1_59_satisfied]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The "Doc impact type" value list uses
Updateswhile the surrounding text and later Step 5 reference "Updates to existing content"; consider standardizing the label so downstream logic and evals don't diverge on the exact string. - The documentation task generation rules don't specify how to handle multiple documentation signals (e.g., both New Content and Release Notes in the same feature); clarifying whether to create a single combined task vs. multiple tasks would reduce ambiguity.
- In the new documentation task template requirements, you mention
## Repositorybut don't specify how to choose it when multiple repos or a monorepo are involved; adding a brief selection rule here would make the behavior more deterministic.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The "Doc impact type" value list uses `Updates` while the surrounding text and later Step 5 reference "Updates to existing content"; consider standardizing the label so downstream logic and evals don't diverge on the exact string.
- The documentation task generation rules don't specify how to handle multiple documentation signals (e.g., both New Content and Release Notes in the same feature); clarifying whether to create a single combined task vs. multiple tasks would reduce ambiguity.
- In the new documentation task template requirements, you mention `## Repository` but don't specify how to choose it when multiple repos or a monorepo are involved; adding a brief selection rule here would make the behavior more deterministic.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
Eval Results
Eval Results: plan-feature
| Eval | Passed | Failed | Pass Rate |
|---|---|---|---|
| eval-1 | 16/17 | 1 | 94% |
| eval-2 | 15/15 | 0 | 100% |
| eval-3 | 15/15 | 0 | 100% |
| eval-4 | 11/11 | 0 | 100% |
| eval-5 | 15/15 | 0 | 100% |
| eval-6 | 13/14 | 1 | 93% |
Failed Assertions
eval-1: 1 failing assertion
- Assertion: "Convention-aware enrichment validates file-type applicability per shared/convention-applicability-rules.md before including a convention — inapplicable conventions are excluded entirely (not listed with 'Not applicable' annotations), and applicable ones include a rationale in the prescribed format ('Applies: task modifies <file> matching the convention's <scope>'), not free-form prose"
Evidence: "No convention enrichment with the prescribed format is present in any task's Implementation Notes. The repo-backend.md structure lists a CONVENTIONS.md file in the directory tree, indicating conventions should exist for enrichment. However, no task contains 'Per CONVENTIONS.md' references or applicability rationales in the required format ('Applies: task modifies <file> matching the convention's <scope>'). Grep for 'Per CONVENTIONS', 'Applies:', and 'convention' found only informal lowercase references like 'per repository Key Conventions' and 'project convention' — not the prescribed convention enrichment format. No evidence that convention-aware enrichment with file-type applicability validation was performed."
eval-6: 1 failing assertion
- Assertion: "Each task file contains all required template sections: Repository, Target Branch, Description, at least one of Files to Modify or Files to Create, Implementation Notes, Acceptance Criteria, Test Requirements"
Evidence: "Tasks 1, 9, and 10 are missing required sections. Task 1 (task-1-create-feature-branch.md) has no 'Files to Modify' or 'Files to Create' section and no 'Implementation Notes' section — it is a bookend task with only Repository, Target Branch, Bookend Type, Parent Epic, Description, Acceptance Criteria, Test Requirements, and Dependencies. Task 9 (task-9-remediation-documentation.md) has no 'Files to Modify' or 'Files to Create' section and no 'Implementation Notes' section — it is a documentation task. Task 10 (task-10-merge-feature-branch.md) similarly lacks both sections. Tasks 2-8 all contain the full set of required sections."
Pass rate: 98% · Tokens: 72,187 · Duration: 302s
Baseline (40c31ac8): 100% · 40,782 tokens · 233s
Generated by sdlc-workflow/run-evals v0.12.0
|
[sdlc-workflow/verify-pr] Re: @sourcery-ai[bot] review — Three suggestions classified:
|
Verification Report for TC-4877 (commit b2eea5a)
Overall: PASSTest Quality is WARN due to eval pass rate regression (71% vs 94% baseline). Five assertion failures are directly caused by this PR's documentation task design: existing assertions use universal quantifiers ("every task") that don't account for the new documentation task type which intentionally omits certain template sections (Files to Modify, Files to Create, Implementation Notes). Three eval failure sub-tasks created. Root-cause investigation identified a plan-feature phase gap. Note: Test Quality, Test Change Classification, and Root-Cause Investigation are informational and do not affect the Overall result. This comment was AI-generated by sdlc-workflow/verify-pr v0.11.0. |
5f08fae to
0a371f0
Compare
…scription signals Add deterministic documentation task generation to plan-feature when the Feature description contains a "Documentation Considerations" section with doc impact signals (New Content, Updates, Release Notes). Replaces the previous advisory-only "Documentation task guidance" paragraph with a formal step that parses signals in Step 1 and generates tasks in Step 5. - Step 1: add "Documentation signal extraction" sub-step - Step 5: replace guidance paragraph with "Documentation task generation" subsection following the Bookend task generation pattern - Add constraints §1.59 and §1.60 to docs/constraints.md - Update Traceability Index with new constraint references - Add eval assertions: positive case (eval 1) and negative case (eval 2) Implements TC-4877 Assisted-by: Claude Code
… assertions Update eval case 1 assertions to exempt documentation tasks from requiring Files to Modify, Files to Create, and Implementation Notes sections, since documentation tasks intentionally omit these per the documentation task generation design. Implements TC-4885 Assisted-by: Claude Code
…ion Notes assertion Update eval case 3 assertion to exempt documentation tasks alongside bookend tasks from the Implementation Notes requirement, since documentation tasks intentionally omit this section by design. Implements TC-4886 Assisted-by: Claude Code
…d dependency assertions Update eval case 5 assertions to exempt documentation tasks from universal template section requirements and create-branch dependency listing, since documentation tasks have different section and dependency structures by design. Implements TC-4887 Assisted-by: Claude Code
Verification Report for TC-4877 (commit a6de0e4)
Overall: PASSAll checks pass. The 2 eval assertion failures (eval-1 convention enrichment, eval-6 template sections) are not regressions — eval-1 is pre-existing flakiness on convention enrichment format, and eval-6 demonstrates the exact problem this PR addresses (documentation tasks lack sections that the old universal assertion required; the PR updates the assertion to exempt them). This comment was AI-generated by sdlc-workflow/verify-pr v0.12.0. |
Summary
Implements TC-4877
Test plan
claude plugin validate plugins/sdlc-workflow— passes🤖 Generated with Claude Code