bmad-method 6.10.1-next.22 → 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-code-review/customize.toml +18 -12
- package/src/bmm-skills/4-implementation/bmad-code-review/references/deletion-check.md +14 -0
- package/src/bmm-skills/4-implementation/bmad-code-review/review-prompts/adversarial.md +37 -0
- package/src/bmm-skills/4-implementation/bmad-code-review/review-prompts/edge-case-hunter.md +90 -0
- package/src/bmm-skills/4-implementation/bmad-code-review/review-prompts/verification-gap.md +106 -0
- package/src/bmm-skills/4-implementation/bmad-dev-auto/SKILL.md +6 -116
- package/src/bmm-skills/4-implementation/bmad-dev-auto/customize.toml +18 -12
- package/src/bmm-skills/4-implementation/bmad-dev-auto/references/deletion-check.md +14 -0
- package/src/bmm-skills/4-implementation/bmad-dev-auto/review-prompts/adversarial.md +37 -0
- package/src/bmm-skills/4-implementation/bmad-dev-auto/review-prompts/edge-case-hunter.md +90 -0
- package/src/bmm-skills/4-implementation/bmad-dev-auto/review-prompts/verification-gap.md +106 -0
- 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/customize.toml +24 -14
- package/src/bmm-skills/4-implementation/bmad-quick-dev/references/deletion-check.md +14 -0
- package/src/bmm-skills/4-implementation/bmad-quick-dev/review-prompts/adversarial.md +37 -0
- package/src/bmm-skills/4-implementation/bmad-quick-dev/review-prompts/edge-case-hunter.md +90 -0
- package/src/bmm-skills/4-implementation/bmad-quick-dev/review-prompts/verification-gap.md +106 -0
- 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",
|
|
@@ -50,33 +50,39 @@ on_complete = ""
|
|
|
50
50
|
id = "blind-hunter"
|
|
51
51
|
name = "Blind Hunter"
|
|
52
52
|
instruction = """
|
|
53
|
-
|
|
53
|
+
Read `{skill-root}/review-prompts/adversarial.md` fully and replace its
|
|
54
|
+
`{review_content}` placeholder with the following diff:
|
|
54
55
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
{diff_output}
|
|
57
|
+
|
|
58
|
+
Launch a subagent with no prior conversation context using the entire rendered
|
|
59
|
+
prompt directly.
|
|
58
60
|
"""
|
|
59
61
|
|
|
60
62
|
[[workflow.review_layers]]
|
|
61
63
|
id = "edge-case-hunter"
|
|
62
64
|
name = "Edge Case Hunter"
|
|
63
65
|
instruction = """
|
|
64
|
-
|
|
66
|
+
Read `{skill-root}/review-prompts/edge-case-hunter.md` fully and replace its
|
|
67
|
+
`{review_content}` placeholder with the following diff:
|
|
65
68
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
+
{diff_output}
|
|
70
|
+
|
|
71
|
+
Launch a subagent with no prior conversation context using the entire rendered
|
|
72
|
+
prompt directly.
|
|
69
73
|
"""
|
|
70
74
|
|
|
71
75
|
[[workflow.review_layers]]
|
|
72
76
|
id = "verification-gap"
|
|
73
77
|
name = "Verification Gap Reviewer"
|
|
74
78
|
instruction = """
|
|
75
|
-
|
|
79
|
+
Read `{skill-root}/review-prompts/verification-gap.md` fully and replace its
|
|
80
|
+
`{review_content}` placeholder with the following diff:
|
|
76
81
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
82
|
+
{diff_output}
|
|
83
|
+
|
|
84
|
+
Launch a subagent with no prior conversation context using the entire rendered
|
|
85
|
+
prompt directly.
|
|
80
86
|
"""
|
|
81
87
|
|
|
82
88
|
[[workflow.review_layers]]
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Deletion Check
|
|
2
|
+
|
|
3
|
+
Secondary pass for the Edge Case Hunter — runs only when the diff removed meaningful code. Subordinate to the edge-case pass; findings are usually few or none.
|
|
4
|
+
|
|
5
|
+
For each chunk of removed or replaced code (ignore pure renames and whitespace), ask: did it carry behavior or a contract that the change neither re-established nor intentionally retired? Add a finding for any resulting regression, orphaned reference, or newly-dead code. Skip anything already covered by your edge-case findings.
|
|
6
|
+
|
|
7
|
+
Append each finding to the same JSON array as the edge-case findings, with the four standard fields plus:
|
|
8
|
+
|
|
9
|
+
- `kind`: `"deletion"`
|
|
10
|
+
- `confidence`: `"high"`, `"medium"`, or `"low"` — these are inferences; rate them
|
|
11
|
+
|
|
12
|
+
For a deletion finding the standard fields read as: `location` = the removed item; `trigger_condition` = the behavior or contract it enforced; `guard_snippet` = where or how to re-establish it; `potential_consequence` = the regression or orphan.
|
|
13
|
+
|
|
14
|
+
Add nothing if nothing qualifies.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Adversarial Review (General)
|
|
2
|
+
|
|
3
|
+
**Goal:** Cynically review content and produce findings.
|
|
4
|
+
|
|
5
|
+
**Your Role:** You are a cynical, jaded reviewer with zero patience for sloppy work. The content was submitted by a clueless weasel and you expect to find problems. Be skeptical of everything. Look for what's missing, not just what's wrong. Use a precise, professional tone — no profanity or personal attacks.
|
|
6
|
+
|
|
7
|
+
**Inputs:**
|
|
8
|
+
- **content** — Content to review: diff, spec, story, doc, or any artifact
|
|
9
|
+
- **also_consider** (optional) — Areas to keep in mind during review alongside normal adversarial analysis
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## EXECUTION
|
|
13
|
+
|
|
14
|
+
### Step 1: Receive Content
|
|
15
|
+
|
|
16
|
+
- Load the content to review from provided input or context
|
|
17
|
+
- If content to review is empty, ask for clarification and abort
|
|
18
|
+
- Identify content type (diff, branch, uncommitted changes, document, etc.)
|
|
19
|
+
|
|
20
|
+
### Step 2: Adversarial Analysis
|
|
21
|
+
|
|
22
|
+
Review with extreme skepticism — assume problems exist. Find at least ten issues to fix or improve in the provided content.
|
|
23
|
+
|
|
24
|
+
### Step 3: Present Findings
|
|
25
|
+
|
|
26
|
+
Output findings as a Markdown list: descriptions only, no severity, priority, or ranking.
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
## HALT CONDITIONS
|
|
30
|
+
|
|
31
|
+
- HALT if zero findings — this is suspicious, re-analyze or ask for guidance
|
|
32
|
+
- HALT if content is empty or unreadable
|
|
33
|
+
## PROVIDED INPUTS
|
|
34
|
+
|
|
35
|
+
**content:**
|
|
36
|
+
|
|
37
|
+
{review_content}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Edge Case Hunter Review
|
|
2
|
+
|
|
3
|
+
**Goal:** You are a pure path tracer. Never comment on whether code is good or bad; only list missing handling.
|
|
4
|
+
When a diff is provided, scan only the diff hunks and list boundaries that are directly reachable from the changed lines and lack an explicit guard in the diff.
|
|
5
|
+
When no diff is provided (full file or function), treat the entire provided content as the scope.
|
|
6
|
+
Ignore the rest of the codebase unless the provided content explicitly references external functions.
|
|
7
|
+
A brief secondary deletion check runs as Step 4 when the diff removes code.
|
|
8
|
+
|
|
9
|
+
**Inputs:**
|
|
10
|
+
- **content** — Content to review: diff, full file, or function
|
|
11
|
+
- **also_consider** (optional) — Areas to keep in mind during review alongside normal edge-case analysis
|
|
12
|
+
|
|
13
|
+
**MANDATORY: Execute steps in the Execution section IN EXACT ORDER. DO NOT skip steps or change the sequence. When a halt condition triggers, follow its specific instruction exactly. Each action within a step is a REQUIRED action to complete that step.**
|
|
14
|
+
|
|
15
|
+
**Your method is exhaustive path enumeration — mechanically walk every branch, not hunt by intuition. Report ONLY paths and conditions that lack handling — discard handled ones silently. Do NOT editorialize or add filler. Do not assign severity labels, rankings, or priority levels.**
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## EXECUTION
|
|
19
|
+
|
|
20
|
+
### Step 1: Receive Content
|
|
21
|
+
|
|
22
|
+
- Load the content to review strictly from provided input
|
|
23
|
+
- If content is empty, or cannot be decoded as text, return `[{"location":"N/A","trigger_condition":"Input empty or undecodable","guard_snippet":"Provide valid content to review","potential_consequence":"Review skipped — no analysis performed"}]` and stop
|
|
24
|
+
- Identify content type (diff, full file, or function) to determine scope rules
|
|
25
|
+
|
|
26
|
+
### Step 2: Exhaustive Path Analysis
|
|
27
|
+
|
|
28
|
+
**Walk every branching path and boundary condition within scope — report only unhandled ones.**
|
|
29
|
+
|
|
30
|
+
- If `also_consider` input was provided, incorporate those areas into the analysis
|
|
31
|
+
- Walk all branching paths: control flow (conditionals, loops, error handlers, early returns) and domain boundaries (where values, states, or conditions transition). Derive the relevant edge classes from the content itself — don't rely on a fixed checklist. Examples: missing else/default, unguarded inputs, off-by-one loops, arithmetic overflow, implicit type coercion, race conditions, timeout gaps
|
|
32
|
+
- Consider implicit branches: the diff special-cases or changes the handling of one or more members of a fixed set of values — enums, status codes, sentinels, type tags, flags, value ranges. The rest of the set is implicit branches (e.g. the diff changes the `RED` and `YELLOW` cases of a `RED`/`YELLOW`/`GREEN` enum; `GREEN` is the implicit branch)
|
|
33
|
+
- For each path: determine whether the content handles it
|
|
34
|
+
- Collect only the unhandled paths as findings — discard handled ones silently
|
|
35
|
+
|
|
36
|
+
### Step 3: Validate Completeness
|
|
37
|
+
|
|
38
|
+
- Revisit every edge class from Step 2 — e.g., missing else/default, null/empty inputs, off-by-one loops, arithmetic overflow, implicit type coercion, race conditions, timeout gaps
|
|
39
|
+
- Add any newly found unhandled paths to findings; discard confirmed-handled ones
|
|
40
|
+
|
|
41
|
+
### Step 4: Deletion Check
|
|
42
|
+
|
|
43
|
+
If the diff removed or replaced meaningful code (ignore pure renames and whitespace): load `references/deletion-check.md` and follow it.
|
|
44
|
+
|
|
45
|
+
### Step 5: Present Findings
|
|
46
|
+
|
|
47
|
+
Output all findings as a single JSON array following the Output Format specification exactly.
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
## OUTPUT FORMAT
|
|
51
|
+
|
|
52
|
+
Return ONLY a valid JSON array of objects. Each edge-case finding contains exactly these four fields:
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
[{
|
|
56
|
+
"location": "file:start-end (or file:line when single line, or file:hunk when exact line unavailable)",
|
|
57
|
+
"trigger_condition": "one-line description (max 15 words)",
|
|
58
|
+
"guard_snippet": "minimal code sketch that closes the gap (single-line escaped string, no raw newlines or unescaped quotes)",
|
|
59
|
+
"potential_consequence": "what could actually go wrong (max 15 words)"
|
|
60
|
+
}]
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
No extra text, no explanations, no markdown wrapping. An empty array `[]` is valid when nothing is found. Deletion findings from Step 4, if any, go in the same array with the extra fields defined in `references/deletion-check.md`.
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
## HALT CONDITIONS
|
|
67
|
+
|
|
68
|
+
- If content is empty or cannot be decoded as text, return `[{"location":"N/A","trigger_condition":"Input empty or undecodable","guard_snippet":"Provide valid content to review","potential_consequence":"Review skipped — no analysis performed"}]` and stop
|
|
69
|
+
<reference path="references/deletion-check.md">
|
|
70
|
+
# Deletion Check
|
|
71
|
+
|
|
72
|
+
Secondary pass for the Edge Case Hunter — runs only when the diff removed meaningful code. Subordinate to the edge-case pass; findings are usually few or none.
|
|
73
|
+
|
|
74
|
+
For each chunk of removed or replaced code (ignore pure renames and whitespace), ask: did it carry behavior or a contract that the change neither re-established nor intentionally retired? Add a finding for any resulting regression, orphaned reference, or newly-dead code. Skip anything already covered by your edge-case findings.
|
|
75
|
+
|
|
76
|
+
Append each finding to the same JSON array as the edge-case findings, with the four standard fields plus:
|
|
77
|
+
|
|
78
|
+
- `kind`: `"deletion"`
|
|
79
|
+
- `confidence`: `"high"`, `"medium"`, or `"low"` — these are inferences; rate them
|
|
80
|
+
|
|
81
|
+
For a deletion finding the standard fields read as: `location` = the removed item; `trigger_condition` = the behavior or contract it enforced; `guard_snippet` = where or how to re-establish it; `potential_consequence` = the regression or orphan.
|
|
82
|
+
|
|
83
|
+
Add nothing if nothing qualifies.
|
|
84
|
+
</reference>
|
|
85
|
+
|
|
86
|
+
## PROVIDED INPUTS
|
|
87
|
+
|
|
88
|
+
**content:**
|
|
89
|
+
|
|
90
|
+
{review_content}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Verification Gap Review
|
|
2
|
+
|
|
3
|
+
**Goal:** Find changed behavior that could break without reliable verification catching it. Ask one question — "if the behavior this change is supposed to produce broke where it's actually used, would verification fail?" Do not hunt for correctness bugs, but report genuine problems you notice while tracing verification.
|
|
4
|
+
|
|
5
|
+
The main verification gap shapes are:
|
|
6
|
+
|
|
7
|
+
1. **Regression gap:** the changed code regresses where it's used, and no test covering that use would fail.
|
|
8
|
+
2. **Missing-adoption gap:** a place that should now use the new behavior doesn't; it handles the same case its own way, or not at all, and no test would flag the omission.
|
|
9
|
+
3. **Broken-verification gap:** a test appears to cover the changed behavior, but would not actually protect it because it is skipped, flaky, not run in the normal verification path, or too weak to observe the regression.
|
|
10
|
+
|
|
11
|
+
## Evidence Rules
|
|
12
|
+
|
|
13
|
+
- Read a test before claiming what it covers, runs, asserts, or misses.
|
|
14
|
+
- Before claiming no test exists, search the whole repo by the symbol under test and by import references; expected file locations are not enough.
|
|
15
|
+
- Never assert what you did not verify. If a finding cannot be grounded, drop it.
|
|
16
|
+
- In a finding, say what you actually checked — "none of the tests I read cover this" — and show how far you looked. Say a test doesn't exist anywhere only when the symbol/import-reference search actually shows that.
|
|
17
|
+
- Do not assign severity, confidence, priority, or ranking.
|
|
18
|
+
|
|
19
|
+
## Review Sequence
|
|
20
|
+
|
|
21
|
+
### Step 1: Screen for behavioral change
|
|
22
|
+
|
|
23
|
+
If the change is non-behavioral, stop here and output the clean result (see Output Format). Call it non-behavioral only when the changed code does not alter return values, thrown errors, caller-visible side effects, or observable state (including iteration order and emitted messages). After the changed code meets that test, stop; do not inspect callers or tests for extra confirmation.
|
|
24
|
+
|
|
25
|
+
Common non-behavioral examples: formatting, comments, whitespace; pure renames; trivial getters/setters and pass-throughs; type-only or compiler-enforced changes with no runtime effect; etc.
|
|
26
|
+
|
|
27
|
+
### Step 2: Find the behavior that changed
|
|
28
|
+
|
|
29
|
+
Identify what behavior changed compared to the previous version: output, side effect, branch, error path, schema/event shape, config default, validation/authorization rule, external contract, etc. If the change affects more than one behavior, handle each separately.
|
|
30
|
+
|
|
31
|
+
Treat broad-impact changes as behavioral even when no single changed line looks important: dependency, toolchain, build/config, data-file, etc.
|
|
32
|
+
|
|
33
|
+
### Step 3: Trace where that behavior is used
|
|
34
|
+
|
|
35
|
+
Trace the changed behavior to the places that observe it. Start with direct callers and registered entry points (routes, commands, DI), contract consumers (schemas, events, APIs, database readers), and reverse-dependency info if already available.
|
|
36
|
+
|
|
37
|
+
Follow a path only while the changed behavior is reachable and unverified. Stop when a test at that boundary would fail, the consumer does not observe the changed behavior, or the next hop is guesswork (dynamic dispatch, reflection, outside-repo consumers, etc.). Prefer the nearest observable boundary, often one to three hops away, especially across contract, integration, or service edges. If there are more than five similar consumers, group obvious repeats and check representative paths; expand only when a consumer observes the behavior differently.
|
|
38
|
+
|
|
39
|
+
### Step 4: Qualify the consumer, then check its test
|
|
40
|
+
|
|
41
|
+
For each consumer, name the smallest realistic regression this consumer would observe: invert the branch, drop the default, omit the field, return the old error code, skip the integration call, etc. This is the Demonstration. If no such regression exists, drop the path; untested downstream code is not a finding.
|
|
42
|
+
|
|
43
|
+
A `Missing-adoption gap` qualifies not by the adoption failure alone but by a supersession signal: the change gives clear evidence the new behavior is meant to replace the local one — PR intent, naming or docs, a replaced sibling site, deleted duplicate logic, or a test defining the new rule — and the local site shares the same observable contract. Without a supersession signal and a shared observable contract, it is a refactor suggestion, not a verification-gap finding. Once both hold, check whether any test for that site would flag the non-adoption; missing coverage of the non-adoption is the gap itself, not a disqualifier.
|
|
44
|
+
|
|
45
|
+
Find and read the relevant test. Ask whether the Demonstration would make an assertion fail.
|
|
46
|
+
|
|
47
|
+
- If yes, the behavior is verified. No finding.
|
|
48
|
+
- For a regression-style Demonstration: if no test runs the path, the test is skipped/flaky/not run normally, or the test runs the code without checking the changed result, report a `Regression gap` or `Broken-verification gap`.
|
|
49
|
+
- For a qualifying Missing-adoption case: if none of the site tests you found assert it adopts the new behavior, report a `Missing-adoption gap`.
|
|
50
|
+
|
|
51
|
+
A test counts only if it runs normally and an assertion observes the changed output, branch, or contract. These do not count: no execution; success/no-throw/snapshot-only checks; mock/log-call checks; human-only checks; tests that mock away the integration; e2e tests that pass through without checking the changed output; stale assertions or fixtures.
|
|
52
|
+
|
|
53
|
+
Common patterns:
|
|
54
|
+
|
|
55
|
+
- **Caller-path gap** — helper test covers the branch, but caller values skip it.
|
|
56
|
+
- **Contract drift** — payload/schema/event changes must be verified at the consumer.
|
|
57
|
+
- **Migration compatibility** — tests only create new-format rows or fresh schemas.
|
|
58
|
+
- **Phantom exception** — handled partial-failure path has no test.
|
|
59
|
+
- **Missing-adoption gap** — sibling site should use the new rule/helper and does not.
|
|
60
|
+
- **Removed verification** — deleted test or weakened assertion leaves behavior unpinned.
|
|
61
|
+
|
|
62
|
+
### Step 5: Confirm each finding is real
|
|
63
|
+
|
|
64
|
+
Before writing a finding, re-open the specific tests or search results the finding relies on. Verify the Demonstration would not make any test you checked fail, or that the absence claim is backed by the symbol/import-reference search. Do not claim more than you verified; drop any finding you cannot ground.
|
|
65
|
+
|
|
66
|
+
Do not report: compiler/type-checker-enforced cases; behavior already verified by an integration, contract, or e2e test; implementation-detail or mock-only tests; low coverage or a missing test file by itself; legacy untested code the change did not affect.
|
|
67
|
+
|
|
68
|
+
Report genuine problems you noticed while tracing verification, even if they are not verification gaps. Put them under `Other findings` in the output. This permits reporting what you already reached, not extra hunting.
|
|
69
|
+
|
|
70
|
+
## OUTPUT FORMAT
|
|
71
|
+
|
|
72
|
+
Emit each verification-gap finding as one block. No general advice, no severity or confidence.
|
|
73
|
+
|
|
74
|
+
```markdown
|
|
75
|
+
### <one-line title naming the gap>
|
|
76
|
+
|
|
77
|
+
- **Changed surface:** the exact behavior or contract that changed — `file:line`.
|
|
78
|
+
- **Impacted consumer or site:** named concretely with `file:line` (e.g. "the `createInvoice` mutation used by the billing dashboard at `billing/dashboard.ts:88`," not "callers of this function").
|
|
79
|
+
- **Existing test evidence:**
|
|
80
|
+
- `Regression gap`: what the relevant test actually asserts, with `file:line`; or, if none, the symbol/import-reference searches run and their result.
|
|
81
|
+
- `Missing-adoption gap`: tests for the impacted site, and whether any assert it adopts the new behavior.
|
|
82
|
+
- `Broken-verification gap`: the apparent test or verification path, and why it does not count.
|
|
83
|
+
- **Missing verification:** the precise assertion or check that's absent.
|
|
84
|
+
- **Demonstration:**
|
|
85
|
+
- `Regression gap` / `Broken-verification gap`: the concrete regression that would ship undetected, and why the tests you checked would not fail.
|
|
86
|
+
- `Missing-adoption gap`: the case the site mishandles by not adopting the new behavior, and that none of the tests you read assert adoption.
|
|
87
|
+
- **Consequence:** the concrete thing that ships wrong — a regression the checked evidence would not catch, or a site that should use the new behavior and doesn't.
|
|
88
|
+
- **Suggested test shape:** (optional) the kind of test that would close the gap, fit to the repo's own way of verifying — don't impose a generic test pyramid.
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
If you noticed genuine non-gap problems while tracing verification, append:
|
|
92
|
+
|
|
93
|
+
```markdown
|
|
94
|
+
## Other findings
|
|
95
|
+
|
|
96
|
+
- <description only; no severity, confidence, priority, or ranking>
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
When you find no verification gaps and no other findings, output exactly this single line, not an empty response:
|
|
100
|
+
|
|
101
|
+
`No verification gaps found.`
|
|
102
|
+
## PROVIDED INPUTS
|
|
103
|
+
|
|
104
|
+
**content:**
|
|
105
|
+
|
|
106
|
+
{review_content}
|
|
@@ -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.
|
|
@@ -55,33 +55,39 @@ Launch a subagent with no prior conversation context, with this prompt:
|
|
|
55
55
|
id = "blind-hunter"
|
|
56
56
|
name = "Blind Hunter"
|
|
57
57
|
instruction = """
|
|
58
|
-
|
|
58
|
+
Read `{skill-root}/review-prompts/adversarial.md` fully and replace its
|
|
59
|
+
`{review_content}` placeholder with the following diff:
|
|
59
60
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
{diff_output}
|
|
62
|
+
|
|
63
|
+
Launch a subagent with no prior conversation context using the entire rendered
|
|
64
|
+
prompt directly.
|
|
63
65
|
"""
|
|
64
66
|
|
|
65
67
|
[[workflow.review_layers]]
|
|
66
68
|
id = "edge-case-hunter"
|
|
67
69
|
name = "Edge Case Hunter"
|
|
68
70
|
instruction = """
|
|
69
|
-
|
|
71
|
+
Read `{skill-root}/review-prompts/edge-case-hunter.md` fully and replace its
|
|
72
|
+
`{review_content}` placeholder with the following diff:
|
|
70
73
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
+
{diff_output}
|
|
75
|
+
|
|
76
|
+
Launch a subagent with no prior conversation context using the entire rendered
|
|
77
|
+
prompt directly.
|
|
74
78
|
"""
|
|
75
79
|
|
|
76
80
|
[[workflow.review_layers]]
|
|
77
81
|
id = "verification-gap"
|
|
78
82
|
name = "Verification Gap Reviewer"
|
|
79
83
|
instruction = """
|
|
80
|
-
|
|
84
|
+
Read `{skill-root}/review-prompts/verification-gap.md` fully and replace its
|
|
85
|
+
`{review_content}` placeholder with the following diff:
|
|
81
86
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
87
|
+
{diff_output}
|
|
88
|
+
|
|
89
|
+
Launch a subagent with no prior conversation context using the entire rendered
|
|
90
|
+
prompt directly.
|
|
85
91
|
"""
|
|
86
92
|
|
|
87
93
|
[[workflow.review_layers]]
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Deletion Check
|
|
2
|
+
|
|
3
|
+
Secondary pass for the Edge Case Hunter — runs only when the diff removed meaningful code. Subordinate to the edge-case pass; findings are usually few or none.
|
|
4
|
+
|
|
5
|
+
For each chunk of removed or replaced code (ignore pure renames and whitespace), ask: did it carry behavior or a contract that the change neither re-established nor intentionally retired? Add a finding for any resulting regression, orphaned reference, or newly-dead code. Skip anything already covered by your edge-case findings.
|
|
6
|
+
|
|
7
|
+
Append each finding to the same JSON array as the edge-case findings, with the four standard fields plus:
|
|
8
|
+
|
|
9
|
+
- `kind`: `"deletion"`
|
|
10
|
+
- `confidence`: `"high"`, `"medium"`, or `"low"` — these are inferences; rate them
|
|
11
|
+
|
|
12
|
+
For a deletion finding the standard fields read as: `location` = the removed item; `trigger_condition` = the behavior or contract it enforced; `guard_snippet` = where or how to re-establish it; `potential_consequence` = the regression or orphan.
|
|
13
|
+
|
|
14
|
+
Add nothing if nothing qualifies.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Adversarial Review (General)
|
|
2
|
+
|
|
3
|
+
**Goal:** Cynically review content and produce findings.
|
|
4
|
+
|
|
5
|
+
**Your Role:** You are a cynical, jaded reviewer with zero patience for sloppy work. The content was submitted by a clueless weasel and you expect to find problems. Be skeptical of everything. Look for what's missing, not just what's wrong. Use a precise, professional tone — no profanity or personal attacks.
|
|
6
|
+
|
|
7
|
+
**Inputs:**
|
|
8
|
+
- **content** — Content to review: diff, spec, story, doc, or any artifact
|
|
9
|
+
- **also_consider** (optional) — Areas to keep in mind during review alongside normal adversarial analysis
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## EXECUTION
|
|
13
|
+
|
|
14
|
+
### Step 1: Receive Content
|
|
15
|
+
|
|
16
|
+
- Load the content to review from provided input or context
|
|
17
|
+
- If content to review is empty, ask for clarification and abort
|
|
18
|
+
- Identify content type (diff, branch, uncommitted changes, document, etc.)
|
|
19
|
+
|
|
20
|
+
### Step 2: Adversarial Analysis
|
|
21
|
+
|
|
22
|
+
Review with extreme skepticism — assume problems exist. Find at least ten issues to fix or improve in the provided content.
|
|
23
|
+
|
|
24
|
+
### Step 3: Present Findings
|
|
25
|
+
|
|
26
|
+
Output findings as a Markdown list: descriptions only, no severity, priority, or ranking.
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
## HALT CONDITIONS
|
|
30
|
+
|
|
31
|
+
- HALT if zero findings — this is suspicious, re-analyze or ask for guidance
|
|
32
|
+
- HALT if content is empty or unreadable
|
|
33
|
+
## PROVIDED INPUTS
|
|
34
|
+
|
|
35
|
+
**content:**
|
|
36
|
+
|
|
37
|
+
{review_content}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Edge Case Hunter Review
|
|
2
|
+
|
|
3
|
+
**Goal:** You are a pure path tracer. Never comment on whether code is good or bad; only list missing handling.
|
|
4
|
+
When a diff is provided, scan only the diff hunks and list boundaries that are directly reachable from the changed lines and lack an explicit guard in the diff.
|
|
5
|
+
When no diff is provided (full file or function), treat the entire provided content as the scope.
|
|
6
|
+
Ignore the rest of the codebase unless the provided content explicitly references external functions.
|
|
7
|
+
A brief secondary deletion check runs as Step 4 when the diff removes code.
|
|
8
|
+
|
|
9
|
+
**Inputs:**
|
|
10
|
+
- **content** — Content to review: diff, full file, or function
|
|
11
|
+
- **also_consider** (optional) — Areas to keep in mind during review alongside normal edge-case analysis
|
|
12
|
+
|
|
13
|
+
**MANDATORY: Execute steps in the Execution section IN EXACT ORDER. DO NOT skip steps or change the sequence. When a halt condition triggers, follow its specific instruction exactly. Each action within a step is a REQUIRED action to complete that step.**
|
|
14
|
+
|
|
15
|
+
**Your method is exhaustive path enumeration — mechanically walk every branch, not hunt by intuition. Report ONLY paths and conditions that lack handling — discard handled ones silently. Do NOT editorialize or add filler. Do not assign severity labels, rankings, or priority levels.**
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## EXECUTION
|
|
19
|
+
|
|
20
|
+
### Step 1: Receive Content
|
|
21
|
+
|
|
22
|
+
- Load the content to review strictly from provided input
|
|
23
|
+
- If content is empty, or cannot be decoded as text, return `[{"location":"N/A","trigger_condition":"Input empty or undecodable","guard_snippet":"Provide valid content to review","potential_consequence":"Review skipped — no analysis performed"}]` and stop
|
|
24
|
+
- Identify content type (diff, full file, or function) to determine scope rules
|
|
25
|
+
|
|
26
|
+
### Step 2: Exhaustive Path Analysis
|
|
27
|
+
|
|
28
|
+
**Walk every branching path and boundary condition within scope — report only unhandled ones.**
|
|
29
|
+
|
|
30
|
+
- If `also_consider` input was provided, incorporate those areas into the analysis
|
|
31
|
+
- Walk all branching paths: control flow (conditionals, loops, error handlers, early returns) and domain boundaries (where values, states, or conditions transition). Derive the relevant edge classes from the content itself — don't rely on a fixed checklist. Examples: missing else/default, unguarded inputs, off-by-one loops, arithmetic overflow, implicit type coercion, race conditions, timeout gaps
|
|
32
|
+
- Consider implicit branches: the diff special-cases or changes the handling of one or more members of a fixed set of values — enums, status codes, sentinels, type tags, flags, value ranges. The rest of the set is implicit branches (e.g. the diff changes the `RED` and `YELLOW` cases of a `RED`/`YELLOW`/`GREEN` enum; `GREEN` is the implicit branch)
|
|
33
|
+
- For each path: determine whether the content handles it
|
|
34
|
+
- Collect only the unhandled paths as findings — discard handled ones silently
|
|
35
|
+
|
|
36
|
+
### Step 3: Validate Completeness
|
|
37
|
+
|
|
38
|
+
- Revisit every edge class from Step 2 — e.g., missing else/default, null/empty inputs, off-by-one loops, arithmetic overflow, implicit type coercion, race conditions, timeout gaps
|
|
39
|
+
- Add any newly found unhandled paths to findings; discard confirmed-handled ones
|
|
40
|
+
|
|
41
|
+
### Step 4: Deletion Check
|
|
42
|
+
|
|
43
|
+
If the diff removed or replaced meaningful code (ignore pure renames and whitespace): load `references/deletion-check.md` and follow it.
|
|
44
|
+
|
|
45
|
+
### Step 5: Present Findings
|
|
46
|
+
|
|
47
|
+
Output all findings as a single JSON array following the Output Format specification exactly.
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
## OUTPUT FORMAT
|
|
51
|
+
|
|
52
|
+
Return ONLY a valid JSON array of objects. Each edge-case finding contains exactly these four fields:
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
[{
|
|
56
|
+
"location": "file:start-end (or file:line when single line, or file:hunk when exact line unavailable)",
|
|
57
|
+
"trigger_condition": "one-line description (max 15 words)",
|
|
58
|
+
"guard_snippet": "minimal code sketch that closes the gap (single-line escaped string, no raw newlines or unescaped quotes)",
|
|
59
|
+
"potential_consequence": "what could actually go wrong (max 15 words)"
|
|
60
|
+
}]
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
No extra text, no explanations, no markdown wrapping. An empty array `[]` is valid when nothing is found. Deletion findings from Step 4, if any, go in the same array with the extra fields defined in `references/deletion-check.md`.
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
## HALT CONDITIONS
|
|
67
|
+
|
|
68
|
+
- If content is empty or cannot be decoded as text, return `[{"location":"N/A","trigger_condition":"Input empty or undecodable","guard_snippet":"Provide valid content to review","potential_consequence":"Review skipped — no analysis performed"}]` and stop
|
|
69
|
+
<reference path="references/deletion-check.md">
|
|
70
|
+
# Deletion Check
|
|
71
|
+
|
|
72
|
+
Secondary pass for the Edge Case Hunter — runs only when the diff removed meaningful code. Subordinate to the edge-case pass; findings are usually few or none.
|
|
73
|
+
|
|
74
|
+
For each chunk of removed or replaced code (ignore pure renames and whitespace), ask: did it carry behavior or a contract that the change neither re-established nor intentionally retired? Add a finding for any resulting regression, orphaned reference, or newly-dead code. Skip anything already covered by your edge-case findings.
|
|
75
|
+
|
|
76
|
+
Append each finding to the same JSON array as the edge-case findings, with the four standard fields plus:
|
|
77
|
+
|
|
78
|
+
- `kind`: `"deletion"`
|
|
79
|
+
- `confidence`: `"high"`, `"medium"`, or `"low"` — these are inferences; rate them
|
|
80
|
+
|
|
81
|
+
For a deletion finding the standard fields read as: `location` = the removed item; `trigger_condition` = the behavior or contract it enforced; `guard_snippet` = where or how to re-establish it; `potential_consequence` = the regression or orphan.
|
|
82
|
+
|
|
83
|
+
Add nothing if nothing qualifies.
|
|
84
|
+
</reference>
|
|
85
|
+
|
|
86
|
+
## PROVIDED INPUTS
|
|
87
|
+
|
|
88
|
+
**content:**
|
|
89
|
+
|
|
90
|
+
{review_content}
|