bmad-method 6.10.1-next.2 → 6.10.1-next.21

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 (156) hide show
  1. package/.claude-plugin/marketplace.json +52 -27
  2. package/package.json +4 -3
  3. package/removals.txt +5 -0
  4. package/src/bmm-skills/1-analysis/bmad-agent-analyst/customize.toml +19 -4
  5. package/src/bmm-skills/1-analysis/bmad-product-brief/SKILL.md +1 -1
  6. package/src/bmm-skills/1-analysis/bmad-product-brief/customize.toml +5 -3
  7. package/src/bmm-skills/2-plan-workflows/bmad-prd/SKILL.md +2 -0
  8. package/src/bmm-skills/2-plan-workflows/bmad-prd/customize.toml +5 -3
  9. package/src/{core-skills → bmm-skills/2-plan-workflows}/bmad-spec/SKILL.md +18 -3
  10. package/src/{core-skills → bmm-skills/2-plan-workflows}/bmad-spec/assets/spec-template.md +1 -1
  11. package/src/bmm-skills/2-plan-workflows/bmad-spec/assets/stories-schema.md +44 -0
  12. package/src/{core-skills → bmm-skills/2-plan-workflows}/bmad-spec/customize.toml +3 -4
  13. package/src/bmm-skills/2-plan-workflows/bmad-ux/customize.toml +4 -2
  14. package/src/bmm-skills/3-solutioning/bmad-architecture/SKILL.md +2 -2
  15. package/src/bmm-skills/3-solutioning/bmad-architecture/customize.toml +4 -2
  16. package/src/bmm-skills/4-implementation/bmad-agent-dev/customize.toml +3 -0
  17. package/src/bmm-skills/4-implementation/bmad-code-review/SKILL.md +2 -4
  18. package/src/bmm-skills/4-implementation/bmad-code-review/customize.toml +52 -0
  19. package/src/bmm-skills/4-implementation/bmad-code-review/steps/step-01-gather-context.md +0 -1
  20. package/src/bmm-skills/4-implementation/bmad-code-review/steps/step-02-review.md +10 -24
  21. package/src/bmm-skills/4-implementation/bmad-code-review/steps/step-03-triage.md +3 -4
  22. package/src/bmm-skills/4-implementation/bmad-dev-auto/SKILL.md +33 -12
  23. package/src/bmm-skills/4-implementation/bmad-dev-auto/customize.toml +75 -0
  24. package/src/bmm-skills/4-implementation/bmad-dev-auto/spec-template.md +4 -4
  25. package/src/bmm-skills/4-implementation/bmad-dev-auto/step-01-clarify-and-route.md +22 -4
  26. package/src/bmm-skills/4-implementation/bmad-dev-auto/step-02-plan.md +5 -6
  27. package/src/bmm-skills/4-implementation/bmad-dev-auto/step-03-implement.md +8 -4
  28. package/src/bmm-skills/4-implementation/bmad-dev-auto/step-04-review.md +13 -19
  29. package/src/bmm-skills/4-implementation/bmad-dev-story/customize.toml +3 -0
  30. package/src/bmm-skills/4-implementation/bmad-quick-dev/SKILL.md +6 -108
  31. package/src/bmm-skills/4-implementation/bmad-quick-dev/customize.toml +73 -0
  32. package/src/bmm-skills/4-implementation/bmad-quick-dev/render.py +381 -0
  33. package/src/bmm-skills/4-implementation/bmad-quick-dev/spec-template.md +2 -2
  34. package/src/bmm-skills/4-implementation/bmad-quick-dev/step-01-clarify-and-route.md +11 -13
  35. package/src/bmm-skills/4-implementation/bmad-quick-dev/step-02-plan.md +4 -9
  36. package/src/bmm-skills/4-implementation/bmad-quick-dev/step-03-implement.md +12 -4
  37. package/src/bmm-skills/4-implementation/bmad-quick-dev/step-04-review.md +8 -20
  38. package/src/bmm-skills/4-implementation/bmad-quick-dev/step-05-present.md +4 -4
  39. package/src/bmm-skills/4-implementation/bmad-quick-dev/step-oneshot.md +12 -13
  40. package/src/bmm-skills/4-implementation/bmad-quick-dev/sync-sprint-status.md +6 -6
  41. package/src/bmm-skills/4-implementation/bmad-quick-dev/workflow.md +85 -0
  42. package/src/bmm-skills/module-help.csv +2 -4
  43. package/src/bmm-skills/module.yaml +2 -5
  44. package/src/bmm-skills/v6-shims/README.md +24 -0
  45. package/src/bmm-skills/{3-solutioning → v6-shims}/bmad-create-architecture/SKILL.md +1 -1
  46. package/src/bmm-skills/{2-plan-workflows → v6-shims}/bmad-create-prd/SKILL.md +3 -3
  47. package/src/bmm-skills/v6-shims/bmad-domain-research/SKILL.md +14 -0
  48. package/src/bmm-skills/{2-plan-workflows → v6-shims}/bmad-edit-prd/SKILL.md +3 -3
  49. package/src/bmm-skills/v6-shims/bmad-market-research/SKILL.md +14 -0
  50. package/src/bmm-skills/v6-shims/bmad-technical-research/SKILL.md +14 -0
  51. package/src/bmm-skills/{2-plan-workflows → v6-shims}/bmad-validate-prd/SKILL.md +3 -3
  52. package/src/core-skills/bmad-advanced-elicitation/SKILL.md +26 -103
  53. package/src/core-skills/bmad-advanced-elicitation/customize.toml +54 -0
  54. package/src/core-skills/bmad-advanced-elicitation/scripts/pick_methods.py +233 -0
  55. package/src/core-skills/bmad-advanced-elicitation/scripts/tests/test_pick_methods.py +228 -0
  56. package/src/core-skills/bmad-brainstorming/SKILL.md +3 -3
  57. package/src/core-skills/bmad-brainstorming/assets/brain-selector.html +2 -0
  58. package/src/core-skills/bmad-brainstorming/references/mode-autonomous.md +1 -1
  59. package/src/core-skills/bmad-brainstorming/scripts/brain.py +36 -6
  60. package/src/core-skills/bmad-brainstorming/scripts/tests/test_brain.py +22 -0
  61. package/src/core-skills/bmad-customize/SKILL.md +2 -2
  62. package/src/core-skills/bmad-deep-recon/SKILL.md +82 -0
  63. package/src/core-skills/bmad-deep-recon/assets/research.template.md +18 -0
  64. package/src/core-skills/bmad-deep-recon/customize.toml +212 -0
  65. package/src/core-skills/bmad-deep-recon/references/draft.md +8 -0
  66. package/src/core-skills/bmad-deep-recon/references/finalize.md +11 -0
  67. package/src/core-skills/bmad-deep-recon/references/html-briefing.md +16 -0
  68. package/src/core-skills/bmad-deep-recon/references/lifecycle.md +11 -0
  69. package/src/core-skills/bmad-deep-recon/references/process.md +10 -0
  70. package/src/core-skills/bmad-deep-recon/references/run.md +73 -0
  71. package/src/core-skills/bmad-deep-recon/references/selection.md +13 -0
  72. package/src/core-skills/bmad-deep-recon/references/synthesis.md +16 -0
  73. package/src/core-skills/bmad-deep-recon/references/verification.md +29 -0
  74. package/src/core-skills/bmad-deep-recon/scripts/recon_kit.py +322 -0
  75. package/src/core-skills/bmad-deep-recon/scripts/tests/test_recon_kit.py +144 -0
  76. package/src/core-skills/bmad-deep-recon/types/academic-lit.md +19 -0
  77. package/src/core-skills/bmad-deep-recon/types/competitive.md +19 -0
  78. package/src/core-skills/bmad-deep-recon/types/domain.md +19 -0
  79. package/src/core-skills/bmad-deep-recon/types/market.md +19 -0
  80. package/src/core-skills/bmad-deep-recon/types/technical.md +19 -0
  81. package/src/core-skills/bmad-deep-recon/types/user-voice.md +19 -0
  82. package/src/core-skills/bmad-forge-idea/SKILL.md +2 -2
  83. package/src/core-skills/bmad-forge-idea/scripts/resolve_personas.py +4 -1
  84. package/src/core-skills/bmad-help/SKILL.md +1 -1
  85. package/src/core-skills/bmad-party-mode/SKILL.md +2 -2
  86. package/src/core-skills/bmad-party-mode/scripts/resolve_party.py +11 -3
  87. package/src/core-skills/bmad-review/SKILL.md +49 -0
  88. package/src/core-skills/bmad-review/customize.toml +141 -0
  89. package/src/core-skills/bmad-review/references/editorial-common.md +56 -0
  90. package/src/core-skills/bmad-review/references/lens-adversarial.md +18 -0
  91. package/src/core-skills/bmad-review/references/lens-edge-case-hunter.md +54 -0
  92. package/src/core-skills/bmad-review/references/lens-prose.md +7 -0
  93. package/src/core-skills/bmad-review/references/lens-structure.md +9 -0
  94. package/src/core-skills/{bmad-review-verification-gap/SKILL.md → bmad-review/references/lens-verification-gap.md} +15 -39
  95. package/src/core-skills/bmad-review/references/structure-models.md +44 -0
  96. package/src/core-skills/bmad-review/scripts/tests/test_word_metrics.py +62 -0
  97. package/src/core-skills/bmad-review/scripts/word_metrics.py +102 -0
  98. package/src/core-skills/module-help.csv +3 -7
  99. package/src/core-skills/module.yaml +5 -0
  100. package/src/core-skills/v6-shims/README.md +25 -0
  101. package/src/core-skills/v6-shims/bmad-editorial-review/SKILL.md +6 -0
  102. package/src/core-skills/v6-shims/bmad-editorial-review/customize.toml +31 -0
  103. package/src/core-skills/v6-shims/bmad-editorial-review-prose/SKILL.md +6 -0
  104. package/src/core-skills/v6-shims/bmad-editorial-review-structure/SKILL.md +6 -0
  105. package/src/core-skills/v6-shims/bmad-review-adversarial-general/SKILL.md +6 -0
  106. package/src/core-skills/v6-shims/bmad-review-edge-case-hunter/SKILL.md +6 -0
  107. package/src/core-skills/v6-shims/bmad-review-verification-gap/SKILL.md +6 -0
  108. package/tools/installer/ide/platform-codes.yaml +7 -0
  109. package/tools/installer/modules/custom-module-manager.js +12 -6
  110. package/tools/installer/modules/external-manager.js +12 -8
  111. package/tools/installer/modules/git-env.js +47 -0
  112. package/tools/skill-validator.md +11 -1
  113. package/tools/validate-skills.js +33 -0
  114. package/src/bmm-skills/1-analysis/research/bmad-domain-research/SKILL.md +0 -96
  115. package/src/bmm-skills/1-analysis/research/bmad-domain-research/customize.toml +0 -41
  116. package/src/bmm-skills/1-analysis/research/bmad-domain-research/domain-steps/step-01-init.md +0 -137
  117. package/src/bmm-skills/1-analysis/research/bmad-domain-research/domain-steps/step-02-domain-analysis.md +0 -229
  118. package/src/bmm-skills/1-analysis/research/bmad-domain-research/domain-steps/step-03-competitive-landscape.md +0 -238
  119. package/src/bmm-skills/1-analysis/research/bmad-domain-research/domain-steps/step-04-regulatory-focus.md +0 -206
  120. package/src/bmm-skills/1-analysis/research/bmad-domain-research/domain-steps/step-05-technical-trends.md +0 -234
  121. package/src/bmm-skills/1-analysis/research/bmad-domain-research/domain-steps/step-06-research-synthesis.md +0 -450
  122. package/src/bmm-skills/1-analysis/research/bmad-domain-research/research.template.md +0 -29
  123. package/src/bmm-skills/1-analysis/research/bmad-market-research/SKILL.md +0 -96
  124. package/src/bmm-skills/1-analysis/research/bmad-market-research/customize.toml +0 -41
  125. package/src/bmm-skills/1-analysis/research/bmad-market-research/research.template.md +0 -29
  126. package/src/bmm-skills/1-analysis/research/bmad-market-research/steps/step-01-init.md +0 -184
  127. package/src/bmm-skills/1-analysis/research/bmad-market-research/steps/step-02-customer-behavior.md +0 -239
  128. package/src/bmm-skills/1-analysis/research/bmad-market-research/steps/step-03-customer-pain-points.md +0 -251
  129. package/src/bmm-skills/1-analysis/research/bmad-market-research/steps/step-04-customer-decisions.md +0 -261
  130. package/src/bmm-skills/1-analysis/research/bmad-market-research/steps/step-05-competitive-analysis.md +0 -173
  131. package/src/bmm-skills/1-analysis/research/bmad-market-research/steps/step-06-research-completion.md +0 -484
  132. package/src/bmm-skills/1-analysis/research/bmad-technical-research/SKILL.md +0 -96
  133. package/src/bmm-skills/1-analysis/research/bmad-technical-research/customize.toml +0 -41
  134. package/src/bmm-skills/1-analysis/research/bmad-technical-research/research.template.md +0 -29
  135. package/src/bmm-skills/1-analysis/research/bmad-technical-research/technical-steps/step-01-init.md +0 -137
  136. package/src/bmm-skills/1-analysis/research/bmad-technical-research/technical-steps/step-02-technical-overview.md +0 -239
  137. package/src/bmm-skills/1-analysis/research/bmad-technical-research/technical-steps/step-03-integration-patterns.md +0 -248
  138. package/src/bmm-skills/1-analysis/research/bmad-technical-research/technical-steps/step-04-architectural-patterns.md +0 -202
  139. package/src/bmm-skills/1-analysis/research/bmad-technical-research/technical-steps/step-05-implementation-research.md +0 -233
  140. package/src/bmm-skills/1-analysis/research/bmad-technical-research/technical-steps/step-06-research-synthesis.md +0 -493
  141. package/src/core-skills/bmad-brainstorming/analysis/catalog-analysis.md +0 -239
  142. package/src/core-skills/bmad-brainstorming/analysis/method-matrix.csv +0 -109
  143. package/src/core-skills/bmad-editorial-review-prose/SKILL.md +0 -86
  144. package/src/core-skills/bmad-editorial-review-structure/SKILL.md +0 -179
  145. package/src/core-skills/bmad-index-docs/SKILL.md +0 -66
  146. package/src/core-skills/bmad-review-adversarial-general/SKILL.md +0 -37
  147. package/src/core-skills/bmad-review-edge-case-hunter/SKILL.md +0 -73
  148. package/src/core-skills/bmad-review-edge-case-hunter/references/deletion-check.md +0 -14
  149. package/src/core-skills/bmad-shard-doc/SKILL.md +0 -105
  150. /package/src/{core-skills → bmm-skills/2-plan-workflows}/bmad-spec/assets/headless-schemas.md +0 -0
  151. /package/src/bmm-skills/{3-solutioning → v6-shims}/bmad-create-architecture/customize.toml +0 -0
  152. /package/src/bmm-skills/{2-plan-workflows → v6-shims}/bmad-create-prd/customize.toml +0 -0
  153. /package/src/bmm-skills/{2-plan-workflows → v6-shims}/bmad-edit-prd/customize.toml +0 -0
  154. /package/src/bmm-skills/{2-plan-workflows → v6-shims}/bmad-validate-prd/customize.toml +0 -0
  155. /package/src/core-skills/bmad-advanced-elicitation/{methods.csv → assets/methods.csv} +0 -0
  156. /package/src/core-skills/bmad-party-mode/scripts/tests/{test-resolve_party.py → test_resolve_party.py} +0 -0
@@ -13,18 +13,38 @@ description: 'One iteration of an unattended development loop. Use when invoked
13
13
 
14
14
  To HALT with a final status and optional blocking condition:
15
15
 
16
- 1. If `{spec_file}` is known and exists, update `status` in frontmatter and append missing result details under `## Auto Run Result`.
17
- 2. If `{spec_file}` is unknown or missing, create `{implementation_artifacts}/bmad-dev-auto-result-<slug-or-timestamp>.md` with:
18
- ```markdown
19
- ---
20
- status: <final status>
21
- ---
22
-
23
- # BMad Dev Auto Result
24
-
25
- Status: <final status>
26
- Blocking condition: <blocking condition, if any>
27
- ```
16
+ 1. **Folder+id dispatch** (`{spec_folder}` and `{story_id}` are set): the write-back always lands at the id-keyed story spec. The `{implementation_artifacts}` fallback in step 2 below is never used in this mode, even for halts before planning starts.
17
+ - If `{spec_file}` is still empty, resolve it now:
18
+ - **Entry not resolved** (`stories.yaml` is missing/unparseable, or `{story_id}` has no matching entry): use the fixed slug segment `unresolved`: `{spec_file}` = `{spec_folder}/stories/{story_id}-unresolved.md`.
19
+ - **Ambiguous on-disk match** (the halt is `ambiguous story file match` — more than one file already matches `{spec_folder}/stories/{story_id}-*.md`): use the fixed slug segment `ambiguous` instead of deriving from the title, so the write-back neither creates a third title-derived candidate nor risks silently landing on one of the existing ambiguous files: `{spec_file}` = `{spec_folder}/stories/{story_id}-ambiguous.md`.
20
+ - **Otherwise** (the entry was resolved and no ambiguous on-disk match exists): derive `{spec_file}` = `{spec_folder}/stories/{story_id}-{slug}.md`, where `{slug}` is a kebab-case slug from `title` (and `description` if needed) with no `{story_id}` prefix — the same derivation step-01's Route uses.
21
+ - If `{spec_file}` exists on disk, update `status` in frontmatter and append missing result details under `## Auto Run Result`.
22
+ - If it does not exist, create it as a skeletal story spec:
23
+ ```markdown
24
+ ---
25
+ status: <final status>
26
+ ---
27
+
28
+ # <entry title, or "Story {story_id}" if the entry could not be resolved or the on-disk match was ambiguous>
29
+
30
+ ## Auto Run Result
31
+
32
+ Status: <final status>
33
+ Blocking condition: <blocking condition, if any>
34
+ ```
35
+ 2. **Otherwise:**
36
+ - If `{spec_file}` is known and exists, update `status` in frontmatter and append missing result details under `## Auto Run Result`.
37
+ - If `{spec_file}` is unknown or missing, create `{implementation_artifacts}/bmad-dev-auto-result-<slug-or-timestamp>.md` with:
38
+ ```markdown
39
+ ---
40
+ status: <final status>
41
+ ---
42
+
43
+ # BMad Dev Auto Result
44
+
45
+ Status: <final status>
46
+ Blocking condition: <blocking condition, if any>
47
+ ```
28
48
  3. Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete`
29
49
  4. If the resolved `workflow.on_complete` is non-empty, follow it as the final instruction before exiting.
30
50
  5. Stop the workflow.
@@ -42,6 +62,7 @@ A specification is "Ready for Development" when:
42
62
  - **Actionable**: Every task has a file path and specific action.
43
63
  - **Logical**: Tasks ordered by dependency.
44
64
  - **Testable**: All ACs use Given/When/Then.
65
+ - **Surface-anchored**: ACs observe the outermost surface the intent references — never a more internal proxy for it (e.g. the API response, not the database row behind it).
45
66
  - **Complete**: No placeholders or TBDs.
46
67
  - **Sufficient**: No known requirement, acceptance, dependency, or implementation gaps remain unresolved.
47
68
  - **Coherent**: No unresolved ambiguities or internal contradictions.
@@ -8,6 +8,7 @@
8
8
  # - Strings replace the default.
9
9
  # - Lists append to the default list.
10
10
  # - Tables merge key by key.
11
+ # - Arrays of tables merge by `id`: matching `id` replaces, new `id`s append.
11
12
 
12
13
  [workflow]
13
14
 
@@ -31,3 +32,77 @@ persistent_facts = [
31
32
  # Empty means no extra terminal behavior.
32
33
 
33
34
  on_complete = ""
35
+
36
+ # Handoff for the implementation subagent in step 03. The whole execution
37
+ # recipe — a subagent by default, but an override may run anything (e.g. an
38
+ # external coding tool via bash). {spec_file} is substituted at run time.
39
+
40
+ implementation_handoff = """
41
+ Launch a subagent with no prior conversation context, with this prompt:
42
+
43
+ > Read {spec_file} fully and implement it. The spec is the sole source of truth for this change; its Spec Change Log entries are binding constraints, not history.
44
+ >
45
+ > Guardrails:
46
+ >
47
+ > - Work in the current project. Before starting, load every file listed in the spec frontmatter `context:`.
48
+ > - Do not edit the spec file itself.
49
+ > - Do not revert or overwrite changes unrelated to this spec.
50
+ > - Run the verification described in the spec, plus focused checks for the code you touched.
51
+ >
52
+ > When done, report: files changed with one line each, verification commands run and their outcomes, any files changed beyond the spec's tasks and why each was needed, anything you could not complete and why, and residual risks.
53
+ """
54
+
55
+ # Review layers for the review step. `instruction` is the layer's whole
56
+ # execution recipe — subagents by default, but an override may run anything
57
+ # (e.g. an external reviewer via bash). {diff_output} is substituted at run
58
+ # time. `when` (optional) gates a layer; empty `instruction` disables it.
59
+
60
+ [[workflow.review_layers]]
61
+ id = "blind-hunter"
62
+ name = "Blind Hunter"
63
+ instruction = """
64
+ Launch a subagent with no prior conversation context, with this prompt:
65
+
66
+ > Invoke the `bmad-review` skill with only the `adversarial` lens on this diff:
67
+ >
68
+ > {diff_output}
69
+ """
70
+
71
+ [[workflow.review_layers]]
72
+ id = "edge-case-hunter"
73
+ name = "Edge Case Hunter"
74
+ instruction = """
75
+ Launch a subagent with no prior conversation context, with this prompt:
76
+
77
+ > Invoke the `bmad-review` skill with only the `edge-case-hunter` lens on this diff:
78
+ >
79
+ > {diff_output}
80
+ """
81
+
82
+ [[workflow.review_layers]]
83
+ id = "verification-gap"
84
+ name = "Verification Gap Reviewer"
85
+ instruction = """
86
+ Launch a subagent with no prior conversation context, with this prompt:
87
+
88
+ > Invoke the `bmad-review` skill with only the `verification-gap` lens on this diff:
89
+ >
90
+ > {diff_output}
91
+ """
92
+
93
+ [[workflow.review_layers]]
94
+ id = "intent-alignment"
95
+ name = "Intent Alignment Auditor"
96
+ instruction = """
97
+ Launch a subagent with no prior conversation context, with this prompt:
98
+
99
+ > You are an intent-alignment auditor. You have no other context about how this change was produced. Here is the verbatim intent this work started from:
100
+ >
101
+ > {verbatim_intent}
102
+ >
103
+ > Here is the diff:
104
+ >
105
+ > {diff_output}
106
+ >
107
+ > Your task is strictly descriptive — do not prescribe additional work. Report: (1) the defensible readings of the intent, enumerated; (2) which reading this diff implements; (3) where the readings and the diff diverge — specifically, which surface the intent's expectations live at versus which surface the diff's changes and its tests exercise.
108
+ """
@@ -4,7 +4,7 @@ type: 'feature' # feature | bugfix | refactor | chore
4
4
  created: '{date}'
5
5
  status: 'draft' # draft | ready-for-dev | in-progress | in-review | done | blocked
6
6
  review_loop_iteration: 0 # incremented by step-04 before each review loopback
7
- followup_review_recommended: false # set by step-04 on status: done from the final review pass significance judgment
7
+ followup_review_recommended: false # set by step-04 on status: done true if the LLM decided another review pass is worthwhile
8
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.
9
9
  warnings: [] # optional: machine-readable warnings for orchestration, e.g. oversized, multiple-goals
10
10
  ---
@@ -48,10 +48,10 @@ warnings: [] # optional: machine-readable warnings for orchestration, e.g. overs
48
48
 
49
49
  ## Code Map
50
50
 
51
- <!-- Agent-populated during planning. Annotated paths prevent blind codebase searching. -->
51
+ <!-- Agent-populated during planning: the distilled investigation map, so the spec carries what exploration found and the implementation handoff need only point here. Annotated paths prevent blind codebase searching. Entries may drill to symbol/line and carry reuse pointers ("mirror X at FILE:LINE") or read-only evidence, where they save the implementer a search. -->
52
52
 
53
53
  - `FILE` -- ROLE_OR_RELEVANCE
54
- - `FILE` -- ROLE_OR_RELEVANCE
54
+ - `FILE:LINE` -- ROLE_OR_RELEVANCE; reuse pointer or READ-ONLY evidence when relevant
55
55
 
56
56
  ## Tasks & Acceptance
57
57
 
@@ -60,7 +60,7 @@ warnings: [] # optional: machine-readable warnings for orchestration, e.g. overs
60
60
  <!-- AC covers system-level behaviors not captured by the I/O Matrix. Do not duplicate I/O scenarios here. -->
61
61
 
62
62
  **Execution:**
63
- - [ ] `FILE` -- ACTION -- RATIONALE
63
+ - `FILE` -- ACTION -- RATIONALE
64
64
 
65
65
  **Acceptance Criteria:**
66
66
  - Given PRECONDITION, when ACTION, then EXPECTED_RESULT
@@ -1,6 +1,8 @@
1
1
  ---
2
2
  deferred_work_file: '{implementation_artifacts}/deferred-work.md'
3
- spec_file: '' # set at runtime for both routes before leaving this step
3
+ spec_file: '' # set at runtime once a route resolves it; some HALT branches exit before it is set
4
+ spec_folder: '' # set at runtime under folder+id dispatch only
5
+ story_id: '' # set at runtime under folder+id dispatch only
4
6
  ---
5
7
 
6
8
  # Step 1: Clarify and Route
@@ -22,6 +24,20 @@ If the invocation prompt explicitly points to an existing spec file with recogni
22
24
  - `blocked` → HALT with status `blocked` and blocking condition `blocked spec supplied`.
23
25
  - `done` → set `review_loop_iteration` to `0` in the frontmatter, then **EARLY EXIT** to `./step-04-review.md` for a fresh review pass. (A `done` spec is a completed run, so this starts a follow-up review, not a resumption.)
24
26
 
27
+ If the invocation prompt instead supplies a spec folder and a story id, with no specific spec file path, this is a **folder+id dispatch**: set `spec_folder` (a `{project-root}`-relative or absolute path) and `story_id` from the prompt. Any further prompt text (e.g. `invoke_dev_with` guidance the caller appended) is additional planning context to carry into step-02 — not a competing description of what to implement.
28
+
29
+ Read `{spec_folder}/stories.yaml`. If the file does not exist or fails to parse, HALT with status `blocked` and blocking condition `no stories.yaml found`. Find the entry whose `id` equals `{story_id}`; if none matches, HALT with status `blocked` and blocking condition `story id not found in stories.yaml`. Take only that entry's `title` and `description` — never read the checkpoint fields or `invoke_dev_with`; those are the caller's orchestration fields, not dev-auto's.
30
+
31
+ Look for files matching `{spec_folder}/stories/{story_id}-*.md` (id-prefix match — story ids are prefix-free, so at most one should match):
32
+ - **If more than one matches**, HALT with status `blocked` and blocking condition `ambiguous story file match`.
33
+ - **If exactly one matches**, set `spec_file` to that path.
34
+ - `draft` (planning was interrupted mid-flight): accumulate cross-story context before resuming — load every other file matching `{spec_folder}/stories/*.md` (every match except `{spec_file}` itself), regardless of `status`, and carry forward each one's **Code Map**, **Design Notes**, **Spec Change Log**, **Tasks & Acceptance** checklist state, and **Auto Run Result** details, where present, as additional planning context for step-02. Then **EARLY EXIT** to `./step-02-plan.md`.
35
+ - Any other recognized `status`: **EARLY EXIT** using the same routing as above, including the `review_loop_iteration` reset for `done`. One difference: a `blocked` story HALTs with blocking condition `story already blocked`, not `blocked spec supplied` — the caller did not supply this file; dev-auto found it by id.
36
+ - `status` missing or unrecognized: HALT with status `blocked` and blocking condition `unrecognized status in existing story file`.
37
+ - **If none matches**, this is the first dispatch for `{story_id}`. The entry's `title` and `description` are the resolved intent. If `{spec_folder}/SPEC.md` does not exist, HALT with status `blocked` and blocking condition `no epic spec found`. Otherwise load it and the files listed in its `companions:` frontmatter as planning context, then accumulate cross-story context the same way as the `draft` case above — load every file matching `{spec_folder}/stories/*.md` (none yet exists for `{story_id}` at this point, so nothing is excluded), regardless of `status`, carrying forward the same fields, where present, as additional planning context for step-02. Then continue to INSTRUCTIONS item 3 below — not `step-03-implement.md`, item 3 of the numbered list in this file (items 1 and 2 do not apply — context and intent are already resolved; item 1.A.5's previous-story continuity scan in particular never runs here, since folder+id dispatch already skips items 1 and 2 entirely — the cross-story accumulation above is its replacement for this dispatch mode).
38
+
39
+ One `stories.yaml` entry per invocation: never read another entry, and never advance to a different story id regardless of outcome.
40
+
25
41
  Otherwise, treat the invocation prompt as starting intent. This may be a story ID, ticket ID, file path, short description, or longer free-form intent. Do not infer workflow state from non-spec files.
26
42
  If the invocation prompt does not contain enough intent to identify what to implement, HALT with status `blocked` and blocking condition `unclear intent`.
27
43
 
@@ -40,7 +56,7 @@ If the invocation prompt does not contain enough intent to identify what to impl
40
56
  - **If valid:** load it as the primary planning context. Do not load raw planning docs (PRD, architecture, UX, etc.).
41
57
  - **If missing, empty, or invalid:** compile it in the next bullet.
42
58
 
43
- 3. **Compile epic context if needed.** If no valid cached epic context was loaded, produce `{implementation_artifacts}/epic-<N>-context.md` by spawning a subagent with `./compile-epic-context.md` as its prompt. Pass it the epic number, the epics file path, the `{planning_artifacts}` directory, and the output path `{implementation_artifacts}/epic-<N>-context.md`.
59
+ 3. **Compile epic context if needed.** If no valid cached epic context was loaded, produce `{implementation_artifacts}/epic-<N>-context.md` by spawning a subagent synchronously (wait for it to return in this turn) with `./compile-epic-context.md` as its prompt. Pass it the epic number, the epics file path, the `{planning_artifacts}` directory, and the output path `{implementation_artifacts}/epic-<N>-context.md`.
44
60
 
45
61
  4. **Verify if compiled.** If epic context was compiled, verify the output file exists, is non-empty, and starts with `# Epic <N> Context:`. If valid, load it. If verification fails, HALT with status `blocked` and blocking condition `context compilation verification failed`.
46
62
 
@@ -55,11 +71,13 @@ If the invocation prompt does not contain enough intent to identify what to impl
55
71
  - **Product Brief** (`*brief*`) — project vision and scope
56
72
  - Scan the listing for files matching these patterns. If any look relevant to the current intent, load them selectively — you don't need all of them, but you need the right constraints and requirements rather than guessing from code alone.
57
73
  2. Resolve intent from the invocation prompt and loaded artifacts. Do not fantasize or leave open questions. If the intent cannot be resolved, HALT with status `blocked` and the unresolved questions as blocking condition.
58
- 3. Version control sanity check. Is the working tree clean? Does the current branch make sense for this intent — considering its name and recent history? If the tree is dirty or the branch is an obvious mismatch, HALT with status `blocked` and that condition as blocking condition. If version control is unavailable, skip this check.
74
+ 3. Version control sanity check. Is the working tree clean? Does the current branch make sense for this intent — considering its name and recent history? Under folder+id dispatch, judge the branch against the epic spec, not the story title: one branch usually carries all of an epic's stories. If the tree is dirty or the branch is an obvious mismatch, HALT with status `blocked` and that condition as blocking condition. If version control is unavailable, skip this check.
59
75
  4. Multi-goal warning. If the intent appears to contain multiple independently shippable goals, carry `multiple-goals` forward so step-02 can add it to `{spec_file}` frontmatter `warnings`. Do not split or block.
60
76
  5. Route:
61
77
 
62
- 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** → `./step-02-plan.md`); otherwise append `-2`, `-3`, etc. Set `spec_file` = `{implementation_artifacts}/spec-{slug}.md`.
78
+ **Folder+id dispatch:** derive a valid kebab-case slug from the entry's `title` (and `description` if needed) the same kebab-casing convention as below, but never prefixed with `{story_id}`, since the id is already the filename's separate leading segment. Set `spec_file` = `{spec_folder}/stories/{story_id}-{slug}.md`. The id already disambiguates: no `{implementation_artifacts}` fallback, no `-2`/`-3` suffixing.
79
+
80
+ **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** → `./step-02-plan.md`); otherwise append `-2`, `-3`, etc. Set `spec_file` = `{implementation_artifacts}/spec-{slug}.md`.
63
81
 
64
82
  ## NEXT
65
83
 
@@ -12,10 +12,10 @@ deferred_work_file: '{implementation_artifacts}/deferred-work.md'
12
12
  ## INSTRUCTIONS
13
13
 
14
14
  1. Draft resume check. If `{spec_file}` exists with `status: draft`, read it and capture the verbatim `<intent-contract>...</intent-contract>` block as `preserved_intent_contract`. Otherwise `preserved_intent_contract` is empty.
15
- 2. Investigate codebase. _Read the code yourself for narrow, localized tasks. Isolate deep exploration in subagents: instruct them to give you distilled summaries only, and plan from those summaries._
16
- 3. Read `./spec-template.md` fully. Fill it out based on the intent and investigation. If `{preserved_intent_contract}` is non-empty, substitute it for the `<intent-contract>` block in your filled spec before writing. Write the result to `{spec_file}`.
15
+ 2. Investigate codebase. _Read the code yourself for narrow, localized tasks. Isolate deep exploration in synchronous subagents: instruct them to give you distilled summaries only, and plan from those summaries._ Decide which findings actually matter for execution — the specific files, symbols/lines, reuse points, and read-only constraints — and carry those forward for the Code Map. This is where the investigation lands: the spec preserves it so it is never re-narrated to the implementer at dispatch time.
16
+ 3. Read `./spec-template.md` fully. Fill it out based on the intent and investigation. Drain the investigation into the `## Code Map` section — annotated paths, symbol/line anchors, reuse pointers, and read-only evidence — so the spec is the implementer's investigation map and the step-03 handoff need only point at it. If `{preserved_intent_contract}` is non-empty, substitute it for the `<intent-contract>` block in your filled spec before writing. Write the result to `{spec_file}`.
17
17
  4. Self-review against READY FOR DEVELOPMENT standard.
18
- 5. If intent gaps exist, do not fantasize and do not leave open questions. HALT with status `blocked`, blocking condition `intent gaps`, and include the unanswered questions and evidence gathered.
18
+ 5. If intent gaps exist, do not fantasize and do not leave open questions. Multiple defensible readings of the intent that lead to observably different outcomes, with nothing in the intent to select between them, are an intent gap — do not resolve one by picking a reading. HALT with status `blocked`, blocking condition `intent gap`, and include the unanswered questions and evidence gathered.
19
19
  6. Warning check. If step-01 carried `multiple-goals`, add it to `{spec_file}` frontmatter `warnings`. If `{spec_file}` exceeds 1600 tokens, add `oversized` to frontmatter `warnings`. Continue either way.
20
20
 
21
21
  ### READY-FOR-DEVELOPMENT GATE
@@ -23,9 +23,8 @@ deferred_work_file: '{implementation_artifacts}/deferred-work.md'
23
23
  Re-read `./SKILL.md`, then re-read `{spec_file}` from disk and verify the spec meets the READY FOR DEVELOPMENT standard.
24
24
 
25
25
  - **If the file is missing:** HALT with status `blocked` and blocking condition `planned spec file disappeared before implementation`.
26
- - **If the spec meets the standard:** set `{spec_file}` frontmatter status to `ready-for-dev`, then continue to step 3.
27
- - **If the spec does not meet the standard:** repair it once, then re-read it from disk and verify again. If it still does not meet the standard, HALT with status `blocked`, blocking condition `spec failed ready-for-development standard`, and include the failing criteria and evidence gathered.
28
-
26
+ - **If the spec meets the standard:** set `{spec_file}` frontmatter status to `ready-for-dev`. If the invocation prompt directs a halt after planning (standard phrasing: `Halt after planning.` — accept any clear equivalent), HALT with status `ready-for-dev`; otherwise continue to step 3.
27
+ - **If the spec does not meet the standard:** repair it once, then re-read it from disk and verify again. If it now meets the standard, apply the **If the spec meets the standard** handling above, including the halt-after-planning check. If it still does not meet the standard, HALT with status `blocked`, blocking condition `spec failed ready-for-development standard`, and include the failing criteria and evidence gathered.
29
28
 
30
29
  ## NEXT
31
30
 
@@ -23,15 +23,19 @@ Capture `baseline_revision` (current HEAD, or `NO_VCS` if version control is una
23
23
 
24
24
  Change `{spec_file}` status to `in-progress` in the frontmatter before starting implementation.
25
25
 
26
- If `{spec_file}` has a non-empty `context:` list in its frontmatter, load those files before implementation begins. When handing to a subagent, include them in the subagent prompt so it has access to the referenced context.
26
+ The implementation handoff is `{workflow.implementation_handoff}`, resolved during activation. Substitute the runtime placeholders (e.g. `{spec_file}`) into it, then follow it verbatim. Do not add parent-authored goal restatements, file lists, ownership boundaries, or acceptance criteria to the handoff the spec is the subagent's sole source of truth. If the resolved handoff conflicts with the spec, HALT with status `blocked` and blocking condition `handoff conflicts with spec`, and include both conflicting passages.
27
27
 
28
- Hand `{spec_file}` to an implementation subagent. Invoke it **synchronously** and wait for it to return in this same turn — do not background/detach it (`run_in_background`) or end your turn to await a notification (see SKILL.md → Subagents). Resume at "Tasks & Acceptance Verification" only after it returns.
28
+ Invoke the subagent **synchronously** and wait for it to return in this same turn — do not background/detach it (`run_in_background`) or end your turn to await a notification (see SKILL.md → Subagents). Resume at "Verify" only after it returns. If the platform allows, keep the subagent available for re-engagement after it returns — step-04 may send it review fixes.
29
29
 
30
30
  **Path formatting rule:** Any markdown links written into `{spec_file}` must use paths relative to `{spec_file}`'s directory so they are clickable in VS Code. Any file paths displayed in terminal/conversation output must use CWD-relative format with `:line` notation (e.g., `src/path/file.ts:42`) for terminal clickability. No leading `/` in either case.
31
31
 
32
- ### Tasks & Acceptance Verification
32
+ ### Verify
33
33
 
34
- After the implementation subagent returns, verify every task in the `## Tasks & Acceptance` section of `{spec_file}` is complete and every acceptance criterion is satisfied. Mark each finished task `[x]`. If any task is not done or any acceptance criterion is not satisfied, finish the missing work before proceeding. If the missing work cannot be completed, HALT with status `blocked`, blocking condition `implementation verification failed`, and include the unfinished task or failing acceptance criterion and reason.
34
+ After the implementation subagent returns: if it reported unfinished work, finish it before proceeding. Run the commands in `{spec_file}`'s `## Verification` section (or perform its manual checks). If verification fails and the failure cannot be fixed, HALT with status `blocked`, blocking condition `implementation verification failed`, and include the failing command or check and reason. Acceptance criteria are judged at review, not here.
35
+
36
+ ### Matrix Test Audit
37
+
38
+ If `{spec_file}`'s intent-contract contains an I/O & Edge-Case Matrix, verify every matrix row is covered by at least one test that verifies its expected behavior, and that each covering test ran and passed in the verification output. A covering test that exists but did not run — unregistered, filtered out, skipped, or disabled — counts as missing. If a test disagrees with the matrix, never edit the expectation to match the code: fix the code, or if the matrix row itself is ambiguous, HALT with status `blocked` and blocking condition `matrix ambiguity`. If the audit cannot otherwise be satisfied, HALT with status `blocked` and blocking condition `matrix test audit failed`.
35
39
 
36
40
  ## NEXT
37
41
 
@@ -22,20 +22,13 @@ Do NOT `git add` anything — this is read-only inspection.
22
22
 
23
23
  ### Review
24
24
 
25
- Launch Blind Hunter, Edge Case Hunter, and Verification Gap Reviewer in parallel without prior conversation context.
26
-
27
- - **Blind Hunter**prompt:
28
- > Invoke the `bmad-review-adversarial-general` skill on this diff:
29
- >
30
- > {diff_output}
31
- - **Edge Case Hunter**prompt:
32
- > Invoke the `bmad-review-edge-case-hunter` skill on this diff:
33
- >
34
- > {diff_output}
35
- - **Verification Gap Reviewer** — prompt:
36
- > Invoke the `bmad-review-verification-gap` skill on this diff:
37
- >
38
- > {diff_output}
25
+ The review layers are `{workflow.review_layers}`, resolved during activation.
26
+
27
+ Skip every layer whose `instruction` is empty or missing that is how an override disables a default layer — and every layer whose `when` condition (if present) does not hold in the current context. If no layers remain, HALT with status `blocked` and blocking condition `no active review layers`.
28
+
29
+ Runtime placeholders: `{diff_output}` is the diff constructed above. `{verbatim_intent}` is the invocation intent exactly as this run received it at step-01; if the run started from an existing spec file rather than a fresh intent, it is the spec's `<intent-contract>` block instead.
30
+
31
+ Execute all remaining layers in parallel wherever their execution methods allow: substitute the runtime placeholders (e.g. `{diff_output}`) into each layer's `instruction`, then follow it verbatim. Parallel means several blocking calls awaited together in this turn never backgrounded or detached, never ending the turn to await results (see SKILL.md → Subagents). Spawn every reviewer subagent before reading or reacting to any of their output; begin collection and triage only once all are launched.
39
32
 
40
33
  ### Classify
41
34
 
@@ -46,6 +39,7 @@ Launch Blind Hunter, Edge Case Hunter, and Verification Gap Reviewer in parallel
46
39
  - `medium`: tolerable
47
40
  - `high`: intolerable
48
41
  3. Route each finding into exactly one triage category. The first three categories are **this story's problem** — caused or exposed by the current change. The last two are **not this story's problem**.
42
+ Scope authority: a finding may be routed to defer or reject *as out of scope* only on the authority of the intent itself. The spec's scope language, the plan, and the diff's own shape are not admissible scope authorities — if only they exclude a finding, treat it as evidence against the chosen reading (intent_gap or bad_spec), not as out of scope.
49
43
  - **intent_gap** — caused by the change; cannot be resolved from the spec because the captured intent is incomplete. Do not infer intent unless there is exactly one possible reading.
50
44
  - **bad_spec** — caused by the change, including direct deviations from spec. The spec should have been clear enough to prevent it. When in doubt between bad_spec and patch, prefer bad_spec — a spec-level fix is more likely to produce coherent code.
51
45
  - **patch** — caused by the change; trivially fixable without human input. Just part of the diff.
@@ -69,9 +63,9 @@ Launch Blind Hunter, Edge Case Hunter, and Verification Gap Reviewer in parallel
69
63
  - none
70
64
  ```
71
65
  5. Process findings in cascading order. If intent_gap exists, lower findings are moot; follow the intent_gap branch below. If bad_spec exists, lower findings are moot since code will be re-derived. If neither exists, process patch and defer normally. Before each bad_spec loopback, read `{spec_file}` frontmatter `review_loop_iteration` (missing means `0`), increment it by 1, and write it back. If it exceeds 5, append the triage-log entry for this pass with `addressed_findings: none`, then HALT with status `blocked` and blocking condition `review repair loop exceeded 5 iterations (non-convergence)`.
72
- - **intent_gap** — Root cause is inside `<intent-contract>`. Revert code changes. Append the triage-log entry for this pass with `addressed_findings: none`, then HALT with status `blocked`, blocking condition `intent gap in intent contract`, and include the intent-gap findings.
66
+ - **intent_gap** — Root cause is inside `<intent-contract>`. Save the attempted change as a patch file in `{implementation_artifacts}` and reference it from the triage-log entry, then revert code changes. Append the triage-log entry for this pass with `addressed_findings: none`, then HALT with status `blocked`, blocking condition `intent gap`, and include the unresolved questions and the saved patch path.
73
67
  - **bad_spec** — Root cause is outside `<intent-contract>`. Do not modify content inside `<intent-contract>`. Before reverting code: extract KEEP instructions for positive preservation (what worked well and must survive re-derivation). Revert code changes. Read the `## Spec Change Log` in `{spec_file}` and strictly respect all logged constraints when amending the sections outside `<intent-contract>` that contain the root cause. Append a new change-log entry recording: the triggering finding, what was amended, the known-bad state avoided, and the KEEP instructions. Append the triage-log entry for this pass, listing every bad_spec finding that triggered the spec amendment and implementation loopback under `addressed_findings`. Read fully and follow `./step-03-implement.md` to re-derive the code, then this step will run again.
74
- - **patch** — Auto-fix. These are the only findings that survive loopbacks. After auto-fixing, append the triage-log entry for this pass, listing every patch fixed in this pass under `addressed_findings`.
68
+ - **patch** — Auto-fix. These are the only findings that survive loopbacks. If the step-03 implementation subagent can be re-engaged with its context intact, send it all patch findings in one synchronous message — for each: the file, what is wrong, and what the fix must do. If it cannot be re-engaged, apply the patches yourself. Then re-run the commands in `{spec_file}`'s `## Verification` section (or perform its manual checks); if verification fails and the failure cannot be fixed, HALT with status `blocked` and blocking condition `patch verification failed`. Append the triage-log entry for this pass, listing every patch fixed in this pass under `addressed_findings`.
75
69
  - **defer** — Append one new entry to `{deferred_work_file}` using this format. Do not modify existing entries or look for duplicates.
76
70
  ```markdown
77
71
  - source_spec: `{spec_file}`
@@ -86,13 +80,13 @@ Prepare `Auto Run Result` details:
86
80
  - Summary of implemented change
87
81
  - Files changed with one-line descriptions
88
82
  - Review findings breakdown: patches applied, items deferred, items rejected
89
- - Follow-up review recommendation: `true` when the final review pass made review-driven changes significant enough to benefit from an independent follow-up review; otherwise `false`. Use judgment, not a fixed numeric threshold. Base the judgment on the final pass's triage log and fixes, including patched-finding volume, consequence/severity, breadth, behavior/API/security/data impact, and implementation complexity. Many low-severity patched findings can be significant by volume. Do not recommend follow-up for only a few localized low-consequence fixes.
83
+ - Follow-up review recommendation: count only this pass's findings triaged `patch` never defer or reject. `true` if any patched finding was `high` severity, or if `3 × medium count + 1 × low count` is 5 or more; otherwise `false`. Record the patched counts by severity and the score.
90
84
  - Verification performed, including command outcomes or manual inspection notes
91
85
  - Any residual risks
92
86
 
93
- Set `{spec_file}` frontmatter `followup_review_recommended` from the judgment above.
87
+ Set `{spec_file}` frontmatter `followup_review_recommended` from the computation above.
94
88
 
95
- If version control is available, commit. Do not push.
89
+ If version control is available, commit every file in the reviewed diff — tracked and untracked. Do not push. After committing, verify the commit contains each file from the reviewed diff; if any is missing, add it and amend before proceeding. Anything still visible in `git status --porcelain` is by definition not part of the change: leave it in place — do not commit, delete, or gitignore it — and list it under `Auto Run Result` as residual artifacts.
96
90
 
97
91
  Capture `final_revision` (current HEAD after committing, or `NO_VCS` if version control is unavailable) into `{spec_file}` frontmatter.
98
92
 
@@ -32,6 +32,9 @@ activation_steps_append = []
32
32
 
33
33
  persistent_facts = [
34
34
  "file:{project-root}/**/project-context.md",
35
+ "Never add epic or story references as inline code comments (e.g. # Epic: X, # Story: PROJ-42).",
36
+ "Code comments explain why, not what — no AI workflow metadata, planning refs, or story tracking in source code.",
37
+ "Generated code must be production-ready: clean, minimal, and free of AI-generated noise.",
35
38
  ]
36
39
 
37
40
  # Scalar: executed when the workflow reaches its final step,
@@ -3,113 +3,11 @@ name: bmad-quick-dev
3
3
  description: 'Implements any user intent, requirement, story, bug fix or change request by producing clean working code artifacts that follow 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.'
4
4
  ---
5
5
 
6
- # Quick Dev New Preview Workflow
6
+ Run this, substituting `{skill-root}` with the absolute path to this skill's base directory, without changing the cwd:
7
7
 
8
- **Goal:** Turn user intent into a hardened, reviewable artifact.
8
+ ```bash
9
+ uv run {skill-root}/render.py
10
+ ```
9
11
 
10
- **CRITICAL:** If a step says "read fully and follow step-XX", you read and follow step-XX. No exceptions.
11
-
12
- Subagents, when the capability is available, are an important part of this workflow. Use them as directed by the workflow steps.
13
- If you need an explicit user instruction to run them, ask once now for the whole workflow run.
14
-
15
- ## READY FOR DEVELOPMENT STANDARD
16
-
17
- A specification is "Ready for Development" when:
18
-
19
- - **Actionable**: Every task has a file path and specific action.
20
- - **Logical**: Tasks ordered by dependency.
21
- - **Testable**: All ACs use Given/When/Then.
22
- - **Complete**: No placeholders or TBDs.
23
- - **Sufficient**: No known requirement, acceptance, dependency, or implementation gaps remain unresolved.
24
- - **Coherent**: No unresolved ambiguities or internal contradictions.
25
-
26
- ## SCOPE STANDARD
27
-
28
- A specification should target a **single user-facing goal** within **900–1600 tokens**:
29
-
30
- - **Single goal**: One cohesive feature, even if it spans multiple layers/files. Multi-goal means >=2 **top-level independent shippable deliverables** — each could be reviewed, tested, and merged as a separate PR without breaking the others. Never count surface verbs, "and" conjunctions, or noun phrases. Never split cross-layer implementation details inside one user goal.
31
- - Split: "add dark mode toggle AND refactor auth to JWT AND build admin dashboard"
32
- - Don't split: "add validation and display errors" / "support drag-and-drop AND paste AND retry"
33
- - **900–1600 tokens**: Optimal range for LLM consumption. Below 900 risks ambiguity; above 1600 risks context-rot in implementation agents.
34
- - **Neither limit is a gate.** Both are proposals with user override.
35
-
36
- ## Conventions
37
-
38
- - Bare paths (e.g. `step-01-clarify-and-route.md`) resolve from the skill root.
39
- - `{skill-root}` resolves to this skill's installed directory (where `customize.toml` lives).
40
- - `{project-root}`-prefixed paths resolve from the project working directory.
41
- - `{skill-name}` resolves to the skill directory's basename.
42
-
43
- ## On Activation
44
-
45
- ### Step 1: Resolve the Workflow Block
46
-
47
- Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow`
48
-
49
- **If the script fails**, resolve the `workflow` block yourself by reading these three files in base → team → user order and applying the same structural merge rules as the resolver:
50
-
51
- 1. `{skill-root}/customize.toml` — defaults
52
- 2. `{project-root}/_bmad/custom/{skill-name}.toml` — team overrides
53
- 3. `{project-root}/_bmad/custom/{skill-name}.user.toml` — personal overrides
54
-
55
- Any missing file is skipped. Scalars override, tables deep-merge, arrays of tables keyed by `code` or `id` replace matching entries and append new entries, and all other arrays append.
56
-
57
- ### Step 2: Execute Prepend Steps
58
-
59
- Execute each entry in `{workflow.activation_steps_prepend}` in order before proceeding.
60
-
61
- ### Step 3: Load Persistent Facts
62
-
63
- Treat every entry in `{workflow.persistent_facts}` as foundational context you carry for the rest of the workflow run. Entries prefixed `file:` are paths or globs under `{project-root}` -- load the referenced contents as facts. All other entries are facts verbatim.
64
-
65
- ### Step 4: Load Config
66
-
67
- Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve:
68
-
69
- - `project_name`, `planning_artifacts`, `implementation_artifacts`, `user_name`
70
- - `communication_language`, `document_output_language`, `user_skill_level`
71
- - `date` as system-generated current datetime
72
- - `sprint_status` = `{implementation_artifacts}/sprint-status.yaml`
73
- - `project_context` = `**/project-context.md` (load if exists)
74
- - YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
75
- - Language MUST be tailored to `{user_skill_level}`
76
- - Generate all documents in `{document_output_language}`
77
-
78
- ### Step 5: Greet the User
79
-
80
- Greet `{user_name}`, speaking in `{communication_language}`.
81
-
82
- ### Step 6: Execute Append Steps
83
-
84
- Execute each entry in `{workflow.activation_steps_append}` in order.
85
-
86
- Activation is complete. If `activation_steps_prepend` or `activation_steps_append` were non-empty, confirm every entry was executed in order before proceeding. Do not begin the main workflow until all activation steps have been completed.
87
-
88
- ## WORKFLOW ARCHITECTURE
89
-
90
- This uses **step-file architecture** for disciplined execution:
91
-
92
- - **Micro-file Design**: Each step is self-contained and followed exactly
93
- - **Just-In-Time Loading**: Only load the current step file
94
- - **Sequential Enforcement**: Complete steps in order, no skipping
95
- - **State Tracking**: Persist progress via spec frontmatter and in-memory variables
96
- - **Append-Only Building**: Build artifacts incrementally
97
-
98
- ### Step Processing Rules
99
-
100
- 1. **READ COMPLETELY**: Read the entire step file before acting
101
- 2. **FOLLOW SEQUENCE**: Execute sections in order
102
- 3. **WAIT FOR INPUT**: Halt at checkpoints and wait for human
103
- 4. **LOAD NEXT**: When directed, read fully and follow the next step file
104
-
105
- ### Critical Rules (NO EXCEPTIONS)
106
-
107
- - **NEVER** load multiple step files simultaneously
108
- - **ALWAYS** read entire step file before execution
109
- - **NEVER** skip steps or optimize the sequence
110
- - **ALWAYS** follow the exact instructions in the step file
111
- - **ALWAYS** halt at checkpoints and wait for human input
112
-
113
- ## FIRST STEP
114
-
115
- Read fully and follow: `./step-01-clarify-and-route.md` to begin the workflow.
12
+ - **On success:** follow the instruction it prints to stdout; ignore stderr.
13
+ - **On any failure** (including `uv` not being installed): report what it printed and HALT.
@@ -8,6 +8,7 @@
8
8
  # - Strings replace the default.
9
9
  # - Lists append to the default list.
10
10
  # - Tables merge key by key.
11
+ # - Arrays of tables merge by `id`: matching `id` replaces, new `id`s append.
11
12
 
12
13
  [workflow]
13
14
 
@@ -31,3 +32,75 @@ persistent_facts = [
31
32
  # Empty means no extra completion behavior.
32
33
 
33
34
  on_complete = ""
35
+
36
+ # Handoff for the implementation subagent in step 03 — nailed down here the same
37
+ # way the review layers below are, so the main session never improvises a fat
38
+ # dispatch prompt. The spec is the subagent's sole source of truth; investigation
39
+ # findings belong in the spec's Code Map (see step 02), not re-narrated here.
40
+ # {spec_file} is substituted at run time. An override may replace the whole recipe
41
+ # (e.g. drive an external coding tool via bash).
42
+
43
+ implementation_handoff = """
44
+ Launch a subagent with no prior conversation context, with this prompt:
45
+
46
+ > Read {spec_file} fully and implement it. The spec is the sole source of truth for this change; its Code Map is your investigation map, and its Spec Change Log entries are binding constraints, not history.
47
+ >
48
+ > Guardrails:
49
+ >
50
+ > - Work in the current project. Before starting, load every file listed in the spec frontmatter `context:`.
51
+ > - Do not edit the spec file itself.
52
+ > - Do not commit or push — that happens later in the workflow.
53
+ > - Do not revert or overwrite changes unrelated to this spec.
54
+ > - Run the verification described in the spec, plus focused checks for the code you touched.
55
+ >
56
+ > When done, report: files changed with one line each, verification commands run and their outcomes, any files changed beyond the spec's tasks and why each was needed, anything you could not complete and why, and residual risks.
57
+ """
58
+
59
+ # Review layers for the review step. `instruction` is the layer's whole
60
+ # execution recipe — subagents by default, but an override may run anything
61
+ # (e.g. an external reviewer via bash). {diff_output} is substituted at run
62
+ # time. `when` (optional) gates a layer; empty `instruction` disables it.
63
+
64
+ [[workflow.review_layers]]
65
+ id = "blind-hunter"
66
+ name = "Blind Hunter"
67
+ instruction = """
68
+ Launch a subagent with no prior conversation context, with this prompt:
69
+
70
+ > Invoke the `bmad-review` skill with only the `adversarial` lens on this diff:
71
+ >
72
+ > {diff_output}
73
+ """
74
+
75
+ [[workflow.review_layers]]
76
+ id = "edge-case-hunter"
77
+ name = "Edge Case Hunter"
78
+ instruction = """
79
+ Launch a subagent with no prior conversation context, with this prompt:
80
+
81
+ > Invoke the `bmad-review` skill with only the `edge-case-hunter` lens on this diff:
82
+ >
83
+ > {diff_output}
84
+ """
85
+
86
+ [[workflow.review_layers]]
87
+ id = "verification-gap"
88
+ name = "Verification Gap Reviewer"
89
+ instruction = """
90
+ Launch a subagent with no prior conversation context, with this prompt:
91
+
92
+ > Invoke the `bmad-review` skill with only the `verification-gap` lens on this diff:
93
+ >
94
+ > {diff_output}
95
+ """
96
+
97
+ # Review layers for the one-shot route.
98
+
99
+ [[workflow.oneshot_review_layers]]
100
+ id = "blind-hunter"
101
+ name = "Blind Hunter"
102
+ instruction = """
103
+ Launch a subagent with no prior conversation context, with this prompt:
104
+
105
+ > Invoke the `bmad-review` skill with only the `adversarial` lens on the changed files.
106
+ """