bmad-plus 0.12.2 → 0.14.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/CHANGELOG.md +47 -0
- package/README.md +96 -461
- package/package.json +12 -5
- package/readme-international/README.de.md +42 -9
- package/readme-international/README.es.md +43 -10
- package/readme-international/README.fr.md +42 -9
- package/src/bmad-plus/agents/agent-orchestrator/SKILL.md +5 -3
- package/src/bmad-plus/module.yaml +270 -220
- package/src/bmad-plus/packs/pack-dev-studio/README.md +133 -141
- package/src/bmad-plus/packs/pack-dev-studio/SKILL.md +49 -0
- package/src/bmad-plus/packs/pack-dev-studio/categories/analysis/analyst-agent.md +35 -60
- package/src/bmad-plus/packs/pack-dev-studio/categories/analysis/document-project.md +59 -59
- package/src/bmad-plus/packs/pack-dev-studio/categories/analysis/domain-research.md +55 -93
- package/src/bmad-plus/packs/pack-dev-studio/categories/analysis/market-research.md +58 -93
- package/src/bmad-plus/packs/pack-dev-studio/categories/analysis/prfaq.md +55 -132
- package/src/bmad-plus/packs/pack-dev-studio/categories/analysis/product-brief.md +63 -78
- package/src/bmad-plus/packs/pack-dev-studio/categories/analysis/tech-writer-agent.md +54 -69
- package/src/bmad-plus/packs/pack-dev-studio/categories/analysis/technical-research.md +54 -93
- package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/architect-agent.md +32 -60
- package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/create-architecture.md +67 -71
- package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/create-epics-stories.md +61 -90
- package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/generate-project-context.md +56 -78
- package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/implementation-readiness.md +55 -88
- package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/steps/step-01-init.md +20 -153
- package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/steps/step-01b-continue.md +20 -173
- package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/steps/step-02-context.md +14 -220
- package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/steps/step-03-starter.md +20 -329
- package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/steps/step-04-decisions.md +15 -314
- package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/steps/step-05-patterns.md +15 -355
- package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/steps/step-06-structure.md +15 -375
- package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/steps/step-07-validation.md +14 -357
- package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/steps/step-08-complete.md +13 -78
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/checkpoint-preview.md +52 -65
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/code-review-steps/step-01-gather-context.md +14 -81
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/code-review-steps/step-02-review.md +14 -31
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/code-review-steps/step-03-triage.md +14 -45
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/code-review-steps/step-04-present.md +13 -128
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/code-review.md +61 -87
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/correct-course.md +55 -298
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/create-story.md +52 -426
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/dev-agent.md +48 -69
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/dev-story-checklist.md +22 -80
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/dev-story.md +60 -482
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/investigate.md +50 -184
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/qa-e2e-tests.md +57 -173
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/quick-dev.md +56 -108
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/retrospective.md +54 -1509
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/sprint-planning.md +54 -296
- package/src/bmad-plus/packs/pack-dev-studio/categories/implementation/sprint-status.md +41 -283
- package/src/bmad-plus/packs/pack-dev-studio/categories/planning/create-prd.md +58 -18
- package/src/bmad-plus/packs/pack-dev-studio/categories/planning/create-ux-design.md +103 -72
- package/src/bmad-plus/packs/pack-dev-studio/categories/planning/edit-prd.md +55 -27
- package/src/bmad-plus/packs/pack-dev-studio/categories/planning/pm-agent.md +34 -60
- package/src/bmad-plus/packs/pack-dev-studio/categories/planning/prd.md +46 -87
- package/src/bmad-plus/packs/pack-dev-studio/categories/planning/steps/step-01-init.md +10 -0
- package/src/bmad-plus/packs/pack-dev-studio/categories/planning/ux-designer-agent.md +30 -60
- package/src/bmad-plus/packs/pack-dev-studio/categories/planning/validate-prd.md +57 -27
- package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/advanced-elicitation.md +47 -138
- package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/adversarial-review.md +48 -34
- package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/bmad-help.md +51 -68
- package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/brainstorming.md +46 -3
- package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/customize.md +68 -109
- package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/distillator.md +53 -174
- package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/edge-case-hunter.md +39 -53
- package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/editorial-review-prose.md +45 -83
- package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/editorial-review-structure.md +45 -176
- package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/index-docs.md +45 -63
- package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/party-mode.md +53 -124
- package/src/bmad-plus/packs/pack-dev-studio/categories/utilities/shard-doc.md +44 -100
- package/src/bmad-plus/packs/pack-dev-studio/dev-studio-orchestrator.md +56 -116
- package/src/bmad-plus/packs/pack-dev-studio/shared/architecture-decision-template.md +49 -12
- package/src/bmad-plus/packs/pack-dev-studio/shared/bwml-spec.md +51 -328
- package/src/bmad-plus/packs/pack-dev-studio/shared/catalog.json +489 -0
- package/src/bmad-plus/packs/pack-dev-studio/shared/execution.md +69 -0
- package/src/bmad-plus/packs/pack-dev-studio/shared/module-help.csv +39 -32
- package/src/bmad-plus/packs/pack-dev-studio/upstream-sync.yaml +85 -14
- package/src/bmad-plus/packs/pack-memory/README.md +6 -0
- package/src/bmad-plus/packs/pack-memory/memory-orchestrator.md +12 -5
- package/src/bmad-plus/packs/pack-seo/SKILL.md +27 -1
- package/src/bmad-plus/packs/pack-seo/scripts/seo_apis.py +8 -8
- package/src/bmad-plus/packs/pack-seo/scripts/seo_fetch.py +1 -2
- package/src/bmad-plus/packs/pack-seo/scripts/seo_report.py +0 -1
- package/src/bmad-plus/packs/pack-seo/seo-chief.md +16 -1
- package/src/bmad-plus/packs/pack-seo/seo-judge.md +12 -0
- package/src/bmad-plus/packs/pack-seo/seo-scout.md +12 -0
- package/src/bmad-plus/skills/bmad-plus-autopilot/SKILL.md +4 -4
- package/src/bmad-plus/skills/bmad-plus-sync/SKILL.md +5 -3
- package/src/bmad-plus/skills/dev-studio/SKILL.md +19 -0
- package/tools/bmad-plus-npx.js +4 -2
- package/tools/build/adapters.config.js +60 -51
- package/tools/build/check-counts.js +52 -54
- package/tools/build/check-install-contract.js +450 -0
- package/tools/build/generate-adapters.js +252 -56
- package/tools/build/generate.js +364 -14
- package/tools/build/generated-adapters/.codex/AGENTS.md +20 -7
- package/tools/build/generated-adapters/.cursor/rules/bmad-plus.mdc +20 -7
- package/tools/build/generated-adapters/.opencode/AGENTS.md +20 -7
- package/tools/build/generated-adapters/AGENTS.md +20 -7
- package/tools/build/generated-adapters/CLAUDE.md +20 -7
- package/tools/build/generated-adapters/CONVENTIONS.md +20 -7
- package/tools/build/generated-adapters/GEMINI.md +20 -7
- package/tools/build/module.template.yaml +82 -0
- package/tools/build/pack-delivery.js +78 -0
- package/tools/cli/bmad-plus-cli.js +16 -1
- package/tools/cli/commands/doctor.js +49 -217
- package/tools/cli/commands/install.js +109 -164
- package/tools/cli/commands/studio.js +68 -0
- package/tools/cli/commands/uninstall.js +173 -65
- package/tools/cli/commands/update-check.js +31 -0
- package/tools/cli/commands/update-policy.js +39 -0
- package/tools/cli/commands/update.js +102 -113
- package/tools/cli/i18n.js +60 -0
- package/tools/cli/lib/ide-config.js +4 -261
- package/tools/cli/lib/install-manifest.js +17 -0
- package/tools/cli/lib/installation-health.js +360 -0
- package/tools/cli/lib/installed-adapters.js +89 -0
- package/tools/cli/lib/npm-runner.js +177 -0
- package/tools/cli/lib/pack-copy.js +62 -66
- package/tools/cli/lib/packs.js +546 -3
- package/tools/cli/lib/python-health.js +233 -0
- package/tools/cli/lib/python-provision.js +2 -2
- package/tools/cli/lib/studio.js +310 -0
- package/tools/cli/lib/update-check.js +153 -0
- package/tools/cli/lib/update-dispatch.js +182 -0
- package/tools/cli/lib/update-policy.js +90 -0
- package/tools/cli/lib/update-transaction.js +334 -0
- package/tools/release/publication-content.js +901 -0
|
@@ -1,85 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
diff_output: '' # set at runtime
|
|
3
|
-
spec_file: '' # set at runtime (path or empty)
|
|
4
|
-
review_mode: '' # set at runtime: "full" or "no-spec"
|
|
5
|
-
story_key: '' # set at runtime when discovered from sprint status
|
|
6
|
-
---
|
|
1
|
+
# Review compatibility guide — gather scoped evidence
|
|
7
2
|
|
|
8
|
-
|
|
3
|
+
This retained path corresponds to procedure step 1 of
|
|
4
|
+
[code-review](../code-review.md). The main workflow is complete; these guides do
|
|
5
|
+
not form an execution chain. Follow the common
|
|
6
|
+
[execution guide](../../../shared/execution.md).
|
|
9
7
|
|
|
10
|
-
|
|
8
|
+
Identify the actual base and target revision or working-tree snapshot. Read the
|
|
9
|
+
request, diff, relevant callers, tests and constraints. Preserve existing edits
|
|
10
|
+
and record the paths and evidence that were inspected.
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
Clarify the reviewed behavior and acceptance criteria. A diff without surrounding
|
|
13
|
+
context may be insufficient to establish a defect; state what is missing instead
|
|
14
|
+
of inventing context.
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
**Tier 1 — Explicit argument.**
|
|
21
|
-
Did the user pass a PR, commit SHA, branch, spec file, or diff source this message?
|
|
22
|
-
- PR reference → resolve to branch/commit via `gh pr view`. If resolution fails, ask for a SHA or branch.
|
|
23
|
-
- Commit or branch → use directly.
|
|
24
|
-
- Spec file → set `{spec_file}` to the provided path. Check its frontmatter for `baseline_commit`. If found, use as diff baseline. If not found, continue the cascade (a spec alone does not identify a diff source).
|
|
25
|
-
- Also scan the argument for diff-mode keywords that narrow the scope:
|
|
26
|
-
- "staged" / "staged changes" → Staged changes only
|
|
27
|
-
- "uncommitted" / "working tree" / "all changes" → Uncommitted changes (staged + unstaged)
|
|
28
|
-
- "branch diff" / "vs main" / "against main" / "compared to <branch>" → Branch diff (extract base branch if mentioned)
|
|
29
|
-
- "commit range" / "last N commits" / "<from-sha>..<to-sha>" → Specific commit range
|
|
30
|
-
- "this diff" / "provided diff" / "paste" → User-provided diff (do not match bare "diff" — it appears in other modes)
|
|
31
|
-
- When multiple keywords match, prefer the most specific (e.g., "branch diff" over bare "diff").
|
|
32
|
-
|
|
33
|
-
**Tier 2 — Recent conversation.**
|
|
34
|
-
Do the last few messages reveal what the user wants to be reviewed? Look for spec paths, commit refs, branches, PRs, or descriptions of a change. Apply the same diff-mode keyword scan and routing as Tier 1.
|
|
35
|
-
|
|
36
|
-
**Tier 3 — Sprint tracking.**
|
|
37
|
-
Look for a sprint status file (`*sprint-status*`) in `{implementation_artifacts}` or `{planning_artifacts}`. If found, scan for stories with status `review`:
|
|
38
|
-
- **Exactly one `review` story:** Set `{story_key}` to the story's key (e.g., `1-2-user-auth`). Suggest it: "I found story <story-id> in `review` status. Would you like to review its changes? [Y] Yes / [N] No, let me choose". If confirmed, use the story context to determine the diff source (branch name derived from story slug, or uncommitted changes). If declined, clear `{story_key}` and fall through.
|
|
39
|
-
- **Multiple `review` stories:** Present them as numbered options alongside a manual choice option. Wait for user selection. If a story is selected, set `{story_key}` and use its context to determine the diff source. If manual choice is selected, clear `{story_key}` and fall through.
|
|
40
|
-
- **None:** Fall through.
|
|
41
|
-
|
|
42
|
-
**Tier 4 — Current git state.**
|
|
43
|
-
If version control is unavailable, skip to Tier 5. Otherwise, check the current branch and HEAD. If the branch is not `main` (or the default branch), confirm: "I see HEAD is `<short-sha>` on `<branch>` — do you want to review this branch's changes?" If confirmed, treat as a branch diff against `main`. If declined, fall through.
|
|
44
|
-
|
|
45
|
-
**Tier 5 — Ask.**
|
|
46
|
-
Fall through to instruction 2.
|
|
47
|
-
|
|
48
|
-
Never ask extra questions beyond what the cascade prescribes. If a tier above already identified the target, skip the remaining tiers and proceed to instruction 3 (construct diff).
|
|
49
|
-
|
|
50
|
-
2. HALT. Ask the user: **What do you want to review?** Present these options:
|
|
51
|
-
- **Uncommitted changes** (staged + unstaged)
|
|
52
|
-
- **Staged changes only**
|
|
53
|
-
- **Branch diff** vs a base branch (ask which base branch)
|
|
54
|
-
- **Specific commit range** (ask for the range)
|
|
55
|
-
- **Provided diff or file list** (user pastes or provides a path)
|
|
56
|
-
|
|
57
|
-
3. Construct `{diff_output}` from the chosen source.
|
|
58
|
-
- For **staged changes only**: run `git diff --cached`.
|
|
59
|
-
- For **uncommitted changes** (staged + unstaged): run `git diff HEAD`.
|
|
60
|
-
- For **branch diff**: verify the base branch exists before running `git diff`. If it does not exist, HALT and ask the user for a valid branch.
|
|
61
|
-
- For **commit range**: verify the range resolves. If it does not, HALT and ask the user for a valid range.
|
|
62
|
-
- For **provided diff**: validate the content is non-empty and parseable as a unified diff. If it is not parseable, HALT and ask the user to provide a valid diff.
|
|
63
|
-
- For **file list**: validate each path exists in the working tree. Construct `{diff_output}` by running `git diff HEAD -- <path1> <path2> ...`. If any paths are untracked (new files not yet staged), use `git diff --no-index /dev/null <path>` to include them. If the diff is empty (files have no uncommitted changes and are not untracked), ask the user whether to review the full file contents or to specify a different baseline.
|
|
64
|
-
- After constructing `{diff_output}`, verify it is non-empty regardless of source type. If empty, HALT and tell the user there is nothing to review.
|
|
65
|
-
|
|
66
|
-
4. **Set the spec context.**
|
|
67
|
-
- If `{spec_file}` is already set (from Tier 1 or Tier 2): verify the file exists and is readable, then set `{review_mode}` = `"full"`.
|
|
68
|
-
- Otherwise, ask the user: **Is there a spec or story file that provides context for these changes?**
|
|
69
|
-
- If yes: set `{spec_file}` to the path provided, verify the file exists and is readable, then set `{review_mode}` = `"full"`.
|
|
70
|
-
- If no: set `{review_mode}` = `"no-spec"`.
|
|
71
|
-
|
|
72
|
-
5. If `{review_mode}` = `"full"` and the file at `{spec_file}` has a `context` field in its frontmatter listing additional docs, load each referenced document. Warn the user about any docs that cannot be found.
|
|
73
|
-
|
|
74
|
-
6. Sanity check: if `{diff_output}` exceeds approximately 3000 lines, warn the user and offer to chunk the review by file group.
|
|
75
|
-
- If the user opts to chunk: agree on the first group, narrow `{diff_output}` accordingly, and list the remaining groups for the user to note for follow-up runs.
|
|
76
|
-
- If the user declines: proceed as-is with the full diff.
|
|
77
|
-
|
|
78
|
-
### CHECKPOINT
|
|
79
|
-
|
|
80
|
-
Present a summary before proceeding: diff stats (files changed, lines added/removed), `{review_mode}`, and loaded spec/context docs (if any). HALT and wait for user confirmation to proceed.
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
## NEXT
|
|
84
|
-
|
|
85
|
-
Read fully and follow `./step-02-review.md`
|
|
16
|
+
Record the scope and input ledger in the report. On resume, compare the current
|
|
17
|
+
snapshot with the reviewed one and invalidate affected conclusions. Continue at
|
|
18
|
+
the first incomplete part of the main procedure.
|
|
@@ -1,35 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
failed_layers: '' # set at runtime: comma-separated list of layers that failed or returned empty
|
|
3
|
-
---
|
|
1
|
+
# Review compatibility guide — inspect behavior
|
|
4
2
|
|
|
5
|
-
|
|
3
|
+
This retained path supports procedure steps 2 through 4 of
|
|
4
|
+
[code-review](../code-review.md). Follow the common
|
|
5
|
+
[execution guide](../../../shared/execution.md).
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Inspect intended behavior, invariants and relevant failure boundaries in the actual
|
|
8
|
+
code. Trace each suspicion to a triggering condition and observable consequence.
|
|
9
|
+
Seek counterevidence and use a focused reproduction where useful and authorized.
|
|
8
10
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
- The Acceptance Auditor subagent receives diff, spec, and context docs.
|
|
13
|
-
- All review subagents must run at the same model capability as the current session.
|
|
11
|
+
Independent perspectives require actual host-supported reviewers. Record their
|
|
12
|
+
assignments and evidence; otherwise label the work as one assistant's sequential
|
|
13
|
+
review. An absent reviewer cannot supply a clean result.
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
2. Launch parallel subagents without conversation context. If subagents are not available, generate prompt files in `{implementation_artifacts}` — one per reviewer role below — and HALT. Ask the user to run each in a separate session (ideally a different LLM) and paste back the findings. When findings are pasted, resume from this point and proceed to step 3.
|
|
20
|
-
|
|
21
|
-
- **Blind Hunter** — receives `{diff_output}` only. No spec, no context docs, no project access. Invoke via the `bmad-review-adversarial-general` skill.
|
|
22
|
-
|
|
23
|
-
- **Edge Case Hunter** — receives `{diff_output}` and read access to the project. Invoke via the `bmad-review-edge-case-hunter` skill.
|
|
24
|
-
|
|
25
|
-
- **Acceptance Auditor** (only if `{review_mode}` = `"full"`) — receives `{diff_output}`, the content of the file at `{spec_file}`, and any loaded context docs. Its prompt:
|
|
26
|
-
> You are an Acceptance Auditor. Review this diff against the spec and context docs. Check for: violations of acceptance criteria, deviations from spec intent, missing implementation of specified behavior, contradictions between spec constraints and actual code. Output findings as a Markdown list. Each finding: one-line title, which AC/constraint it violates, and evidence from the diff.
|
|
27
|
-
|
|
28
|
-
3. **Subagent failure handling**: If any subagent fails, times out, or returns empty results, append the layer name to `{failed_layers}` (comma-separated) and proceed with findings from the remaining layers.
|
|
29
|
-
|
|
30
|
-
4. Collect all findings from the completed layers.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
## NEXT
|
|
34
|
-
|
|
35
|
-
Read fully and follow `./step-03-triage.md`
|
|
15
|
+
Do not change product code during review unless fixes are within the user's task.
|
|
16
|
+
Record supported findings, unresolved questions and refuted suspicions. Continue
|
|
17
|
+
the main procedure at the next unfinished part; this guide does not spawn agents
|
|
18
|
+
or load another step by itself.
|
|
@@ -1,49 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
---
|
|
1
|
+
# Review compatibility guide — triage findings
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
This retained path supports procedure steps 5 and 6 of
|
|
4
|
+
[code-review](../code-review.md). Follow the common
|
|
5
|
+
[execution guide](../../../shared/execution.md).
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
For each suspected issue, inspect the supporting code and counterevidence. Remove
|
|
8
|
+
duplicates and distinguish a behavioral defect from a style preference. Retain
|
|
9
|
+
the reason a suspicion was refuted so continuation does not repeat it.
|
|
7
10
|
|
|
8
|
-
|
|
9
|
-
|
|
11
|
+
A retained finding needs a file/line, trigger, consequence, evidence, confidence
|
|
12
|
+
and proportionate fix direction. Set severity from actual impact and likelihood.
|
|
13
|
+
Unsupported speculation belongs in open questions.
|
|
10
14
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
- Edge Case Hunter: JSON array with `location`, `trigger_condition`, `guard_snippet`, `potential_consequence` fields
|
|
16
|
-
- Acceptance Auditor: markdown list with title, AC/constraint reference, and evidence
|
|
17
|
-
|
|
18
|
-
If a layer's output does not match its expected format, attempt best-effort parsing. Note any parsing issues for the user.
|
|
19
|
-
|
|
20
|
-
Convert all to a unified list where each finding has:
|
|
21
|
-
- `id` -- sequential integer
|
|
22
|
-
- `source` -- `blind`, `edge`, `auditor`, or merged sources (e.g., `blind+edge`)
|
|
23
|
-
- `title` -- one-line summary
|
|
24
|
-
- `detail` -- full description
|
|
25
|
-
- `location` -- file and line reference (if available)
|
|
26
|
-
|
|
27
|
-
2. **Deduplicate.** If two or more findings describe the same issue, merge them into one:
|
|
28
|
-
- Use the most specific finding as the base (prefer edge-case JSON with location over adversarial prose).
|
|
29
|
-
- Append any unique detail, reasoning, or location references from the other finding(s) into the surviving `detail` field.
|
|
30
|
-
- Set `source` to the merged sources (e.g., `blind+edge`).
|
|
31
|
-
|
|
32
|
-
3. **Classify** each finding into exactly one bucket:
|
|
33
|
-
- **decision_needed** -- There is an ambiguous choice that requires human input. The code cannot be correctly patched without knowing the user's intent. Only possible if `{review_mode}` = `"full"`.
|
|
34
|
-
- **patch** -- Code issue that is fixable without human input. The correct fix is unambiguous.
|
|
35
|
-
- **defer** -- Pre-existing issue not caused by the current change. Real but not actionable now.
|
|
36
|
-
- **dismiss** -- Noise, false positive, or handled elsewhere.
|
|
37
|
-
|
|
38
|
-
If `{review_mode}` = `"no-spec"` and a finding would otherwise be `decision_needed`, reclassify it as `patch` (if the fix is unambiguous) or `defer` (if not).
|
|
39
|
-
|
|
40
|
-
4. **Drop** all `dismiss` findings. Record the dismiss count for the summary.
|
|
41
|
-
|
|
42
|
-
5. If `{failed_layers}` is non-empty, report which layers failed before announcing results. If zero findings remain after dropping dismissed AND `{failed_layers}` is non-empty, warn the user that the review may be incomplete rather than announcing a clean review.
|
|
43
|
-
|
|
44
|
-
6. If zero findings remain after triage (all rejected or none raised): state "✅ Clean review — all layers passed." (Step 3 already warned if any review layers failed via `{failed_layers}`.)
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
## NEXT
|
|
48
|
-
|
|
49
|
-
Read fully and follow `./step-04-present.md`
|
|
15
|
+
Reconcile acceptance and review coverage. Missing tools, unrun checks and absent
|
|
16
|
+
required reviewers remain incomplete. Zero findings is valid when supported by
|
|
17
|
+
the inspected scope. Continue at the first incomplete part of the main procedure;
|
|
18
|
+
triage does not itself repair the code.
|
|
@@ -1,132 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
deferred_work_file: '{implementation_artifacts}/deferred-work.md'
|
|
3
|
-
---
|
|
1
|
+
# Review compatibility guide — present the conclusion
|
|
4
2
|
|
|
5
|
-
|
|
3
|
+
This retained path corresponds to procedure step 7 and continuation of
|
|
4
|
+
[code-review](../code-review.md). Follow the common
|
|
5
|
+
[execution guide](../../../shared/execution.md).
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Present actionable findings in impact order with evidence and locations. Follow
|
|
8
|
+
them with the baseline, acceptance coverage, checks actually performed, refuted
|
|
9
|
+
suspicions where useful and unresolved limitations.
|
|
8
10
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
Use findings, no-actionable-findings or incomplete as the scoped disposition.
|
|
12
|
+
List partial findings even when some coverage is incomplete. Never present a
|
|
13
|
+
missing review or a passing unrelated test as evidence that the change is clean.
|
|
12
14
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
If zero findings remain after triage (all dismissed or none raised): state that and proceed to section 6 (Sprint Status Update).
|
|
18
|
-
|
|
19
|
-
### 2. Write findings to the story file
|
|
20
|
-
|
|
21
|
-
If `{spec_file}` exists and contains a Tasks/Subtasks section, append a `### Review Findings` subsection. Write all findings in this order:
|
|
22
|
-
|
|
23
|
-
1. **`decision-needed`** findings (unchecked):
|
|
24
|
-
`- [ ] [Review][Decision] <Title> — <Detail>`
|
|
25
|
-
|
|
26
|
-
2. **`patch`** findings (unchecked):
|
|
27
|
-
`- [ ] [Review][Patch] <Title> [<file>:<line>]`
|
|
28
|
-
|
|
29
|
-
3. **`defer`** findings (checked off, marked deferred):
|
|
30
|
-
`- [x] [Review][Defer] <Title> [<file>:<line>] — deferred, pre-existing`
|
|
31
|
-
|
|
32
|
-
Also append each `defer` finding to `{deferred_work_file}` under a heading `## Deferred from: code review ({date})`. If `{spec_file}` is set, include its basename in the heading (e.g., `code review of story-3.3 (2026-03-18)`). One bullet per finding with description.
|
|
33
|
-
|
|
34
|
-
### 3. Present summary
|
|
35
|
-
|
|
36
|
-
Announce what was written:
|
|
37
|
-
|
|
38
|
-
> **Code review complete.** <D> `decision-needed`, <P> `patch`, <W> `defer`, <R> dismissed as noise.
|
|
39
|
-
|
|
40
|
-
If `{spec_file}` is set, add: `Findings written to the review findings section in {spec_file}.`
|
|
41
|
-
Otherwise add: `Findings are listed above. No story file was provided, so nothing was persisted.`
|
|
42
|
-
|
|
43
|
-
### 4. Resolve decision-needed findings
|
|
44
|
-
|
|
45
|
-
If `decision_needed` findings exist, present each one with its detail and the options available. The user must decide — the correct fix is ambiguous without their input. Walk through each finding (or batch related ones) and get the user's call. Once resolved, each becomes a `patch`, `defer`, or is dismissed.
|
|
46
|
-
|
|
47
|
-
If the user chooses to defer, ask: Quick one-line reason for deferring this item? (helps future reviews): — then append that reason to both the story file bullet and the `{deferred_work_file}` entry.
|
|
48
|
-
|
|
49
|
-
**HALT** — I am waiting for your numbered choice. Reply with only the number. Do not proceed until you select an option.
|
|
50
|
-
|
|
51
|
-
### 5. Handle `patch` findings
|
|
52
|
-
|
|
53
|
-
If `patch` findings exist (including any resolved from step 4), HALT. Ask the user:
|
|
54
|
-
|
|
55
|
-
If `{spec_file}` is set, present all three options:
|
|
56
|
-
|
|
57
|
-
> **How would you like to handle the `<P>` `patch` findings?**
|
|
58
|
-
> 1. **Apply every patch** — fix all of them now, no per-finding confirmation. Defer and decision-needed items are not touched.
|
|
59
|
-
> 2. **Leave as action items** — they are already in the story file
|
|
60
|
-
> 3. **Walk through each patch** — show details for each before deciding
|
|
61
|
-
|
|
62
|
-
If `{spec_file}` is **not** set, present only options 1 and 2 (omit "Leave as action items" — findings were not written to a file):
|
|
63
|
-
|
|
64
|
-
> **How would you like to handle the `<P>` `patch` findings?**
|
|
65
|
-
> 1. **Apply every patch** — fix all of them now, no per-finding confirmation. Defer and decision-needed items are not touched.
|
|
66
|
-
> 2. **Walk through each patch** — show details for each before deciding
|
|
67
|
-
|
|
68
|
-
**HALT** — I am waiting for your numbered choice. Reply with only the number. Do not proceed until you select an option.
|
|
69
|
-
|
|
70
|
-
- **Apply every patch**: Apply every patch finding without per-finding confirmation. Do not modify defer or decision-needed items. After all patches are applied, present a summary of changes made. If `{spec_file}` is set, check off the patch items in the story file (leave defer items as-is).
|
|
71
|
-
- **Leave as action items** (only when `{spec_file}` is set): Done — findings are already written to the story.
|
|
72
|
-
- **Walk through each patch**: Present each finding with full detail, diff context, and suggested fix. After walkthrough, re-offer the applicable options above.
|
|
73
|
-
|
|
74
|
-
**HALT** — I am waiting for your numbered choice. Do not proceed until you select an option.
|
|
75
|
-
|
|
76
|
-
**✅ Code review actions complete**
|
|
77
|
-
|
|
78
|
-
- Decision-needed resolved: <D>
|
|
79
|
-
- Patches handled: <P>
|
|
80
|
-
- Deferred: <W>
|
|
81
|
-
- Dismissed: <R>
|
|
82
|
-
|
|
83
|
-
### 6. Update story status and sync sprint tracking
|
|
84
|
-
|
|
85
|
-
Skip this section if `{spec_file}` is not set.
|
|
86
|
-
|
|
87
|
-
#### Determine new status based on review outcome
|
|
88
|
-
|
|
89
|
-
- If all `decision-needed` and `patch` findings were resolved (fixed or dismissed) AND no unresolved HIGH/MEDIUM issues remain: set `{new_status}` = `done`. Update the story file Status section to `done`.
|
|
90
|
-
- If `patch` findings were left as action items, or unresolved issues remain: set `{new_status}` = `in-progress`. Update the story file Status section to `in-progress`.
|
|
91
|
-
|
|
92
|
-
Save the story file.
|
|
93
|
-
|
|
94
|
-
#### Sync sprint-status.yaml
|
|
95
|
-
|
|
96
|
-
If `{story_key}` is not set, skip this subsection and note that sprint status was not synced because no story key was available.
|
|
97
|
-
|
|
98
|
-
If `{sprint_status}` file exists:
|
|
99
|
-
|
|
100
|
-
1. Load the FULL `{sprint_status}` file.
|
|
101
|
-
2. Find the `development_status` entry matching `{story_key}`.
|
|
102
|
-
3. If found: update `development_status[{story_key}]` to `{new_status}`. Update `last_updated` to current date. Save the file, preserving ALL comments and structure including STATUS DEFINITIONS.
|
|
103
|
-
4. If `{story_key}` not found in sprint status: warn the user that the story file was updated but sprint-status sync failed.
|
|
104
|
-
|
|
105
|
-
If `{sprint_status}` file does not exist, note that story status was updated in the story file only.
|
|
106
|
-
|
|
107
|
-
#### Completion summary
|
|
108
|
-
|
|
109
|
-
> **Review Complete!**
|
|
110
|
-
>
|
|
111
|
-
> **Story Status:** `{new_status}`
|
|
112
|
-
> **Issues Fixed:** <fixed_count>
|
|
113
|
-
> **Action Items Created:** <action_count>
|
|
114
|
-
> **Deferred:** <W>
|
|
115
|
-
> **Dismissed:** <R>
|
|
116
|
-
|
|
117
|
-
### 7. Next steps
|
|
118
|
-
|
|
119
|
-
Present the user with follow-up options:
|
|
120
|
-
|
|
121
|
-
> **What would you like to do next?**
|
|
122
|
-
> 1. **Start the next story** — run `dev-story` to pick up the next `ready-for-dev` story
|
|
123
|
-
> 2. **Re-run code review** — address findings and review again
|
|
124
|
-
> 3. **Done** — end the workflow
|
|
125
|
-
|
|
126
|
-
**HALT** — I am waiting for your choice. Do not proceed until the user selects an option.
|
|
127
|
-
|
|
128
|
-
## On Complete
|
|
129
|
-
|
|
130
|
-
<!-- Adapted for BMAD+: original script dependency removed -->
|
|
131
|
-
|
|
132
|
-
If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting.
|
|
15
|
+
On updated code, verify each claimed resolution against actual changes and
|
|
16
|
+
re-review affected behavior. Preserve prior findings and their resolution evidence.
|
|
17
|
+
This guide does not imply approval to commit, publish or modify tracking statuses.
|
|
@@ -1,90 +1,64 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
2
|
name: bmad-code-review
|
|
3
|
-
description:
|
|
3
|
+
description: Review a scoped code change using reproducible findings and explicit evidence limits.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Code
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
This uses **step-file architecture** for disciplined execution:
|
|
66
|
-
|
|
67
|
-
- **Micro-file Design**: Each step is self-contained and followed exactly
|
|
68
|
-
- **Just-In-Time Loading**: Only load the current step file
|
|
69
|
-
- **Sequential Enforcement**: Complete steps in order, no skipping
|
|
70
|
-
- **State Tracking**: Persist progress via in-memory variables
|
|
71
|
-
- **Append-Only Building**: Build artifacts incrementally
|
|
72
|
-
|
|
73
|
-
### Step Processing Rules
|
|
74
|
-
|
|
75
|
-
1. **READ COMPLETELY**: Read the entire step file before acting
|
|
76
|
-
2. **FOLLOW SEQUENCE**: Execute sections in order
|
|
77
|
-
3. **WAIT FOR INPUT**: Halt at checkpoints and wait for human
|
|
78
|
-
4. **LOAD NEXT**: When directed, read fully and follow the next step file
|
|
79
|
-
|
|
80
|
-
### Critical Rules (NO EXCEPTIONS)
|
|
81
|
-
|
|
82
|
-
- **NEVER** load multiple step files simultaneously
|
|
83
|
-
- **ALWAYS** read entire step file before execution
|
|
84
|
-
- **NEVER** skip steps or optimize the sequence
|
|
85
|
-
- **ALWAYS** follow the exact instructions in the step file
|
|
86
|
-
- **ALWAYS** halt at checkpoints and wait for human input
|
|
87
|
-
|
|
88
|
-
## FIRST STEP
|
|
89
|
-
|
|
90
|
-
Read fully and follow: `./steps/step-01-gather-context.md`
|
|
6
|
+
# Code review
|
|
7
|
+
|
|
8
|
+
Read the [execution guide](../../shared/execution.md) and
|
|
9
|
+
[Oholiab's role](dev-agent.md). This page is the complete review procedure.
|
|
10
|
+
|
|
11
|
+
## Inputs
|
|
12
|
+
|
|
13
|
+
An explicit diff, change artifact or review request identifying the relevant
|
|
14
|
+
project changes. Inspect the repository with host tools. Establish a base revision,
|
|
15
|
+
target revision or working-tree snapshot rather than silently reviewing an
|
|
16
|
+
arbitrary branch. Read the intended behavior and applicable project constraints.
|
|
17
|
+
|
|
18
|
+
## Procedure
|
|
19
|
+
|
|
20
|
+
1. Define the review scope and baseline. Inventory changed paths, related callers,
|
|
21
|
+
tests and requirements. Preserve existing edits and record unavailable context.
|
|
22
|
+
A supplied diff may omit the surrounding behavior needed to evaluate it.
|
|
23
|
+
2. Review the intended behavior, invariants and relevant failure boundaries.
|
|
24
|
+
Check control flow, data changes, interface compatibility and test assertions.
|
|
25
|
+
Add concurrency, permissions, input validation, recovery or UX perspectives
|
|
26
|
+
where the change makes them relevant.
|
|
27
|
+
3. Use actual independent reviewers only when the host supports them and the
|
|
28
|
+
scoped work benefits from delegation. Give each a bounded question and the
|
|
29
|
+
same baseline; record returned evidence. Otherwise perform sequential
|
|
30
|
+
perspectives and identify them as one assistant's work. Never invent a
|
|
31
|
+
teammate or treat an absent response as a clean review.
|
|
32
|
+
4. Test each suspected defect against the code and requirements. Seek a concrete
|
|
33
|
+
triggering case and inspect counterevidence. Run a focused reproduction when
|
|
34
|
+
practical and within the task. Do not alter product code during a review
|
|
35
|
+
unless fixes are also authorized.
|
|
36
|
+
5. Triage the results. Remove duplicates, distinguish defects from preferences,
|
|
37
|
+
and retain the reason when a suspicion is refuted. For a retained issue,
|
|
38
|
+
provide file/line, trigger, consequence, supporting evidence, confidence and a
|
|
39
|
+
proportionate fix direction. Severity follows impact and likelihood, not tone.
|
|
40
|
+
6. Reconcile acceptance coverage and review limitations. Record checks actually
|
|
41
|
+
run, unresolved disputes and missing reviewer or environment evidence. A
|
|
42
|
+
missing required review makes that coverage incomplete.
|
|
43
|
+
7. Deliver findings in impact order, followed by the scoped conclusion and
|
|
44
|
+
evidence limits. Zero findings is valid after inspection; it means no
|
|
45
|
+
actionable defect was found within that reviewed scope.
|
|
46
|
+
|
|
47
|
+
## Output and acceptance
|
|
48
|
+
|
|
49
|
+
Write the report for code-review with baseline and scope, inspected evidence,
|
|
50
|
+
findings, refuted suspicions, acceptance coverage and next actions. Each retained
|
|
51
|
+
finding must distinguish an observed defect from a supported inference. Speculation
|
|
52
|
+
without enough evidence belongs in open questions, not an asserted failure.
|
|
53
|
+
|
|
54
|
+
Use a disposition of findings, no-actionable-findings, or incomplete, and explain
|
|
55
|
+
the scope of that disposition. List partial findings even when coverage is
|
|
56
|
+
incomplete. A passing test suite does not establish a missing review perspective
|
|
57
|
+
or an untested requirement.
|
|
58
|
+
|
|
59
|
+
## Continue
|
|
60
|
+
|
|
61
|
+
Compare the current diff and input hashes with the reviewed snapshot. Preserve
|
|
62
|
+
prior findings and check their resolution against actual changes. Re-review
|
|
63
|
+
affected behavior and invalidate conclusions that relied on changed inputs;
|
|
64
|
+
do not rerun unchanged checks merely to refresh the report date.
|