bmad-method 6.3.1-next.1 → 6.3.1-next.2

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.3.1-next.1",
4
+ "version": "6.3.1-next.2",
5
5
  "description": "Breakthrough Method of Agile AI-driven Development",
6
6
  "keywords": [
7
7
  "agile",
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  deferred_work_file: '{implementation_artifacts}/deferred-work.md'
3
3
  spec_file: '' # set at runtime for both routes before leaving this step
4
+ 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
5
  ---
5
6
 
6
7
  # Step 1: Clarify and Route
@@ -20,7 +21,7 @@ Before listing artifacts or prompting the user, check whether you already know t
20
21
 
21
22
  1. Explicit argument
22
23
  Did the user pass a specific file path, spec name, or clear instruction this message?
23
- - If it points to a file that matches the spec template (has `status` frontmatter with a recognized value: draft, ready-for-dev, in-progress, in-review, or done) → set `spec_file` and **EARLY EXIT** to the appropriate step (step-02 for draft, step-03 for ready/in-progress, step-04 for review). For `done`, ingest as context and proceed to INSTRUCTIONS — do not resume.
24
+ - If it points to a file that matches the spec template (has `status` frontmatter with a recognized value: draft, ready-for-dev, in-progress, in-review, or done) → set `spec_file`. Before exiting, run **Story-key resolution** (below). Then **EARLY EXIT** to the appropriate step (step-02 for draft, step-03 for ready/in-progress, step-04 for review). For `done`, ingest as context and proceed to INSTRUCTIONS — do not resume.
24
25
  - Anything else (intent files, external docs, plans, descriptions) → ingest it as starting intent and proceed to INSTRUCTIONS. Do not attempt to infer a workflow state from it.
25
26
 
26
27
  2. Recent conversation
@@ -29,13 +30,19 @@ Before listing artifacts or prompting the user, check whether you already know t
29
30
 
30
31
  3. Otherwise — scan artifacts and ask
31
32
  - 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).
32
- - If `draft` selected: Set `spec_file`. **EARLY EXIT** → `./step-02-plan.md` (resume planning from the draft)
33
- - If `ready-for-dev` or `in-progress` selected: Set `spec_file`. **EARLY EXIT** → `./step-03-implement.md`
34
- - If `in-review` selected: Set `spec_file`. **EARLY EXIT** → `./step-04-review.md`
33
+ - If `draft` selected: Set `spec_file`. Run **Story-key resolution** (below). **EARLY EXIT** → `./step-02-plan.md` (resume planning from the draft)
34
+ - If `ready-for-dev` or `in-progress` selected: Set `spec_file`. Run **Story-key resolution** (below). **EARLY EXIT** → `./step-03-implement.md`
35
+ - If `in-review` selected: Set `spec_file`. Run **Story-key resolution** (below). **EARLY EXIT** → `./step-04-review.md`
35
36
  - 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.
36
37
 
37
38
  Never ask extra questions if you already understand what the user intends.
38
39
 
40
+ ### Story-key resolution
41
+
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.
43
+
44
+ If the spec is an epic story and `{sprint_status}` exists: find the `development_status` key matching `{epic_num}-{story_num}` by exact numeric equality on the first two segments (so `1-1` never collides with `1-10`). Exactly one match → set `{story_key}` to that full key. Zero or multiple matches → leave `{story_key}` unset (warn on multiple).
45
+
39
46
  ## INSTRUCTIONS
40
47
 
41
48
  1. Load context.
@@ -45,7 +52,7 @@ Never ask extra questions if you already understand what the user intends.
45
52
 
46
53
  **A) Epic story path** — if the intent is clearly an epic story:
47
54
 
48
- 1. Identify the epic number and (if present) the story number. If you can't identify an epic number, use path B.
55
+ 1. Identify the epic number `{epic_num}` and (if present) the story number `{story_num}`. If you can't identify an epic number, use path B.
49
56
 
50
57
  2. **Check for a valid cached epic context.** Look for `{implementation_artifacts}/epic-<N>-context.md` (where `<N>` is the epic number). A file is **valid** when it exists, is non-empty, starts with `# Epic <N> Context:` (with the correct epic number), and no file in `{planning_artifacts}` is newer.
51
58
  - **If valid:** load it as the primary planning context. Do not load raw planning docs (PRD, architecture, UX, etc.). Skip to step 5.
@@ -59,6 +66,8 @@ Never ask extra questions if you already understand what the user intends.
59
66
 
60
67
  5. **Previous story continuity.** Regardless of which context source succeeded above, scan `{implementation_artifacts}` for specs from the same epic with `status: done` and a lower story number. Load the most recent one (highest story number below current). Extract its **Code Map**, **Design Notes**, **Spec Change Log**, and **task list** as continuity context for step-02 planning. If no `done` spec is found but an `in-review` spec exists for the same epic with a lower story number, note it to the user and ask whether to load it.
61
68
 
69
+ 6. **Resolve `{story_key}`.** If not already set by an earlier early-exit path, run **Story-key resolution** (above) now.
70
+
62
71
  **B) Freeform path** — if the intent is not an epic story:
63
72
  - Planning artifacts are the output of BMAD phases 1-3. Typical files include:
64
73
  - **PRD** (`*prd*`) — product requirements and success criteria
@@ -24,6 +24,8 @@ Capture `baseline_commit` (current HEAD, or `NO_VCS` if version control is unava
24
24
 
25
25
  Change `{spec_file}` status to `in-progress` in the frontmatter before starting implementation.
26
26
 
27
+ Follow `./sync-sprint-status.md` with `{target_status}` = `in-progress`.
28
+
27
29
  If `{spec_file}` has a non-empty `context:` list in its frontmatter, load those files before implementation begins. When handing to a sub-agent, include them in the sub-agent prompt so it has access to the referenced context.
28
30
 
29
31
  Hand `{spec_file}` to a sub-agent/task and let it implement. If no sub-agents are available, implement directly.
@@ -48,16 +48,25 @@ Format each stop as framing first, link on the next indented line:
48
48
 
49
49
  When there is only one concern, omit the bold label — just list the stops directly.
50
50
 
51
- ### Commit and Present
51
+ ### Mark Spec Done
52
52
 
53
- 1. Change `{spec_file}` status to `done` in the frontmatter.
54
- 2. If version control is available and the tree is dirty, create a local commit with a conventional message derived from the spec title.
55
- 3. Open the spec in the user's editor so they can click through the Suggested Review Order:
53
+ Change `{spec_file}` status to `done` in the frontmatter.
54
+
55
+ Follow `./sync-sprint-status.md` with `{target_status}` = `review`.
56
+
57
+ ### Commit and Open
58
+
59
+ 1. If version control is available and the tree is dirty, create a local commit with a conventional message derived from the spec title.
60
+ 2. Open the spec in the user's editor so they can click through the Suggested Review Order:
56
61
  - Resolve two absolute paths: (1) the repository root (`git rev-parse --show-toplevel` — returns the worktree root when in a worktree, project root otherwise; if this fails, fall back to the current working directory), (2) `{spec_file}`. Run `code -r "{absolute-root}" "{absolute-spec-file}"` — the root first so VS Code opens in the right context, then the spec file. Always double-quote paths to handle spaces and special characters.
57
62
  - If `code` is not available (command fails), skip gracefully and tell the user the spec file path instead.
58
- 4. Display summary of your work to the user, including the commit hash if one was created. 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. Include:
59
- - A note that the spec is open in their editor (or the file path if it couldn't be opened). Mention that `{spec_file}` now contains a Suggested Review Order.
60
- - **Navigation tip:** "Ctrl+click (Cmd+click on macOS) the links in the Suggested Review Order to jump to each stop."
61
- - Offer to push and/or create a pull request.
63
+
64
+ ### Display Summary
65
+
66
+ Display summary of your work to the user, including the commit hash if one was created. 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. Include:
67
+
68
+ - A note that the spec is open in their editor (or the file path if it couldn't be opened). Mention that `{spec_file}` now contains a Suggested Review Order.
69
+ - **Navigation tip:** "Ctrl+click (Cmd+click on macOS) the links in the Suggested Review Order to jump to each stop."
70
+ - Offer to push and/or create a pull request.
62
71
 
63
72
  Workflow complete.
@@ -13,6 +13,8 @@ deferred_work_file: '{implementation_artifacts}/deferred-work.md'
13
13
 
14
14
  ### Implement
15
15
 
16
+ Follow `./sync-sprint-status.md` with `{target_status}` = `in-progress`.
17
+
16
18
  Implement the clarified intent directly.
17
19
 
18
20
  ### Review
@@ -39,6 +41,8 @@ Write `{spec_file}` using `./spec-template.md`. Fill only these sections — del
39
41
  2. **Title and Intent** — `# {title}` heading and `## Intent` with **Problem** and **Approach** lines. Reuse the summary you already generated for the terminal.
40
42
  3. **Suggested Review Order** — append after Intent. Build using the same convention as `./step-05-present.md` § "Generate Suggested Review Order" (spec-file-relative links, concern-based ordering, ultra-concise framing).
41
43
 
44
+ Follow `./sync-sprint-status.md` with `{target_status}` = `review`.
45
+
42
46
  ### Commit
43
47
 
44
48
  If version control is available and the tree is dirty, create a local commit with a conventional message derived from the intent. If VCS is unavailable, skip.
@@ -0,0 +1,19 @@
1
+ # Sync Sprint Status
2
+
3
+ Shared sub-step for updating `sprint-status.yaml` during quick-dev. Called from any route (plan-code-review, one-shot, future routes) with a `{target_status}` parameter.
4
+
5
+ ## Preconditions
6
+
7
+ Skip this entire file (return to caller) if ANY of:
8
+ - `{story_key}` is unset
9
+ - `{sprint_status}` does not exist on disk
10
+
11
+ ## Instructions
12
+
13
+ 1. Load the FULL `{sprint_status}` file.
14
+ 2. Find the `development_status` entry matching `{story_key}`. If not found, warn the user once (`"{story_key} not found in sprint-status; skipping sprint sync"`) and return to caller.
15
+ 3. **Idempotency check.** If `development_status[{story_key}]` is already at `{target_status}` or a later state (`review` is later than `in-progress`; `done` is later than both), return to caller — no write needed. Never regress a story's status.
16
+ 4. Set `development_status[{story_key}]` to `{target_status}`.
17
+ 5. **Epic lift (only when `{target_status}` = `in-progress`).** Derive the parent epic key as `epic-{N}` from the leading numeric segment of `{story_key}` (e.g., `3-2-digest-delivery` → `epic-3`). If that entry exists and is `backlog`, set it to `in-progress`. Leave it alone otherwise. Skip this sub-step entirely when `{target_status}` is not `in-progress`.
18
+ 6. Refresh `last_updated` to the current date.
19
+ 7. Save the file, preserving ALL comments and structure including STATUS DEFINITIONS and WORKFLOW NOTES.
@@ -65,6 +65,7 @@ Load and read full config from `{main_config}` and resolve:
65
65
  - `project_name`, `planning_artifacts`, `implementation_artifacts`, `user_name`
66
66
  - `communication_language`, `document_output_language`, `user_skill_level`
67
67
  - `date` as system-generated current datetime
68
+ - `sprint_status` = `{implementation_artifacts}/sprint-status.yaml`
68
69
  - `project_context` = `**/project-context.md` (load if exists)
69
70
  - CLAUDE.md / memory files (load if exist)
70
71