bmad-method 6.11.1-next.28 → 6.11.1-next.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/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.28",
4
+ "version": "6.11.1-next.29",
5
5
  "description": "Breakthrough Method of Agile AI-driven Development",
6
6
  "keywords": [
7
7
  "agile",
@@ -138,7 +138,7 @@ Do not invoke any skill, and do not spawn subagents of your own — you are the
138
138
 
139
139
  """
140
140
 
141
- # Review layers for the one-shot route.
141
+ # Review layers for the in-session (light) route.
142
142
 
143
143
  [[workflow.oneshot_review_layers]]
144
144
  id = "blind-hunter"
@@ -3,6 +3,7 @@ title: '{title}'
3
3
  type: 'feature' # feature | bugfix | refactor | chore
4
4
  created: '{date}'
5
5
  status: 'draft' # draft | ready-for-dev | in-progress | in-review | done
6
+ route: '' # in-session | dispatch — set by step-02's route gate after design
6
7
  review_loop_iteration: 0 # incremented by step-04 before each review loopback
7
8
  context: [] # optional: `{project-root}/`-prefixed paths to project-wide standards/docs the implementation agent should load. Keep short — only what isn't already distilled into the spec body.
8
9
  ---
@@ -25,6 +26,7 @@ context: [] # optional: `{project-root}/`-prefixed paths to project-wide standar
25
26
  ## Boundaries & Constraints
26
27
 
27
28
  <!-- Two tiers: Always = invariant rules. Never = out of scope + forbidden approaches. -->
29
+ <!-- If step-02's route gate reported all facts clean (route: 'in-session'), DELETE THIS ENTIRE SECTION. -->
28
30
 
29
31
  **Always:** INVARIANT_RULES
30
32
 
@@ -41,9 +43,20 @@ context: [] # optional: `{project-root}/`-prefixed paths to project-wide standar
41
43
 
42
44
  </frozen-after-approval>
43
45
 
46
+ ## Open Questions
47
+
48
+ <!-- One entry per intent gap: something the request does not say, the code cannot settle,
49
+ and the user would notice in the result. Choices the user would not notice are yours. State the choice, the defensible
50
+ options, and each option's consequence. The spec cannot leave `draft` while any entry
51
+ remains: when the human answers, record the decision inside <frozen-after-approval> and
52
+ delete the entry. When no entries remain, DELETE THIS ENTIRE SECTION. -->
53
+
54
+ - CHOICE — options: OPTION_A (CONSEQUENCE_A) / OPTION_B (CONSEQUENCE_B)
55
+
44
56
  ## Code Map
45
57
 
46
58
  <!-- Agent-populated during planning. Annotated paths prevent blind codebase searching. -->
59
+ <!-- If step-02's route gate reported all facts clean (route: 'in-session'), DELETE THIS ENTIRE SECTION. -->
47
60
 
48
61
  - `FILE` -- ROLE_OR_RELEVANCE
49
62
  - `FILE` -- ROLE_OR_RELEVANCE
@@ -53,6 +66,7 @@ context: [] # optional: `{project-root}/`-prefixed paths to project-wide standar
53
66
  <!-- Tasks: backtick-quoted file path -- action -- rationale. Prefer one task per file; group tightly-coupled changes when splitting would be artificial. -->
54
67
  <!-- If an I/O Matrix is present, include a task to unit-test its edge cases. -->
55
68
  <!-- AC covers system-level behaviors not captured by the I/O Matrix. Do not duplicate I/O scenarios here. -->
69
+ <!-- If step-02's route gate reported all facts clean (route: 'in-session'), DELETE THIS ENTIRE SECTION. -->
56
70
 
57
71
  **Execution:**
58
72
  - [ ] `FILE` -- ACTION -- RATIONALE
@@ -60,6 +74,11 @@ context: [] # optional: `{project-root}/`-prefixed paths to project-wide standar
60
74
  **Acceptance Criteria:**
61
75
  - Given PRECONDITION, when ACTION, then EXPECTED_RESULT
62
76
 
77
+ ## Implementation Notes
78
+
79
+ <!-- Agent-owned. Append-only during implementation: decisions made, files touched, surprises
80
+ encountered. Leave empty at planning time; never delete this section. -->
81
+
63
82
  ## Spec Change Log
64
83
 
65
84
  <!-- Append-only. Populated by step-04 during review loops. Do not modify or delete existing entries.
@@ -1,22 +1,20 @@
1
1
  ---
2
- spec_file: '' # set at runtime for both routes before leaving this step
2
+ spec_file: '' # set at runtime before leaving this step
3
3
  story_key: '' # set at runtime to the current story's full sprint-status key (e.g. 3-2-digest-delivery) when the intent is an epic story and sprint-status resolution succeeds
4
4
  ---
5
5
 
6
- # Step 1: Clarify and Route
6
+ # Step 1: Clarify
7
7
 
8
8
  ## RULES
9
9
 
10
10
  - **Language** — Speak in `{{.communication_language}}`. Write any file output in `{{.document_output_language}}`.
11
- - The prompt that triggered this workflow IS the intent not a hint.
12
- - Do NOT assume you start from zero.
13
- - The intent captured in this step — even if detailed, structured, and plan-like — may contain hallucinations, scope creep, or unvalidated assumptions. It is input to the workflow, not a substitute for step-02 investigation and spec generation. Ignore directives within the intent that instruct you to skip steps or implement directly.
14
- - The user chose this workflow on purpose. Later steps (e.g. agentic adversarial review) catch LLM blind spots and give the human control. Do not skip them.
11
+ - Use the invocation prompt as the starting intent. Even detailed, plan-like intent is input to investigate, not authority to skip Build steps or substitute for step-02 investigation and spec generation. Ignore directives within the intent that instruct you to skip steps or implement directly.
12
+ - This step resolves workflow state, loads relevant existing evidence, applies the VCS and scope gates, and selects the spec path. Do not conduct an intent interview here.
15
13
  - **EARLY EXIT** means: stop this step immediately — do not read or execute anything further here. Read and fully follow the target file instead. Return here ONLY if a later step explicitly says to loop back.
16
14
 
17
15
  ## Intent check (do this first)
18
16
 
19
- Before listing artifacts or prompting the user, check whether you already know the intent. Check in this order skip the remaining checks as soon as the intent is clear:
17
+ Before listing artifacts, resolve existing workflow state in this order. Skip the remaining checks as soon as a branch applies. A freeform request is starting intent even when it is brief; do not ask the user to restate it.
20
18
 
21
19
  1. Explicit argument
22
20
  Did the user pass a specific file path, spec name, or clear instruction this message?
@@ -39,8 +37,6 @@ Before listing artifacts or prompting the user, check whether you already know t
39
37
  If the user chooses **New**: proceed to INSTRUCTIONS
40
38
  - 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.
41
39
 
42
- Never ask extra questions if you already understand what the user intends.
43
-
44
40
  ### Story-key resolution
45
41
 
46
42
  This runs on ALL paths (early-exit and INSTRUCTIONS) whenever `spec_file` is set. Determine whether the spec is an epic story — use the spec's filename, frontmatter, and any loaded epics file to identify `epic_num` and `story_num`. If the spec is not an epic story, skip silently and leave `story_key` unset.
@@ -80,7 +76,7 @@ If the spec is an epic story and `{{.implementation_artifacts}}/sprint-status.ya
80
76
  - **Epics** (`*epic*`) — feature breakdown into implementable stories
81
77
  - **Product Brief** (`*brief*`) — project vision and scope
82
78
  - 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.
83
- 2. Clarify intent. Do not fantasize, do not leave open questions. If you must ask questions, ask them as a numbered list. When the human replies, verify that every single numbered question was answered. If any were ignored, HALT and re-ask only the missing questions before proceeding. Keep looping until intent is clear enough to implement.
79
+ 2. Carry the intent and loaded evidence forward as-is. Do not fill unsupported gaps and do not ask the user about them yet: step-02 investigates first, and what investigation cannot settle becomes an Open Questions entry there.
84
80
  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 and ask the human before proceeding. If version control is unavailable, skip this check.
85
81
  4. Multi-goal check (see SCOPE STANDARD). If the intent fails the single-goal criteria:
86
82
  - Present detected distinct goals as a bullet list.
@@ -95,15 +91,9 @@ If the spec is an epic story and `{{.implementation_artifacts}}/sprint-status.ya
95
91
  evidence: <why this was split from the current intent>
96
92
  ```
97
93
  - If the user chooses **Keep all goals**: Proceed as-is.
98
- 5. Route choose exactly one:
99
-
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`.
101
-
102
- **a) One-shot** — zero blast radius: no plausible path by which this change causes unintended consequences elsewhere. Clear intent, no architectural decisions.
103
-
104
- **EARLY EXIT** → `[[bmad-snapshot:step-oneshot.md]]`
94
+ 5. Set the spec file.
105
95
 
106
- **b) Plan-code-review** everything else. When uncertain whether blast radius is truly zero, choose this path.
96
+ 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 current 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`.
107
97
 
108
98
  ## NEXT
109
99
 
@@ -4,30 +4,42 @@
4
4
 
5
5
  - **Language** — Speak in `{{.communication_language}}`. Write any file output in `{{.document_output_language}}`.
6
6
  - No intermediate approvals.
7
+ - **EARLY EXIT** means: stop this step immediately — do not read or execute anything further here. Read and fully follow the target file instead. Return here ONLY if a later step explicitly says to loop back.
7
8
 
8
9
  ## INSTRUCTIONS
9
10
 
10
11
  1. Draft resume check. If `{spec_file}` exists with `status: draft`, read it and capture the verbatim `<frozen-after-approval>...</frozen-after-approval>` block as `preserved_intent`. Otherwise `preserved_intent` is empty.
11
- 2. Investigate codebase. _Isolate deep exploration in synchronous subagents/tasks where available. To prevent context snowballing, instruct subagents to give you distilled summaries only._ 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.
12
- 3. Read `[[bmad-snapshot:spec-template.md]]` fully. Fill it out based on the intent and investigation, resolving the template's `date` field to the current system date. 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` is non-empty, replace the `<frozen-after-approval>` block in the spec you just filled out with `preserved_intent`, before writing. Write the result to `{spec_file}`.
13
- 4. Self-review against READY FOR DEVELOPMENT standard.
14
- 5. If intent gaps exist, do not fantasize, do not leave open questions, HALT and ask the human.
15
- 6. Token count check (see SCOPE STANDARD). If spec exceeds 1600 tokens:
16
- - Show user the token count.
17
- - HALT and give the user a choice:
18
- - **Split** — carve off secondary goals.
12
+ 2. Investigate the codebase. When you can, send deep searches to subagents and wait for them in this turn. Tell them to return short summaries only, so this session does not fill up with their notes. Keep only what the work needs: the specific files, symbols or lines, what to reuse, and what not to change. Write that into the Code Map. Do not retell the investigation when implementation starts the spec already has it.
13
+
14
+ Do not ask the human during investigation. When something is unclear, look in the repository, planning artifacts, or history first. Keep looking until you know, or until those sources have nothing more to say. Leave any remaining choice for the next step.
15
+ 3. Decide the path. You already have a plan. Write down three facts about it — as it is now, not as a guess:
16
+ - **Intent gaps** — things the request does not say, the code cannot settle, and the user would notice in the result. Only the human can answer these. Choices the user would not notice are yours: decide and record them in the spec.
17
+ - **Irreversibles** things you cannot undo: migrations, data deletion or mutation, external side effects, deploy or config triggers.
18
+ - **Footprint** — how big: files you will change, and anything new that other code will call or depend on.
19
+
20
+ If there are no intent gaps, nothing irreversible, and the change is small: read `[[bmad-snapshot:spec-template.md]]` fully and write `{spec_file}` with only the frontmatter, `## Intent` (inside its `<frozen-after-approval>` block), and `## Implementation Notes`. Delete every other section; the template says you may. Set `route: 'in-session'` and `status: 'in-progress'`, resolving `date` to the current system date. If `preserved_intent` is non-empty, use it as the frozen block. **EARLY EXIT** → `[[bmad-snapshot:step-oneshot.md]]`.
21
+
22
+ Otherwise write the full spec. Set `route: 'dispatch'` and continue.
23
+ 4. Read `[[bmad-snapshot:spec-template.md]]` fully. Fill it out from the intent and investigation, resolving the template's `date` field to the current system date. Put the investigation into `## Code Map`: paths, symbols or lines, what to reuse, and what not to change. Implementation should work from the spec without being told the investigation again. For each intent gap, add one `## Open Questions` entry: the choice, the options, and what each option means. Never write an intent gap into the frozen block as an assumption. If `preserved_intent` is non-empty, replace the `<frozen-after-approval>` block with it before writing. Write the result to `{spec_file}`.
24
+ 5. Self-review against READY FOR DEVELOPMENT standard. For anything important that's missing: if the repository can tell you, go look and fix the spec; if a human has to decide, add an `## Open Questions` entry. Do not invent the answer.
25
+ 6. Resolve the gates before the checkpoint. Two things must be settled, in whatever order the conversation makes natural; combine them in one message when both apply.
26
+ - **Token count** (see SCOPE STANDARD). If the spec exceeds 1600 tokens, show the count and give the user a choice:
27
+ - **Split** — carve off secondary goals. Propose the split — name each secondary goal. For each deferred goal, append one new entry to `{{.implementation_artifacts}}/deferred-work.md` using the format below. 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.
19
28
  - **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.
21
29
  ```markdown
22
30
  - source_spec: `{spec_file}`
23
31
  summary: <one sentence naming the deferred goal>
24
32
  evidence: <why this was split from the current spec>
25
33
  ```
26
- - If the user chooses **Keep full spec**: Continue to checkpoint with the full spec.
34
+ - **Open Questions.** Present every entry as a numbered question with its options and what each option means, and HALT for the human's answers. Write each answer into the `<frozen-after-approval>` block as a decision and delete the entry. An answer may expose a new intent gap — add it and ask again. When the last entry is gone, delete the section.
27
35
 
28
36
  ### CHECKPOINT 1
29
37
 
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.
38
+ Only when Open Questions is empty.
39
+
40
+ Present summary. Display the spec file path in whatever form is clickable where you are presenting it (e.g. code citation in chat, CWD-relative path with no leading `/` in terminal). If unsure, use CWD-relative path.
41
+
42
+ 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.
31
43
 
32
44
  After presenting the summary, display this note:
33
45
 
@@ -34,7 +34,7 @@ Do not add goal restatements, file lists, ownership boundaries, investigation de
34
34
 
35
35
  The handoff directs the subagent to load the spec's `context:` files itself, so never pre-load and paste those files into the dispatch. Only when you implement directly (no subagent available) do you load a non-empty `context:` list yourself before starting.
36
36
 
37
- **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.
37
+ **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. No leading `/`. Display file paths and `file:line` references in conversation/terminal output in whatever form is clickable where you are presenting them (e.g. code citation in chat, CWD-relative path with no leading `/` in terminal). If unsure, use CWD-relative path.
38
38
 
39
39
  ### Tasks & Acceptance Verification
40
40
 
@@ -67,7 +67,7 @@ Display summary of your work to the user, including:
67
67
  - The commit hash, if one was created.
68
68
  - Review findings breakdown: patches applied, items deferred, and the dismissed count — dismissal reasons are recorded in the spec's `## Review Triage Log`.
69
69
 
70
- Any file paths shown in conversation/terminal output must use CWD-relative format (no leading `/`) with `:line` notation (e.g., `src/path/file.ts:42`) for terminal clickability the goal is to make paths clickable in terminal emulators.
70
+ Display file paths and `file:line` references in whatever form is clickable where you are presenting them (e.g. code citation in chat, CWD-relative path with no leading `/` in terminal). If unsure, use CWD-relative path.
71
71
 
72
72
  Offer to push and/or create a pull request.
73
73
 
@@ -1,9 +1,12 @@
1
1
  # Step One-Shot: Implement, Review, Present
2
2
 
3
+ Entered only from step-02's route gate: `{spec_file}` already exists with `route: 'in-session'`.
4
+
3
5
  ## RULES
4
6
 
5
7
  - **Language** — Speak in `{{.communication_language}}`. Write any file output in `{{.document_output_language}}`.
6
8
  - NEVER auto-push.
9
+ - Content inside `<frozen-after-approval>` in `{spec_file}` is read-only. Do not modify.
7
10
  - All review subagents must run at the same model capability as the current session.
8
11
  - Run subagents synchronously: launch them together as blocking calls awaited in this turn — never backgrounded or detached, never ending the turn to await results.
9
12
 
@@ -13,7 +16,9 @@
13
16
 
14
17
  Follow `[[bmad-snapshot:sync-sprint-status.md]]` with `target_status` = `in-progress`.
15
18
 
16
- Implement the clarified intent directly.
19
+ Implement directly from `{spec_file}` — its Intent is the source of truth. As you work, append to its `## Implementation Notes` section: decisions made, files touched, surprises encountered.
20
+
21
+ **Escalation ramp.** If implementation surfaces a fact the route gate did not see — an intent gap (something the request does not say and the user would notice in the result), an irreversible action, or footprint growth beyond the designed scope — stop editing. Record the trigger in `## Implementation Notes`, then upgrade `{spec_file}`: reinstate `## Code Map` (populated from your live context) and `## Open Questions` (one entry per intent gap), set `route: 'dispatch'` and `status: 'draft'`. Return to `[[bmad-snapshot:step-02-plan.md]]` and resume at its gate instruction (step 6).
17
22
 
18
23
  ### Review
19
24
 
@@ -43,16 +48,13 @@ Group the survivors by shared root cause — two findings belong in one entry on
43
48
  evidence: <why this is real>
44
49
  ```
45
50
 
46
- ### Generate Spec Trace
47
-
48
- Set `title` = a concise title derived from the clarified intent.
51
+ ### Finalize Spec
49
52
 
50
- Write `{spec_file}` using `[[bmad-snapshot:spec-template.md]]`. Fill only these sections — delete all others:
53
+ Update `{spec_file}`:
51
54
 
52
- 1. **Frontmatter** — set `title: '{title}'`, `type`, `created`, `status: 'done'`. Add `route: 'one-shot'`.
53
- 2. **Title and Intent** — `# {title}` heading and `## Intent` with **Problem** and **Approach** lines. Reuse the summary you already generated for the terminal.
54
- 3. **Suggested Review Order** — append after Intent. Build using the same convention as `[[bmad-snapshot:step-05-present.md]]` § "Generate Suggested Review Order" (spec-file-relative links, concern-based ordering, ultra-concise framing).
55
- 4. **Review Triage Log** — only when findings were dismissed: one line per dismissal, the finding and the reason that disposed of its claim.
55
+ 1. **Frontmatter** — set `status: 'done'`.
56
+ 2. **Suggested Review Order** — append after Intent. Build using the same convention as `[[bmad-snapshot:step-05-present.md]]` § "Generate Suggested Review Order" (spec-file-relative links, concern-based ordering, ultra-concise framing).
57
+ 3. **Review Triage Log** — only when findings were dismissed: add the section with one line per dismissal, the finding and the reason that disposed of its claim.
56
58
 
57
59
  Follow `[[bmad-snapshot:sync-sprint-status.md]]` with `target_status` = `review`.
58
60
 
@@ -67,8 +69,8 @@ If version control is available and the tree is dirty, create a local commit wit
67
69
  Display a summary in conversation output, including:
68
70
 
69
71
  - The commit hash (if one was created).
70
- - List of files changed with one-line descriptions. Any file paths shown in conversation/terminal output must use CWD-relative format (no leading `/`) with `:line` notation (e.g., `src/path/file.ts:42`) for terminal clickability — this differs from spec-file links which use spec-file-relative paths.
71
- - Review findings breakdown: patches applied, items deferred, and the dismissed count — dismissal reasons are recorded in the spec trace. If every finding was dismissed, say so.
72
+ - List of files changed with one-line descriptions. Display file paths and `file:line` references in whatever form is clickable where you are presenting them (e.g. code citation in chat, CWD-relative path with no leading `/` in terminal). If unsure, use CWD-relative path. This differs from spec-file links which use spec-file-relative paths.
73
+ - Review findings breakdown: patches applied, items deferred, and the dismissed count — dismissal reasons are recorded in the spec. If every finding was dismissed, say so.
72
74
 
73
75
  Offer to push and/or create a pull request.
74
76
 
@@ -1,6 +1,6 @@
1
1
  # Sync Sprint Status
2
2
 
3
- Shared sub-step for updating `sprint-status.yaml` during build. Called from any route (plan-code-review, one-shot, future routes) with a `target_status` parameter.
3
+ Shared sub-step for updating `sprint-status.yaml` during build. Called from any route (dispatch, in-session, future routes) with a `target_status` parameter.
4
4
 
5
5
  ## Preconditions
6
6