bmad-method 6.10.1-next.1 → 6.10.1-next.11
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 +1 -1
- package/src/bmm-skills/4-implementation/bmad-code-review/SKILL.md +2 -4
- package/src/bmm-skills/4-implementation/bmad-code-review/customize.toml +52 -0
- package/src/bmm-skills/4-implementation/bmad-code-review/steps/step-01-gather-context.md +0 -1
- package/src/bmm-skills/4-implementation/bmad-code-review/steps/step-02-review.md +10 -24
- package/src/bmm-skills/4-implementation/bmad-code-review/steps/step-03-triage.md +3 -4
- package/src/bmm-skills/4-implementation/bmad-dev-auto/SKILL.md +33 -12
- package/src/bmm-skills/4-implementation/bmad-dev-auto/customize.toml +75 -0
- package/src/bmm-skills/4-implementation/bmad-dev-auto/spec-template.md +1 -1
- package/src/bmm-skills/4-implementation/bmad-dev-auto/step-01-clarify-and-route.md +21 -3
- package/src/bmm-skills/4-implementation/bmad-dev-auto/step-02-plan.md +4 -5
- package/src/bmm-skills/4-implementation/bmad-dev-auto/step-03-implement.md +8 -4
- package/src/bmm-skills/4-implementation/bmad-dev-auto/step-04-review.md +10 -16
- package/src/bmm-skills/4-implementation/bmad-quick-dev/customize.toml +50 -0
- package/src/bmm-skills/4-implementation/bmad-quick-dev/step-01-clarify-and-route.md +0 -1
- package/src/bmm-skills/4-implementation/bmad-quick-dev/step-02-plan.md +0 -1
- package/src/bmm-skills/4-implementation/bmad-quick-dev/step-03-implement.md +4 -0
- package/src/bmm-skills/4-implementation/bmad-quick-dev/step-04-review.md +8 -14
- package/src/bmm-skills/4-implementation/bmad-quick-dev/step-oneshot.md +5 -2
- package/src/core-skills/bmad-spec/SKILL.md +17 -2
- package/src/core-skills/bmad-spec/assets/stories-schema.md +44 -0
- package/tools/installer/ide/platform-codes.yaml +7 -0
package/package.json
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: bmad-code-review
|
|
3
|
-
description: '
|
|
3
|
+
description: 'Adversarial code review using parallel review layers and structured triage. Use when the user says "run code review" or "review this code"'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Code Review Workflow
|
|
7
7
|
|
|
8
|
-
**Goal:** Review code changes adversarially
|
|
9
|
-
|
|
10
|
-
**Your Role:** You are an elite code reviewer. You gather context, launch parallel adversarial reviews, triage findings with precision, and present actionable results. No noise, no filler.
|
|
8
|
+
**Goal:** Review code changes adversarially. No noise, no filler.
|
|
11
9
|
|
|
12
10
|
Subagents, when the capability is available, are an important part of this workflow. Use them as directed by the workflow steps.
|
|
13
11
|
If you need an explicit user instruction to run them, ask once now for the whole workflow run.
|
|
@@ -39,3 +39,55 @@ persistent_facts = [
|
|
|
39
39
|
# Leave empty for no custom post-completion behavior.
|
|
40
40
|
|
|
41
41
|
on_complete = ""
|
|
42
|
+
|
|
43
|
+
# Review layers for the review step. `instruction` is the layer's whole
|
|
44
|
+
# execution recipe — subagents by default, but an override may run anything
|
|
45
|
+
# (e.g. an external reviewer via bash). {diff_output} and {spec_file} are
|
|
46
|
+
# substituted at run time. `when` (optional) gates a layer; empty
|
|
47
|
+
# `instruction` disables it.
|
|
48
|
+
|
|
49
|
+
[[workflow.review_layers]]
|
|
50
|
+
id = "blind-hunter"
|
|
51
|
+
name = "Blind Hunter"
|
|
52
|
+
instruction = """
|
|
53
|
+
Launch a subagent with no prior conversation context, with this prompt:
|
|
54
|
+
|
|
55
|
+
> Invoke the `bmad-review-adversarial-general` skill on this diff:
|
|
56
|
+
>
|
|
57
|
+
> {diff_output}
|
|
58
|
+
"""
|
|
59
|
+
|
|
60
|
+
[[workflow.review_layers]]
|
|
61
|
+
id = "edge-case-hunter"
|
|
62
|
+
name = "Edge Case Hunter"
|
|
63
|
+
instruction = """
|
|
64
|
+
Launch a subagent with no prior conversation context, with this prompt:
|
|
65
|
+
|
|
66
|
+
> Invoke the `bmad-review-edge-case-hunter` skill on this diff:
|
|
67
|
+
>
|
|
68
|
+
> {diff_output}
|
|
69
|
+
"""
|
|
70
|
+
|
|
71
|
+
[[workflow.review_layers]]
|
|
72
|
+
id = "verification-gap"
|
|
73
|
+
name = "Verification Gap Reviewer"
|
|
74
|
+
instruction = """
|
|
75
|
+
Launch a subagent with no prior conversation context, with this prompt:
|
|
76
|
+
|
|
77
|
+
> Invoke the `bmad-review-verification-gap` skill on this diff:
|
|
78
|
+
>
|
|
79
|
+
> {diff_output}
|
|
80
|
+
"""
|
|
81
|
+
|
|
82
|
+
[[workflow.review_layers]]
|
|
83
|
+
id = "acceptance-auditor"
|
|
84
|
+
name = "Acceptance Auditor"
|
|
85
|
+
when = 'Only when {review_mode} = "full".'
|
|
86
|
+
instruction = """
|
|
87
|
+
Launch a subagent with no prior conversation context, with this prompt:
|
|
88
|
+
|
|
89
|
+
> You are an Acceptance Auditor. Review the provided diff against `{spec_file}` and any loaded context docs. Check for: violations of acceptance criteria, deviations from spec intent, missing implementation of specified behavior, contradictions between spec constraints and actual code. Output findings as a Markdown list. Each finding: one-line title, which AC/constraint it violates, and evidence from the diff.
|
|
90
|
+
>
|
|
91
|
+
> Diff:
|
|
92
|
+
> {diff_output}
|
|
93
|
+
"""
|
|
@@ -79,7 +79,6 @@ story_key: '' # set at runtime when discovered from sprint status
|
|
|
79
79
|
|
|
80
80
|
Present a summary before proceeding: diff stats (files changed, lines added/removed), `{review_mode}`, and loaded spec/context docs (if any). HALT and wait for user confirmation to proceed.
|
|
81
81
|
|
|
82
|
-
|
|
83
82
|
## NEXT
|
|
84
83
|
|
|
85
84
|
Read fully and follow `./step-02-review.md`
|
|
@@ -8,38 +8,24 @@ failed_layers: '' # set at runtime: comma-separated list of layers that failed o
|
|
|
8
8
|
|
|
9
9
|
- YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
|
|
10
10
|
- All review subagents must run at the same model capability as the current session.
|
|
11
|
+
- Run subagents synchronously: launch them together, then wait for all results before continuing.
|
|
11
12
|
|
|
12
13
|
## INSTRUCTIONS
|
|
13
14
|
|
|
14
|
-
1.
|
|
15
|
+
1. The review layers are `{workflow.review_layers}`, resolved during activation.
|
|
15
16
|
|
|
16
|
-
2.
|
|
17
|
+
2. For each layer in `{workflow.review_layers}`:
|
|
18
|
+
- `instruction` empty or missing → drop the layer silently (an override disabled it).
|
|
19
|
+
- `when` condition present and not satisfied by the current context (`{review_mode}`, `{spec_file}`) → drop the layer and tell the user, e.g. "Acceptance Auditor skipped — no spec file provided."
|
|
20
|
+
- otherwise → the layer is active.
|
|
17
21
|
|
|
18
|
-
|
|
19
|
-
> Invoke the `bmad-review-adversarial-general` skill on this diff:
|
|
20
|
-
>
|
|
21
|
-
> {diff_output}
|
|
22
|
+
If no layer is active, HALT with status `blocked` and blocking condition `no active review layers`.
|
|
22
23
|
|
|
23
|
-
|
|
24
|
-
> Invoke the `bmad-review-edge-case-hunter` skill on this diff:
|
|
25
|
-
>
|
|
26
|
-
> {diff_output}
|
|
24
|
+
3. Execute all active layers in parallel wherever their execution methods allow: substitute the runtime placeholders (`{diff_output}`, `{spec_file}`) into each layer's `instruction`, then follow it verbatim. If a layer's instruction requires subagents and subagents are not available, generate prompt files in `{implementation_artifacts}` for each such layer and HALT. Ask the user to run each in a separate session (ideally a different LLM) and paste back the findings. When findings are pasted, treat them as those layers' findings and resume from this point.
|
|
27
25
|
|
|
28
|
-
|
|
29
|
-
> Invoke the `bmad-review-verification-gap` skill on this diff:
|
|
30
|
-
>
|
|
31
|
-
> {diff_output}
|
|
32
|
-
|
|
33
|
-
- **Acceptance Auditor** (only if `{review_mode}` = `"full"`) — prompt:
|
|
34
|
-
> You are an Acceptance Auditor. Review the provided diff against `{spec_file}` and any loaded context docs. Check for: violations of acceptance criteria, deviations from spec intent, missing implementation of specified behavior, contradictions between spec constraints and actual code. Output findings as a Markdown list. Each finding: one-line title, which AC/constraint it violates, and evidence from the diff.
|
|
35
|
-
>
|
|
36
|
-
> Diff:
|
|
37
|
-
> {diff_output}
|
|
38
|
-
|
|
39
|
-
3. **Subagent failure handling**: If any subagent fails, times out, or returns empty results, append the layer name to `{failed_layers}` (comma-separated) and proceed with findings from the remaining layers.
|
|
40
|
-
|
|
41
|
-
4. Collect all findings from the completed layers.
|
|
26
|
+
4. **Layer failure handling**: If any layer fails, times out, or returns empty results, append the layer's `name` to `{failed_layers}` (comma-separated) and proceed with findings from the remaining layers.
|
|
42
27
|
|
|
28
|
+
5. Collect all findings from the completed layers, keeping track of each finding's originating layer `id`.
|
|
43
29
|
|
|
44
30
|
## NEXT
|
|
45
31
|
|
|
@@ -11,15 +11,15 @@
|
|
|
11
11
|
|
|
12
12
|
1. **Normalize** findings from all layers into a unified list where each finding has:
|
|
13
13
|
- `id` -- sequential integer
|
|
14
|
-
- `source` --
|
|
14
|
+
- `source` -- the `id` of the layer that produced the finding (e.g., `blind-hunter`), or merged sources joined with `+` (e.g., `blind-hunter+edge-case-hunter`)
|
|
15
15
|
- `title` -- one-line summary
|
|
16
16
|
- `detail` -- full description
|
|
17
17
|
- `location` -- file and line reference (if available)
|
|
18
18
|
|
|
19
19
|
2. **Deduplicate.** Deduplicate only findings with the same claim and same required action. If two or more findings meet both conditions, merge them into one:
|
|
20
|
-
- Use the most specific finding as the base (prefer
|
|
20
|
+
- Use the most specific finding as the base (prefer findings with a precise location over prose-only findings).
|
|
21
21
|
- Append any unique detail, reasoning, or location references from the other finding(s) into the surviving `detail` field.
|
|
22
|
-
- Set `source` to the merged sources (e.g., `blind+edge`).
|
|
22
|
+
- Set `source` to the merged sources (e.g., `blind-hunter+edge-case-hunter`).
|
|
23
23
|
|
|
24
24
|
3. Then evaluate each remaining finding independently. Do not reject a finding because a related finding was rejected.
|
|
25
25
|
|
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
|
|
46
46
|
9. If zero findings remain after triage (all rejected or none raised): state "✅ Clean review — all layers passed." (Step 3 already warned if any review layers failed via `{failed_layers}`.)
|
|
47
47
|
|
|
48
|
-
|
|
49
48
|
## NEXT
|
|
50
49
|
|
|
51
50
|
Read fully and follow `./step-04-present.md`
|
|
@@ -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.
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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-adversarial-general` skill 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-edge-case-hunter` skill 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-verification-gap` skill 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
|
+
"""
|
|
@@ -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
|
-
-
|
|
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
|
|
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
|
|
|
@@ -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
|
-
|
|
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.
|
|
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
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}`.
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
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
|
-
###
|
|
32
|
+
### Verify
|
|
33
33
|
|
|
34
|
-
After the implementation subagent returns
|
|
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
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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. 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,7 +63,7 @@ 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>`.
|
|
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
68
|
- **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`.
|
|
75
69
|
- **defer** — Append one new entry to `{deferred_work_file}` using this format. Do not modify existing entries or look for duplicates.
|
|
@@ -92,7 +86,7 @@ Prepare `Auto Run Result` details:
|
|
|
92
86
|
|
|
93
87
|
Set `{spec_file}` frontmatter `followup_review_recommended` from the judgment 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
|
|
|
@@ -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,52 @@ persistent_facts = [
|
|
|
31
32
|
# Empty means no extra completion behavior.
|
|
32
33
|
|
|
33
34
|
on_complete = ""
|
|
35
|
+
|
|
36
|
+
# Review layers for the review step. `instruction` is the layer's whole
|
|
37
|
+
# execution recipe — subagents by default, but an override may run anything
|
|
38
|
+
# (e.g. an external reviewer via bash). {diff_output} is substituted at run
|
|
39
|
+
# time. `when` (optional) gates a layer; empty `instruction` disables it.
|
|
40
|
+
|
|
41
|
+
[[workflow.review_layers]]
|
|
42
|
+
id = "blind-hunter"
|
|
43
|
+
name = "Blind Hunter"
|
|
44
|
+
instruction = """
|
|
45
|
+
Launch a subagent with no prior conversation context, with this prompt:
|
|
46
|
+
|
|
47
|
+
> Invoke the `bmad-review-adversarial-general` skill on this diff:
|
|
48
|
+
>
|
|
49
|
+
> {diff_output}
|
|
50
|
+
"""
|
|
51
|
+
|
|
52
|
+
[[workflow.review_layers]]
|
|
53
|
+
id = "edge-case-hunter"
|
|
54
|
+
name = "Edge Case Hunter"
|
|
55
|
+
instruction = """
|
|
56
|
+
Launch a subagent with no prior conversation context, with this prompt:
|
|
57
|
+
|
|
58
|
+
> Invoke the `bmad-review-edge-case-hunter` skill on this diff:
|
|
59
|
+
>
|
|
60
|
+
> {diff_output}
|
|
61
|
+
"""
|
|
62
|
+
|
|
63
|
+
[[workflow.review_layers]]
|
|
64
|
+
id = "verification-gap"
|
|
65
|
+
name = "Verification Gap Reviewer"
|
|
66
|
+
instruction = """
|
|
67
|
+
Launch a subagent with no prior conversation context, with this prompt:
|
|
68
|
+
|
|
69
|
+
> Invoke the `bmad-review-verification-gap` skill on this diff:
|
|
70
|
+
>
|
|
71
|
+
> {diff_output}
|
|
72
|
+
"""
|
|
73
|
+
|
|
74
|
+
# Review layers for the one-shot route.
|
|
75
|
+
|
|
76
|
+
[[workflow.oneshot_review_layers]]
|
|
77
|
+
id = "blind-hunter"
|
|
78
|
+
name = "Blind Hunter"
|
|
79
|
+
instruction = """
|
|
80
|
+
Launch a subagent with no prior conversation context, with this prompt:
|
|
81
|
+
|
|
82
|
+
> Invoke the `bmad-review-adversarial-general` skill on the changed files.
|
|
83
|
+
"""
|
|
@@ -99,7 +99,6 @@ If the spec is an epic story and `{sprint_status}` exists: find the `development
|
|
|
99
99
|
|
|
100
100
|
**b) Plan-code-review** — everything else. When uncertain whether blast radius is truly zero, choose this path.
|
|
101
101
|
|
|
102
|
-
|
|
103
102
|
## NEXT
|
|
104
103
|
|
|
105
104
|
Read fully and follow `./step-02-plan.md`
|
|
@@ -46,7 +46,6 @@ HALT and ask human: `[A] Approve` | `[E] Edit`
|
|
|
46
46
|
- **If the file exists:** Compare the content to what you wrote. If it has changed since you wrote it, acknowledge the external edits — show a brief summary of what changed — and proceed with the updated version. Then set status `ready-for-dev` in `{spec_file}`. Everything inside `<frozen-after-approval>` is now locked — only the human can change it. → Step 3.
|
|
47
47
|
- **E**: Apply changes, then return to CHECKPOINT 1.
|
|
48
48
|
|
|
49
|
-
|
|
50
49
|
## NEXT
|
|
51
50
|
|
|
52
51
|
Read fully and follow `./step-03-implement.md`
|
|
@@ -36,6 +36,10 @@ Hand `{spec_file}` to a subagent/task and let it implement. If no subagents are
|
|
|
36
36
|
|
|
37
37
|
Before leaving this step, 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.
|
|
38
38
|
|
|
39
|
+
### Matrix Test Audit
|
|
40
|
+
|
|
41
|
+
If `{spec_file}`'s `<frozen-after-approval>` block 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 and ask the human. Fix any other audit failure before proceeding.
|
|
42
|
+
|
|
39
43
|
## NEXT
|
|
40
44
|
|
|
41
45
|
Read fully and follow `./step-04-review.md`
|
|
@@ -8,6 +8,7 @@ deferred_work_file: '{implementation_artifacts}/deferred-work.md'
|
|
|
8
8
|
|
|
9
9
|
- YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
|
|
10
10
|
- All review subagents must run at the same model capability as the current session.
|
|
11
|
+
- Run subagents synchronously: launch them together, then wait for all results before continuing.
|
|
11
12
|
|
|
12
13
|
## INSTRUCTIONS
|
|
13
14
|
|
|
@@ -21,20 +22,13 @@ Do NOT `git add` anything — this is read-only inspection.
|
|
|
21
22
|
|
|
22
23
|
### Review
|
|
23
24
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
> Invoke the `bmad-review-edge-case-hunter` skill on this diff:
|
|
32
|
-
>
|
|
33
|
-
> {diff_output}
|
|
34
|
-
- **Verification Gap Reviewer** — prompt:
|
|
35
|
-
> Invoke the `bmad-review-verification-gap` skill on this diff:
|
|
36
|
-
>
|
|
37
|
-
> {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
|
+
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.
|
|
30
|
+
|
|
31
|
+
If a layer's instruction requires subagents and none are available, generate one review prompt file per such layer in `{implementation_artifacts}` and HALT. Ask the human to run each in a separate session (ideally a different LLM) and paste back the findings.
|
|
38
32
|
|
|
39
33
|
### Classify
|
|
40
34
|
|
|
@@ -9,6 +9,7 @@ deferred_work_file: '{implementation_artifacts}/deferred-work.md'
|
|
|
9
9
|
- YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
|
|
10
10
|
- NEVER auto-push.
|
|
11
11
|
- All review subagents must run at the same model capability as the current session.
|
|
12
|
+
- Run subagents synchronously: launch them together, then wait for all results before continuing.
|
|
12
13
|
|
|
13
14
|
## INSTRUCTIONS
|
|
14
15
|
|
|
@@ -20,9 +21,11 @@ Implement the clarified intent directly.
|
|
|
20
21
|
|
|
21
22
|
### Review
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
The review layers for this route are `{workflow.oneshot_review_layers}`, resolved during activation.
|
|
24
25
|
|
|
25
|
-
|
|
26
|
+
Skip every layer whose `instruction` is empty or missing, and every layer whose `when` condition (if present) does not hold. If no layers remain, HALT with status `blocked` and blocking condition `no active review layers`. Execute all remaining layers in parallel wherever their execution methods allow, following each layer's `instruction` verbatim after substituting any runtime placeholders.
|
|
27
|
+
|
|
28
|
+
If a layer's instruction requires subagents and none are available, generate one review prompt file per such layer in `{implementation_artifacts}` and HALT. Ask the human to run each in a separate session and paste back the findings.
|
|
26
29
|
|
|
27
30
|
### Classify
|
|
28
31
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: bmad-spec
|
|
3
|
-
description: Distill any intent input into the SPEC kernel + companions — the canonical, preservation-validated machine contract for downstream work. Use when the user says "create a spec", "distill this into a spec", "validate this spec",
|
|
3
|
+
description: Distill any intent input into the SPEC kernel + companions — the canonical, preservation-validated machine contract for downstream work. Use when the user says "create a spec", "distill this into a spec", "validate this spec", "update the spec", or "break this into stories".
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# BMad Spec
|
|
@@ -46,6 +46,7 @@ Inside the spec folder:
|
|
|
46
46
|
SPEC.md ← uppercase, the kernel — DERIVED from .memlog.md, never hand-edited
|
|
47
47
|
<companion-1>.md ← optional, content-typed (e.g. glossary.md); spec-authored ones are derived too
|
|
48
48
|
<companion-2>.md
|
|
49
|
+
stories.yaml ← optional, written only by Story Breakdown — fixed name, never in companions:
|
|
49
50
|
.memlog.md ← canonical, append-only memory; what SPEC.md is distilled from
|
|
50
51
|
```
|
|
51
52
|
|
|
@@ -99,6 +100,8 @@ Two rules govern companions:
|
|
|
99
100
|
|
|
100
101
|
Pre-existing project-wide docs (e.g. `project-context.md`) that downstream needs are listed as **adopted companions**, never duplicated into SPEC.md or a spec-authored companion.
|
|
101
102
|
|
|
103
|
+
`stories.yaml`, when produced, is spec-authored but deliberately **not** a companion — see Story Breakdown below.
|
|
104
|
+
|
|
102
105
|
## Spec Law
|
|
103
106
|
|
|
104
107
|
Every spec must satisfy these eight rules. The operation aims for them; the self-validate sweep enforces them.
|
|
@@ -126,9 +129,21 @@ Record the verdict for each pass to `.memlog.md` (`append --type event`). In int
|
|
|
126
129
|
|
|
127
130
|
When the user points the skill at an existing spec folder (or its SPEC.md) with no change signal, offer to review assumptions or open questions, or determine what they want to do.
|
|
128
131
|
|
|
132
|
+
## Story Breakdown (optional, interactive-only)
|
|
133
|
+
|
|
134
|
+
Requires `SPEC.md` on disk — run the normal Operation first if it doesn't exist yet. Headless runs never do this, even when the invocation text asks for it: if mode detection (On Activation, step 4) resolved headless, skip this section entirely and proceed with the normal headless response. In interactive mode, offer it at most once per run when the input reads as multiple independently shippable slices; a decline ends the offer for this run, not forever. Also run it on direct request ("break this into stories") whenever `SPEC.md` exists. When a spec update runs and `stories.yaml` exists, check the story descriptions against the updated spec; if any no longer matches, say so and offer to re-run Story Breakdown. The update itself never rewrites `stories.yaml`.
|
|
135
|
+
|
|
136
|
+
Either way, walk the capabilities and constraints with the user and propose a story per independently reviewable slice — this is a conversation, not a silent render. For each story, ask the user for `spec_checkpoint`, `done_checkpoint`, and any `invoke_dev_with` note rather than defaulting them silently; capturing that human judgment is what the fields are for. If the conversation surfaces load-bearing detail beyond dispatch notes (a constraint, a design decision), route it into SPEC.md or a companion — `invoke_dev_with` carries dispatch notes only (Spec Law rule 7 still applies).
|
|
137
|
+
|
|
138
|
+
The output is `stories.yaml`, a sibling of `SPEC.md` inside the spec folder, discovered by that fixed name — same convention as `SPEC.md` and `.memlog.md`. Never list it in `companions:` and never point a frontmatter key at it: companions carry the what-to-build contract every consumer reads; `stories.yaml` is input for whichever tool dispatches the stories.
|
|
139
|
+
|
|
140
|
+
Field definitions, the validity rules, and a worked example live in `assets/stories-schema.md`. Before writing or re-writing the file, check every entry against those rules; fix violations rather than presenting a file that fails them. Record the check's verdict to `.memlog.md` (`append --type event`), the same discipline as Self-Validate.
|
|
141
|
+
|
|
142
|
+
Derive `stories.yaml` from `.memlog.md` exactly like any other spec-authored artifact: log each proposed story (`--type decision`) as the user agrees to it, then render. On a later run against the same spec folder, re-derive the same way, handling ids per the schema's update semantics.
|
|
143
|
+
|
|
129
144
|
## Output
|
|
130
145
|
|
|
131
|
-
**Interactive** — share the spec folder path conversationally. Name the capability count, the companions produced, and the verdict in one or two sentences. If `assumptions[]` or `open_questions[]` are non-empty, list them (short — one line each) and invite the user to walk through them. Make clear that addressing them can update the source input (if it was a file), the spec, or both — whichever combination the user prefers. Do not dump JSON or present a wall of output.
|
|
146
|
+
**Interactive** — share the spec folder path conversationally. Name the capability count, the companions produced, and the verdict in one or two sentences. Name the story count too if `stories.yaml` was written this run. If `assumptions[]` or `open_questions[]` are non-empty, list them (short — one line each) and invite the user to walk through them. Make clear that addressing them can update the source input (if it was a file), the spec, or both — whichever combination the user prefers. Do not dump JSON or present a wall of output.
|
|
132
147
|
|
|
133
148
|
**Headless** — return JSON per `assets/headless-schemas.md`.
|
|
134
149
|
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Stories schema
|
|
2
|
+
|
|
3
|
+
`stories.yaml` — the optional output of Story Breakdown: a top-level YAML list, one entry per story, in execution order — stories run top to bottom. Sibling of `SPEC.md`, discovered by its fixed filename (same convention as `SPEC.md` and `.memlog.md`); never listed in `companions:`, never referenced from frontmatter.
|
|
4
|
+
|
|
5
|
+
## Fields
|
|
6
|
+
|
|
7
|
+
| Field | Type | Required | Meaning |
|
|
8
|
+
|---|---|---|---|
|
|
9
|
+
| `id` | string | yes | Identity, unique within the file. Compared for equality and used as a filename prefix; carries no other meaning. Use unpadded integers (`"1"`), or composites (`"3-2"`) when the epic sits inside a larger project spec. No zero-padding — execution order is the list order, not filename sort. Pinned once the story's spec file exists (see Update semantics); until then it may be renumbered. |
|
|
10
|
+
| `title` | string, one line | yes | Display name; becomes the story's heading downstream. |
|
|
11
|
+
| `description` | string | yes | What this story covers, pointing into `SPEC.md` — not a story spec. Keep it to two sentences; a writing rule, not something tooling enforces. |
|
|
12
|
+
| `spec_checkpoint` | boolean | no (default `false`) | Set by the human at breakdown time; read only by the dispatching caller, never by the implementing dev skill. When true, a human reviews the story spec between planning and implementation. |
|
|
13
|
+
| `done_checkpoint` | boolean | no (default `false`) | Caller-only, like `spec_checkpoint`. When true, dispatch pauses after this story completes, before anything further runs. |
|
|
14
|
+
| `invoke_dev_with` | string | no (default `""`) | Free text appended verbatim to the prompt that dispatches this story; the implementing dev skill reads it as part of its prompt, and nothing else interprets it. If the text needs structure, put it inside the string. Which dev skill to invoke is the caller's configuration, never data in this file. |
|
|
15
|
+
|
|
16
|
+
## Validity rules
|
|
17
|
+
|
|
18
|
+
1. Every entry parses with all required fields; ids unique.
|
|
19
|
+
2. Ids are prefix-free under the `<id>-` filename-matching convention: no id may equal another id plus a dash-suffix (`"3"` and `"3-2"` cannot coexist).
|
|
20
|
+
3. No `status` field, ever.
|
|
21
|
+
4. Ids are YAML strings, always quoted, containing only letters, digits, and dashes. An unquoted `id: 1` parses as a number and breaks string comparison; characters like `/` or `*` break the filename match.
|
|
22
|
+
|
|
23
|
+
## Example
|
|
24
|
+
|
|
25
|
+
```yaml
|
|
26
|
+
- id: "1"
|
|
27
|
+
title: Add rate limiting to the public API
|
|
28
|
+
description: >-
|
|
29
|
+
Introduce a token-bucket limiter in front of the public endpoints;
|
|
30
|
+
return 429 with a Retry-After header on limit breach.
|
|
31
|
+
spec_checkpoint: true
|
|
32
|
+
invoke_dev_with: >-
|
|
33
|
+
Rate limit state must be shared across instances; use the existing
|
|
34
|
+
Redis client, not in-process memory.
|
|
35
|
+
- id: "2"
|
|
36
|
+
title: Expose limiter metrics to the ops dashboard
|
|
37
|
+
description: >-
|
|
38
|
+
Emit per-route accept/reject counters the existing dashboard can
|
|
39
|
+
scrape; no new dashboard panels in this story.
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Update semantics
|
|
43
|
+
|
|
44
|
+
Updates to `stories.yaml` go through Story Breakdown: append the change to `.memlog.md`, then re-derive. An id is pinned once its story spec file exists (any `stories/<id>-*.md` in the spec folder): a pinned story keeps its id through edits, its removal retires the id, and retired ids are never reassigned. Stories with no spec file yet may be renumbered, reordered, or removed freely on re-derive — typically so ids keep following list order. Never give a story an id that collides with a `stories/` file belonging to a different story.
|
|
@@ -35,6 +35,13 @@ platforms:
|
|
|
35
35
|
target_dir: .agent/skills
|
|
36
36
|
global_target_dir: ~/.gemini/antigravity/skills
|
|
37
37
|
|
|
38
|
+
antigravity-cli:
|
|
39
|
+
name: "Antigravity CLI (AGY)"
|
|
40
|
+
preferred: false
|
|
41
|
+
installer:
|
|
42
|
+
target_dir: .agents/skills
|
|
43
|
+
global_target_dir: ~/.gemini/antigravity-cli/skills
|
|
44
|
+
|
|
38
45
|
auggie:
|
|
39
46
|
name: "Auggie"
|
|
40
47
|
preferred: false
|