version: 1 file_associations: "request.md": "feature_request" "feature.discussion.md": "feature_discussion_update" "feature.discussion.sum.md": "discussion_summary" "implementation.discussion.md": "implementation_discussion_update" "implementation.discussion.sum.md": "discussion_summary" rules: feature_request: outputs: feature_discussion: path: "Docs/features/{feature_id}/discussions/feature.discussion.md" output_type: "feature_discussion_writer" implementation_gate: enabled: false # Disabled by default - enable when feature is ready for implementation path: "Docs/features/{feature_id}/discussions/implementation.discussion.md" output_type: "implementation_gate_writer" # To enable: set "enabled: true" in your project's .ai-rules.yml # This prevents unnecessary AI calls during initial feature discussion phase feature_discussion_update: outputs: self_append: path: "{path}" output_type: "feature_discussion_writer" implementation_discussion_update: outputs: self_append: path: "{path}" output_type: "impl_discussion_writer" discussion_summary: outputs: normalize: path: "{path}" output_type: "discussion_summary_normalizer" instruction: | If missing, create summary with standard markers. Only modify the content between the SUMMARY markers. feature_discussion_writer: instruction: | You maintain the feature discussion derived from the feature request. If the discussion file is missing: - Create it with this header (respect spacing/keys): --- type: feature-discussion stage: feature status: OPEN feature_id: created: promotion_rule: allow_agent_votes: false ready_min_eligible_votes: 2 reject_min_eligible_votes: 1 participation: instructions: | - Append your input at the end as: "YourName: your comment…" - Every comment must end with a vote line: "VOTE: READY|CHANGES|REJECT" - Agents/bots must prefix names with "AI_". Example: "AI_Claude: … VOTE: CHANGES" voting: values: [READY, CHANGES, REJECT] --- - Add sections: ## Summary – one short paragraph summarising the request ## Participation – reminder list of how to comment & vote - Append an initial comment signed `AI_Claude:` and end with a vote line. If the discussion exists: - Append a concise AI_Claude comment at the end proposing next actions/questions. - Always end your comment with exactly one vote line: `VOTE: READY`, `VOTE: CHANGES`, or `VOTE: REJECT`. Voting & promotion rules: - Read `promotion_rule` from the header. - Eligible voters: * allow_agent_votes=false → ignore names starting with "AI_" (case-insensitive) * allow_agent_votes=true → everyone counts - For each participant the most recent vote wins. A vote is a line matching `VOTE:\s*(READY|CHANGES|REJECT)`. - Count READY and REJECT votes among eligible voters. CHANGES is neutral (and blocks `ready_min_eligible_votes: "all"`). - Threshold interpretation: * Integer `N` → require at least `N` votes. * `"all"` → require a vote from every eligible voter (and none opposing for READY). * If there are no eligible voters the `"all"` condition never passes. - Promotion (`status: READY_FOR_IMPLEMENTATION`): * READY threshold satisfied AND REJECT threshold NOT satisfied. - Rejection (`status: FEATURE_REJECTED`): * REJECT threshold satisfied AND READY threshold NOT satisfied. - Otherwise keep `status: OPEN`. - When the status changes, update the header and state the outcome explicitly in your comment. Output requirements: - Emit a single unified diff touching only this discussion file. - Keep diffs minimal (append-only plus header adjustments). implementation_gate_writer: instruction: | Create or update the implementation discussion located at the path provided. Creation criteria: - Locate the sibling feature discussion (`feature.discussion.md`). - Read its YAML header. Only create/update this implementation file when that header shows `status: READY_FOR_IMPLEMENTATION`. - If the status is `OPEN` or `FEATURE_REJECTED`, produce **no diff**. When creating the implementation discussion: --- type: implementation-discussion stage: implementation status: OPEN feature_id: created: --- Sections to include: ## Scope – high-level intent ## Tasks – checklist of concrete steps (Markdown checkboxes) ## Acceptance Criteria – bullet list ## Risks / Notes – known concerns or follow-ups Subsequent updates: - Keep diffs minimal, amending sections in place. - Do not change status automatically; human votes or policies will manage it. Output a unified diff for this file only. If no changes are required, emit nothing. impl_discussion_writer: instruction: | Append planning updates to the implementation discussion in an incremental, checklist-driven style. - Work within the existing sections (Scope, Tasks, Acceptance Criteria, Risks / Notes). - Prefer adding or checking off checklist items rather than rewriting history. - Keep each comment short and concrete (one or two sentences plus list updates). - Do not close the discussion automatically; maintainers handle status transitions.