bmad-method 6.11.1-next.2 → 6.11.1-next.20

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 (90) hide show
  1. package/package.json +2 -2
  2. package/src/bmm-skills/agents/bmad-agent-analyst/customize.toml +1 -3
  3. package/src/bmm-skills/agents/bmad-agent-architect/customize.toml +1 -3
  4. package/src/bmm-skills/agents/bmad-agent-dev/customize.toml +1 -3
  5. package/src/bmm-skills/agents/bmad-agent-pm/customize.toml +1 -3
  6. package/src/bmm-skills/agents/bmad-agent-ux-designer/customize.toml +1 -3
  7. package/src/bmm-skills/plan/bmad-architecture/SKILL.md +1 -1
  8. package/src/bmm-skills/plan/bmad-architecture/customize.toml +5 -6
  9. package/src/bmm-skills/plan/bmad-create-epics-and-stories/customize.toml +1 -3
  10. package/src/bmm-skills/plan/bmad-generate-project-context/SKILL.md +2 -0
  11. package/src/bmm-skills/plan/bmad-prd/customize.toml +5 -6
  12. package/src/bmm-skills/plan/bmad-prfaq/customize.toml +1 -3
  13. package/src/bmm-skills/plan/bmad-product-brief/customize.toml +5 -6
  14. package/src/bmm-skills/plan/bmad-project-context/SKILL.md +23 -12
  15. package/src/bmm-skills/plan/bmad-project-context/references/best-practices.md +26 -7
  16. package/src/bmm-skills/plan/bmad-project-context/references/template.md +1 -1
  17. package/src/bmm-skills/plan/bmad-spec/customize.toml +5 -5
  18. package/src/bmm-skills/plan/bmad-sprint-planning/customize.toml +1 -3
  19. package/src/bmm-skills/plan/bmad-sprint-planning/scripts/__pycache__/sprint_plan.cpython-311.pyc +0 -0
  20. package/src/bmm-skills/plan/bmad-sprint-planning/scripts/tests/__pycache__/test_sprint_plan.cpython-311-pytest-9.1.1.pyc +0 -0
  21. package/src/bmm-skills/plan/bmad-ux/customize.toml +1 -3
  22. package/src/bmm-skills/ship/bmad-build/SKILL.md +1 -1
  23. package/src/bmm-skills/ship/bmad-build/customize.toml +5 -7
  24. package/src/bmm-skills/ship/bmad-build/step-01-clarify-and-route.md +12 -7
  25. package/src/bmm-skills/ship/bmad-build/step-02-plan.md +13 -10
  26. package/src/bmm-skills/ship/bmad-build/step-04-review.md +1 -1
  27. package/src/bmm-skills/ship/bmad-build/step-oneshot.md +7 -8
  28. package/src/bmm-skills/ship/bmad-build-auto/customize.toml +7 -6
  29. package/src/bmm-skills/ship/bmad-build-auto/step-04-review.md +1 -1
  30. package/src/bmm-skills/ship/bmad-checkpoint-preview/customize.toml +1 -3
  31. package/src/bmm-skills/ship/bmad-code-review/customize.toml +14 -17
  32. package/src/bmm-skills/ship/bmad-code-review/references/claims-check.md +14 -0
  33. package/src/bmm-skills/ship/bmad-code-review/review-prompts/edge-case-hunter.md +29 -7
  34. package/src/bmm-skills/ship/bmad-code-review/review-prompts/verification-gap.md +1 -1
  35. package/src/bmm-skills/ship/bmad-code-review/steps/step-01-gather-context.md +22 -15
  36. package/src/bmm-skills/ship/bmad-code-review/steps/step-02-review.md +2 -2
  37. package/src/bmm-skills/ship/bmad-correct-course/SKILL.md +11 -3
  38. package/src/bmm-skills/ship/bmad-correct-course/customize.toml +1 -3
  39. package/src/bmm-skills/ship/bmad-qa-generate-e2e-tests/customize.toml +1 -3
  40. package/src/bmm-skills/ship/bmad-retrospective/customize.toml +1 -3
  41. package/src/bmm-skills/ship/bmad-retrospective/scripts/__pycache__/sprint_status.cpython-311.pyc +0 -0
  42. package/src/bmm-skills/ship/bmad-retrospective/scripts/tests/__pycache__/test_git_evidence.cpython-311-pytest-9.1.1.pyc +0 -0
  43. package/src/bmm-skills/ship/bmad-retrospective/scripts/tests/__pycache__/test_sprint_status.cpython-311-pytest-9.1.1.pyc +0 -0
  44. package/src/bmm-skills/v6-shims/bmad-create-architecture/SKILL.md +2 -0
  45. package/src/bmm-skills/v6-shims/bmad-create-architecture/customize.toml +1 -3
  46. package/src/bmm-skills/v6-shims/bmad-create-prd/SKILL.md +2 -0
  47. package/src/bmm-skills/v6-shims/bmad-create-prd/customize.toml +1 -3
  48. package/src/bmm-skills/v6-shims/bmad-create-story/SKILL.md +3 -1
  49. package/src/bmm-skills/v6-shims/bmad-create-story/customize.toml +1 -3
  50. package/src/bmm-skills/v6-shims/bmad-dev-auto/SKILL.md +2 -0
  51. package/src/bmm-skills/v6-shims/bmad-dev-story/SKILL.md +2 -0
  52. package/src/bmm-skills/v6-shims/bmad-dev-story/customize.toml +1 -6
  53. package/src/bmm-skills/v6-shims/bmad-document-project/SKILL.md +2 -0
  54. package/src/bmm-skills/v6-shims/bmad-domain-research/SKILL.md +2 -0
  55. package/src/bmm-skills/v6-shims/bmad-edit-prd/SKILL.md +2 -0
  56. package/src/bmm-skills/v6-shims/bmad-edit-prd/customize.toml +1 -3
  57. package/src/bmm-skills/v6-shims/bmad-market-research/SKILL.md +2 -0
  58. package/src/bmm-skills/v6-shims/bmad-quick-dev/SKILL.md +2 -0
  59. package/src/bmm-skills/v6-shims/bmad-sprint-status/SKILL.md +2 -0
  60. package/src/bmm-skills/v6-shims/bmad-sprint-status/customize.toml +1 -3
  61. package/src/bmm-skills/v6-shims/bmad-technical-research/SKILL.md +2 -0
  62. package/src/bmm-skills/v6-shims/bmad-validate-prd/SKILL.md +2 -0
  63. package/src/bmm-skills/v6-shims/bmad-validate-prd/customize.toml +1 -3
  64. package/src/core-skills/bmad-advanced-elicitation/SKILL.md +21 -22
  65. package/src/core-skills/bmad-brainstorming/customize.toml +5 -6
  66. package/src/core-skills/bmad-forge-idea/customize.toml +5 -6
  67. package/src/core-skills/bmad-party-mode/customize.toml +4 -4
  68. package/src/core-skills/bmad-review/SKILL.md +3 -3
  69. package/src/core-skills/bmad-review/customize.toml +1 -1
  70. package/src/core-skills/v6-shims/bmad-editorial-review/SKILL.md +2 -0
  71. package/src/core-skills/v6-shims/bmad-editorial-review-prose/SKILL.md +2 -0
  72. package/src/core-skills/v6-shims/bmad-editorial-review-structure/SKILL.md +2 -0
  73. package/src/core-skills/v6-shims/bmad-review-adversarial-general/SKILL.md +2 -0
  74. package/src/core-skills/v6-shims/bmad-review-edge-case-hunter/SKILL.md +2 -0
  75. package/src/core-skills/v6-shims/bmad-review-verification-gap/SKILL.md +2 -0
  76. package/src/scripts/__pycache__/config_utils.cpython-311.pyc +0 -0
  77. package/src/scripts/tests/__pycache__/test_config_utils.cpython-311.pyc +0 -0
  78. package/src/scripts/tests/__pycache__/test_resolve_config.cpython-311.pyc +0 -0
  79. package/src/scripts/tests/__pycache__/test_resolve_customization.cpython-311.pyc +0 -0
  80. package/tools/installer/commands/install.js +2 -0
  81. package/tools/installer/core/config.js +3 -0
  82. package/tools/installer/core/installer.js +57 -1
  83. package/tools/installer/core/manifest-generator.js +6 -0
  84. package/tools/installer/core/manifest.js +6 -0
  85. package/tools/installer/core/shim-policy.js +159 -0
  86. package/tools/installer/ide/_config-driven.js +3 -3
  87. package/tools/installer/ide/platform-codes.yaml +7 -0
  88. package/tools/installer/modules/official-modules.js +38 -6
  89. package/tools/installer/prompts.js +15 -2
  90. package/tools/installer/ui.js +68 -3
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "bmad-method",
4
- "version": "6.11.1-next.2",
4
+ "version": "6.11.1-next.20",
5
5
  "description": "Breakthrough Method of Agile AI-driven Development",
6
6
  "keywords": [
7
7
  "agile",
@@ -44,7 +44,7 @@
44
44
  "rebundle": "node tools/installer/bundlers/bundle-web.js rebundle",
45
45
  "test": "npm run test:refs && npm run test:install && npm run test:urls && npm run test:site-url && npm run test:channels && npm run test:renderer && npm run test:retrospective && npm run test:sprint-planning && npm run test:skills && npm run lint && npm run lint:md && npm run format:check",
46
46
  "test:channels": "node test/test-installer-channels.js",
47
- "test:install": "node test/test-installation-components.js",
47
+ "test:install": "node test/test-installation-components.js && node test/test-shim-policy.js",
48
48
  "test:refs": "node test/test-file-refs-csv.js",
49
49
  "test:renderer": "uv run --python 3.11 python -m unittest src/scripts/tests/test_config_utils.py src/scripts/tests/test_resolve_config.py src/scripts/tests/test_resolve_customization.py && node test/test-build-auto-renderer.js",
50
50
  "test:retrospective": "uv run --python 3.11 src/bmm-skills/ship/bmad-retrospective/scripts/tests/test_git_evidence.py && uv run --python 3.11 src/bmm-skills/ship/bmad-retrospective/scripts/tests/test_sprint_status.py",
@@ -35,9 +35,7 @@ activation_steps_append = []
35
35
  # - a file reference prefixed with `file:`, e.g. "file:{project-root}/docs/standards.md"
36
36
  # (glob patterns are supported; the file's contents are loaded and treated as facts).
37
37
 
38
- persistent_facts = [
39
- "file:{project-root}/**/project-context.md",
40
- ]
38
+ persistent_facts = []
41
39
 
42
40
  role = "Help the user ideate research and analyze before committing to a project in the BMad Method analysis phase."
43
41
  identity = "Channels Michael Porter's strategic rigor and Barbara Minto's Pyramid Principle discipline."
@@ -35,9 +35,7 @@ activation_steps_append = []
35
35
  # - a file reference prefixed with `file:`, e.g. "file:{project-root}/docs/standards.md"
36
36
  # (glob patterns are supported; the file's contents are loaded and treated as facts).
37
37
 
38
- persistent_facts = [
39
- "file:{project-root}/**/project-context.md",
40
- ]
38
+ persistent_facts = []
41
39
 
42
40
  role = "Convert the PRD and UX into technical architecture decisions that keep implementation on track during the BMad Method solutioning phase."
43
41
  identity = "Channels Martin Fowler's pragmatism and Werner Vogels's cloud-scale realism."
@@ -35,9 +35,7 @@ activation_steps_append = []
35
35
  # - a file reference prefixed with `file:`, e.g. "file:{project-root}/docs/standards.md"
36
36
  # (glob patterns are supported; the file's contents are loaded and treated as facts).
37
37
 
38
- persistent_facts = [
39
- "file:{project-root}/**/project-context.md",
40
- ]
38
+ persistent_facts = []
41
39
 
42
40
  role = "Implement approved stories with test-first discipline and ship working, verified code during the BMad Method implementation phase."
43
41
  identity = "Disciplined in Kent Beck's TDD and the Pragmatic Programmer's precision."
@@ -35,9 +35,7 @@ activation_steps_append = []
35
35
  # - a file reference prefixed with `file:`, e.g. "file:{project-root}/docs/standards.md"
36
36
  # (glob patterns are supported; the file's contents are loaded and treated as facts).
37
37
 
38
- persistent_facts = [
39
- "file:{project-root}/**/project-context.md",
40
- ]
38
+ persistent_facts = []
41
39
 
42
40
  role = "Translate product vision into a validated PRD, epics, and stories that development can execute during the BMad Method planning phase."
43
41
  identity = "Thinks like Marty Cagan and Teresa Torres. Writes with Bezos's six-pager discipline."
@@ -35,9 +35,7 @@ activation_steps_append = []
35
35
  # - a file reference prefixed with `file:`, e.g. "file:{project-root}/docs/standards.md"
36
36
  # (glob patterns are supported; the file's contents are loaded and treated as facts).
37
37
 
38
- persistent_facts = [
39
- "file:{project-root}/**/project-context.md",
40
- ]
38
+ persistent_facts = []
41
39
 
42
40
  role = "Turn user needs and the PRD into UX design specifications that inform architecture and implementation during the BMad Method planning phase."
43
41
  identity = "Grounded in Don Norman's human-centered design and Alan Cooper's persona discipline."
@@ -50,7 +50,7 @@ Writes go through the shared script (don't read the file back except on resume):
50
50
 
51
51
  **Forwarded activation:** if a caller invoked you with a stated intent and pre-resolved customization fields, honor them verbatim — skip your own intent inference, use the supplied values for those named fields, and resolve only the remaining fields from your own `customize.toml`.
52
52
 
53
- 1. Resolve customization: `uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow` (on failure read `{skill-root}/customize.toml`, use defaults). Run `{workflow.activation_steps_prepend}`, then `{workflow.activation_steps_append}`. Hold `{workflow.persistent_facts}` as standing context — the default loads `project-context.md`, load-bearing for brownfield — and consult `{workflow.external_sources}` on demand.
53
+ 1. Resolve customization: `uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow` (on failure read `{skill-root}/customize.toml`, use defaults). Run `{workflow.activation_steps_prepend}`, then `{workflow.activation_steps_append}`. Hold `{workflow.persistent_facts}` as standing context — empty unless the user opted in — and consult `{workflow.external_sources}` on demand.
54
54
  2. 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}` (under `core`), `{planning_artifacts}` (under `modules.bmm`), and `{date}`; missing keys take neutral defaults, never block.
55
55
  3. Headless (no interactive user) → follow `references/headless.md` for the whole run. Otherwise greet `{user_name}` in `{communication_language}`. Detect the intent from the conversation and input — **create** (the default), **update** an existing spine, or **validate** one (see those sections). If the real ask is requirements / UX / a capability contract / epic breakdown / an agent, invoke the `bmad-prd`, `bmad-ux`, `bmad-spec`, `bmad-create-epics-and-stories`, or `bmad-workflow-builder` (if the BMad Builder module is installed) skill instead.
56
56
  4. If a run folder for this target already exists under `{workflow.spine_output_path}`, offer to resume from its memlog rather than restart.
@@ -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
25
25
  # path/glob whose contents are loaded as facts.
26
26
  #
27
- # Default loads project-context.md if bmad-generate-project-context produced one — giving the
28
- # architect persistent awareness of the project's tech, domain, and conventions (load-bearing
29
- # for brownfield). 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
30
  # "Our org is AWS-only -- do not propose GCP or Azure."
31
31
  # "file:{project-root}/docs/engineering-standards.md"
32
- persistent_facts = [
33
- "file:{project-root}/**/project-context.md",
34
- ]
32
+ # "file:{project-root}/**/project-context.md" # if you keep a project-context.md
33
+ persistent_facts = []
35
34
 
36
35
  # Executed when the workflow completes (after the spine is final and the user has been told).
37
36
  # String scalar (single instruction) or array of instructions executed in order. Empty for none.
@@ -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 Step 4 (Final Validation) and the
38
36
  # user confirms [C] Complete — after the epics.md is saved and bmad-help is invoked.
@@ -1,6 +1,8 @@
1
1
  ---
2
2
  name: bmad-generate-project-context
3
3
  description: 'Deprecated — forwards to bmad-project-context. Use when the user says "generate project context" or "create project context"'
4
+ metadata:
5
+ lifecycle: shim
4
6
  ---
5
7
 
6
8
  # DEPRECATED — forwards to bmad-project-context
@@ -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
  # "Investor PRDs must include a market sizing section." # 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
  # PRD is ready). Accepts either a string scalar (single instruction)
@@ -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 terminal stage (Stage 5: The Verdict),
38
36
  # after the PRFAQ and distillate have been delivered. Override wins. Leave empty for
@@ -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, 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. Must be invoked by name'
4
4
  ---
5
5
 
6
6
  # Overview
@@ -9,7 +9,7 @@ A conversation that produces a repository's agent instructions: a small verified
9
9
 
10
10
  Conversational always; the user approves every write.
11
11
 
12
- **Args:** intent (`setup` | `refresh` | `record` | `audit`); a target repo or path; extra source paths or URLs. Supplied values skip their questions.
12
+ **Args:** intent (`setup` | `adopt` | `refresh` | `record` | `audit`); a target repo or path; extra source paths or URLs.
13
13
 
14
14
  ## Resolution rules
15
15
 
@@ -22,9 +22,9 @@ Conversational always; the user approves every write.
22
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).
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
- 4. Detect intent and greet `{user_name}`: **setup** (no block in the target — the default), **refresh** (a block exists), **record** (the user reports a mistake agents made), **audit** (re-verify and prune). Fold `{workflow.external_sources}` into the source list. Execute `{workflow.activation_steps_append}`.
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}`.
26
26
 
27
- ## Setup and Refresh Steps
27
+ ## Setup, Adoption, and Refresh Steps
28
28
 
29
29
  No writes until step 5!
30
30
 
@@ -32,6 +32,8 @@ No writes until step 5!
32
32
 
33
33
  Read `AGENTS.md`, harness or agent specific rule files, docs folders, and any notes carrying lessons. Report what exists and how it measures up, per `best-practices.md`.
34
34
 
35
+ Existing instructions are the baseline being improved, never raw material to discard. Open a **ledger**: one entry per existing section and per independently meaningful instruction, opened at `retain` or `rewrite`, carrying what an agent would get wrong without it. Entries settle as evidence arrives in steps 2–4 — `retain | rewrite | relocate | automate | delete`, each with its reason, its evidence, the risk if it goes, a destination for a relocation, and an approval flag. Deletion needs one of the four grounds in `best-practices.md`, and a relocation destination must itself be loaded or sit behind an observable trigger — a move into a file nothing reads is a deletion and needs its ground. Setup has nothing to map and opens no ledger; refresh opens entries for the lines it proposes to change or remove, the block's own included. A lesson found outside the instruction files — a warning in a README, a notes file — is an ordinary candidate, not a ledger entry.
36
+
35
37
  If the target contains separable units — a workspace manifest listing members, or directories carrying their own build manifest — name them and ask whether this run covers the root only, all of them, or which. Absent that evidence, do not ask. Sibling repositories are not children; each is its own target, offered in turn.
36
38
 
37
39
  ### 2. Ask what they bring
@@ -44,7 +46,7 @@ Greenfield: this is the whole content. Brownfield: it is the half no scan reache
44
46
 
45
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.
46
48
 
47
- `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.
48
50
 
49
51
  Each child agreed in step 1 is scanned as its own scope, against its own manifests.
50
52
 
@@ -61,9 +63,9 @@ Only what no scan reaches: what agents keep getting wrong here, what is off limi
61
63
 
62
64
  ### 5. Show the block, then write it
63
65
 
64
- 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.
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).
65
67
 
66
- **Show the complete block before writing it**, and every child block alongside it — one approval covers the set. On approval, splice between the markers, leaving everything outside them byte-identical. 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.
67
69
 
68
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.
69
71
 
@@ -71,15 +73,22 @@ Never commit.
71
73
 
72
74
  ### 6. Close
73
75
 
74
- - What went in, and what was left out and why.
76
+ - What went in, what was left out and why, and — after adoption or refresh — where each existing instruction landed.
75
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.
76
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.
77
80
  - Maintenance: re-run after significant change, `record` the moment an agent gets something wrong, prefer a check over a new line.
78
81
  - Rules repeating across their projects, or personal rather than the team's, belong in their global agent config.
79
82
 
80
83
  ### Refresh
81
84
 
82
- Same steps, step 1 as a diff. Read the provenance line, re-verify every path and every caveat, and run `git log --diff-filter=DR --name-only` since the recorded SHA against every line — update or remove lines whose evidence is gone. Never re-ask what a prior run settled; the interview shrinks to what changed about how the team works. The block grows only on new evidence.
85
+ Same steps, step 1 as a diff. Read the provenance line, re-verify every path and every caveat, and run `git log --diff-filter=DR --name-only` since the recorded SHA against every line — update or remove lines whose evidence is gone. Every proposed removal is a ledger entry shown in step 5, never a silent edit, and handwritten instructions outside the block are treated as in adoption — any proposal touching them enters the ledger. Never re-ask what a prior run settled; the interview shrinks to what changed about how the team works. The block grows only on new evidence.
86
+
87
+ ### Adoption
88
+
89
+ Refresh against instructions this skill has never touched. Nothing was settled by a prior run, so the full interview applies — and the file itself is maintainer testimony, so the ledger is the run's main output: the user should be able to read it and see where each of their instructions went.
90
+
91
+ The proposal states what remains of every file instructions were moved out of — commonly a `CLAUDE.md` reduced to `@AGENTS.md`, once that import is verified for every harness in use, like any loading mechanism. No instruction lives in two loaded files, where it is paid for twice; a duplicate, verbatim or reworded, is kept once — the block keeps the survivor — and that settles both entries.
83
92
 
84
93
  ### Greenfield
85
94
 
@@ -97,13 +106,15 @@ Take the task, the mistake, the correction, and its evidence. Check the block fo
97
106
 
98
107
  ## Audit
99
108
 
100
- 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.
101
110
 
102
- Failing lines move behind an observable trigger, get fixed, or are deleted confirm deletions first. **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
+ 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.
103
112
 
104
113
  ## Children
105
114
 
106
- A component, nested repository, or extracted rules file gets its own file under the same shape when work keeps landing there and its truths do not belong at the parent level. Rules bounded to a directory go in a nested `AGENTS.md` there, attached by location. Use a linked file only when the trigger is not a path.
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`.
116
+
117
+ Use a linked file only when the trigger is not a path.
107
118
 
108
119
  A chosen child that ends with nothing its parent does not already say gets no file. Say so and move on.
109
120
 
@@ -4,15 +4,19 @@ Rules for deciding what goes in the block, for judging what a repo already has,
4
4
 
5
5
  ## The test
6
6
 
7
- Can an agent derive this by reading the repository? If yes, leave it out a stored copy is a stale duplicate of something the agent reads more accurately first-hand, and it is charged on every session. Write down what the code cannot say.
7
+ Not *could an agent derive this* but *what does it cost when it doesn't*: how much exploration finding it takes, how likely the agent is to search the right place in time rather than guess, whether it is available at the point of use or only after the mistake, what a retrieval failure costs — a wasted search, or corrupt data — and whether it is a rule that must hold or a detail the code already shows.
8
+
9
+ A line that stops the same rediscovery every session earns its place, derivable or not. A stored copy of what the agent reads more accurately first-hand does not — it rots, and it is charged every session.
8
10
 
9
11
  ## Admit
10
12
 
11
13
  - **Policy the code cannot express** — branch rules, frozen and protected paths, generated files, secrets, security and compliance. Stated by a human or read off an enforcing config, never inferred.
12
- - **What a config file cannot say about running the project** — the root test script does nothing in this workspace, integration tests need a service up first, the suite takes eleven minutes so iterate on single files, the `Makefile` is the real entry point and `package.json` is vestigial, CI runs a typecheck the test script does not. The invocation itself is already stated in `package.json`, `Makefile`, `pyproject.toml`, or CI config and does not earn a line — the correction or the caveat does.
14
+ - **What a config file cannot say about running the project** — the root test script does nothing in this workspace, integration tests need a service up first, the suite takes eleven minutes so iterate on single files, the `Makefile` is the real entry point and `package.json` is vestigial, CI runs a typecheck the test script does not. An invocation the obvious guess gets right is already stated in `package.json`, `Makefile`, `pyproject.toml`, or CI config and does not earn a line — the correction, the caveat, and the right command to use do.
13
15
  - **Conventions that differ from ecosystem defaults.** An agent follows the norm unless told otherwise, so only the divergences earn a line. Command invocations count: when the obvious command is wrong here — a bare-repo prefix, a required wrapper — the exact working invocation earns a line, and no observed mistake is needed to admit it.
14
16
  - **Pitfalls with observed evidence** — a recorded lesson, the maintainer's recollection, the same mistake fixed repeatedly in history, or one this session made and caught. A repo yields hundreds of trap-looking facts and none of them predict real mistakes; only observed behavior does. A surprising scan finding is a question to ask, not a line to write.
15
17
  - **Runtime behavior invisible from the repo** — replaying webhooks, lying health endpoints, environment quirks — once a human confirms it.
18
+ - **Cross-component rules**, admitted when getting one wrong in one file breaks something elsewhere — what must stay true across parts of the system the agent cannot see from the file it is editing: who owns what, how data must flow, what order a pipeline runs in. "Writes go through the dispatcher; direct store mutation skips the transaction." "The importer is two passes — validate every row, then commit; never write inside the parse loop." A six-line map of who owns what. Never an inventory written for completeness; the exclusions below still bind.
19
+ - **Required tool and runtime versions**, read from the project files that declare them, never from this session's environment — which answers faster, and wrongly, so the mistake arrives before the search.
16
20
  - **Entry points and pointers** to where work lands.
17
21
 
18
22
  Prefer prohibitions to advice, and name the permitted alternative in the same line.
@@ -25,26 +29,30 @@ Prefer prohibitions to advice, and name the permitted alternative in the same li
25
29
  | Anything included for being interesting | Interest is not need |
26
30
  | Style rules an agent self-enforces | Belongs in a formatter, linter, hook, or CI check — propose the check instead |
27
31
  | Platitudes | Already the default |
28
- | Commands already stated in `package.json`, a `Makefile`, or CI config | Read from the source of truth; a copy drifts the moment a script is renamed |
32
+ | Transcribed command lists whose obvious invocation is already right | Read from `package.json`, a `Makefile`, or CI config; a copy drifts the moment a script is renamed. The right command to use, and any command the obvious guess gets wrong, are admitted above |
29
33
  | Pasted code, changelog content, fast-changing facts | Stale immediately |
30
34
  | Aspirational state | Describe what is; intent belongs in specs |
31
35
  | History and edit narration | Git holds it; state present truth |
32
36
 
33
37
  ## Retire
34
38
 
35
- A policy or pitfall goes only when the thing it guards is gone, or the user retires it. Nothing failing lately is not evidence — a working rule erases its own evidence.
39
+ A policy or pitfall goes only when the thing it guards is gone, or the user retires it. Nothing failing lately is not evidence — a working rule erases its own evidence. Any other existing instruction goes only on one of the four grounds under "Judging an existing file".
36
40
 
37
- Every other line faces one question at each write: would removing it change agent behavior? If no, cut it.
41
+ Every line faces one question at each write: would removing it change agent behavior? If no, cut it — but for a line a human wrote, that answer only opens a candidate; a ground still has to carry it.
38
42
 
39
43
  ## Size
40
44
 
41
45
  Every line is paid in every session, and instruction-following degrades as the loaded set grows. Count what other always-loaded files add. Over budget means cut the weakest lines or move them behind a trigger — never raise the budget. Ten lines of evidence means ten lines.
42
46
 
47
+ An adopted file must fit the budget too, but shrinking it works differently. Move the weakest instructions out first — into a child file, a linked doc, or a hook or check that enforces them. Deleting still needs one of the four grounds. If the file is still too big and no ground justifies another deletion, show the user and let them decide — an over-budget file they chose beats a gutted one they didn't. "Keep it small" disciplines what this skill writes, never what the maintainer already wrote.
48
+
43
49
  ## Retrieval
44
50
 
45
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").
46
52
 
47
- Rules bounded to a directory go in a nested `AGENTS.md` there, attached by location rather than by pointer. Use a linked file only when the trigger is not a path.
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
+
55
+ Use a linked file only when the trigger is not a path.
48
56
 
49
57
  ## Maintain
50
58
 
@@ -62,4 +70,15 @@ Two things belong in the user's global agent config instead — rules repeating
62
70
 
63
71
  ## Judging an existing file
64
72
 
65
- Report, in this order: what is derivable filler, what is unverifiable or stale, what is missing against the sections above, and what is already good. Keep recorded lessons by default they are maintainer testimony, and are challenged only with evidence that the thing they name is gone or wrong.
73
+ Every instruction a human wrote is presumed intentional: someone paid for it, usually by watching an agent fail. The file is the baseline being improved, not raw material. Keep its phrasing where it works, and carry each instruction through a ledger entry `retain | rewrite | relocate | automate | delete`, opened at retain or rewrite — so the user sees where all of it went.
74
+
75
+ **Deletion needs one of four grounds:**
76
+
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 named by the instruction. A tool that only covers the same files or topic does not enforce the instruction.
79
+ 3. **Harmful or contradictory** — it points agents at the wrong thing, or it contradicts another live instruction and loses the reconciliation.
80
+ 4. **The user approved this deletion** — asked as a line item, never implied by approving a replacement block.
81
+
82
+ Grounds 1–3 are evidence the run carries itself, and ride the block approval; ground 4 is the ask-first path everything else takes. Nothing else deletes. Brevity is not grounds, nothing failing lately is not grounds, "the agent could derive it" is not grounds, and **"it is discoverable somewhere in the repository" is never, alone, grounds** — that is the reasoning that empties good files. Content the exclusions table rejects — a directory tree, a stack list, pasted code — has no ground of its own: propose the deletion and let it land under ground 4, asked rather than assumed.
83
+
84
+ Report, in this order: what is unverifiable or stale, what is missing against the sections above, what is already good, and the ledger, every relocation, automation, and deletion itemized. Recorded lessons are maintainer testimony — kept by default, challenged only with evidence that the thing they name is gone or wrong.
@@ -5,7 +5,7 @@ Sections in this order. Omit any section with nothing that passes its rule — n
5
5
  1. **Orientation** — three or four sentences: what this is, the stack, where planning and deeper docs live.
6
6
  2. **Policy** — what the org requires.
7
7
  3. **Where things are** — entry points, and pointers to children and linked files.
8
- 4. **Running and verifying** — only what `package.json`, a `Makefile`, or CI config does not already say.
8
+ 4. **Running and verifying** — the right commands to run and the required tool versions, plus what `package.json`, `pyproject.toml`, a `Makefile`, or CI config does not already say.
9
9
  5. **Conventions that differ from defaults**
10
10
  6. **Known pitfalls**
11
11
 
@@ -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 = ""
@@ -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.
@@ -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: 'Implement any requirement, story, bug fix, or change request as working code that follows the project''s existing architecture, patterns, and conventions. Use when the user wants to build, fix, tweak, refactor, add, or modify any code, component, or feature'
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.'
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,9 +24,7 @@ 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.
@@ -105,7 +103,7 @@ If you have zero findings, re-check and keep thinking; do not stop with an empty
105
103
  CONTENT:
106
104
  {diff_output}
107
105
 
108
- Do not invoke any skill. Return only the review result.
106
+ 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
107
 
110
108
  """
111
109
 
@@ -121,7 +119,7 @@ Review content:
121
119
 
122
120
  {diff_output}
123
121
 
124
- Do not invoke any skill. If the instruction file is unreadable, report that exact failure and stop. Return only the review result.
122
+ 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
123
 
126
124
  """
127
125
 
@@ -137,7 +135,7 @@ Review content:
137
135
 
138
136
  {diff_output}
139
137
 
140
- Do not invoke any skill. If the instruction file is unreadable, report that exact failure and stop. Return only the review result.
138
+ 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
139
 
142
140
  """
143
141
 
@@ -159,6 +157,6 @@ If you have zero findings, re-check and keep thinking; do not stop with an empty
159
157
  CONTENT:
160
158
  The changed files in the current worktree. Inspect them directly before reviewing.
161
159
 
162
- Do not invoke any skill. Return only the review result.
160
+ 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
161
 
164
162
  """
@@ -30,10 +30,13 @@ Before listing artifacts or prompting the user, check whether you already know t
30
30
  Use the same routing as above.
31
31
 
32
32
  3. Otherwise — scan artifacts and ask
33
- - Active specs (`draft`, `ready-for-dev`, `in-progress`, `in-review`) in `{{.implementation_artifacts}}`? → List them and HALT. Ask user which to resume (or `[N]` for new).
34
- - If `draft` selected: Set `spec_file`. Run **Story-key resolution** (below). **EARLY EXIT** → `[[bmad-snapshot:step-02-plan.md]]` (resume planning from the draft)
35
- - If `ready-for-dev` or `in-progress` selected: Set `spec_file`. Run **Story-key resolution** (below). **EARLY EXIT** → `[[bmad-snapshot:step-03-implement.md]]`
36
- - If `in-review` selected: Set `spec_file`. Run **Story-key resolution** (below). **EARLY EXIT** → `[[bmad-snapshot:step-04-review.md]]`
33
+ - Active specs (`draft`, `ready-for-dev`, `in-progress`, `in-review`) in `{{.implementation_artifacts}}`? → List them and HALT. Give the user a choice:
34
+ - Resume one of the listed specs
35
+ - **New** start new work
36
+ If `draft` selected: Set `spec_file`. Run **Story-key resolution** (below). **EARLY EXIT** → `[[bmad-snapshot:step-02-plan.md]]` (resume planning from the draft)
37
+ If `ready-for-dev` or `in-progress` selected: Set `spec_file`. Run **Story-key resolution** (below). **EARLY EXIT** → `[[bmad-snapshot:step-03-implement.md]]`
38
+ If `in-review` selected: Set `spec_file`. Run **Story-key resolution** (below). **EARLY EXIT** → `[[bmad-snapshot:step-04-review.md]]`
39
+ If the user chooses **New**: proceed to INSTRUCTIONS
37
40
  - Unformatted spec or intent file lacking `status` frontmatter? → Suggest treating its contents as the starting intent. Do NOT attempt to infer a state and resume it.
38
41
 
39
42
  Never ask extra questions if you already understand what the user intends.
@@ -82,14 +85,16 @@ If the spec is an epic story and `{{.implementation_artifacts}}/sprint-status.ya
82
85
  4. Multi-goal check (see SCOPE STANDARD). If the intent fails the single-goal criteria:
83
86
  - Present detected distinct goals as a bullet list.
84
87
  - Explain briefly (2–4 sentences): why each goal qualifies as independently shippable, any coupling risks if split, and which goal you recommend tackling first.
85
- - HALT and ask human: `[S] Split — pick first goal, defer the rest` | `[K] Keep all goals — accept the risks`
86
- - On **S**: For each deferred goal, append one new entry to `{{.implementation_artifacts}}/deferred-work.md` using this format. Do not modify existing entries or look for duplicates. Narrow scope to the first-mentioned goal. Continue routing.
88
+ - HALT and give the user a choice:
89
+ - **Split** pick first goal, defer the rest.
90
+ - **Keep all goals** — accept the risks.
91
+ - If the user chooses **Split**: For each deferred goal, append one new entry to `{{.implementation_artifacts}}/deferred-work.md` using this format. Do not modify existing entries or look for duplicates. Narrow scope to the first-mentioned goal. Continue routing.
87
92
  ```markdown
88
93
  - source_spec: none
89
94
  summary: <one sentence naming the deferred goal>
90
95
  evidence: <why this was split from the current intent>
91
96
  ```
92
- - On **K**: Proceed as-is.
97
+ - If the user chooses **Keep all goals**: Proceed as-is.
93
98
  5. Route — choose exactly one:
94
99
 
95
100
  If the explicit spec-folder-plus-story-id pair had no matching story file, keep the colocated `spec_file` selected above. Otherwise, derive a valid kebab-case slug from the clarified intent. If the intent references a tracking identifier (story number, issue number, ticket ID), lead the slug with it (e.g. `3-2-digest-delivery`, `gh-47-fix-auth`). If `{{.implementation_artifacts}}/spec-{slug}.md` already exists: if its status is `draft`, treat it as the same work and resume it (set `spec_file` to that path, **EARLY EXIT** → `[[bmad-snapshot:step-02-plan.md]]`); otherwise append `-2`, `-3`, etc. Set `spec_file` = `{{.implementation_artifacts}}/spec-{slug}.md`.
@@ -14,33 +14,36 @@
14
14
  5. If intent gaps exist, do not fantasize, do not leave open questions, HALT and ask the human.
15
15
  6. Token count check (see SCOPE STANDARD). If spec exceeds 1600 tokens:
16
16
  - Show user the token count.
17
- - HALT and ask human: `[S] Split — carve off secondary goals` | `[K] Keep full spec — accept the risks`
18
- - On **S**: Propose the split name each secondary goal. For each deferred goal, append one new entry to `{{.implementation_artifacts}}/deferred-work.md` using this format. Do not modify existing entries or look for duplicates. Rewrite the current spec to cover only the main goal — do not surgically carve sections out; regenerate the spec for the narrowed scope. Continue to checkpoint.
17
+ - HALT and give the user a choice:
18
+ - **Split**carve off secondary goals.
19
+ - **Keep full spec** — accept the risks.
20
+ - If the user chooses **Split**: Propose the split — name each secondary goal. For each deferred goal, append one new entry to `{{.implementation_artifacts}}/deferred-work.md` using this format. Do not modify existing entries or look for duplicates. Rewrite the current spec to cover only the main goal — do not surgically carve sections out; regenerate the spec for the narrowed scope. Continue to checkpoint.
19
21
  ```markdown
20
22
  - source_spec: `{spec_file}`
21
23
  summary: <one sentence naming the deferred goal>
22
24
  evidence: <why this was split from the current spec>
23
25
  ```
24
- - On **K**: Continue to checkpoint with full spec.
26
+ - If the user chooses **Keep full spec**: Continue to checkpoint with the full spec.
25
27
 
26
28
  ### CHECKPOINT 1
27
29
 
28
- Present summary. Display the spec file path as a CWD-relative path (no leading `/`) so it is clickable in the terminal. If token count exceeded 1600 and user chose [K], include the token count and explain why it may be a problem.
30
+ Present summary. Display the spec file path as a CWD-relative path (no leading `/`) so it is clickable in the terminal. If token count exceeded 1600 and the user chose to keep the full spec, include the token count and explain why it may be a problem.
29
31
 
30
32
  After presenting the summary, display this note:
31
33
 
32
34
  ---
33
35
 
34
- Before approving, you can open the spec file in an editor or ask me questions and tell me what to change. You can also use `bmad-advanced-elicitation`, `bmad-party-mode`, or `bmad-code-review` skills, ideally in another session to avoid context bloat.
36
+ Before approving, you can open the spec file in an editor or ask me questions and tell me what to change. You can also use `bmad-advanced-elicitation` or `bmad-party-mode`, ideally in another session to avoid context bloat.
35
37
 
36
38
  ---
37
39
 
38
- HALT and ask human: `[A] Approve` | `[E] Edit`
40
+ HALT and give the user a choice:
39
41
 
40
- - **A**: Re-read `{spec_file}` from disk.
41
- - **If the file is missing:** HALT. Tell the user the spec file is gone and STOP do not write anything to `{spec_file}`, do not set status, do not proceed to Step 3. Nothing below this point runs.
42
- - **If the file exists:** Compare the content to what you wrote. If it has changed since you wrote it, acknowledge the external edits — show a brief summary of what changed — and proceed with the updated version. Then set status `ready-for-dev` in `{spec_file}`. Everything inside `<frozen-after-approval>` is now locked — only the human can change it. → Step 3.
43
- - **E**: Apply changes, then return to CHECKPOINT 1.
42
+ - **Approve and continue** approve the spec and proceed to implementation in this session.
43
+ - **Approve and stop** approve the spec, leave it `ready-for-dev`, and stop so a fresh `bmad-build` session can resume at implementation.
44
+ - **Review spec** review the spec, use a subagent if available, and discuss the findings and revisions with the user until the user is ready to approve, then either stop or continue.
45
+
46
+ Before acting on approval, re-read `{spec_file}` from disk. If it is missing, HALT without recreating it, changing status, or proceeding. If it changed, acknowledge the external edits and continue with the updated version. Set status `ready-for-dev`; everything inside `<frozen-after-approval>` is then locked and only the human can change it.
44
47
 
45
48
  ## NEXT
46
49