bmad-method 6.11.1-next.8 → 6.12.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.
Files changed (153) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/AGENTS.md +12 -0
  3. package/CLAUDE.md +1 -0
  4. package/README.md +13 -19
  5. package/README_CN.md +0 -10
  6. package/README_KR.md +90 -0
  7. package/README_VN.md +0 -10
  8. package/greptile.json +52 -0
  9. package/package.json +6 -5
  10. package/src/bmm-skills/agents/bmad-agent-analyst/SKILL.md +1 -1
  11. package/src/bmm-skills/agents/bmad-agent-analyst/customize.toml +1 -3
  12. package/src/bmm-skills/agents/bmad-agent-architect/SKILL.md +1 -1
  13. package/src/bmm-skills/agents/bmad-agent-architect/customize.toml +1 -3
  14. package/src/bmm-skills/agents/bmad-agent-dev/SKILL.md +1 -1
  15. package/src/bmm-skills/agents/bmad-agent-dev/customize.toml +1 -3
  16. package/src/bmm-skills/agents/bmad-agent-pm/SKILL.md +1 -1
  17. package/src/bmm-skills/agents/bmad-agent-pm/customize.toml +1 -3
  18. package/src/bmm-skills/agents/bmad-agent-ux-designer/SKILL.md +1 -1
  19. package/src/bmm-skills/agents/bmad-agent-ux-designer/customize.toml +1 -3
  20. package/src/bmm-skills/module-help.csv +2 -2
  21. package/src/bmm-skills/plan/bmad-architecture/SKILL.md +1 -1
  22. package/src/bmm-skills/plan/bmad-architecture/customize.toml +5 -6
  23. package/src/bmm-skills/plan/bmad-create-epics-and-stories/SKILL.md +1 -1
  24. package/src/bmm-skills/plan/bmad-create-epics-and-stories/customize.toml +1 -3
  25. package/src/bmm-skills/plan/bmad-create-epics-and-stories/steps/step-04-final-validation.md +1 -1
  26. package/src/bmm-skills/plan/bmad-prd/SKILL.md +1 -1
  27. package/src/bmm-skills/plan/bmad-prd/customize.toml +5 -6
  28. package/src/bmm-skills/plan/bmad-prfaq/SKILL.md +1 -1
  29. package/src/bmm-skills/plan/bmad-prfaq/customize.toml +1 -3
  30. package/src/bmm-skills/plan/bmad-prfaq/references/verdict.md +1 -1
  31. package/src/bmm-skills/plan/bmad-product-brief/SKILL.md +1 -1
  32. package/src/bmm-skills/plan/bmad-product-brief/customize.toml +5 -6
  33. package/src/bmm-skills/plan/bmad-project-context/SKILL.md +7 -6
  34. package/src/bmm-skills/plan/bmad-project-context/references/best-practices.md +2 -2
  35. package/src/bmm-skills/plan/bmad-spec/SKILL.md +1 -1
  36. package/src/bmm-skills/plan/bmad-spec/customize.toml +5 -5
  37. package/src/bmm-skills/plan/bmad-sprint-planning/SKILL.md +1 -1
  38. package/src/bmm-skills/plan/bmad-sprint-planning/customize.toml +1 -3
  39. package/src/bmm-skills/plan/bmad-sprint-planning/scripts/__pycache__/sprint_plan.cpython-311.pyc +0 -0
  40. package/src/bmm-skills/plan/bmad-sprint-planning/scripts/tests/__pycache__/test_sprint_plan.cpython-311-pytest-9.1.1.pyc +0 -0
  41. package/src/bmm-skills/plan/bmad-ux/SKILL.md +1 -1
  42. package/src/bmm-skills/plan/bmad-ux/customize.toml +1 -3
  43. package/src/bmm-skills/ship/bmad-build/SKILL.md +1 -1
  44. package/src/bmm-skills/ship/bmad-build/customize.toml +21 -33
  45. package/src/bmm-skills/ship/bmad-build/references/claims-check.md +14 -0
  46. package/src/bmm-skills/ship/bmad-build/review-prompts/edge-case-hunter.md +31 -7
  47. package/src/bmm-skills/ship/bmad-build/review-prompts/verification-gap.md +4 -4
  48. package/src/bmm-skills/ship/bmad-build/spec-template.md +26 -4
  49. package/src/bmm-skills/ship/bmad-build/step-01-clarify-and-route.md +21 -26
  50. package/src/bmm-skills/ship/bmad-build/step-02-plan.md +31 -16
  51. package/src/bmm-skills/ship/bmad-build/step-03-implement.md +5 -3
  52. package/src/bmm-skills/ship/bmad-build/step-04-review.md +49 -19
  53. package/src/bmm-skills/ship/bmad-build/step-05-present.md +9 -41
  54. package/src/bmm-skills/ship/bmad-build/step-oneshot.md +60 -29
  55. package/src/bmm-skills/ship/bmad-build/sync-sprint-status.md +5 -19
  56. package/src/bmm-skills/ship/bmad-build-auto/customize.toml +17 -19
  57. package/src/bmm-skills/ship/bmad-build-auto/references/claims-check.md +14 -0
  58. package/src/bmm-skills/ship/bmad-build-auto/review-prompts/edge-case-hunter.md +31 -7
  59. package/src/bmm-skills/ship/bmad-build-auto/review-prompts/verification-gap.md +4 -4
  60. package/src/bmm-skills/ship/bmad-build-auto/spec-template.md +4 -7
  61. package/src/bmm-skills/ship/bmad-build-auto/step-01-clarify-and-route.md +3 -2
  62. package/src/bmm-skills/ship/bmad-build-auto/step-03-implement.md +5 -1
  63. package/src/bmm-skills/ship/bmad-build-auto/step-04-review.md +58 -38
  64. package/src/bmm-skills/ship/bmad-build-auto/workflow.md +1 -1
  65. package/src/bmm-skills/ship/bmad-code-review/SKILL.md +1 -1
  66. package/src/bmm-skills/ship/bmad-code-review/customize.toml +15 -18
  67. package/src/bmm-skills/ship/bmad-code-review/references/claims-check.md +14 -0
  68. package/src/bmm-skills/ship/bmad-code-review/review-prompts/edge-case-hunter.md +31 -7
  69. package/src/bmm-skills/ship/bmad-code-review/review-prompts/verification-gap.md +4 -4
  70. package/src/bmm-skills/ship/bmad-code-review/steps/step-01-gather-context.md +30 -23
  71. package/src/bmm-skills/ship/bmad-code-review/steps/step-02-review.md +3 -3
  72. package/src/bmm-skills/ship/bmad-code-review/steps/step-03-triage.md +25 -21
  73. package/src/bmm-skills/ship/bmad-code-review/steps/step-04-present.md +20 -18
  74. package/src/bmm-skills/ship/bmad-correct-course/SKILL.md +13 -5
  75. package/src/bmm-skills/ship/bmad-correct-course/customize.toml +1 -3
  76. package/src/bmm-skills/ship/bmad-qa-generate-e2e-tests/SKILL.md +2 -2
  77. package/src/bmm-skills/ship/bmad-qa-generate-e2e-tests/customize.toml +1 -3
  78. package/src/bmm-skills/ship/bmad-retrospective/SKILL.md +1 -1
  79. package/src/bmm-skills/ship/bmad-retrospective/customize.toml +1 -3
  80. package/src/bmm-skills/ship/bmad-retrospective/scripts/__pycache__/sprint_status.cpython-311.pyc +0 -0
  81. package/src/bmm-skills/ship/bmad-retrospective/scripts/tests/__pycache__/test_git_evidence.cpython-311-pytest-9.1.1.pyc +0 -0
  82. package/src/bmm-skills/ship/bmad-retrospective/scripts/tests/__pycache__/test_sprint_status.cpython-311-pytest-9.1.1.pyc +0 -0
  83. package/src/bmm-skills/ship/{bmad-checkpoint-preview → bmad-walkthrough}/SKILL.md +4 -4
  84. package/src/bmm-skills/ship/{bmad-checkpoint-preview → bmad-walkthrough}/customize.toml +2 -4
  85. package/src/bmm-skills/ship/{bmad-checkpoint-preview → bmad-walkthrough}/step-05-wrapup.md +1 -1
  86. package/src/bmm-skills/v6-shims/README.md +1 -0
  87. package/src/bmm-skills/v6-shims/bmad-checkpoint-preview/SKILL.md +21 -0
  88. package/src/bmm-skills/v6-shims/bmad-create-architecture/SKILL.md +1 -1
  89. package/src/bmm-skills/v6-shims/bmad-create-architecture/customize.toml +1 -3
  90. package/src/bmm-skills/v6-shims/bmad-create-prd/SKILL.md +1 -1
  91. package/src/bmm-skills/v6-shims/bmad-create-prd/customize.toml +1 -3
  92. package/src/bmm-skills/v6-shims/bmad-create-story/SKILL.md +3 -3
  93. package/src/bmm-skills/v6-shims/bmad-create-story/customize.toml +1 -3
  94. package/src/bmm-skills/v6-shims/bmad-dev-story/SKILL.md +2 -2
  95. package/src/bmm-skills/v6-shims/bmad-dev-story/customize.toml +1 -6
  96. package/src/bmm-skills/v6-shims/bmad-domain-research/SKILL.md +1 -1
  97. package/src/bmm-skills/v6-shims/bmad-edit-prd/SKILL.md +1 -1
  98. package/src/bmm-skills/v6-shims/bmad-edit-prd/customize.toml +1 -3
  99. package/src/bmm-skills/v6-shims/bmad-market-research/SKILL.md +1 -1
  100. package/src/bmm-skills/v6-shims/bmad-sprint-status/SKILL.md +1 -1
  101. package/src/bmm-skills/v6-shims/bmad-sprint-status/customize.toml +1 -3
  102. package/src/bmm-skills/v6-shims/bmad-technical-research/SKILL.md +1 -1
  103. package/src/bmm-skills/v6-shims/bmad-validate-prd/SKILL.md +1 -1
  104. package/src/bmm-skills/v6-shims/bmad-validate-prd/customize.toml +1 -3
  105. package/src/core-skills/bmad-advanced-elicitation/SKILL.md +22 -23
  106. package/src/core-skills/bmad-brainstorming/SKILL.md +1 -1
  107. package/src/core-skills/bmad-brainstorming/customize.toml +5 -6
  108. package/src/core-skills/bmad-brainstorming/scripts/brain.py +19 -0
  109. package/src/core-skills/bmad-brainstorming/scripts/tests/test_brain.py +50 -0
  110. package/src/core-skills/bmad-customize/SKILL.md +1 -1
  111. package/src/core-skills/bmad-deep-recon/SKILL.md +1 -1
  112. package/src/core-skills/bmad-forge-idea/SKILL.md +1 -1
  113. package/src/core-skills/bmad-forge-idea/customize.toml +5 -6
  114. package/src/core-skills/bmad-forge-idea/scripts/resolve_personas.py +3 -1
  115. package/src/core-skills/bmad-forge-idea/scripts/tests/test_resolve_personas.py +22 -0
  116. package/src/core-skills/bmad-help/SKILL.md +1 -1
  117. package/src/core-skills/bmad-party-mode/SKILL.md +1 -1
  118. package/src/core-skills/bmad-party-mode/customize.toml +4 -4
  119. package/src/core-skills/bmad-party-mode/references/create-party.md +1 -1
  120. package/src/core-skills/bmad-party-mode/scripts/resolve_party.py +3 -1
  121. package/src/core-skills/bmad-party-mode/scripts/tests/test_resolve_party.py +22 -0
  122. package/src/core-skills/bmad-review/SKILL.md +5 -4
  123. package/src/core-skills/bmad-review/customize.toml +1 -1
  124. package/src/core-skills/bmad-review/references/lens-edge-case-hunter.md +18 -0
  125. package/src/core-skills/module-help.csv +1 -1
  126. package/src/scripts/__pycache__/config_utils.cpython-311.pyc +0 -0
  127. package/src/scripts/resolve_config.py +9 -1
  128. package/src/scripts/resolve_customization.py +72 -7
  129. package/src/scripts/tests/__pycache__/test_config_utils.cpython-311.pyc +0 -0
  130. package/src/scripts/tests/__pycache__/test_resolve_config.cpython-311.pyc +0 -0
  131. package/src/scripts/tests/__pycache__/test_resolve_customization.cpython-311.pyc +0 -0
  132. package/src/scripts/tests/test_resolve_config.py +28 -0
  133. package/src/scripts/tests/test_resolve_customization.py +102 -0
  134. package/tools/installer/core/installer.js +33 -1
  135. package/tools/installer/core/shim-policy.js +75 -7
  136. package/tools/installer/ide/platform-codes.yaml +13 -0
  137. package/tools/installer/prompts.js +15 -2
  138. package/tools/installer/ui.js +28 -8
  139. package/tools/skill-validator.md +85 -151
  140. package/tools/tests/__pycache__/test_validate_skills.cpython-311.pyc +0 -0
  141. package/tools/tests/fixtures/validate-skills/bmad/SKILL.md +8 -0
  142. package/tools/tests/fixtures/validate-skills/deprecated-shim/SKILL.md +9 -0
  143. package/tools/tests/fixtures/validate-skills/missing-trigger/SKILL.md +9 -0
  144. package/tools/tests/fixtures/validate-skills/with-trigger/SKILL.md +8 -0
  145. package/tools/tests/test_validate_skills.py +476 -0
  146. package/tools/validate-published-implementation-model.mjs +0 -9
  147. package/tools/validate_skills.py +698 -0
  148. package/tools/validate-skills.js +0 -735
  149. /package/src/bmm-skills/ship/{bmad-checkpoint-preview → bmad-walkthrough}/generate-trail.md +0 -0
  150. /package/src/bmm-skills/ship/{bmad-checkpoint-preview → bmad-walkthrough}/step-01-orientation.md +0 -0
  151. /package/src/bmm-skills/ship/{bmad-checkpoint-preview → bmad-walkthrough}/step-02-walkthrough.md +0 -0
  152. /package/src/bmm-skills/ship/{bmad-checkpoint-preview → bmad-walkthrough}/step-03-detail-pass.md +0 -0
  153. /package/src/bmm-skills/ship/{bmad-checkpoint-preview → bmad-walkthrough}/step-04-testing.md +0 -0
@@ -15,7 +15,7 @@ At the opening greeting, let the user know they can invoke `bmad-party-mode` for
15
15
 
16
16
  ## On Activation
17
17
 
18
- 1. Resolve customization: `uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow`. On failure, read `{skill-root}/customize.toml` directly and use defaults.
18
+ 1. Resolve customization: `uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --project-root {project-root} --key workflow`. On failure, read `{skill-root}/customize.toml` directly and use defaults.
19
19
  2. Execute each entry in `{workflow.activation_steps_prepend}` in order.
20
20
  3. Treat every entry in `{workflow.persistent_facts}` as foundational context for the rest of the run. Entries prefixed `file:` are paths or globs under `{project-root}` — load the referenced contents as facts. All other entries are facts verbatim.
21
21
  4. `{workflow.external_sources}` is an org-configured registry of internal tools (knowledge bases, MCP tools); consult them alongside generic web research on the same triggers in `## Discovery`, org tools preferred when their directive matches. If a named tool is unavailable at runtime, fall back to standard behavior and note the gap when relevant.
@@ -24,14 +24,13 @@ activation_steps_append = []
24
24
  # Each entry is either a literal sentence, a skill prefixed with `skill:`, or a `file:`-prefixed path/glob
25
25
  # whose contents are loaded as facts.
26
26
  #
27
- # Default loads project-context.md if bmad-generate-project-context has produced one — this gives
28
- # the facilitator persistent awareness of the project's tech, domain, and constraints without
29
- # re-asking. Common opt-ins (set in team/user override TOML):
27
+ # Empty by default. Repo-wide context belongs in AGENTS.md (see bmad-project-context), which every
28
+ # skill already sees; use this for context only this skill needs, loaded on demand rather than
29
+ # carried as constant memory. Common opt-ins (set in team/user override TOML):
30
+ # "file:{project-root}/**/project-context.md" # if you keep a project-context.md
30
31
  # "skill:acme-co:terms-and-conditions" # a skill that contains some relevant info
31
32
  # "Elvis has left the building" # generic agent instruction
32
- persistent_facts = [
33
- "file:{project-root}/**/project-context.md",
34
- ]
33
+ persistent_facts = []
35
34
 
36
35
  # Executed when the workflow completes (after the user has been told the
37
36
  # brief is ready). Accepts either a string scalar (single instruction)
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: bmad-project-context
3
- description: 'Set up, adopt, refresh, or audit a repository''s agent instructions (the AGENTS.md block) so AI agents work well in that repo. Also records observed agent mistakes as pitfalls. Must be invoked by name'
3
+ description: 'Set up, adopt, refresh, or audit a repository''s agent instructions (the AGENTS.md block) so AI agents work well in that repo. Also records observed agent mistakes as pitfalls. Use when invoked by name'
4
4
  ---
5
5
 
6
6
  # Overview
@@ -19,7 +19,7 @@ Conversational always; the user approves every write.
19
19
 
20
20
  ## On Activation
21
21
 
22
- 1. Resolve customization: `uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow`. On failure, read `{skill-root}/customize.toml` directly and use defaults. Execute `{workflow.activation_steps_prepend}`; treat `{workflow.persistent_facts}` entries as standing context (`file:` = paths/globs to load, others verbatim).
22
+ 1. Resolve customization: `uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --project-root {project-root} --key workflow`. On failure, read `{skill-root}/customize.toml` directly and use defaults. Execute `{workflow.activation_steps_prepend}`; treat `{workflow.persistent_facts}` entries as standing context (`file:` = paths/globs to load, others verbatim).
23
23
  2. Config: if `{project-root}/_bmad` exists, `uv run {project-root}/_bmad/scripts/resolve_config.py --project-root {project-root}` and read `{user_name}`, `{communication_language}` (use it every turn), `{output_folder}`. Standalone: skip.
24
24
  3. **Load `references/best-practices.md` and `references/template.md` before anything else.** Every decision below is made against them.
25
25
  4. Detect intent and greet `{user_name}`: **setup** (no instruction file in the target carries meaningful content — scaffolding alone, empty headings, a comment, a lone import line, is not meaningful; when unsure, adopt, since adopting a near-empty file costs one small ledger while setting up a meaningful one loses instructions), **adopt** (an instruction file has content but no managed block, whatever its state and whoever wrote it — the migration form of refresh; that file is the baseline and every instruction in it enters the ledger of step 1), **refresh** (a managed block exists), **record** (the user reports a mistake agents made), **audit** (re-verify and prune). A supplied intent that contradicts what detection finds — e.g. `setup` against a file with content — is surfaced and confirmed, never silently obeyed. Fold `{workflow.external_sources}` into the source list. Execute `{workflow.activation_steps_append}`.
@@ -46,7 +46,7 @@ Greenfield: this is the whole content. Brownfield: it is the half no scan reache
46
46
 
47
47
  Fan out with parallel subagents against what the sections need — executable config and CI for policy and for what they already state, tracked source for conventions and boundaries, targeted history for constraints whose reason must still hold.
48
48
 
49
- `package.json`, a `Makefile`, `pyproject.toml`, and CI config are read to know what the block must not repeat. Their caveats come from the human in step 4. Path-check every claim naming a file.
49
+ `package.json`, a `Makefile`, `pyproject.toml`, contribution guides, pull request templates, and CI config are read to know what the block must not repeat. Their caveats come from the human in step 4. Path-check every claim naming a file. For every claim the block will make about what a command does, read the target or script that runs it and verify the claim.
50
50
 
51
51
  Each child agreed in step 1 is scanned as its own scope, against its own manifests.
52
52
 
@@ -65,7 +65,7 @@ Only what no scan reaches: what agents keep getting wrong here, what is off limi
65
65
 
66
66
  Compose against `template.md`. For each candidate, ask first whether a hook, lint rule, or CI check enforces it better than prose; if so propose the check, and the line becomes the fallback if they decline. A ledger entry marked `automate` keeps its instruction until its check is in place (a later run deletes the line under ground 2 once the check is live).
67
67
 
68
- **Show the complete block before writing it**, and every child block alongside it — one approval covers the set. **Present the settled ledger with it**: replacement text alone is an incomplete proposal, because it shows what the user gains and hides what they lose. Every existing instruction appears with its decision and reason; retains and rewrites may be grouped, every relocation, automation, and deletion is itemized. A deletion resting on none of the first three grounds is held for line-item approval — approving the block never approves it — and a declined deletion, relocation, or automation reverts to retain. On approval, splice between the markers — the splice itself touches nothing outside them. Text outside the markers changes only through a settled ledger entry or a proposed fix the user has seen, never as a side effect of the splice. Fill each provenance line with today's date and the verified SHA.
68
+ **Show the complete block before writing it**, and every child block alongside it — one approval covers the set. **Present the settled ledger with it**: replacement text alone is an incomplete proposal, because it shows what the user gains and hides what they lose. Every existing instruction appears with its decision and reason. Retains and rewrites that keep the full rule may be grouped. If a rewrite weakens, narrows, or drops part of a rule, treat the lost part as a deletion and list it separately. Keep the rule itself; examples may explain it but cannot replace it. Every relocation, automation, and deletion is itemized. A deletion resting on none of the first three grounds is held for line-item approval — approving the block never approves it — and a declined deletion, relocation, or automation reverts to retain. On approval, splice between the markers — the splice itself touches nothing outside them. Text outside the markers changes only through a settled ledger entry or a proposed fix the user has seen, never as a side effect of the splice. Fill each provenance line with today's date and the verified SHA.
69
69
 
70
70
  Where an instruction elsewhere contradicts the block in a way that changes behavior — a stale `CLAUDE.md` line, a retired command — propose the fix to that file. Two live contradictory instructions is a defect.
71
71
 
@@ -76,6 +76,7 @@ Never commit.
76
76
  - What went in, what was left out and why, and — after adoption or refresh — where each existing instruction landed.
77
77
  - Why, in the user's terms, from `best-practices.md` — why it is small, why what the repo already states stays out, why a pitfall stays until its cause is gone.
78
78
  - How it loads, and that other harness files can point at it.
79
+ - Any branch, ticket, commit, or pull request rules that apply when the user submits these instruction changes.
79
80
  - Maintenance: re-run after significant change, `record` the moment an agent gets something wrong, prefer a check over a new line.
80
81
  - Rules repeating across their projects, or personal rather than the team's, belong in their global agent config.
81
82
 
@@ -105,13 +106,13 @@ Take the task, the mistake, the correction, and its evidence. Check the block fo
105
106
 
106
107
  ## Audit
107
108
 
108
- Re-check every caveat, path-check every file, follow every pointer, and ask of every line whether removing it would change agent behavior. Check for contradictions with other instruction files.
109
+ Re-check every caveat, path-check every file, follow every pointer, and ask of every line whether removing it would change agent behavior. Verify each command claim against the target or script that runs it. Check for contradictions with other instruction files.
109
110
 
110
111
  Failing lines get fixed, move behind an observable trigger, or become ledger entries: a removal needs one of the four grounds in `best-practices.md`, presented and settled as in step 5 before anything is removed. **A policy or pitfall goes only when the thing it guards is gone or the user retires it; nothing failing lately is not grounds.** Audit ends smaller or equal.
111
112
 
112
113
  ## Children
113
114
 
114
- A component, nested repository, or extracted rules file gets its own file under the same shape when work keeps landing there and every condition holds: its rules are subtree-exclusive, they are substantial (a handful of rules is not a file), the split materially reduces the parent block, the loading mechanism is verified for every harness in use — checked, never assumed — and the user approves the split. Otherwise the rules stay in the parent block as path-qualified lines ("in `src/importer/`: ..."), which cost less than a file nobody loads. Why the loading check: `best-practices.md`.
115
+ A component, nested repository, or extracted rules file gets its own file under the same shape when work keeps landing there and every condition holds: its rules are subtree-exclusive, they are substantial (a handful of rules is not a file), the split materially reduces the parent block, the loading mechanism is verified for every harness in use — checked, never assumed — and the user approves the split. Even with verified loading, keep a rule at the root when it must apply before a session enters that directory or when breaking it can affect work outside the child. Otherwise the rules stay in the parent block as path-qualified lines ("in `src/importer/`: ..."), which cost less than a file nobody loads. Why the loading check: `best-practices.md`.
115
116
 
116
117
  Use a linked file only when the trigger is not a path.
117
118
 
@@ -50,7 +50,7 @@ An adopted file must fit the budget too, but shrinking it works differently. Mov
50
50
 
51
51
  An index the agent must choose to fetch gets skipped; one already in context does not. Keep everything load-bearing in the block. A pointer out of it names a trigger the agent can observe — a path, a file type, a named task — never one it must judge ("when the task is complex") or track about itself ("before your first edit").
52
52
 
53
- Rules bounded to a directory can go in a nested `AGENTS.md` there, attached by location rather than by pointer — but only when they are subtree-exclusive and substantial, the split materially reduces the root block, the user approves it, and **loading is verified for every harness in use**. Check, never assume: several harnesses build the instruction chain once at session start, root down to the working directory, so a nested file is invisible to the session that later edits into that subtree. Unverified means path-qualified lines at root instead — "in `src/importer/`: ..." — cheaper than a file nobody loads.
53
+ Rules bounded to a directory can go in a nested `AGENTS.md` there, attached by location rather than by pointer — but only when they are subtree-exclusive and substantial, the split materially reduces the root block, the user approves it, and **loading is verified for every harness in use**. Even with verified loading, keep a rule at the root when it must apply before a session enters that directory or when breaking it can affect work outside the child. Check, never assume: several harnesses build the instruction chain once at session start, root down to the working directory, so a nested file is invisible to the session that later edits into that subtree. Unverified means path-qualified lines at root instead — "in `src/importer/`: ..." — cheaper than a file nobody loads.
54
54
 
55
55
  Use a linked file only when the trigger is not a path.
56
56
 
@@ -75,7 +75,7 @@ Every instruction a human wrote is presumed intentional: someone paid for it, us
75
75
  **Deletion needs one of four grounds:**
76
76
 
77
77
  1. **Stale or incorrect** — the referent is gone, or the instruction was never true; the evidence is named.
78
- 2. **Mechanically enforced** — a hook, linter, formatter, or CI check already fails the violation, so the line has no work left to do.
78
+ 2. **Mechanically enforced** — a hook, linter, formatter, or CI check already fails the violation named by the instruction. A tool that only covers the same files or topic does not enforce the instruction.
79
79
  3. **Harmful or contradictory** — it points agents at the wrong thing, or it contradicts another live instruction and loses the reconciliation.
80
80
  4. **The user approved this deletion** — asked as a line item, never implied by approving a replacement block.
81
81
 
@@ -18,7 +18,7 @@ Multiple skills may call to update the same spec over time.
18
18
 
19
19
  ## On Activation
20
20
 
21
- 1. Resolve customization: `uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow`. On failure, read `{skill-root}/customize.toml` directly.
21
+ 1. Resolve customization: `uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --project-root {project-root} --key workflow`. On failure, read `{skill-root}/customize.toml` directly.
22
22
  2. Run `{workflow.activation_steps_prepend}`. Treat `{workflow.persistent_facts}` as foundational context (`file:` entries are loaded).
23
23
  3. Resolve config: `uv run {project-root}/_bmad/scripts/resolve_config.py --project-root {project-root}` (merges `_bmad/config.toml`, `_bmad/config.user.toml`, and the `_bmad/custom/` overrides). From the merged JSON resolve `{user_name}`, `{communication_language}`, `{document_output_language}`, `{project_name}`, `{output_folder}` (under `core`), and `{date}`.
24
24
  4. Detect mode. **Headless** when any of: no TTY, programmatic caller (another skill or non-interactive runner), or the first message pre-supplies all inputs and asks for an artifact path back. **Interactive** otherwise. In interactive mode, greet by `{user_name}` in `{communication_language}`, stay in that language, and mention that `bmad-party-mode` and `bmad-advanced-elicitation` are available for deeper exploration on any field.
@@ -20,11 +20,11 @@ activation_steps_append = []
20
20
  # Persistent facts the workflow keeps in mind for the whole run.
21
21
  # Each entry is either a literal sentence, a skill prefixed with `skill:`,
22
22
  # or a `file:`-prefixed path/glob whose contents are loaded as facts.
23
- # Default points to a single top-level file; override in team/user TOML
24
- # to widen the scope (e.g. `_bmad/**/project-context.md`) if needed.
25
- persistent_facts = [
26
- "file:{project-root}/project-context.md",
27
- ]
23
+ # Empty by default. Repo-wide context belongs in AGENTS.md (see bmad-project-context),
24
+ # which every skill already sees; use this for context only this skill needs, loaded on
25
+ # demand rather than carried as constant memory. Add a `file:` entry in team/user TOML to
26
+ # opt in (e.g. `file:{project-root}/**/project-context.md` if you keep one).
27
+ persistent_facts = []
28
28
 
29
29
  # Executed when the workflow completes. Scalar or array of instructions.
30
30
  on_complete = ""
@@ -9,7 +9,7 @@ You are a senior developer about to commit to this plan. Two moves, in order: fi
9
9
 
10
10
  ## On Activation
11
11
 
12
- 1. Resolve customization: `uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow`. On failure, read `{skill-root}/customize.toml` directly and use defaults.
12
+ 1. Resolve customization: `uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --project-root {project-root} --key workflow`. On failure, read `{skill-root}/customize.toml` directly and use defaults.
13
13
  2. Execute each entry in `{workflow.activation_steps_prepend}` in order.
14
14
  3. Treat every entry in `{workflow.persistent_facts}` as foundational context for the rest of the run. Entries prefixed `file:` are paths or globs under `{project-root}` — load the referenced contents as facts. All other entries are facts verbatim.
15
15
  4. Load `{project-root}/_bmad/bmm/config.yaml` (and `config.user.yaml` if present). Resolve `{user_name}`, `{communication_language}`, `{document_output_language}`, `{project_name}`, `{planning_artifacts}`, `{implementation_artifacts}`, `{project_knowledge}` (skip gracefully if unset), `{date}`. Stay in `{communication_language}` for every turn, not just the greeting.
@@ -30,9 +30,7 @@ activation_steps_append = []
30
30
  # - a file reference prefixed with `file:`, e.g. "file:{project-root}/docs/standards.md"
31
31
  # (glob patterns are supported; the file's contents are loaded and treated as facts).
32
32
 
33
- persistent_facts = [
34
- "file:{project-root}/**/project-context.md",
35
- ]
33
+ persistent_facts = []
36
34
 
37
35
  # Scalar: executed when the workflow reaches its final step,
38
36
  # after sprint-status.yaml is generated and validated. Override wins.
@@ -30,7 +30,7 @@ UX may lead, follow, or stand alone. Inherit `sources:` by reference; the spines
30
30
 
31
31
  ## On Activation
32
32
 
33
- 1. Resolve customization: `uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow`. On failure, read `{skill-root}/customize.toml` directly and use defaults.
33
+ 1. Resolve customization: `uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --project-root {project-root} --key workflow`. On failure, read `{skill-root}/customize.toml` directly and use defaults.
34
34
  2. Run `{workflow.activation_steps_prepend}`. Treat `{workflow.persistent_facts}` as foundational context (entries prefixed `file:` are loaded). `{workflow.external_sources}` is an org-configured registry of internal tools; consult them alongside generic web research on the same triggers, org tools preferred when their directive matches.
35
35
  3. Load `{project-root}/_bmad/bmm/config.yaml` (+ `config.user.yaml` if present). Resolve `{user_name}`, `{communication_language}`, `{document_output_language}`, `{planning_artifacts}`, `{project_name}`, `{date}`. Missing keys → neutral defaults; never block.
36
36
  4. If headless, follow `references/headless.md` for the whole run. Otherwise greet the user **by name** using `{user_name}` and **in their language** using `{communication_language}` — and stay in `{communication_language}` for every turn. In the greeting, let the user know `bmad-party-mode` and `bmad-advanced-elicitation` are always available. Then scan for misroute on the first message: PRD → `bmad-prd`; architecture → `bmad-architecture`; game UX → BMad GDS; agent/skill → `bmad-workflow-builder`; brief → `bmad-product-brief`.
@@ -14,9 +14,7 @@ activation_steps_append = []
14
14
 
15
15
  # Persistent facts loaded at activation and kept in mind for the run.
16
16
  # Entries: literal sentence, `skill:NAME`, or `file:PATH` (glob ok).
17
- persistent_facts = [
18
- "file:{project-root}/**/project-context.md",
19
- ]
17
+ persistent_facts = []
20
18
 
21
19
  # Runs at workflow completion. String or array of instructions.
22
20
  on_complete = ""
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: bmad-build
3
- description: 'Turns a work item — feature, story, bug fix, change request — into working code, reviewed and verified. Use when the user hands over an outcome and leaves the edits to you; a bare story or issue link counts. Also use whenever the user asks BMAD by name then any change qualifies, even a tiny fully-specified edit. Do not volunteer for interactive edits the user directs and reviews themselves, or for version-control operations that record existing work without changing it.'
3
+ description: 'Turns implementation work into working code, reviewed and verified. Use when the user delegates a feature, story, bug fix, or meaningful change; a bare story or issue link counts. Skip obvious, low-risk mechanical maintenance such as small ignore-file, typo-only, formatting-only, or configuration-hygiene edits. Explicit BMAD requests always qualify. Do not volunteer for user-directed interactive edits or version-control operations that only record existing work.'
4
4
  ---
5
5
 
6
6
  Run the following command exactly once without changing the current working directory. Replace `{project-root}` with the absolute path to the project root and `{skill-root}` with the absolute path to this skill's directory:
@@ -24,28 +24,23 @@ activation_steps_append = []
24
24
  # Entries are literal text or file references prefixed with "file:".
25
25
  # File entries may use globs and are loaded during activation.
26
26
 
27
- persistent_facts = [
28
- "file:{project-root}/**/project-context.md",
29
- ]
27
+ persistent_facts = []
30
28
 
31
29
  # Instruction run after Build completes.
32
30
  # Empty means no extra completion behavior.
33
31
 
34
32
  on_complete = ""
35
33
 
36
- # How Build opens a completed spec for human review. The default deliberately
37
- # opens the repository root first and the spec second in a reused VS Code
38
- # window so relative review links resolve in the correct workspace. Override
39
- # this with the application and equivalent behavior you prefer. Set it to an
40
- # empty string to disable automatic opening and all related completion output.
34
+ # Optional instructions for opening a completed spec. The empty default leaves
35
+ # the spec closed. Override this with the application and behavior you prefer.
41
36
  # Example requests for bmad-customize: "Open completed specs in Cursor and
42
37
  # reuse the project window" or "Do not open completed specs automatically."
43
38
  #
44
39
  # Example `open_spec` override instructions for bmad-build.user.toml:
45
40
  # {project-root} and {spec_file} are substituted at run time.
46
41
  #
47
- # VS Code and compatible GUI editors — shipped default uses `code`; Cursor,
48
- # Windsurf, Antigravity, Zed, and similar editors can substitute their launcher.
42
+ # VS Code and compatible GUI editors — a custom override can use `code`; Cursor,
43
+ # Windsurf, Antigravity, Zed, and similar editors can use their own launcher.
49
44
  # Preserve reuse-window behavior when the launcher supports it, and always pass
50
45
  # the repository root first and the spec second:
51
46
  # Run `code -r "{project-root}" "{spec_file}"`, root first.
@@ -63,13 +58,7 @@ on_complete = ""
63
58
  # Emacs — reuse an Emacs server without waiting for the buffer to close:
64
59
  # Run `cd "{project-root}" && emacsclient -n "{spec_file}"`.
65
60
  #
66
- # For every non-empty override, also tell Build to note in the completion summary
67
- # that the spec was sent to the chosen editor and contains a Suggested Review
68
- # Order, then include the default navigation tip shown below.
69
-
70
- open_spec = """
71
- Run `code -r "{project-root}" "{spec_file}"` — the repository root first so VS Code opens in the right context, then the spec file. Always double-quote both paths to handle spaces and special characters. If `code` is unavailable or the command fails, skip gracefully and tell the user the spec file path instead. In the completion summary, note that the spec was sent to VS Code and that it contains a Suggested Review Order, then add this navigation tip: "Ctrl+click (Cmd+click on macOS) the links in the Suggested Review Order to jump to each stop."
72
- """
61
+ open_spec = ""
73
62
 
74
63
  # Handoff for the implementation subagent in step 03. The whole execution
75
64
  # recipe — a subagent by default, but an override may run it any other way
@@ -86,8 +75,10 @@ Launch a subagent with no prior conversation context, with this prompt:
86
75
 
87
76
  # Review layers for the review step. `instruction` is the layer's whole
88
77
  # execution recipe — subagents by default, but an override may run anything
89
- # (e.g. an external reviewer via bash). {diff_output} is substituted at run
90
- # time. `when` (optional) gates a layer; empty `instruction` disables it.
78
+ # (e.g. an external reviewer via bash). {diff_file} and {claims_file} are
79
+ # substituted at run time; both are paths, and {diff_file} is the unified diff
80
+ # file the layer reads. `when` (optional) gates a layer; empty `instruction`
81
+ # disables it.
91
82
 
92
83
  [[workflow.review_layers]]
93
84
  id = "blind-hunter"
@@ -97,15 +88,14 @@ Launch a context-free subagent with this prompt:
97
88
 
98
89
  Conduct a review of CONTENT.
99
90
  Look for what's missing, not only what's wrong.
100
- Find at least ten issues to fix or improve.
91
+ Compute your finding floor N from the diff file's size: N = min(floor(sqrt(kB) + 1), 10), where kB is the file's size in kilobytes. State the arithmetic in one line, then find at least N issues to fix or improve.
101
92
  Output a Markdown list of findings only — no severity, priority, or ranking.
102
93
  If the content is empty, stop and say so.
103
94
  If you have zero findings, re-check and keep thinking; do not stop with an empty list.
104
95
 
105
- CONTENT:
106
- {diff_output}
96
+ CONTENT: the unified diff at `{diff_file}`. Read that file — it is the content under review.
107
97
 
108
- Do not invoke any skill. Return only the review result.
98
+ Do not invoke any skill, and do not spawn subagents of your own — you are the reviewer. Return your findings as text in your final message; do not route them through any findings-reporting tool the host may offer.
109
99
 
110
100
  """
111
101
 
@@ -117,11 +107,11 @@ Launch a context-free subagent with this prompt:
117
107
 
118
108
  Read `{skill-root}/review-prompts/edge-case-hunter.md` completely and follow it as your review instructions.
119
109
 
120
- Review content:
110
+ claims_file (leave unread until your instructions call for it): {claims_file}
121
111
 
122
- {diff_output}
112
+ Review content: the unified diff at `{diff_file}`. Read that file — it is the content under review.
123
113
 
124
- Do not invoke any skill. If the instruction file is unreadable, report that exact failure and stop. Return only the review result.
114
+ Do not invoke any skill, and do not spawn subagents of your own — you are the reviewer. If the instruction file is unreadable, report that exact failure and stop. Return your findings as text in your final message; do not route them through any findings-reporting tool the host may offer.
125
115
 
126
116
  """
127
117
 
@@ -133,15 +123,13 @@ Launch a context-free subagent with this prompt:
133
123
 
134
124
  Read `{skill-root}/review-prompts/verification-gap.md` completely and follow it as your review instructions.
135
125
 
136
- Review content:
137
-
138
- {diff_output}
126
+ Review content: the unified diff at `{diff_file}`. Read that file — it is the content under review.
139
127
 
140
- Do not invoke any skill. If the instruction file is unreadable, report that exact failure and stop. Return only the review result.
128
+ Do not invoke any skill, and do not spawn subagents of your own — you are the reviewer. If the instruction file is unreadable, report that exact failure and stop. Return your findings as text in your final message; do not route them through any findings-reporting tool the host may offer.
141
129
 
142
130
  """
143
131
 
144
- # Review layers for the one-shot route.
132
+ # Review layers for the oneshot route.
145
133
 
146
134
  [[workflow.oneshot_review_layers]]
147
135
  id = "blind-hunter"
@@ -151,7 +139,7 @@ Launch a context-free subagent with this prompt:
151
139
 
152
140
  Conduct a review of CONTENT.
153
141
  Look for what's missing, not only what's wrong.
154
- Find at least ten issues to fix or improve.
142
+ Compute your finding floor N from the size of the changes: N = min(floor(sqrt(kB) + 1), 10), where kB is the changed content's size in kilobytes. State the arithmetic in one line, then find at least N issues to fix or improve.
155
143
  Output a Markdown list of findings only — no severity, priority, or ranking.
156
144
  If the content is empty, stop and say so.
157
145
  If you have zero findings, re-check and keep thinking; do not stop with an empty list.
@@ -159,6 +147,6 @@ If you have zero findings, re-check and keep thinking; do not stop with an empty
159
147
  CONTENT:
160
148
  The changed files in the current worktree. Inspect them directly before reviewing.
161
149
 
162
- Do not invoke any skill. Return only the review result.
150
+ Do not invoke any skill, and do not spawn subagents of your own — you are the reviewer. Return your findings as text in your final message; do not route them through any findings-reporting tool the host may offer.
163
151
 
164
152
  """
@@ -0,0 +1,14 @@
1
+ # Claims Check
2
+
3
+ Final pass for the Edge Case Hunter. Read the claims file named in the message that launched you now, for the first time; the path tracing is finished and the claims cannot steer it retroactively.
4
+
5
+ It is the spec the change was built from. Read only its `## Intent` and `## Tasks & Acceptance` sections — the claims live there; ignore the rest of the file. The spec is the change's own account of itself: testimony, not evidence — a claim repeated in a code comment is still the same claim, not confirmation. Extract each checkable claim — what the change does, what it preserves, ordering, arithmetic, and parity with existing code ("exactly as X does") — then try to falsify each one against the code you have already traced. Where your trace is not enough to decide, read the code that decides it: the compared-to function, the actual callee, the state the claim assumes.
6
+
7
+ Append one finding per falsified claim to the same JSON array, with the four standard fields plus:
8
+
9
+ - `kind`: `"claim"`
10
+ - `confidence`: `"high"`, `"medium"`, or `"low"`
11
+
12
+ For a claim finding the standard fields read as: `location` = where the code contradicts the claim; `trigger_condition` = the claim, quoted or tightly paraphrased; `guard_snippet` = what the code actually does; `potential_consequence` = what goes wrong for someone who believed the claim.
13
+
14
+ Verified claims produce nothing. Add nothing if nothing is falsified.
@@ -5,10 +5,12 @@ When a diff is provided, scan only the diff hunks and list boundaries that are d
5
5
  When no diff is provided (full file or function), treat the entire provided content as the scope.
6
6
  Ignore the rest of the codebase unless the provided content explicitly references external functions.
7
7
  A brief secondary deletion check runs as Step 4 when the diff removes code.
8
+ A claims check runs as Step 5.
8
9
 
9
10
  **Inputs:**
10
- - **content** — Content to review: diff, full file, or function
11
+ - **content** — Content to review, or a path to read it from: diff, full file, or function
11
12
  - **also_consider** (optional) — Areas to keep in mind during review alongside normal edge-case analysis
13
+ - **claims_file** — Path to the spec this change was built from. Do NOT read it before Step 5: the path tracing in Steps 2–3 must finish before the claims are seen.
12
14
 
13
15
  **MANDATORY: Execute steps in the Execution section IN EXACT ORDER. DO NOT skip steps or change the sequence. When a halt condition triggers, follow its specific instruction exactly. Each action within a step is a REQUIRED action to complete that step.**
14
16
 
@@ -19,8 +21,8 @@ A brief secondary deletion check runs as Step 4 when the diff removes code.
19
21
 
20
22
  ### Step 1: Receive Content
21
23
 
22
- - Load the content to review strictly from the parent message that launched you (not from this instruction file)
23
- - If content is empty, or cannot be decoded as text, return `[{"location":"N/A","trigger_condition":"Input empty or undecodable","guard_snippet":"Provide valid content to review","potential_consequence":"Review skipped — no analysis performed"}]` and stop
24
+ - Take the content to review from the parent message that launched you — inline, or by reading the file it points to (never from this instruction file)
25
+ - If no content is supplied, or it is empty, unreadable, or cannot be decoded as text, return `[{"location":"N/A","trigger_condition":"Input empty or undecodable","guard_snippet":"Provide valid content to review","potential_consequence":"Review skipped — no analysis performed"}]` and stop
24
26
  - Identify content type (diff, full file, or function) to determine scope rules
25
27
 
26
28
  ### Step 2: Exhaustive Path Analysis
@@ -30,6 +32,8 @@ A brief secondary deletion check runs as Step 4 when the diff removes code.
30
32
  - If `also_consider` input was provided, incorporate those areas into the analysis
31
33
  - Walk all branching paths: control flow (conditionals, loops, error handlers, early returns) and domain boundaries (where values, states, or conditions transition). Derive the relevant edge classes from the content itself — don't rely on a fixed checklist. Examples: missing else/default, unguarded inputs, off-by-one loops, arithmetic overflow, implicit type coercion, race conditions, timeout gaps
32
34
  - Consider implicit branches: the diff special-cases or changes the handling of one or more members of a fixed set of values — enums, status codes, sentinels, type tags, flags, value ranges. The rest of the set is implicit branches (e.g. the diff changes the `RED` and `YELLOW` cases of a `RED`/`YELLOW`/`GREEN` enum; `GREEN` is the implicit branch)
35
+ - Consider handle lifetime: when the changed code re-checks, re-fetches, or re-validates something it already held — a handle, index, id, pointer — the re-check exists because an intervening call can invalidate it. Identify that call, what it does to the thing held, and what the changed code silently skips when the re-check fails
36
+ - For each call site the diff adds or changes — in test files as well as production code — read the callee's declaration and check the call against it: argument count, order, types, and defaults. Report any mismatch
33
37
  - For each path: determine whether the content handles it
34
38
  - Collect only the unhandled paths as findings — discard handled ones silently
35
39
 
@@ -42,7 +46,11 @@ A brief secondary deletion check runs as Step 4 when the diff removes code.
42
46
 
43
47
  If the diff removed or replaced meaningful code (ignore pure renames and whitespace): load `references/deletion-check.md` and follow it.
44
48
 
45
- ### Step 5: Present Findings
49
+ ### Step 5: Claims Check
50
+
51
+ Load `references/claims-check.md` and follow it.
52
+
53
+ ### Step 6: Present Findings
46
54
 
47
55
  Output all findings as a single JSON array following the Output Format specification exactly.
48
56
 
@@ -60,12 +68,12 @@ Return ONLY a valid JSON array of objects. Each edge-case finding contains exact
60
68
  }]
61
69
  ```
62
70
 
63
- No extra text, no explanations, no markdown wrapping. An empty array `[]` is valid when nothing is found. Deletion findings from Step 4, if any, go in the same array with the extra fields defined in `references/deletion-check.md`.
71
+ No extra text, no explanations, no markdown wrapping. An empty array `[]` is valid when nothing is found. Deletion findings from Step 4 and claim findings from Step 5, if any, go in the same array with the extra fields defined in `references/deletion-check.md` and `references/claims-check.md`.
64
72
 
65
73
 
66
74
  ## HALT CONDITIONS
67
75
 
68
- - If content is empty or cannot be decoded as text, return `[{"location":"N/A","trigger_condition":"Input empty or undecodable","guard_snippet":"Provide valid content to review","potential_consequence":"Review skipped — no analysis performed"}]` and stop
76
+ - If no content is supplied, or it is empty, unreadable, or cannot be decoded as text, return `[{"location":"N/A","trigger_condition":"Input empty or undecodable","guard_snippet":"Provide valid content to review","potential_consequence":"Review skipped — no analysis performed"}]` and stop
69
77
  <reference path="references/deletion-check.md">
70
78
  # Deletion Check
71
79
 
@@ -82,7 +90,23 @@ For a deletion finding the standard fields read as: `location` = the removed ite
82
90
 
83
91
  Add nothing if nothing qualifies.
84
92
  </reference>
93
+ <reference path="references/claims-check.md">
94
+ # Claims Check
95
+
96
+ Final pass for the Edge Case Hunter. Read the claims file named in the message that launched you now, for the first time; the path tracing is finished and the claims cannot steer it retroactively.
97
+
98
+ It is the spec the change was built from. Read only its `## Intent` and `## Tasks & Acceptance` sections — the claims live there; ignore the rest of the file. The spec is the change's own account of itself: testimony, not evidence — a claim repeated in a code comment is still the same claim, not confirmation. Extract each checkable claim — what the change does, what it preserves, ordering, arithmetic, and parity with existing code ("exactly as X does") — then try to falsify each one against the code you have already traced. Where your trace is not enough to decide, read the code that decides it: the compared-to function, the actual callee, the state the claim assumes.
99
+
100
+ Append one finding per falsified claim to the same JSON array, with the four standard fields plus:
101
+
102
+ - `kind`: `"claim"`
103
+ - `confidence`: `"high"`, `"medium"`, or `"low"`
104
+
105
+ For a claim finding the standard fields read as: `location` = where the code contradicts the claim; `trigger_condition` = the claim, quoted or tightly paraphrased; `guard_snippet` = what the code actually does; `potential_consequence` = what goes wrong for someone who believed the claim.
106
+
107
+ Verified claims produce nothing. Add nothing if nothing is falsified.
108
+ </reference>
85
109
 
86
110
  ## CONTENT SOURCE
87
111
 
88
- Review the content supplied under "Review content:" in the message that launched you.
112
+ "Review content:" in the message that launched you gives the content itself or a path to read it from. Read the file when it is a path; either way that is the content under review, and this instruction file never is.
@@ -73,11 +73,11 @@ Explain why the test misses the bug using what the test sets up and checks.
73
73
 
74
74
  Do not report: compiler/type-checker-enforced cases; behavior already verified by an integration, contract, or e2e test; implementation-detail or mock-only tests; low coverage or a missing test file by itself; legacy untested code the change did not affect.
75
75
 
76
- Report genuine problems you noticed while tracing verification, even if they are not verification gaps. Put them under `Other findings` in the output. This permits reporting what you already reached, not extra hunting.
76
+ Report genuine problems you noticed while tracing verification, even if they are not verification gaps. Put them under `Other findings` in the output. This permits reporting what you already reached, not extra hunting. A claim that code misbehaves is a defect, not a gap — it goes under `Other findings` for standard triage, however you found it.
77
77
 
78
78
  ## OUTPUT FORMAT
79
79
 
80
- Emit each verification-gap finding as one block. No general advice, no severity or confidence.
80
+ Emit each verification-gap finding as one block. No general advice, no severity or confidence. Triage trusts a gap finding as filed and does not re-verify it, so each block must stand on its own evidence.
81
81
 
82
82
  ```markdown
83
83
  ### <one-line title naming the gap>
@@ -93,7 +93,7 @@ Emit each verification-gap finding as one block. No general advice, no severity
93
93
  - `Regression gap` / `Broken-verification gap`: the concrete regression that would ship undetected, and why the tests you checked would not fail.
94
94
  - `Missing-adoption gap`: the case the site mishandles by not adopting the new behavior, and that none of the tests you read assert adoption.
95
95
  - **Consequence:** the concrete thing that ships wrong — a regression the checked evidence would not catch, or a site that should use the new behavior and doesn't.
96
- - **Suggested test shape:** (optional) the kind of test that would close the gap, fit to the repo's own way of verifying don't impose a generic test pyramid.
96
+ - **Disposition:** `patch` name the test to add, fit to the repo's own way of verifying (don't impose a generic test pyramid) — or `defer` when the gap is real but not worth closing as part of this change, with one sentence of why.
97
97
  ```
98
98
 
99
99
  If you noticed genuine non-gap problems while tracing verification, append:
@@ -110,4 +110,4 @@ When you find no verification gaps and no other findings, output exactly this si
110
110
 
111
111
  ## CONTENT SOURCE
112
112
 
113
- Review the content supplied under "Review content:" in the message that launched you. If none is supplied, stop with exactly: `No verification gaps found.`
113
+ "Review content:" in the message that launched you gives the content itself or a path to read it from. Read the file when it is a path; either way that is the content under review, and this instruction file never is. If no content is supplied, or the file it points to is missing, empty, or unreadable, say exactly that and stop — never report a clean review for content you could not read.
@@ -3,6 +3,7 @@ title: '{title}'
3
3
  type: 'feature' # feature | bugfix | refactor | chore
4
4
  created: '{date}'
5
5
  status: 'draft' # draft | ready-for-dev | in-progress | in-review | done
6
+ route: '' # oneshot | dispatch — set by step-02's route gate after design
6
7
  review_loop_iteration: 0 # incremented by step-04 before each review loopback
7
8
  context: [] # optional: `{project-root}/`-prefixed paths to project-wide standards/docs the implementation agent should load. Keep short — only what isn't already distilled into the spec body.
8
9
  ---
@@ -24,13 +25,11 @@ context: [] # optional: `{project-root}/`-prefixed paths to project-wide standar
24
25
 
25
26
  ## Boundaries & Constraints
26
27
 
27
- <!-- Three tiers: Always = invariant rules. Ask First = human-gated decisions. Never = out of scope + forbidden approaches. -->
28
+ <!-- Two tiers: Always = invariant rules. Never = out of scope + forbidden approaches. -->
29
+ <!-- If step-02's route gate reported all facts clean (route: 'oneshot'), DELETE THIS ENTIRE SECTION. -->
28
30
 
29
31
  **Always:** INVARIANT_RULES
30
32
 
31
- **Ask First:** DECISIONS_REQUIRING_HUMAN_APPROVAL
32
- <!-- Agent: if any of these trigger during execution, HALT and ask the user before proceeding. -->
33
-
34
33
  **Never:** NON_GOALS_AND_FORBIDDEN_APPROACHES
35
34
 
36
35
  ## I/O & Edge-Case Matrix
@@ -44,9 +43,20 @@ context: [] # optional: `{project-root}/`-prefixed paths to project-wide standar
44
43
 
45
44
  </frozen-after-approval>
46
45
 
46
+ ## Open Questions
47
+
48
+ <!-- One entry per intent gap: something the request does not say, the code cannot settle,
49
+ and the user would notice in the result. Choices the user would not notice are yours. State the choice, the defensible
50
+ options, and each option's consequence. The spec cannot leave `draft` while any entry
51
+ remains: when the human answers, record the decision inside <frozen-after-approval> and
52
+ delete the entry. When no entries remain, DELETE THIS ENTIRE SECTION. -->
53
+
54
+ - CHOICE — options: OPTION_A (CONSEQUENCE_A) / OPTION_B (CONSEQUENCE_B)
55
+
47
56
  ## Code Map
48
57
 
49
58
  <!-- Agent-populated during planning. Annotated paths prevent blind codebase searching. -->
59
+ <!-- If step-02's route gate reported all facts clean (route: 'oneshot'), DELETE THIS ENTIRE SECTION. -->
50
60
 
51
61
  - `FILE` -- ROLE_OR_RELEVANCE
52
62
  - `FILE` -- ROLE_OR_RELEVANCE
@@ -56,6 +66,7 @@ context: [] # optional: `{project-root}/`-prefixed paths to project-wide standar
56
66
  <!-- Tasks: backtick-quoted file path -- action -- rationale. Prefer one task per file; group tightly-coupled changes when splitting would be artificial. -->
57
67
  <!-- If an I/O Matrix is present, include a task to unit-test its edge cases. -->
58
68
  <!-- AC covers system-level behaviors not captured by the I/O Matrix. Do not duplicate I/O scenarios here. -->
69
+ <!-- If step-02's route gate reported all facts clean (route: 'oneshot'), DELETE THIS ENTIRE SECTION. -->
59
70
 
60
71
  **Execution:**
61
72
  - [ ] `FILE` -- ACTION -- RATIONALE
@@ -63,6 +74,11 @@ context: [] # optional: `{project-root}/`-prefixed paths to project-wide standar
63
74
  **Acceptance Criteria:**
64
75
  - Given PRECONDITION, when ACTION, then EXPECTED_RESULT
65
76
 
77
+ ## Implementation Notes
78
+
79
+ <!-- Agent-owned. Append-only during implementation: decisions made, files touched, surprises
80
+ encountered. Leave empty at planning time; never delete this section. -->
81
+
66
82
  ## Spec Change Log
67
83
 
68
84
  <!-- Append-only. Populated by step-04 during review loops. Do not modify or delete existing entries.
@@ -70,6 +86,12 @@ context: [] # optional: `{project-root}/`-prefixed paths to project-wide standar
70
86
  the amendment avoids, and any KEEP instructions (what worked well and must survive re-derivation).
71
87
  Empty until the first bad_spec loopback. -->
72
88
 
89
+ ## Review Triage Log
90
+
91
+ <!-- Append-only. Populated by step-04 on every review pass: one row per reviewer finding —
92
+ verdict (high/medium/low/false/maybe-false) with its evidence: the refutation for
93
+ false, what would settle it for maybe-false. Empty until the first review pass. -->
94
+
73
95
  ## Design Notes
74
96
 
75
97
  <!-- If the approach is straightforward, DELETE THIS ENTIRE SECTION. Do not write "N/A" or "None". -->