bmad-method 6.10.1-next.23 → 6.10.1-next.24
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 +2 -2
- package/src/bmm-skills/4-implementation/bmad-dev-auto/SKILL.md +6 -116
- package/src/bmm-skills/4-implementation/bmad-dev-auto/step-01-clarify-and-route.md +14 -15
- package/src/bmm-skills/4-implementation/bmad-dev-auto/step-02-plan.md +4 -8
- package/src/bmm-skills/4-implementation/bmad-dev-auto/step-03-implement.md +6 -4
- package/src/bmm-skills/4-implementation/bmad-dev-auto/step-04-review.md +16 -18
- package/src/bmm-skills/4-implementation/bmad-dev-auto/workflow.md +104 -0
- package/src/bmm-skills/4-implementation/bmad-quick-dev/SKILL.md +1 -1
- package/src/bmm-skills/4-implementation/bmad-quick-dev/workflow.md +1 -0
- package/src/scripts/__pycache__/config_utils.cpython-311.pyc +0 -0
- package/src/scripts/config_utils.py +119 -0
- package/src/scripts/render_skill.py +400 -0
- package/src/scripts/resolve_config.py +32 -136
- package/src/scripts/resolve_customization.py +43 -184
- package/src/scripts/tests/__pycache__/test_config_utils.cpython-311.pyc +0 -0
- package/src/scripts/tests/__pycache__/test_resolve_config.cpython-311.pyc +0 -0
- package/src/scripts/tests/__pycache__/test_resolve_customization.cpython-311.pyc +0 -0
- package/src/scripts/tests/test_config_utils.py +85 -0
- package/src/scripts/tests/test_resolve_config.py +89 -0
- package/src/scripts/tests/test_resolve_customization.py +27 -0
- package/tools/installer/core/installer.js +14 -6
- package/tools/installer/core/manifest-generator.js +1 -1
- package/tools/installer/modules/official-modules.js +1 -1
- package/tools/installer/ui.js +22 -4
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.10.1-next.
|
|
4
|
+
"version": "6.10.1-next.24",
|
|
5
5
|
"description": "Breakthrough Method of Agile AI-driven Development",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"agile",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"test:channels": "node test/test-installer-channels.js",
|
|
47
47
|
"test:install": "node test/test-installation-components.js",
|
|
48
48
|
"test:refs": "node test/test-file-refs-csv.js",
|
|
49
|
-
"test:renderer": "node test/test-quick-dev-renderer.js",
|
|
49
|
+
"test:renderer": "uv run --python 3.11 python -m unittest src/scripts/tests/test_config_utils.py src/scripts/tests/test_resolve_config.py src/scripts/tests/test_resolve_customization.py && node test/test-quick-dev-renderer.js && node test/test-dev-auto-renderer.js",
|
|
50
50
|
"test:skills": "node test/test-validate-skills.js",
|
|
51
51
|
"test:urls": "node test/test-parse-source-urls.js",
|
|
52
52
|
"validate:refs": "node tools/validate-file-refs.js --strict",
|
|
@@ -3,121 +3,11 @@ name: bmad-dev-auto
|
|
|
3
3
|
description: 'One iteration of an unattended development loop. Use when invoked by name.'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
Run this single command exactly once, substituting the absolute project and skill roots without changing the working directory:
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
```bash
|
|
9
|
+
uv run --no-cache "{project-root}/_bmad/scripts/render_skill.py" --project-root "{project-root}" --skill "{skill-root}"
|
|
10
|
+
```
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
## HALT
|
|
13
|
-
|
|
14
|
-
To HALT with a final status and optional blocking condition:
|
|
15
|
-
|
|
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
|
-
```
|
|
48
|
-
3. Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete`
|
|
49
|
-
4. If the resolved `workflow.on_complete` is non-empty, follow it as the final instruction before exiting.
|
|
50
|
-
5. Stop the workflow.
|
|
51
|
-
|
|
52
|
-
## Subagents
|
|
53
|
-
|
|
54
|
-
Using subagents when instructed is mandatory. If you cannot, HALT with status `blocked` and blocking condition `no subagents`.
|
|
55
|
-
|
|
56
|
-
Invoke every subagent **synchronously**: launch it, wait for it to return within the same turn, then continue with its result. When a step says to run subagents "in parallel" (e.g. the reviewers), that means several **blocking** calls awaited together in one turn — not detached execution. Never run a subagent in the background / detached / async (e.g. `run_in_background: true`), and never end your turn to "await a completion notification." This workflow runs unattended: there is no event loop to resume a yielded turn, so a backgrounded subagent never hands control back and the run stalls. The only sanctioned way to end a turn is the HALT protocol above with an explicit terminal `status`.
|
|
57
|
-
|
|
58
|
-
## READY FOR DEVELOPMENT STANDARD
|
|
59
|
-
|
|
60
|
-
A specification is "Ready for Development" when:
|
|
61
|
-
|
|
62
|
-
- **Actionable**: Every task has a file path and specific action.
|
|
63
|
-
- **Logical**: Tasks ordered by dependency.
|
|
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).
|
|
66
|
-
- **Complete**: No placeholders or TBDs.
|
|
67
|
-
- **Sufficient**: No known requirement, acceptance, dependency, or implementation gaps remain unresolved.
|
|
68
|
-
- **Coherent**: No unresolved ambiguities or internal contradictions.
|
|
69
|
-
|
|
70
|
-
## Conventions
|
|
71
|
-
|
|
72
|
-
- Bare paths (e.g. `step-01-clarify-and-route.md`) resolve from the skill root.
|
|
73
|
-
- `{skill-root}` resolves to this skill's installed directory (where `customize.toml` lives).
|
|
74
|
-
- `{project-root}`-prefixed paths resolve from the project working directory.
|
|
75
|
-
- `{skill-name}` resolves to the skill directory's basename.
|
|
76
|
-
|
|
77
|
-
## On Activation
|
|
78
|
-
|
|
79
|
-
### Step 1: Resolve the Workflow Block
|
|
80
|
-
|
|
81
|
-
Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow`
|
|
82
|
-
|
|
83
|
-
**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:
|
|
84
|
-
|
|
85
|
-
1. `{skill-root}/customize.toml` — defaults
|
|
86
|
-
2. `{project-root}/_bmad/custom/{skill-name}.toml` — team overrides
|
|
87
|
-
3. `{project-root}/_bmad/custom/{skill-name}.user.toml` — personal overrides
|
|
88
|
-
|
|
89
|
-
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.
|
|
90
|
-
|
|
91
|
-
### Step 2: Execute Prepend Steps
|
|
92
|
-
|
|
93
|
-
Execute each entry in `{workflow.activation_steps_prepend}` in order before proceeding.
|
|
94
|
-
|
|
95
|
-
### Step 3: Load Persistent Facts
|
|
96
|
-
|
|
97
|
-
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.
|
|
98
|
-
|
|
99
|
-
### Step 4: Load Config
|
|
100
|
-
|
|
101
|
-
Load config from `{project-root}/_bmad/bmm/config.yaml` and resolve:
|
|
102
|
-
|
|
103
|
-
- `project_name`, `planning_artifacts`, `implementation_artifacts`, `user_name`
|
|
104
|
-
- `communication_language`, `document_output_language`, `user_skill_level`
|
|
105
|
-
- `date` as system-generated current datetime
|
|
106
|
-
- `project_context` = `**/project-context.md` (load if exists)
|
|
107
|
-
- YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
|
|
108
|
-
- Language MUST be tailored to `{user_skill_level}`
|
|
109
|
-
- Generate all documents in `{document_output_language}`
|
|
110
|
-
|
|
111
|
-
### Step 5: Execute Append Steps
|
|
112
|
-
|
|
113
|
-
Execute each entry in `{workflow.activation_steps_append}` in order.
|
|
114
|
-
|
|
115
|
-
Activation is complete after all activation steps have run.
|
|
116
|
-
|
|
117
|
-
## Workflow Execution
|
|
118
|
-
|
|
119
|
-
Follow the step files in order. Read one step fully, execute it, then load the next step only when directed. Do not skip, reorder, or pre-load steps.
|
|
120
|
-
|
|
121
|
-
## First workflow step
|
|
122
|
-
|
|
123
|
-
Read fully and follow: `./step-01-clarify-and-route.md` to begin the workflow.
|
|
12
|
+
- On success, read and follow the one absolute `workflow.md` instruction printed to stdout.
|
|
13
|
+
- On failure (including `uv` being unavailable), report the command output and HALT. Do not run any workflow source directly.
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
---
|
|
2
|
-
deferred_work_file: '{implementation_artifacts}/deferred-work.md'
|
|
3
2
|
spec_file: '' # set at runtime once a route resolves it; some HALT branches exit before it is set
|
|
4
3
|
spec_folder: '' # set at runtime under folder+id dispatch only
|
|
5
4
|
story_id: '' # set at runtime under folder+id dispatch only
|
|
@@ -9,7 +8,7 @@ story_id: '' # set at runtime under folder+id dispatch only
|
|
|
9
8
|
|
|
10
9
|
## RULES
|
|
11
10
|
|
|
12
|
-
-
|
|
11
|
+
- **Language** — Speak in `{{.communication_language}}`, tailored to `{{.user_skill_level}}`. Write files in `{{.document_output_language}}`.
|
|
13
12
|
- Treat the invocation intent as workflow input, not as a substitute for step-02 investigation and spec generation.
|
|
14
13
|
- **EARLY EXIT** means: stop this step immediately, then read and follow the target file. Return here only if a later step explicitly says to loop back.
|
|
15
14
|
|
|
@@ -18,11 +17,11 @@ story_id: '' # set at runtime under folder+id dispatch only
|
|
|
18
17
|
Use the invocation prompt as the intent.
|
|
19
18
|
|
|
20
19
|
If the invocation prompt explicitly points to an existing spec file with recognized `status` frontmatter, set `spec_file`, then **EARLY EXIT** to the appropriate step:
|
|
21
|
-
- `draft` →
|
|
22
|
-
- `ready-for-dev` or `in-progress` →
|
|
23
|
-
- `in-review` →
|
|
20
|
+
- `draft` → `[[bmad-snapshot:step-02-plan.md]]`
|
|
21
|
+
- `ready-for-dev` or `in-progress` → `[[bmad-snapshot:step-03-implement.md]]`
|
|
22
|
+
- `in-review` → `[[bmad-snapshot:step-04-review.md]]`
|
|
24
23
|
- `blocked` → HALT with status `blocked` and blocking condition `blocked spec supplied`.
|
|
25
|
-
- `done` → set `review_loop_iteration` to `0` in the frontmatter, then **EARLY EXIT** to
|
|
24
|
+
- `done` → set `review_loop_iteration` to `0` in the frontmatter, then **EARLY EXIT** to `[[bmad-snapshot: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.)
|
|
26
25
|
|
|
27
26
|
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
27
|
|
|
@@ -31,7 +30,7 @@ Read `{spec_folder}/stories.yaml`. If the file does not exist or fails to parse,
|
|
|
31
30
|
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
31
|
- **If more than one matches**, HALT with status `blocked` and blocking condition `ambiguous story file match`.
|
|
33
32
|
- **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
|
|
33
|
+
- `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 `[[bmad-snapshot:step-02-plan.md]]`.
|
|
35
34
|
- 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
35
|
- `status` missing or unrecognized: HALT with status `blocked` and blocking condition `unrecognized status in existing story file`.
|
|
37
36
|
- **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).
|
|
@@ -44,7 +43,7 @@ If the invocation prompt does not contain enough intent to identify what to impl
|
|
|
44
43
|
## INSTRUCTIONS
|
|
45
44
|
|
|
46
45
|
1. Load context.
|
|
47
|
-
- List files in `{planning_artifacts}` and `{implementation_artifacts}`.
|
|
46
|
+
- List files in `{{.planning_artifacts}}` and `{{.implementation_artifacts}}`.
|
|
48
47
|
- If the invocation prompt points to an unformatted spec or intent file, ingest that file. Do not scan for unrelated intent files.
|
|
49
48
|
- **Determine context strategy.** Using the intent and the artifact listing, infer whether the current work is a story from an epic. Do not rely on filename patterns or regex — reason about the intent, the listing, and any epics file content together.
|
|
50
49
|
|
|
@@ -52,15 +51,15 @@ If the invocation prompt does not contain enough intent to identify what to impl
|
|
|
52
51
|
|
|
53
52
|
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.
|
|
54
53
|
|
|
55
|
-
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.
|
|
54
|
+
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.
|
|
56
55
|
- **If valid:** load it as the primary planning context. Do not load raw planning docs (PRD, architecture, UX, etc.).
|
|
57
56
|
- **If missing, empty, or invalid:** compile it in the next bullet.
|
|
58
57
|
|
|
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
|
|
58
|
+
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 with `[[bmad-snapshot:compile-epic-context.md]]` as its prompt. Pass it the epic number, epics file path, `{{.planning_artifacts}}`, and output path `{{.implementation_artifacts}}/epic-<N>-context.md`.
|
|
60
59
|
|
|
61
60
|
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`.
|
|
62
61
|
|
|
63
|
-
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, HALT with status `blocked` and blocking condition `missing previous-story continuity decision`.
|
|
62
|
+
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, HALT with status `blocked` and blocking condition `missing previous-story continuity decision`.
|
|
64
63
|
|
|
65
64
|
**B) Freeform path** — if the intent is not an epic story:
|
|
66
65
|
- Planning artifacts are the output of BMAD phases 1-3. Typical files include:
|
|
@@ -71,14 +70,14 @@ If the invocation prompt does not contain enough intent to identify what to impl
|
|
|
71
70
|
- **Product Brief** (`*brief*`) — project vision and scope
|
|
72
71
|
- 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.
|
|
73
72
|
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.
|
|
74
|
-
3. Version control sanity check.
|
|
73
|
+
3. Version control sanity check. If version control is unavailable, skip this check. Otherwise require a clean working tree, a branch that fits the intent, and writable repository metadata. For Git, run `git add --refresh -- .`, then confirm the tree is still clean; on failure or change, HALT with status `blocked` and blocking condition `version-control metadata not writable`. Under folder+id dispatch, judge the branch against the epic, not the story. HALT on a dirty tree or obvious branch mismatch.
|
|
75
74
|
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.
|
|
76
75
|
5. Route:
|
|
77
76
|
|
|
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.
|
|
77
|
+
**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
78
|
|
|
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** →
|
|
79
|
+
**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`.
|
|
81
80
|
|
|
82
81
|
## NEXT
|
|
83
82
|
|
|
84
|
-
Read fully and follow
|
|
83
|
+
Read fully and follow `[[bmad-snapshot:step-02-plan.md]]`
|
|
@@ -1,26 +1,22 @@
|
|
|
1
|
-
---
|
|
2
|
-
deferred_work_file: '{implementation_artifacts}/deferred-work.md'
|
|
3
|
-
---
|
|
4
|
-
|
|
5
1
|
# Step 2: Plan
|
|
6
2
|
|
|
7
3
|
## RULES
|
|
8
4
|
|
|
9
|
-
-
|
|
5
|
+
- **Language** — Speak in `{{.communication_language}}`, tailored to `{{.user_skill_level}}`. Write files in `{{.document_output_language}}`.
|
|
10
6
|
- No human interaction: do not ask questions or wait for approval in this step.
|
|
11
7
|
|
|
12
8
|
## INSTRUCTIONS
|
|
13
9
|
|
|
14
10
|
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
11
|
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
|
|
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_contract}` is non-empty, substitute it for the `<intent-contract>` block in your filled spec before writing. Write the result to `{spec_file}`.
|
|
17
13
|
4. Self-review against READY FOR DEVELOPMENT standard.
|
|
18
14
|
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
15
|
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
16
|
|
|
21
17
|
### READY-FOR-DEVELOPMENT GATE
|
|
22
18
|
|
|
23
|
-
Re-read
|
|
19
|
+
Re-read `[[bmad-snapshot:workflow.md]]`, then re-read `{spec_file}` from disk and verify the spec meets the READY FOR DEVELOPMENT standard.
|
|
24
20
|
|
|
25
21
|
- **If the file is missing:** HALT with status `blocked` and blocking condition `planned spec file disappeared before implementation`.
|
|
26
22
|
- **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.
|
|
@@ -28,4 +24,4 @@ Re-read `./SKILL.md`, then re-read `{spec_file}` from disk and verify the spec m
|
|
|
28
24
|
|
|
29
25
|
## NEXT
|
|
30
26
|
|
|
31
|
-
Read fully and follow
|
|
27
|
+
Read fully and follow `[[bmad-snapshot:step-03-implement.md]]`
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
## RULES
|
|
7
7
|
|
|
8
|
-
-
|
|
8
|
+
- **Language** — Speak in `{{.communication_language}}`, tailored to `{{.user_skill_level}}`. Write files in `{{.document_output_language}}`.
|
|
9
9
|
- No human interaction: do not ask questions or wait for approval in this step.
|
|
10
10
|
- Content inside `<intent-contract>` in `{spec_file}` is read-only. Do not modify.
|
|
11
11
|
|
|
@@ -23,9 +23,11 @@ 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
|
-
|
|
26
|
+
Substitute the runtime placeholders (e.g. `{spec_file}`) into the implementation handoff below, 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 handoff conflicts with the spec, HALT with status `blocked` and blocking condition `handoff conflicts with spec`, and include both conflicting passages.
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
{workflow.implementation_handoff}
|
|
29
|
+
|
|
30
|
+
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 workflow.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
31
|
|
|
30
32
|
**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
33
|
|
|
@@ -39,4 +41,4 @@ If `{spec_file}`'s intent-contract contains an I/O & Edge-Case Matrix, verify ev
|
|
|
39
41
|
|
|
40
42
|
## NEXT
|
|
41
43
|
|
|
42
|
-
Read fully and follow
|
|
44
|
+
Read fully and follow `[[bmad-snapshot:step-04-review.md]]`
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
---
|
|
2
|
-
deferred_work_file: '{implementation_artifacts}/deferred-work.md'
|
|
3
|
-
---
|
|
4
|
-
|
|
5
1
|
# Step 4: Review
|
|
6
2
|
|
|
7
3
|
## RULES
|
|
8
4
|
|
|
9
|
-
-
|
|
5
|
+
- **Language** — Speak in `{{.communication_language}}`, tailored to `{{.user_skill_level}}`. Write files in `{{.document_output_language}}`.
|
|
10
6
|
- No human interaction: do not ask questions or wait for approval in this step.
|
|
11
7
|
- All review subagents must run at the same model capability as the current session.
|
|
12
8
|
|
|
@@ -22,13 +18,11 @@ Do NOT `git add` anything — this is read-only inspection.
|
|
|
22
18
|
|
|
23
19
|
### Review
|
|
24
20
|
|
|
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
21
|
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
22
|
|
|
31
|
-
Execute
|
|
23
|
+
Execute these review 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 workflow.md → Subagents). Spawn every reviewer subagent before reading or reacting to any of their output; begin collection and triage only once all are launched.
|
|
24
|
+
|
|
25
|
+
{workflow.review_layers}
|
|
32
26
|
|
|
33
27
|
### Classify
|
|
34
28
|
|
|
@@ -56,17 +50,17 @@ Execute all remaining layers in parallel wherever their execution methods allow:
|
|
|
56
50
|
- addressed_findings:
|
|
57
51
|
- `[high|medium|low]` `[patch|bad_spec]` <finding summary and action taken in this pass>
|
|
58
52
|
```
|
|
59
|
-
Where `count` is either just `0`, or total with breakdown by severity `N: (high Nhigh, medium Nmedium, low Nlow)`.
|
|
53
|
+
Where `{date}` is the current system date and `count` is either just `0`, or total with breakdown by severity `N: (high Nhigh, medium Nmedium, low Nlow)`.
|
|
60
54
|
If no patch was fixed and no bad_spec repair loopback was triggered in this pass, write:
|
|
61
55
|
```markdown
|
|
62
56
|
- addressed_findings:
|
|
63
57
|
- none
|
|
64
58
|
```
|
|
65
59
|
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)`.
|
|
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.
|
|
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
|
|
60
|
+
- **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.
|
|
61
|
+
- **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 `[[bmad-snapshot:step-03-implement.md]]` to re-derive the code, then this step will run again.
|
|
68
62
|
- **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`.
|
|
69
|
-
- **defer** — Append one new entry to `{
|
|
63
|
+
- **defer** — Append one new entry to `{{.implementation_artifacts}}/deferred-work.md` using this format. Do not modify existing entries or look for duplicates.
|
|
70
64
|
```markdown
|
|
71
65
|
- source_spec: `{spec_file}`
|
|
72
66
|
summary: <one sentence>
|
|
@@ -76,7 +70,7 @@ Execute all remaining layers in parallel wherever their execution methods allow:
|
|
|
76
70
|
|
|
77
71
|
## Finalize
|
|
78
72
|
|
|
79
|
-
|
|
73
|
+
Write the following details to `{spec_file}` under `## Auto Run Result`:
|
|
80
74
|
- Summary of implemented change
|
|
81
75
|
- Files changed with one-line descriptions
|
|
82
76
|
- Review findings breakdown: patches applied, items deferred, items rejected
|
|
@@ -86,10 +80,14 @@ Prepare `Auto Run Result` details:
|
|
|
86
80
|
|
|
87
81
|
Set `{spec_file}` frontmatter `followup_review_recommended` from the computation above.
|
|
88
82
|
|
|
89
|
-
If version control is
|
|
83
|
+
If version control is unavailable, set `{spec_file}` frontmatter `final_revision: NO_VCS` and `status: done`, then proceed to HALT.
|
|
90
84
|
|
|
91
|
-
|
|
85
|
+
If version control is available:
|
|
92
86
|
|
|
93
|
-
|
|
87
|
+
1. Commit any reviewed-diff files that remain uncommitted. Keep commits already created during this run. Verify every reviewed-diff file appears in the change set after `{baseline_revision}` and none remains uncommitted. Do not push.
|
|
88
|
+
2. Obtain the current full canonical revision directly from version control and preserve it verbatim as `{final_revision}`.
|
|
89
|
+
3. Write `{final_revision}` and `status: done` into `{spec_file}` frontmatter.
|
|
90
|
+
4. If `{spec_file}` is tracked in that working copy, commit only `{spec_file}` as a spec-finalization commit. Keep `{final_revision}` unchanged. Otherwise leave the finalized spec in place; do not create a substitute artifact.
|
|
91
|
+
5. Verify the version-controlled working copy is clean. Otherwise HALT with status `blocked` and blocking condition `finalization left repository dirty`.
|
|
94
92
|
|
|
95
93
|
HALT with status `done`.
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Dev Auto Workflow
|
|
2
|
+
|
|
3
|
+
**Goal:** Turn intent into a hardened, reviewable artifact, without human interaction.
|
|
4
|
+
|
|
5
|
+
**CRITICAL:** If a step directs you to another snapshot file, read it fully and follow it. No exceptions.
|
|
6
|
+
|
|
7
|
+
## HALT
|
|
8
|
+
|
|
9
|
+
To HALT with a final status and optional blocking condition:
|
|
10
|
+
|
|
11
|
+
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.
|
|
12
|
+
- If `{spec_file}` is still empty, resolve it now:
|
|
13
|
+
- **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`.
|
|
14
|
+
- **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`.
|
|
15
|
+
- **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.
|
|
16
|
+
- If `{spec_file}` exists on disk, update `status` in frontmatter and append missing result details under `## Auto Run Result`.
|
|
17
|
+
- If it does not exist, create it as a skeletal story spec:
|
|
18
|
+
```markdown
|
|
19
|
+
---
|
|
20
|
+
status: <final status>
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
# <entry title, or "Story {story_id}" if the entry could not be resolved or the on-disk match was ambiguous>
|
|
24
|
+
|
|
25
|
+
## Auto Run Result
|
|
26
|
+
|
|
27
|
+
Status: <final status>
|
|
28
|
+
Blocking condition: <blocking condition, if any>
|
|
29
|
+
```
|
|
30
|
+
2. **Otherwise:**
|
|
31
|
+
- If `{spec_file}` is known and exists, update `status` in frontmatter and append missing result details under `## Auto Run Result`.
|
|
32
|
+
- If `{spec_file}` is unknown or missing, create `{{.implementation_artifacts}}/bmad-dev-auto-result-<slug-or-timestamp>.md` with:
|
|
33
|
+
```markdown
|
|
34
|
+
---
|
|
35
|
+
status: <final status>
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
# BMad Dev Auto Result
|
|
39
|
+
|
|
40
|
+
Status: <final status>
|
|
41
|
+
Blocking condition: <blocking condition, if any>
|
|
42
|
+
```
|
|
43
|
+
3. Follow **On Complete** below, then stop the workflow.
|
|
44
|
+
|
|
45
|
+
### On Complete
|
|
46
|
+
|
|
47
|
+
If anything appears below, follow it as the final terminal instruction before exiting; otherwise exit normally.
|
|
48
|
+
|
|
49
|
+
{workflow.on_complete}
|
|
50
|
+
|
|
51
|
+
## Subagents
|
|
52
|
+
|
|
53
|
+
Using subagents when instructed is mandatory. If you cannot, HALT with status `blocked` and blocking condition `no subagents`.
|
|
54
|
+
|
|
55
|
+
Invoke every subagent **synchronously**: launch it, wait for it to return within the same turn, then continue with its result. When a step says to run subagents "in parallel" (e.g. the reviewers), that means several **blocking** calls awaited together in one turn — not detached execution. Never run a subagent in the background / detached / async (e.g. `run_in_background: true`), and never end your turn to "await a completion notification." This workflow runs unattended: there is no event loop to resume a yielded turn, so a backgrounded subagent never hands control back and the run stalls. The only sanctioned way to end a turn is the HALT protocol above with an explicit terminal `status`.
|
|
56
|
+
|
|
57
|
+
## READY FOR DEVELOPMENT STANDARD
|
|
58
|
+
|
|
59
|
+
A specification is "Ready for Development" when:
|
|
60
|
+
|
|
61
|
+
- **Actionable**: Every task has a file path and specific action.
|
|
62
|
+
- **Logical**: Tasks ordered by dependency.
|
|
63
|
+
- **Testable**: All ACs use Given/When/Then.
|
|
64
|
+
- **Surface-anchored**: ACs observe the outermost surface the intent references — never a more internal proxy for it.
|
|
65
|
+
- **Complete**: No placeholders or TBDs.
|
|
66
|
+
- **Sufficient**: No known requirement, acceptance, dependency, or implementation gaps remain unresolved.
|
|
67
|
+
- **Coherent**: No unresolved ambiguities or internal contradictions.
|
|
68
|
+
|
|
69
|
+
## Conventions
|
|
70
|
+
|
|
71
|
+
- Every operational cross-file reference in this workflow is an absolute snapshot path. Open it directly; do not resolve it relative to a skill directory.
|
|
72
|
+
- `{project-root}`-prefixed paths resolve from the project working directory.
|
|
73
|
+
- Speak in `{{.communication_language}}`, tailor communication to `{{.user_skill_level}}`, and write documents in `{{.document_output_language}}`.
|
|
74
|
+
- Whenever this workflow captures or records a version-control revision, obtain the full canonical identifier directly from version control and preserve it verbatim.
|
|
75
|
+
|
|
76
|
+
## On Activation
|
|
77
|
+
|
|
78
|
+
### Step 1: Execute Prepend Steps
|
|
79
|
+
|
|
80
|
+
Execute each of these steps in order before proceeding (`_None._` means skip):
|
|
81
|
+
|
|
82
|
+
{workflow.activation_steps_prepend}
|
|
83
|
+
|
|
84
|
+
### Step 2: Load Persistent Facts
|
|
85
|
+
|
|
86
|
+
Treat every entry below 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 (`_None._` means none):
|
|
87
|
+
|
|
88
|
+
{workflow.persistent_facts}
|
|
89
|
+
|
|
90
|
+
### Step 3: Execute Append Steps
|
|
91
|
+
|
|
92
|
+
Execute each of these steps in order (`_None._` means skip):
|
|
93
|
+
|
|
94
|
+
{workflow.activation_steps_append}
|
|
95
|
+
|
|
96
|
+
Activation is complete after all activation steps have run.
|
|
97
|
+
|
|
98
|
+
## Workflow Execution
|
|
99
|
+
|
|
100
|
+
Follow the step files in order. Read one step fully, execute it, then load the next step only when directed. Do not skip, reorder, or pre-load steps.
|
|
101
|
+
|
|
102
|
+
## First Workflow Step
|
|
103
|
+
|
|
104
|
+
Read fully and follow: `[[bmad-snapshot:step-01-clarify-and-route.md]]`.
|
|
@@ -6,7 +6,7 @@ description: 'Implements any user intent, requirement, story, bug fix or change
|
|
|
6
6
|
Run this, substituting `{skill-root}` with the absolute path to this skill's base directory, without changing the cwd:
|
|
7
7
|
|
|
8
8
|
```bash
|
|
9
|
-
uv run {skill-root}/render.py
|
|
9
|
+
uv run --no-cache {skill-root}/render.py
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
- **On success:** follow the instruction it prints to stdout; ignore stderr.
|
|
@@ -34,6 +34,7 @@ A specification should target a **single user-facing goal** within **900–1600
|
|
|
34
34
|
- `{skill-root}` resolves to this skill's installed directory (where `customize.toml` lives).
|
|
35
35
|
- `{project-root}`-prefixed paths resolve from the project working directory.
|
|
36
36
|
- `{skill-name}` resolves to the skill directory's basename.
|
|
37
|
+
- Whenever this workflow captures or records a version-control revision, obtain the full canonical identifier directly from version control and preserve it verbatim.
|
|
37
38
|
|
|
38
39
|
## On Activation
|
|
39
40
|
|
|
Binary file
|