bmad-method 6.0.4 → 6.0.5-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.augment/code_review_guidelines.yaml +2 -42
- package/.claude/skills/bmad-os-findings-triage/SKILL.md +6 -0
- package/.claude/skills/bmad-os-findings-triage/prompts/agent-prompt.md +104 -0
- package/.claude/skills/bmad-os-findings-triage/prompts/instructions.md +286 -0
- package/.claude/skills/bmad-os-review-pr/SKILL.md +1 -1
- package/.claude/skills/bmad-os-review-pr/prompts/instructions.md +63 -6
- package/.claude/skills/bmad-os-review-prompt/SKILL.md +177 -0
- package/.github/workflows/publish.yaml +243 -0
- package/CONTRIBUTING.md +1 -1
- package/README_CN.md +121 -0
- package/docs/_STYLE_GUIDE.md +10 -10
- package/docs/explanation/brainstorming.md +1 -1
- package/docs/explanation/party-mode.md +1 -1
- package/docs/explanation/preventing-agent-conflicts.md +1 -1
- package/docs/explanation/project-context.md +15 -15
- package/docs/explanation/quick-flow.md +9 -9
- package/docs/how-to/established-projects.md +7 -7
- package/docs/how-to/get-answers-about-bmad.md +2 -2
- package/docs/how-to/install-bmad.md +16 -6
- package/docs/how-to/project-context.md +2 -2
- package/docs/how-to/quick-fixes.md +5 -5
- package/docs/how-to/shard-large-documents.md +1 -1
- package/docs/how-to/upgrade-to-v6.md +8 -5
- package/docs/index.md +1 -1
- package/docs/reference/agents.md +14 -14
- package/docs/reference/commands.md +64 -70
- package/docs/reference/testing.md +1 -1
- package/docs/reference/workflow-map.md +19 -19
- package/docs/tutorials/getting-started.md +34 -34
- package/docs/zh-cn/404.md +9 -0
- package/docs/zh-cn/_STYLE_GUIDE.md +370 -0
- package/docs/zh-cn/explanation/advanced-elicitation.md +62 -0
- package/docs/zh-cn/explanation/adversarial-review.md +71 -0
- package/docs/zh-cn/explanation/brainstorming.md +43 -0
- package/docs/zh-cn/explanation/established-projects-faq.md +60 -0
- package/docs/zh-cn/explanation/party-mode.md +79 -0
- package/docs/zh-cn/explanation/preventing-agent-conflicts.md +137 -0
- package/docs/zh-cn/explanation/project-context.md +176 -0
- package/docs/zh-cn/explanation/quick-flow.md +93 -0
- package/docs/zh-cn/explanation/why-solutioning-matters.md +90 -0
- package/docs/zh-cn/how-to/customize-bmad.md +182 -0
- package/docs/zh-cn/how-to/established-projects.md +134 -0
- package/docs/zh-cn/how-to/get-answers-about-bmad.md +144 -0
- package/docs/zh-cn/how-to/install-bmad.md +105 -0
- package/docs/zh-cn/how-to/non-interactive-installation.md +181 -0
- package/docs/zh-cn/how-to/project-context.md +152 -0
- package/docs/zh-cn/how-to/quick-fixes.md +140 -0
- package/docs/zh-cn/how-to/shard-large-documents.md +86 -0
- package/docs/zh-cn/how-to/upgrade-to-v6.md +120 -0
- package/docs/zh-cn/index.md +69 -0
- package/docs/zh-cn/reference/agents.md +41 -0
- package/docs/zh-cn/reference/commands.md +166 -0
- package/docs/zh-cn/reference/modules.md +94 -0
- package/docs/zh-cn/reference/testing.md +122 -0
- package/docs/zh-cn/reference/workflow-map.md +104 -0
- package/docs/zh-cn/roadmap.mdx +152 -0
- package/docs/zh-cn/tutorials/getting-started.md +300 -0
- package/package.json +1 -1
- package/src/bmm/agents/analyst.agent.yaml +1 -1
- package/src/bmm/agents/bmad-skill-manifest.yaml +39 -0
- package/src/bmm/agents/dev.agent.yaml +2 -2
- package/src/bmm/agents/pm.agent.yaml +1 -1
- package/src/bmm/agents/qa.agent.yaml +1 -1
- package/src/bmm/agents/quick-flow-solo-dev.agent.yaml +6 -2
- package/src/bmm/agents/sm.agent.yaml +4 -4
- package/src/bmm/agents/tech-writer/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/agents/tech-writer/tech-writer.agent.yaml +1 -1
- package/src/bmm/module-help.csv +11 -10
- package/src/bmm/workflows/1-analysis/create-product-brief/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/1-analysis/create-product-brief/steps/step-02-vision.md +1 -1
- package/src/bmm/workflows/1-analysis/create-product-brief/steps/step-03-users.md +1 -1
- package/src/bmm/workflows/1-analysis/create-product-brief/steps/step-04-metrics.md +1 -1
- package/src/bmm/workflows/1-analysis/create-product-brief/steps/step-05-scope.md +1 -1
- package/src/bmm/workflows/1-analysis/create-product-brief/steps/step-06-complete.md +1 -1
- package/src/bmm/workflows/1-analysis/research/bmad-skill-manifest.yaml +14 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/bmad-skill-manifest.yaml +14 -0
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-02-discovery.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-02b-vision.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-02c-executive-summary.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-03-success.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-04-journeys.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-05-domain.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-06-innovation.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-07-project-type.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-08-scoping.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-09-functional.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-10-nonfunctional.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-11-polish.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-c/step-12-complete.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-e/step-e-01-discovery.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-e/step-e-02-review.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-01-discovery.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-10-smart-validation.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-11-holistic-quality-validation.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-13-report-complete.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-02-discovery.md +1 -1
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-03-core-experience.md +2 -2
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-04-emotional-response.md +2 -2
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-05-inspiration.md +2 -2
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-06-design-system.md +2 -2
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-07-defining-experience.md +2 -2
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-08-visual-foundation.md +2 -2
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-09-design-directions.md +2 -2
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-10-user-journeys.md +2 -2
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-11-component-strategy.md +2 -2
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-12-ux-patterns.md +2 -2
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-13-responsive-accessibility.md +2 -2
- package/src/bmm/workflows/2-plan-workflows/create-ux-design/steps/step-14-complete.md +1 -1
- package/src/bmm/workflows/3-solutioning/check-implementation-readiness/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/3-solutioning/check-implementation-readiness/steps/step-06-final-assessment.md +1 -1
- package/src/bmm/workflows/3-solutioning/create-architecture/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-02-context.md +2 -2
- package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-03-starter.md +2 -2
- package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-04-decisions.md +2 -2
- package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-05-patterns.md +2 -2
- package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-06-structure.md +2 -2
- package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-07-validation.md +2 -2
- package/src/bmm/workflows/3-solutioning/create-architecture/steps/step-08-complete.md +1 -1
- package/src/bmm/workflows/3-solutioning/create-epics-and-stories/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-01-validate-prerequisites.md +1 -1
- package/src/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-02-design-epics.md +1 -1
- package/src/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-03-create-stories.md +1 -1
- package/src/bmm/workflows/3-solutioning/create-epics-and-stories/steps/step-04-final-validation.md +2 -2
- package/src/bmm/workflows/4-implementation/code-review/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/4-implementation/code-review/discover-inputs.md +88 -0
- package/src/bmm/workflows/4-implementation/code-review/workflow.md +271 -0
- package/src/bmm/workflows/4-implementation/correct-course/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/4-implementation/correct-course/checklist.md +1 -1
- package/src/bmm/workflows/4-implementation/correct-course/{instructions.md → workflow.md} +79 -12
- package/src/bmm/workflows/4-implementation/create-story/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/4-implementation/create-story/checklist.md +9 -10
- package/src/bmm/workflows/4-implementation/create-story/discover-inputs.md +88 -0
- package/src/bmm/workflows/4-implementation/create-story/workflow.md +388 -0
- package/src/bmm/workflows/4-implementation/dev-story/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/4-implementation/dev-story/{instructions.xml → workflow.md} +49 -2
- package/src/bmm/workflows/4-implementation/retrospective/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/4-implementation/retrospective/{instructions.md → workflow.md} +64 -23
- package/src/bmm/workflows/4-implementation/sprint-planning/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/4-implementation/sprint-planning/sprint-status-template.yaml +1 -0
- package/src/bmm/workflows/4-implementation/sprint-planning/{instructions.md → workflow.md} +55 -10
- package/src/bmm/workflows/4-implementation/sprint-status/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/4-implementation/sprint-status/{instructions.md → workflow.md} +45 -8
- package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/SKILL.md +6 -0
- package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/bmad-skill-manifest.yaml +1 -0
- package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-01-clarify-and-route.md +54 -0
- package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-02-plan.md +39 -0
- package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-03-implement.md +35 -0
- package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-04-review.md +55 -0
- package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-05-present.md +19 -0
- package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/tech-spec-template.md +90 -0
- package/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/workflow.md +84 -0
- package/src/bmm/workflows/bmad-quick-flow/quick-dev/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/bmad-quick-flow/quick-dev/steps/step-05-adversarial-review.md +8 -14
- package/src/bmm/workflows/bmad-quick-flow/quick-dev/workflow.md +1 -1
- package/src/bmm/workflows/bmad-quick-flow/quick-spec/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/bmad-quick-flow/quick-spec/steps/step-04-review.md +4 -6
- package/src/bmm/workflows/bmad-quick-flow/quick-spec/workflow.md +1 -1
- package/src/bmm/workflows/document-project/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/document-project/instructions.md +5 -7
- package/src/bmm/workflows/document-project/workflow.md +39 -0
- package/src/bmm/workflows/document-project/workflows/deep-dive-instructions.md +0 -1
- package/src/bmm/workflows/document-project/workflows/deep-dive-workflow.md +42 -0
- package/src/bmm/workflows/document-project/workflows/full-scan-instructions.md +0 -1
- package/src/bmm/workflows/document-project/workflows/full-scan-workflow.md +42 -0
- package/src/bmm/workflows/generate-project-context/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/generate-project-context/steps/step-02-generate.md +2 -2
- package/src/bmm/workflows/qa-generate-e2e-tests/bmad-skill-manifest.yaml +3 -0
- package/src/bmm/workflows/qa-generate-e2e-tests/checklist.md +1 -1
- package/src/bmm/workflows/qa-generate-e2e-tests/{instructions.md → workflow.md} +40 -7
- package/src/core/agents/bmad-master.agent.yaml +1 -1
- package/src/core/agents/bmad-skill-manifest.yaml +3 -0
- package/src/core/module-help.csv +3 -3
- package/src/core/module.yaml +1 -1
- package/src/core/tasks/bmad-help/SKILL.md +6 -0
- package/src/core/tasks/bmad-help/bmad-skill-manifest.yaml +1 -0
- package/src/core/tasks/{help.md → bmad-help/workflow.md} +6 -4
- package/src/core/tasks/bmad-review-adversarial-general/SKILL.md +6 -0
- package/src/core/tasks/bmad-review-adversarial-general/bmad-skill-manifest.yaml +1 -0
- package/src/core/tasks/bmad-review-adversarial-general/workflow.md +32 -0
- package/src/core/tasks/bmad-review-edge-case-hunter/SKILL.md +6 -0
- package/src/core/tasks/bmad-review-edge-case-hunter/bmad-skill-manifest.yaml +1 -0
- package/src/core/tasks/bmad-review-edge-case-hunter/workflow.md +62 -0
- package/src/core/tasks/bmad-skill-manifest.yaml +19 -0
- package/src/core/workflows/advanced-elicitation/bmad-skill-manifest.yaml +3 -0
- package/src/core/workflows/advanced-elicitation/workflow.md +138 -0
- package/src/core/workflows/brainstorming/bmad-skill-manifest.yaml +3 -0
- package/src/core/workflows/brainstorming/steps/step-03-technique-execution.md +1 -1
- package/src/core/workflows/brainstorming/workflow.md +1 -1
- package/src/core/workflows/party-mode/bmad-skill-manifest.yaml +3 -0
- package/src/utility/agent-components/activation-steps.txt +2 -2
- package/src/utility/agent-components/handler-multi.txt +1 -2
- package/test/adversarial-review-tests/README.md +3 -3
- package/test/adversarial-review-tests/test-cases.yaml +2 -2
- package/test/fixtures/agent-schema/valid/menu/multiple-menu-items.agent.yaml +1 -1
- package/test/fixtures/agent-schema/valid/menu-commands/all-command-types.agent.yaml +1 -1
- package/test/fixtures/agent-schema/valid/menu-commands/multiple-commands.agent.yaml +1 -2
- package/test/fixtures/file-refs-csv/valid/bmm-style.csv +1 -1
- package/test/test-file-refs-csv.js +1 -1
- package/test/test-install-to-bmad.js +154 -0
- package/test/test-installation-components.js +1586 -2
- package/test/test-workflow-path-regex.js +88 -0
- package/tools/cli/installers/lib/core/installer.js +34 -1
- package/tools/cli/installers/lib/core/manifest-generator.js +328 -35
- package/tools/cli/installers/lib/ide/_base-ide.js +24 -15
- package/tools/cli/installers/lib/ide/_config-driven.js +472 -53
- package/tools/cli/installers/lib/ide/manager.js +23 -61
- package/tools/cli/installers/lib/ide/platform-codes.yaml +108 -30
- package/tools/cli/installers/lib/ide/shared/agent-command-generator.js +1 -0
- package/tools/cli/installers/lib/ide/shared/bmad-artifacts.js +7 -0
- package/tools/cli/installers/lib/ide/shared/path-utils.js +68 -3
- package/tools/cli/installers/lib/ide/shared/skill-manifest.js +90 -0
- package/tools/cli/installers/lib/ide/shared/task-tool-command-generator.js +2 -0
- package/tools/cli/installers/lib/ide/shared/workflow-command-generator.js +6 -145
- package/tools/cli/installers/lib/modules/manager.js +9 -132
- package/tools/cli/lib/agent/compiler.js +1 -10
- package/tools/cli/lib/agent-analyzer.js +2 -14
- package/tools/cli/lib/yaml-xml-builder.js +1 -18
- package/tools/docs/native-skills-migration-checklist.md +281 -0
- package/tools/platform-codes.yaml +1 -1
- package/tools/schema/agent.js +1 -3
- package/tools/validate-file-refs.js +2 -0
- package/website/astro.config.mjs +24 -3
- package/website/src/content/config.ts +2 -1
- package/website/src/content/i18n/zh-CN.json +28 -0
- package/src/bmm/workflows/4-implementation/code-review/instructions.xml +0 -227
- package/src/bmm/workflows/4-implementation/code-review/workflow.yaml +0 -43
- package/src/bmm/workflows/4-implementation/correct-course/workflow.yaml +0 -53
- package/src/bmm/workflows/4-implementation/create-story/instructions.xml +0 -346
- package/src/bmm/workflows/4-implementation/create-story/workflow.yaml +0 -52
- package/src/bmm/workflows/4-implementation/dev-story/workflow.yaml +0 -20
- package/src/bmm/workflows/4-implementation/retrospective/workflow.yaml +0 -52
- package/src/bmm/workflows/4-implementation/sprint-planning/workflow.yaml +0 -47
- package/src/bmm/workflows/4-implementation/sprint-status/workflow.yaml +0 -25
- package/src/bmm/workflows/document-project/workflow.yaml +0 -22
- package/src/bmm/workflows/document-project/workflows/deep-dive.yaml +0 -31
- package/src/bmm/workflows/document-project/workflows/full-scan.yaml +0 -31
- package/src/bmm/workflows/qa-generate-e2e-tests/workflow.yaml +0 -42
- package/src/core/tasks/review-adversarial-general.xml +0 -49
- package/src/core/tasks/review-edge-case-hunter.xml +0 -63
- package/src/core/tasks/workflow.xml +0 -235
- package/src/core/workflows/advanced-elicitation/workflow.xml +0 -118
- package/src/utility/agent-components/handler-validate-workflow.txt +0 -7
- package/src/utility/agent-components/handler-workflow.txt +0 -10
- package/tools/cli/installers/lib/ide/codex.js +0 -440
- package/tools/cli/installers/lib/ide/github-copilot.js +0 -699
- package/tools/cli/installers/lib/ide/kilo.js +0 -269
- package/tools/cli/installers/lib/ide/rovodev.js +0 -257
- package/tools/cli/installers/lib/ide/templates/combined/default-workflow-yaml.md +0 -14
- package/tools/cli/installers/lib/ide/templates/combined/kiro-workflow-yaml.md +0 -15
- package/tools/cli/installers/lib/ide/templates/workflow-command-template.md +0 -13
- package/tools/cli/installers/lib/ide/templates/workflow-commander.md +0 -5
|
@@ -56,17 +56,13 @@ areas:
|
|
|
56
56
|
- "src/**/workflows/**"
|
|
57
57
|
rules:
|
|
58
58
|
- id: "workflow_entry_point_required"
|
|
59
|
-
description: "Every workflow folder must have workflow.
|
|
59
|
+
description: "Every workflow folder must have workflow.md as entry point"
|
|
60
60
|
severity: "high"
|
|
61
61
|
|
|
62
62
|
- id: "sharded_workflow_steps_folder"
|
|
63
63
|
description: "Sharded workflows (using workflow.md) must have steps/ folder with numbered files (step-01-*.md, step-02-*.md)"
|
|
64
64
|
severity: "high"
|
|
65
65
|
|
|
66
|
-
- id: "standard_workflow_instructions"
|
|
67
|
-
description: "Standard workflows using workflow.yaml must include instructions.md for execution guidance"
|
|
68
|
-
severity: "medium"
|
|
69
|
-
|
|
70
66
|
- id: "workflow_step_limit"
|
|
71
67
|
description: "Workflows should have 5-10 steps maximum to prevent context loss in LLM execution"
|
|
72
68
|
severity: "medium"
|
|
@@ -75,11 +71,9 @@ areas:
|
|
|
75
71
|
# WORKFLOW ENTRY FILE RULES
|
|
76
72
|
# ============================================
|
|
77
73
|
workflow_definitions:
|
|
78
|
-
description: "Workflow entry files (workflow.
|
|
74
|
+
description: "Workflow entry files (workflow.md)"
|
|
79
75
|
globs:
|
|
80
|
-
- "src/**/workflows/**/workflow.yaml"
|
|
81
76
|
- "src/**/workflows/**/workflow.md"
|
|
82
|
-
- "src/**/workflows/**/workflow.xml"
|
|
83
77
|
rules:
|
|
84
78
|
- id: "workflow_name_required"
|
|
85
79
|
description: "Workflow entry files must define 'name' field in frontmatter or root element"
|
|
@@ -89,10 +83,6 @@ areas:
|
|
|
89
83
|
description: "Workflow entry files must include 'description' explaining the workflow's purpose"
|
|
90
84
|
severity: "high"
|
|
91
85
|
|
|
92
|
-
- id: "workflow_config_source"
|
|
93
|
-
description: "Workflows should reference config_source for variable resolution (e.g., {project-root}/_bmad/module/config.yaml)"
|
|
94
|
-
severity: "medium"
|
|
95
|
-
|
|
96
86
|
- id: "workflow_installed_path"
|
|
97
87
|
description: "Workflows should define installed_path for relative file references within the workflow"
|
|
98
88
|
severity: "medium"
|
|
@@ -149,35 +139,6 @@ areas:
|
|
|
149
139
|
description: "Steps presenting user menus ([C] Continue, [a] Advanced, etc.) must HALT and wait for response"
|
|
150
140
|
severity: "high"
|
|
151
141
|
|
|
152
|
-
# ============================================
|
|
153
|
-
# XML WORKFLOW/TASK RULES
|
|
154
|
-
# ============================================
|
|
155
|
-
xml_workflows:
|
|
156
|
-
description: "XML-based workflows and tasks"
|
|
157
|
-
globs:
|
|
158
|
-
- "src/**/workflows/**/*.xml"
|
|
159
|
-
- "src/**/tasks/**/*.xml"
|
|
160
|
-
rules:
|
|
161
|
-
- id: "xml_task_id_required"
|
|
162
|
-
description: "XML tasks must have unique 'id' attribute on root task element"
|
|
163
|
-
severity: "high"
|
|
164
|
-
|
|
165
|
-
- id: "xml_llm_instructions"
|
|
166
|
-
description: "XML workflows should include <llm> section with critical execution instructions for the agent"
|
|
167
|
-
severity: "medium"
|
|
168
|
-
|
|
169
|
-
- id: "xml_step_numbering"
|
|
170
|
-
description: "XML steps should use n='X' attribute for sequential numbering"
|
|
171
|
-
severity: "medium"
|
|
172
|
-
|
|
173
|
-
- id: "xml_action_tags"
|
|
174
|
-
description: "Use <action> for required actions, <ask> for user input (must HALT), <goto> for jumps, <check if='...'> for conditionals"
|
|
175
|
-
severity: "medium"
|
|
176
|
-
|
|
177
|
-
- id: "xml_ask_must_halt"
|
|
178
|
-
description: "<ask> tags require agent to HALT and wait for user response before continuing"
|
|
179
|
-
severity: "high"
|
|
180
|
-
|
|
181
142
|
# ============================================
|
|
182
143
|
# WORKFLOW CONTENT QUALITY
|
|
183
144
|
# ============================================
|
|
@@ -185,7 +146,6 @@ areas:
|
|
|
185
146
|
description: "Content quality and consistency rules for all workflow files"
|
|
186
147
|
globs:
|
|
187
148
|
- "src/**/workflows/**/*.md"
|
|
188
|
-
- "src/**/workflows/**/*.yaml"
|
|
189
149
|
rules:
|
|
190
150
|
- id: "communication_language_variable"
|
|
191
151
|
description: "Workflows should use {communication_language} variable for agent output language consistency"
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bmad-os-findings-triage
|
|
3
|
+
description: Orchestrate HITL triage of review findings using parallel agents. Use when the user says 'triage these findings' or 'run findings triage' or has a batch of review findings to process.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Read `prompts/instructions.md` and execute.
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Finding Agent: {{TASK_ID}} — {{TASK_SUBJECT}}
|
|
2
|
+
|
|
3
|
+
You are a finding agent in the `{{TEAM_NAME}}` triage team. You own exactly one finding and will shepherd it through research, planning, human conversation, and a final decision.
|
|
4
|
+
|
|
5
|
+
## Your Assignment
|
|
6
|
+
|
|
7
|
+
- **Task:** `{{TASK_ID}}`
|
|
8
|
+
- **Finding:** `{{FINDING_ID}}` — {{FINDING_TITLE}}
|
|
9
|
+
- **Severity:** {{SEVERITY}}
|
|
10
|
+
- **Team:** `{{TEAM_NAME}}`
|
|
11
|
+
- **Team Lead:** `{{TEAM_LEAD_NAME}}`
|
|
12
|
+
|
|
13
|
+
## Phase 1 — Research (autonomous)
|
|
14
|
+
|
|
15
|
+
1. Read your task details with `TaskGet("{{TASK_ID}}")`.
|
|
16
|
+
2. Read the relevant source files to understand the finding in context:
|
|
17
|
+
{{FILE_LIST}}
|
|
18
|
+
If no specific files are listed above, use codebase search to locate code relevant to the finding.
|
|
19
|
+
|
|
20
|
+
If a context document was provided:
|
|
21
|
+
- Also read this context document for background: {{CONTEXT_DOC}}
|
|
22
|
+
|
|
23
|
+
If an initial triage was provided:
|
|
24
|
+
- **Note:** The team lead triaged this as **{{INITIAL_TRIAGE}}** — {{TRIAGE_RATIONALE}}. Evaluate whether this triage is correct and incorporate your assessment into your plan.
|
|
25
|
+
|
|
26
|
+
**Rules for research:**
|
|
27
|
+
- Work autonomously. Do not ask the team lead or the human for help during research.
|
|
28
|
+
- Use `Read`, `Grep`, `Glob`, and codebase search tools to understand the codebase.
|
|
29
|
+
- Trace call chains, check tests, read related code — be thorough.
|
|
30
|
+
- Form your own opinion on whether this finding is real, a false positive, or somewhere in between.
|
|
31
|
+
|
|
32
|
+
## Phase 2 — Plan (display only)
|
|
33
|
+
|
|
34
|
+
Prepare a plan for dealing with this finding. The plan MUST cover:
|
|
35
|
+
|
|
36
|
+
1. **Assessment** — Is this finding real? What is the actual risk or impact?
|
|
37
|
+
2. **Recommendation** — One of: fix it, accept the risk (wontfix), dismiss as not a real issue, or reject as a false positive.
|
|
38
|
+
3. **If recommending a fix:** Describe the specific changes — which files, what modifications, why this approach.
|
|
39
|
+
4. **If recommending against fixing:** Explain the reasoning — existing mitigations, acceptable risk, false positive rationale.
|
|
40
|
+
|
|
41
|
+
**Display the plan in your output.** Write it clearly so the human can read it directly. Follow the plan with a 2-5 line summary of the finding itself.
|
|
42
|
+
|
|
43
|
+
**CRITICAL: Do NOT send your plan or analysis to the team lead.** The team lead does not need your plan — the human reads it from your output stream. Sending full plans to the team lead wastes its context window.
|
|
44
|
+
|
|
45
|
+
## Phase 3 — Signal Ready
|
|
46
|
+
|
|
47
|
+
After displaying your plan, send exactly this to the team lead:
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
SendMessage({
|
|
51
|
+
type: "message",
|
|
52
|
+
recipient: "{{TEAM_LEAD_NAME}}",
|
|
53
|
+
content: "{{FINDING_ID}} ready for HITL",
|
|
54
|
+
summary: "{{FINDING_ID}} ready for review"
|
|
55
|
+
})
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Then **stop and wait**. Do not proceed until the human engages with you.
|
|
59
|
+
|
|
60
|
+
## Phase 4 — HITL Conversation
|
|
61
|
+
|
|
62
|
+
The human will review your plan and talk to you directly. This is a real conversation, not a rubber stamp:
|
|
63
|
+
|
|
64
|
+
- The human may agree immediately, push back, ask questions, or propose alternatives.
|
|
65
|
+
- Answer questions thoroughly. Refer back to specific code you read.
|
|
66
|
+
- If the human wants a fix, **apply it** — edit the source files, verify the change makes sense.
|
|
67
|
+
- If the human disagrees with your assessment, update your recommendation.
|
|
68
|
+
- Stay focused on THIS finding only. Do not discuss other findings.
|
|
69
|
+
- **Do not send a decision until the human explicitly states a verdict.** Acknowledging your plan is NOT a decision. Wait for clear direction like "fix it", "dismiss", "reject", "skip", etc.
|
|
70
|
+
|
|
71
|
+
## Phase 5 — Report Decision
|
|
72
|
+
|
|
73
|
+
When the human reaches a decision, send exactly ONE message to the team lead:
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
SendMessage({
|
|
77
|
+
type: "message",
|
|
78
|
+
recipient: "{{TEAM_LEAD_NAME}}",
|
|
79
|
+
content: "DECISION {{FINDING_ID}} {{TASK_ID}} [CATEGORY] | [one-sentence summary]",
|
|
80
|
+
summary: "{{FINDING_ID}} [CATEGORY]"
|
|
81
|
+
})
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Where `[CATEGORY]` is one of:
|
|
85
|
+
|
|
86
|
+
| Category | Meaning |
|
|
87
|
+
|----------|---------|
|
|
88
|
+
| **SKIP** | Human chose to skip without full review. |
|
|
89
|
+
| **DEFER** | Human chose to defer to a later session. |
|
|
90
|
+
| **FIX** | Change applied. List the file paths changed and what each change was (use a parseable format: `files: path1, path2`). |
|
|
91
|
+
| **WONTFIX** | Real finding, not worth fixing now. State why. |
|
|
92
|
+
| **DISMISS** | Not a real finding or mitigated by existing design. State the mitigation. |
|
|
93
|
+
| **REJECT** | False positive from the reviewer. State why it is wrong. |
|
|
94
|
+
|
|
95
|
+
After sending the decision, **go idle and wait for shutdown**. Do not take any further action. The team lead will send you a shutdown request — approve it.
|
|
96
|
+
|
|
97
|
+
## Rules
|
|
98
|
+
|
|
99
|
+
- You own ONE finding. Do not touch files unrelated to your finding unless required for the fix.
|
|
100
|
+
- Your plan is for the human's eyes — display it in your output, never send it to the team lead.
|
|
101
|
+
- Your only messages to the team lead are: (1) ready for HITL, (2) final decision. Nothing else.
|
|
102
|
+
- If you cannot form a confident plan (ambiguous finding, missing context), still signal ready for HITL and explain what you are unsure about. The HITL conversation will resolve it.
|
|
103
|
+
- If the human tells you to skip or defer, report the decision as `SKIP` or `DEFER` per the category table above.
|
|
104
|
+
- When you receive a shutdown request, approve it immediately.
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
# Findings Triage — Team Lead Orchestration
|
|
2
|
+
|
|
3
|
+
You are the team lead for a findings triage session. Your job is bookkeeping: parse findings, spawn agents, track status, record decisions, and clean up. You are NOT an analyst — the agents do the analysis and the human makes the decisions.
|
|
4
|
+
|
|
5
|
+
**Be minimal.** Short confirmations. No editorializing. No repeating what agents already said.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Phase 1 — Setup
|
|
10
|
+
|
|
11
|
+
### 1.1 Determine Input Source
|
|
12
|
+
|
|
13
|
+
The human will provide findings in one of three ways:
|
|
14
|
+
|
|
15
|
+
1. **A findings report file** — a markdown file with structured findings. Read the file.
|
|
16
|
+
2. **A pre-populated task list** — tasks already exist. Call `TaskList` to discover them.
|
|
17
|
+
- If tasks are pre-populated: skip section 1.2 (parsing) and section 1.4 (task creation). Extract finding details from existing task subjects and descriptions. Number findings based on task order. Proceed from section 1.3 (pre-spawn checks).
|
|
18
|
+
3. **Inline findings** — pasted directly in conversation. Parse them.
|
|
19
|
+
|
|
20
|
+
Also accept optional parameters:
|
|
21
|
+
- **Working directory / worktree path** — where source files live (default: current working directory).
|
|
22
|
+
- **Initial triage** per finding — upstream assessment (real / noise / undecided) with rationale.
|
|
23
|
+
- **Context document** — a design doc, plan, or other background file path to pass to agents.
|
|
24
|
+
|
|
25
|
+
### 1.2 Parse Findings
|
|
26
|
+
|
|
27
|
+
Extract from each finding:
|
|
28
|
+
- **Title / description**
|
|
29
|
+
- **Severity** (Critical / High / Medium / Low)
|
|
30
|
+
- **Relevant file paths**
|
|
31
|
+
- **Initial triage** (if provided)
|
|
32
|
+
|
|
33
|
+
Number findings sequentially: F1, F2, ... Fn. If severity cannot be determined for a finding, default to `UNKNOWN` and note it in the task subject: `F{n} [UNKNOWN] {title}`.
|
|
34
|
+
|
|
35
|
+
**If no findings are extracted** (empty file, blank input), inform the human and halt. Do not proceed to task creation or team setup.
|
|
36
|
+
|
|
37
|
+
**If the input is unstructured or ambiguous:** Parse best-effort and display the parsed list to the human. Ask for confirmation before proceeding. Do NOT spawn agents until confirmed.
|
|
38
|
+
|
|
39
|
+
### 1.3 Pre-Spawn Checks
|
|
40
|
+
|
|
41
|
+
**Large batch (>25 findings):**
|
|
42
|
+
HALT. Tell the human:
|
|
43
|
+
> "There are {N} findings. Spawning {N} agents at once may overwhelm the system. I recommend processing in waves of ~20. Proceed with all at once, or batch into waves?"
|
|
44
|
+
|
|
45
|
+
Wait for the human to decide. If batching, record wave assignments (Wave 1: F1-F20, Wave 2: F21-Fn).
|
|
46
|
+
|
|
47
|
+
**Same-file conflicts:**
|
|
48
|
+
Scan all findings for overlapping file paths. If two or more findings reference the same file, warn — enumerating ALL findings that share each file:
|
|
49
|
+
> "Findings {Fa}, {Fb}, {Fc}, ... all reference `{file}`. Concurrent edits may conflict. Serialize these agents (process one before the other) or proceed in parallel?"
|
|
50
|
+
|
|
51
|
+
Wait for the human to decide. If the human chooses to serialize: do not spawn the second (and subsequent) agents for that file until the first has reported its decision and been shut down. Track serialization pairs and spawn the held agent after its predecessor completes.
|
|
52
|
+
|
|
53
|
+
### 1.4 Create Tasks
|
|
54
|
+
|
|
55
|
+
For each finding, create a task:
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
TaskCreate({
|
|
59
|
+
subject: "F{n} [{SEVERITY}] {title}",
|
|
60
|
+
description: "{full finding details}\n\nFiles: {file paths}\n\nInitial triage: {triage or 'none'}",
|
|
61
|
+
activeForm: "Analyzing F{n}"
|
|
62
|
+
})
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Record the mapping: finding number -> task ID.
|
|
66
|
+
|
|
67
|
+
### 1.5 Create Team
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
TeamCreate({
|
|
71
|
+
team_name: "{review-type}-triage",
|
|
72
|
+
description: "HITL triage of {N} findings from {source}"
|
|
73
|
+
})
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Use a contextual name based on the review type (e.g., `pr-review-triage`, `prompt-audit-triage`, `code-review-triage`). If unsure, use `findings-triage`.
|
|
77
|
+
|
|
78
|
+
After creating the team, note your own registered team name for the agent prompt template. Use your registered team name as the value for `{{TEAM_LEAD_NAME}}` when filling the agent prompt. If unsure of your name, read the team config at `~/.claude/teams/{team-name}/config.json` to find your own entry in the members list.
|
|
79
|
+
|
|
80
|
+
### 1.6 Spawn Agents
|
|
81
|
+
|
|
82
|
+
Read the agent prompt template from `prompts/agent-prompt.md`.
|
|
83
|
+
|
|
84
|
+
For each finding, spawn one agent using the Agent tool with these parameters:
|
|
85
|
+
- `name`: `f{n}-agent`
|
|
86
|
+
- `team_name`: the team name from 1.5
|
|
87
|
+
- `subagent_type`: `general-purpose`
|
|
88
|
+
- `model`: `opus` (explicitly set — reasoning-heavy analysis requires a frontier model)
|
|
89
|
+
- `prompt`: the agent template with all placeholders filled in:
|
|
90
|
+
- `{{TEAM_NAME}}` — the team name
|
|
91
|
+
- `{{TEAM_LEAD_NAME}}` — your registered name in the team (from 1.5)
|
|
92
|
+
- `{{TASK_ID}}` — the task ID from 1.4
|
|
93
|
+
- `{{TASK_SUBJECT}}` — the task subject
|
|
94
|
+
- `{{FINDING_ID}}` — `F{n}`
|
|
95
|
+
- `{{FINDING_TITLE}}` — the finding title
|
|
96
|
+
- `{{SEVERITY}}` — the severity level
|
|
97
|
+
- `{{FILE_LIST}}` — bulleted list of file paths (each prefixed with `- `)
|
|
98
|
+
- `{{CONTEXT_DOC}}` — path to context document, or remove the block if none
|
|
99
|
+
- `{{INITIAL_TRIAGE}}` — triage assessment, or remove the block if none
|
|
100
|
+
- `{{TRIAGE_RATIONALE}}` — rationale for the triage, or remove the block if none
|
|
101
|
+
|
|
102
|
+
Spawn ALL agents for the current wave in a single message (parallel). If batching, spawn only the current wave.
|
|
103
|
+
|
|
104
|
+
After spawning, print:
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
All {N} agents spawned. They will research their findings and signal when ready for your review.
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Initialize the scorecard (internal state):
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
Scorecard:
|
|
114
|
+
- Total: {N}
|
|
115
|
+
- Pending: {N}
|
|
116
|
+
- Ready for review: 0
|
|
117
|
+
- Completed: 0
|
|
118
|
+
- Decisions: FIX=0 WONTFIX=0 DISMISS=0 REJECT=0 SKIP=0 DEFER=0
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Phase 2 — HITL Review Loop
|
|
124
|
+
|
|
125
|
+
### 2.1 Track Agent Readiness
|
|
126
|
+
|
|
127
|
+
Agents will send messages matching: `F{n} ready for HITL`
|
|
128
|
+
|
|
129
|
+
When received:
|
|
130
|
+
- Note which finding is ready.
|
|
131
|
+
- Update the internal status tracker.
|
|
132
|
+
- Print a short status line: `F{n} ready. ({ready_count}/{total} ready, {completed}/{total} done)`
|
|
133
|
+
|
|
134
|
+
Do NOT print agent plans, analysis, or recommendations. The human reads those directly from the agent output.
|
|
135
|
+
|
|
136
|
+
### 2.2 Status Dashboard
|
|
137
|
+
|
|
138
|
+
When the human asks for status (or periodically when useful), print:
|
|
139
|
+
|
|
140
|
+
```
|
|
141
|
+
=== Triage Status ===
|
|
142
|
+
Ready for review: F3, F7, F11
|
|
143
|
+
Still analyzing: F1, F5, F9
|
|
144
|
+
Completed: F2 (FIX), F4 (DISMISS), F6 (REJECT)
|
|
145
|
+
{completed}/{total} done
|
|
146
|
+
===
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Keep it compact. No decoration beyond what is needed.
|
|
150
|
+
|
|
151
|
+
### 2.3 Process Decisions
|
|
152
|
+
|
|
153
|
+
Agents will send messages matching: `DECISION F{n} {task_id} [CATEGORY] | [summary]`
|
|
154
|
+
|
|
155
|
+
When received:
|
|
156
|
+
1. **Update the task** — first call `TaskGet("{task_id}")` to read the current task description, then prepend the decision:
|
|
157
|
+
```
|
|
158
|
+
TaskUpdate({
|
|
159
|
+
taskId: "{task_id}",
|
|
160
|
+
status: "completed",
|
|
161
|
+
description: "DECISION: {CATEGORY} | {summary}\n\n{existing description}"
|
|
162
|
+
})
|
|
163
|
+
```
|
|
164
|
+
2. **Update the scorecard** — increment the decision category counter. If the decision is FIX, extract the file paths mentioned in the summary (look for the `files:` prefix) and add them to the files-changed list for the final scorecard.
|
|
165
|
+
3. **Shut down the agent:**
|
|
166
|
+
```
|
|
167
|
+
SendMessage({
|
|
168
|
+
type: "shutdown_request",
|
|
169
|
+
recipient: "f{n}-agent",
|
|
170
|
+
content: "Decision recorded. Shutting down."
|
|
171
|
+
})
|
|
172
|
+
```
|
|
173
|
+
4. **Print confirmation:** `F{n} closed: {CATEGORY}. {remaining} remaining.`
|
|
174
|
+
|
|
175
|
+
### 2.4 Human-Initiated Skip/Defer
|
|
176
|
+
|
|
177
|
+
If the human wants to skip or defer a finding without full engagement:
|
|
178
|
+
|
|
179
|
+
1. Send the decision to the agent, replacing `{CATEGORY}` with the human's chosen category (`SKIP` or `DEFER`):
|
|
180
|
+
```
|
|
181
|
+
SendMessage({
|
|
182
|
+
type: "message",
|
|
183
|
+
recipient: "f{n}-agent",
|
|
184
|
+
content: "Human decision: {CATEGORY} this finding. Report {CATEGORY} as your decision and go idle.",
|
|
185
|
+
summary: "F{n} {CATEGORY} directive"
|
|
186
|
+
})
|
|
187
|
+
```
|
|
188
|
+
2. Wait for the agent to report the decision back (it will send `DECISION F{n} ... {CATEGORY}`).
|
|
189
|
+
3. Process as a normal decision (2.3).
|
|
190
|
+
|
|
191
|
+
If the agent has not yet signaled ready, the message will queue and be processed when it finishes research.
|
|
192
|
+
|
|
193
|
+
If the human requests skip/defer for a finding where an HITL conversation is already underway, send the directive to the agent. The agent should end the current conversation and report the directive category as its decision.
|
|
194
|
+
|
|
195
|
+
### 2.5 Wave Batching (if >25 findings)
|
|
196
|
+
|
|
197
|
+
When the current wave is complete (all findings resolved):
|
|
198
|
+
1. Print wave summary.
|
|
199
|
+
2. Ask: `"Wave {W} complete. Spawn wave {W+1} ({count} findings)? (y/n)"`
|
|
200
|
+
3. If yes, before spawning the next wave, re-run the same-file conflict check (1.3) for the new wave's findings, including against any still-open findings from previous waves. Then repeat Phase 1.4 (task creation) and 1.6 (agent spawning) only. Do NOT call TeamCreate again — the team already exists.
|
|
201
|
+
4. If the human declines, treat unspawned findings as not processed. Proceed to Phase 3 wrap-up. Note the count of unprocessed findings in the final scorecard.
|
|
202
|
+
5. Carry the scorecard forward across waves.
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Phase 3 — Wrap-up
|
|
207
|
+
|
|
208
|
+
When all findings across all waves are resolved:
|
|
209
|
+
|
|
210
|
+
### 3.1 Final Scorecard
|
|
211
|
+
|
|
212
|
+
```
|
|
213
|
+
=== Final Triage Scorecard ===
|
|
214
|
+
|
|
215
|
+
Total findings: {N}
|
|
216
|
+
|
|
217
|
+
FIX: {count}
|
|
218
|
+
WONTFIX: {count}
|
|
219
|
+
DISMISS: {count}
|
|
220
|
+
REJECT: {count}
|
|
221
|
+
SKIP: {count}
|
|
222
|
+
DEFER: {count}
|
|
223
|
+
|
|
224
|
+
Files changed:
|
|
225
|
+
- {file1}
|
|
226
|
+
- {file2}
|
|
227
|
+
...
|
|
228
|
+
|
|
229
|
+
Findings:
|
|
230
|
+
F1 [{SEVERITY}] {title} — {DECISION}
|
|
231
|
+
F2 [{SEVERITY}] {title} — {DECISION}
|
|
232
|
+
...
|
|
233
|
+
|
|
234
|
+
=== End Triage ===
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
### 3.2 Shutdown Remaining Agents
|
|
238
|
+
|
|
239
|
+
Send shutdown requests to any agents still alive (there should be none if all decisions were processed, but handle stragglers):
|
|
240
|
+
|
|
241
|
+
```
|
|
242
|
+
SendMessage({
|
|
243
|
+
type: "shutdown_request",
|
|
244
|
+
recipient: "f{n}-agent",
|
|
245
|
+
content: "Triage complete. Shutting down."
|
|
246
|
+
})
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
### 3.3 Offer to Save
|
|
250
|
+
|
|
251
|
+
Ask the human:
|
|
252
|
+
> "Save the scorecard to a file? (y/n)"
|
|
253
|
+
|
|
254
|
+
If yes, write the scorecard to `_bmad-output/triage-reports/triage-{YYYY-MM-DD}-{team-name}.md`.
|
|
255
|
+
|
|
256
|
+
### 3.4 Delete Team
|
|
257
|
+
|
|
258
|
+
```
|
|
259
|
+
TeamDelete()
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
## Edge Cases Reference
|
|
265
|
+
|
|
266
|
+
| Situation | Response |
|
|
267
|
+
|-----------|----------|
|
|
268
|
+
| >25 findings | HALT, suggest wave batching, wait for human decision |
|
|
269
|
+
| Same-file conflict | Warn, suggest serializing, wait for human decision |
|
|
270
|
+
| Unstructured input | Parse best-effort, display list, confirm before spawning |
|
|
271
|
+
| Agent signals uncertainty | Normal — the HITL conversation resolves it |
|
|
272
|
+
| Human skips/defers | Send directive to agent, process decision when reported |
|
|
273
|
+
| Agent goes idle unexpectedly | Send a message to check status; agents stay alive until explicit shutdown |
|
|
274
|
+
| Human asks to re-open a completed finding | Not supported in this session; suggest re-running triage on that finding |
|
|
275
|
+
| All agents spawned but none ready yet | Tell the human agents are still analyzing; no action needed |
|
|
276
|
+
|
|
277
|
+
---
|
|
278
|
+
|
|
279
|
+
## Behavioral Rules
|
|
280
|
+
|
|
281
|
+
1. **Be minimal.** Short confirmations, compact dashboards. Do not repeat agent analysis.
|
|
282
|
+
2. **Never auto-close.** Every finding requires a human decision. No exceptions.
|
|
283
|
+
3. **One agent per finding.** Never batch multiple findings into one agent.
|
|
284
|
+
4. **Protect your context window.** Agents display plans in their output, not in messages to you. If an agent sends you a long message, acknowledge it briefly and move on.
|
|
285
|
+
5. **Track everything.** Finding number, task ID, agent name, decision, files changed. You are the single source of truth for the session.
|
|
286
|
+
6. **Respect the human's pace.** They review in whatever order they want. Do not rush them. Do not suggest which finding to review next unless asked.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: bmad-os-review-pr
|
|
3
|
-
description:
|
|
3
|
+
description: Dual-layer PR review tool (Raven's Verdict). Runs adversarial cynical review and edge case hunter in parallel, merges and deduplicates findings into professional engineering output. Use when user asks to 'review a PR' and provides a PR url or id.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
Read `prompts/instructions.md` and execute.
|
|
@@ -93,13 +93,17 @@ gh pr diff {PR_NUMBER} [--repo {REPO}] --name-only | grep -E '\.(png|jpg|jpeg|gi
|
|
|
93
93
|
|
|
94
94
|
Store list of binary files to skip. Note them in final output.
|
|
95
95
|
|
|
96
|
-
##
|
|
96
|
+
## Review Layers
|
|
97
97
|
|
|
98
|
-
|
|
98
|
+
**Launch steps 1.1 and 1.2 as parallel subagents.** Both receive the same PR diff and run concurrently. Wait for both to complete before proceeding to step 1.3.
|
|
99
|
+
|
|
100
|
+
### 1.1 Run Cynical Review (subagent)
|
|
101
|
+
|
|
102
|
+
Spawn a subagent with the following prompt. Pass the full PR diff as context.
|
|
99
103
|
|
|
100
104
|
**INTERNAL PERSONA - Never post this directly:**
|
|
101
105
|
|
|
102
|
-
Task: You are a cynical, jaded code reviewer with zero patience for sloppy work. This PR was submitted by a clueless weasel and you expect to find problems. Find at least five issues to fix or improve in it. Number them. Be skeptical of everything.
|
|
106
|
+
Task: You are a cynical, jaded code reviewer with zero patience for sloppy work. This PR was submitted by a clueless weasel and you expect to find problems. Find at least five issues to fix or improve in it. Number them. Be skeptical of everything.
|
|
103
107
|
|
|
104
108
|
Output format:
|
|
105
109
|
|
|
@@ -124,14 +128,64 @@ Likely tag:
|
|
|
124
128
|
- Add `[likely]` to findings with high confidence, e.g. with direct evidence
|
|
125
129
|
- Sort findings by severity (Critical → Moderate → Minor), not by confidence
|
|
126
130
|
|
|
131
|
+
### 1.2 Run Edge Case Hunter (subagent)
|
|
132
|
+
|
|
133
|
+
Spawn a subagent that invokes the `bmad-review-edge-case-hunter` skill. Pass the full PR diff as the `content` input. Omit `also_consider` unless the user specified extra focus areas.
|
|
134
|
+
|
|
135
|
+
The skill returns a JSON array of objects, each with: `location`, `trigger_condition`, `guard_snippet`, `potential_consequence`.
|
|
136
|
+
|
|
137
|
+
**Map each JSON finding to the standard finding format:**
|
|
138
|
+
|
|
139
|
+
````markdown
|
|
140
|
+
### [NUMBER]. [trigger_condition] [likely]
|
|
141
|
+
|
|
142
|
+
**Severity:** [INFERRED_EMOJI] [INFERRED_LEVEL]
|
|
143
|
+
|
|
144
|
+
**`[location]`** — [trigger_condition]. [potential_consequence].
|
|
145
|
+
|
|
146
|
+
**Suggested fix:**
|
|
147
|
+
```
|
|
148
|
+
[guard_snippet]
|
|
149
|
+
```
|
|
150
|
+
````
|
|
151
|
+
|
|
152
|
+
Severity inference rules for edge case findings:
|
|
153
|
+
|
|
154
|
+
- **Critical** — data loss, security, or crash conditions (null deref, unhandled throw, auth bypass)
|
|
155
|
+
- **Moderate** — logic errors, silent wrong results, race conditions
|
|
156
|
+
- **Minor** — cosmetic edge cases, unlikely boundary conditions
|
|
157
|
+
|
|
158
|
+
Add `[likely]` to all edge case findings — they are derived from mechanical path tracing, so confidence is inherently high.
|
|
159
|
+
|
|
160
|
+
If the edge case hunter returns zero findings or halts, note it internally and proceed — step 1.1 findings still stand.
|
|
161
|
+
|
|
162
|
+
### 1.3 Merge and Deduplicate
|
|
163
|
+
|
|
164
|
+
Combine the findings from step 1.1 (adversarial) and step 1.2 (edge case hunter) into a single list.
|
|
165
|
+
|
|
166
|
+
**Deduplication rules:**
|
|
167
|
+
|
|
168
|
+
1. Compare each edge case finding against each adversarial finding
|
|
169
|
+
2. Two findings are duplicates if they reference the same file location AND describe the same gap (use description similarity — same function/variable/condition mentioned)
|
|
170
|
+
3. When a duplicate is found, keep the version with more specificity (usually the edge case hunter's, since it includes `guard_snippet`)
|
|
171
|
+
4. Mark the kept finding with the source that produced it
|
|
172
|
+
|
|
173
|
+
**After dedup, renumber all findings sequentially and sort by severity (Critical → Moderate → Minor).**
|
|
174
|
+
|
|
175
|
+
Tag each finding with its source:
|
|
176
|
+
|
|
177
|
+
- `[Adversarial]` — from step 1.1 only
|
|
178
|
+
- `[Edge Case]` — from step 1.2 only
|
|
179
|
+
- `[Both]` — flagged by both layers (deduped)
|
|
180
|
+
|
|
127
181
|
## Tone Transformation
|
|
128
182
|
|
|
129
|
-
**Transform the
|
|
183
|
+
**Transform the merged findings into cold engineering professionalism.**
|
|
130
184
|
|
|
131
185
|
**Transformation rules:**
|
|
132
186
|
|
|
133
187
|
1. Remove all inflammatory language, insults, assumptions about the author
|
|
134
|
-
2. Keep all technical substance, file references, severity ratings and
|
|
188
|
+
2. Keep all technical substance, file references, severity ratings, likely tag, and **source tags**
|
|
135
189
|
3. Replace accusatory phrasing with neutral observations:
|
|
136
190
|
- ❌ "The author clearly didn't think about..."
|
|
137
191
|
- ✅ "This implementation may not account for..."
|
|
@@ -140,6 +194,7 @@ Likely tag:
|
|
|
140
194
|
- ✅ "This pattern has historically caused issues in production environments"
|
|
141
195
|
5. Add the suggested fixes.
|
|
142
196
|
6. Keep suggestions actionable and specific
|
|
197
|
+
7. Edge case hunter findings need no persona cleanup, but still apply professional formatting consistently
|
|
143
198
|
|
|
144
199
|
Output format after transformation:
|
|
145
200
|
|
|
@@ -149,18 +204,20 @@ Output format after transformation:
|
|
|
149
204
|
**Title:** {PR_TITLE}
|
|
150
205
|
**Author:** @{AUTHOR}
|
|
151
206
|
**Branch:** {HEAD} → {BASE}
|
|
207
|
+
**Review layers:** Adversarial + Edge Case Hunter
|
|
152
208
|
|
|
153
209
|
---
|
|
154
210
|
|
|
155
211
|
### Findings
|
|
156
212
|
|
|
157
|
-
[TRANSFORMED FINDINGS HERE]
|
|
213
|
+
[TRANSFORMED FINDINGS HERE — each tagged with source]
|
|
158
214
|
|
|
159
215
|
---
|
|
160
216
|
|
|
161
217
|
### Summary
|
|
162
218
|
|
|
163
219
|
**Critical:** {COUNT} | **Moderate:** {COUNT} | **Minor:** {COUNT}
|
|
220
|
+
**Sources:** {ADVERSARIAL_COUNT} adversarial | {EDGE_CASE_COUNT} edge case | {BOTH_COUNT} both
|
|
164
221
|
|
|
165
222
|
[BINARY_FILES_NOTE if any]
|
|
166
223
|
|