diff --git a/.ai/workflow-contract.json b/.ai/workflow-contract.json index be948e2..24b22cb 100644 --- a/.ai/workflow-contract.json +++ b/.ai/workflow-contract.json @@ -52,7 +52,8 @@ "ONE PR for the parent issue. The PR closes the parent and all sub-issues.", "Commits reference the specific sub-issue index they implement.", "Sub-issues should be small enough to fit in a single AI context window.", - "Plan milestones map 1:1 to sub-issues." + "Plan milestones map 1:1 to sub-issues.", + "Each sub-issue receives its own plan comment with duplicated shared context. An agent must be able to execute from the sub-issue alone." ], "examples": { "parent": "#105 'feat: Add Grafana dashboards and alerting'", @@ -103,8 +104,9 @@ "[SKILL] Problem Analysis if complex problem.", "[SKILL] Decision Critic if uncertain approach.", "If multi-file feature (3+ files): decompose into sub-issues per sub_issues rules. Each sub-issue = one plan milestone.", - "[SKILL] Planner writes plan as parent issue comment. Plan milestones map 1:1 to sub-issues.", - "[SKILL] Plan review cycle: QR plan-completeness -> TW plan-scrub -> QR plan-code -> QR plan-docs.", + "[SKILL] Planner writes plan summary as parent issue comment: shared context + milestone index linking each milestone to its sub-issue. M5 (doc-sync) stays on parent if no sub-issue exists.", + "[SKILL] Planner posts each milestone's self-contained implementation plan as a comment on the corresponding sub-issue. Each sub-issue plan duplicates relevant shared context (API maps, state changes, auth, error handling, risk) so an agent can execute from the sub-issue alone without reading the parent.", + "[SKILL] Plan review cycle: QR plan-completeness -> TW plan-scrub -> QR plan-code -> QR plan-docs. Distribute milestone-specific review findings to sub-issue plan comments.", "Create ONE branch issue-{parent_index}-{slug} from main.", "[SKILL] Planner executes plan, delegates to Developer per milestone/sub-issue.", "[SKILL] QR post-implementation per milestone (results in parent issue comment).", @@ -123,7 +125,7 @@ "execution_review": ["QR post-implementation per milestone"], "final_review": ["Quality Agent RULE 0/1/2"] }, - "plan_storage": "gitea_issue_comments", + "plan_storage": "gitea_issue_comments: summary on parent issue, milestone detail on sub-issues", "tracking_storage": "gitea_issue_comments", "issue_comment_operations": { "create_comment": "mcp__gitea-mcp__create_issue_comment",