claude-devkit-cli 1.3.3 → 1.3.5
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/README.md +17 -17
- package/package.json +1 -1
- package/templates/.claude/CLAUDE.md +2 -2
- package/templates/.claude/commands/{mf-test.md → mf-build.md} +19 -3
- package/templates/.claude/commands/mf-challenge.md +38 -27
- package/templates/.claude/commands/mf-commit.md +35 -8
- package/templates/.claude/commands/mf-fix.md +18 -1
- package/templates/.claude/commands/mf-plan.md +55 -48
- package/templates/docs/WORKFLOW.md +5 -5
package/README.md
CHANGED
|
@@ -66,7 +66,7 @@ claude
|
|
|
66
66
|
/mf-plan "describe your feature here"
|
|
67
67
|
|
|
68
68
|
# 4. Write code, then test
|
|
69
|
-
/mf-
|
|
69
|
+
/mf-build
|
|
70
70
|
|
|
71
71
|
# 5. Review before merging
|
|
72
72
|
/mf-review
|
|
@@ -138,7 +138,7 @@ your-project/
|
|
|
138
138
|
│ └── commands/
|
|
139
139
|
│ ├── mf-plan.md ← /mf-plan command
|
|
140
140
|
│ ├── mf-challenge.md ← /mf-challenge command
|
|
141
|
-
│ ├── mf-
|
|
141
|
+
│ ├── mf-build.md ← /mf-build command
|
|
142
142
|
│ ├── mf-fix.md ← /mf-fix command
|
|
143
143
|
│ ├── mf-review.md ← /mf-review command
|
|
144
144
|
│ └── mf-commit.md ← /mf-commit command
|
|
@@ -202,7 +202,7 @@ This removes hooks, commands, settings, and build-test.sh. It preserves `CLAUDE.
|
|
|
202
202
|
→ Generates spec with acceptance scenarios at docs/specs/<feature>/<feature>.md.
|
|
203
203
|
|
|
204
204
|
2. Implement code in chunks.
|
|
205
|
-
After each chunk: /mf-
|
|
205
|
+
After each chunk: /mf-build
|
|
206
206
|
Repeat until green.
|
|
207
207
|
|
|
208
208
|
3. /mf-review (before merge)
|
|
@@ -225,7 +225,7 @@ This removes hooks, commands, settings, and build-test.sh. It preserves `CLAUDE.
|
|
|
225
225
|
Do NOT manually edit the spec before running /mf-plan.
|
|
226
226
|
|
|
227
227
|
2. Implement the code change.
|
|
228
|
-
/mf-
|
|
228
|
+
/mf-build
|
|
229
229
|
Fix until green.
|
|
230
230
|
|
|
231
231
|
3. /mf-review → /mf-commit
|
|
@@ -392,21 +392,21 @@ docs/specs/<feature>/
|
|
|
392
392
|
|
|
393
393
|
**Token cost:** 15-30k (uses parallel subagents, doesn't bloat main context)
|
|
394
394
|
|
|
395
|
-
### /mf-
|
|
395
|
+
### /mf-build — TDD Delivery Loop
|
|
396
396
|
|
|
397
397
|
**Usage:**
|
|
398
398
|
```
|
|
399
|
-
/mf-
|
|
400
|
-
/mf-
|
|
401
|
-
/mf-
|
|
399
|
+
/mf-build # build all changes vs base branch
|
|
400
|
+
/mf-build src/api/users.ts # build specific file
|
|
401
|
+
/mf-build "user authentication" # build specific feature
|
|
402
402
|
```
|
|
403
403
|
|
|
404
404
|
**How it works:**
|
|
405
405
|
|
|
406
406
|
1. **Phase 0: Build Context** — Finds changed files vs base branch, reads the spec (acceptance scenarios in `## Stories` section are the roadmap), reads existing tests for patterns, fixtures, and naming conventions. Doesn't duplicate what already exists.
|
|
407
|
-
2. **Phase 1: Write Tests** — Creates
|
|
407
|
+
2. **Phase 1: Write Failing Tests** — Creates tests from acceptance scenarios (RED). Each test covers one AS, is independent, deterministic (no random, no time-dependent, no external calls), and has a clear name.
|
|
408
408
|
3. **Phase 2: Compile First** — Runs typecheck/compile before executing tests. Catches syntax errors early.
|
|
409
|
-
4. **Phase 3: Run
|
|
409
|
+
4. **Phase 3: Implement + Run** — Implements story code, executes tests, drives to GREEN story by story.
|
|
410
410
|
5. **Phase 4: Fix Loop** — If tests fail, fixes **test code only** (max 3 attempts, then hard stop and report). If tests expect X but code does Y, asks you whether to fix production code or adjust the test.
|
|
411
411
|
6. **Phase 5: Report** — Summary with test counts, results, coverage, and files touched.
|
|
412
412
|
|
|
@@ -858,7 +858,7 @@ Then use: `/deploy staging`
|
|
|
858
858
|
|
|
859
859
|
| Activity | Tokens | Frequency |
|
|
860
860
|
|----------|--------|-----------|
|
|
861
|
-
| `/mf-
|
|
861
|
+
| `/mf-build` (incremental, 1-3 files) | 5–10k | Every code chunk |
|
|
862
862
|
| `/mf-fix` (single bug) | 3–5k | As needed |
|
|
863
863
|
| `/mf-commit` | 2–4k | Every commit |
|
|
864
864
|
| `/mf-review` (diff-based) | 10–20k | Before merge |
|
|
@@ -868,9 +868,9 @@ Then use: `/deploy staging`
|
|
|
868
868
|
|
|
869
869
|
### Minimizing Token Usage
|
|
870
870
|
|
|
871
|
-
- **Test incrementally.** `/mf-
|
|
872
|
-
- **Use filters.** `/mf-
|
|
873
|
-
- **Skip `/mf-plan` for tiny changes.** Under 5 lines with no behavior change? Just `/mf-
|
|
871
|
+
- **Test incrementally.** `/mf-build` after each small chunk uses 5-10k. Waiting until everything is done then running `/mf-build` on a large diff uses 50k+.
|
|
872
|
+
- **Use filters.** `/mf-build src/auth/login.ts` is cheaper than `/mf-build` on the whole project.
|
|
873
|
+
- **Skip `/mf-plan` for tiny changes.** Under 5 lines with no behavior change? Just `/mf-build` and `/mf-commit`.
|
|
874
874
|
- **Use `/mf-review` only before merge.** Not after every commit.
|
|
875
875
|
|
|
876
876
|
---
|
|
@@ -898,7 +898,7 @@ Then use: `/deploy staging`
|
|
|
898
898
|
|
|
899
899
|
### Wrong base branch
|
|
900
900
|
|
|
901
|
-
**Symptom:** `/mf-
|
|
901
|
+
**Symptom:** `/mf-build` or `/mf-review` compares against wrong branch.
|
|
902
902
|
|
|
903
903
|
**Check:**
|
|
904
904
|
```bash
|
|
@@ -928,13 +928,13 @@ export FILE_GUARD_EXCLUDE="*.generated.swift,*.pb.go,*.min.js,*.snap"
|
|
|
928
928
|
## 12. FAQ
|
|
929
929
|
|
|
930
930
|
**Q: Do I need specs for every tiny change?**
|
|
931
|
-
A: No. Changes under 5 lines with no behavior change can skip the spec. Just `/mf-
|
|
931
|
+
A: No. Changes under 5 lines with no behavior change can skip the spec. Just `/mf-build` and `/mf-commit`. The spec-first rule is for meaningful behavior changes.
|
|
932
932
|
|
|
933
933
|
**Q: Can I use mocks in tests?**
|
|
934
934
|
A: Only for external services you can't run locally (third-party APIs, email services). Never mock your own code or database just to make tests pass faster.
|
|
935
935
|
|
|
936
936
|
**Q: What if Claude writes a test that tests the wrong thing?**
|
|
937
|
-
A: This usually means the spec is ambiguous. Clarify the spec first, then re-run `/mf-
|
|
937
|
+
A: This usually means the spec is ambiguous. Clarify the spec first, then re-run `/mf-build`. Good specs produce good tests.
|
|
938
938
|
|
|
939
939
|
**Q: Can I use this with other AI coding tools?**
|
|
940
940
|
A: The commands and hooks are Claude Code-specific. The specs, workflow, and `build-test.sh` work with any tool or manual workflow.
|
package/package.json
CHANGED
|
@@ -13,8 +13,8 @@ Every change follows this cycle: **SPEC (with acceptance scenarios) → CODE + T
|
|
|
13
13
|
|
|
14
14
|
| Trigger | Commands | Details |
|
|
15
15
|
|---------|----------|---------|
|
|
16
|
-
| New feature | `/mf-plan` → `/mf-challenge` (optional) → code in chunks → `/mf-
|
|
17
|
-
| Update feature | `/mf-plan <spec-path> "changes"` → code → `/mf-
|
|
16
|
+
| New feature | `/mf-plan` → `/mf-challenge` (optional) → code in chunks → `/mf-build` each chunk | Start with spec or description |
|
|
17
|
+
| Update feature | `/mf-plan <spec-path> "changes"` → code → `/mf-build` | Do NOT manually edit spec before /mf-plan |
|
|
18
18
|
| Bug fix | `/mf-fix "description"` | Test-first: write failing test → fix → green |
|
|
19
19
|
| Remove feature | `/mf-plan <spec-path> "remove stories"` → delete code + tests → build pass | /mf-plan handles snapshot before removal |
|
|
20
20
|
| Pre-merge check | `/mf-review` | Diff-based quality gate |
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
TDD delivery loop — write failing tests from spec AS, implement story by story, drive to GREEN.
|
|
2
2
|
|
|
3
3
|
## Phase 0: Build Context
|
|
4
4
|
|
|
@@ -70,7 +70,23 @@ If `scripts/build-test.sh` doesn't exist, detect and run directly:
|
|
|
70
70
|
|
|
71
71
|
If tests fail:
|
|
72
72
|
1. Read error output. Is the test wrong or the production code wrong?
|
|
73
|
-
2. If production code seems wrong →
|
|
73
|
+
2. If production code seems wrong → use `AskUserQuestion`:
|
|
74
|
+
|
|
75
|
+
```json
|
|
76
|
+
{
|
|
77
|
+
"questions": [
|
|
78
|
+
{
|
|
79
|
+
"question": "Test expects <X> but code does <Y>. Which is correct?",
|
|
80
|
+
"header": "Test vs Code Mismatch",
|
|
81
|
+
"multiSelect": false,
|
|
82
|
+
"options": [
|
|
83
|
+
{"label": "Fix production code — the test is correct"},
|
|
84
|
+
{"label": "Adjust the test — the code behavior is intentional"}
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
```
|
|
74
90
|
3. Fix test code only. Re-run. Max 3 attempts, then stop and report.
|
|
75
91
|
|
|
76
92
|
**NEVER:**
|
|
@@ -99,7 +115,7 @@ If a test fails due to an edge case, error path, or boundary condition that is N
|
|
|
99
115
|
|
|
100
116
|
1. State explicitly: **"This failure suggests a missing acceptance scenario."**
|
|
101
117
|
2. Describe the gap: what behavior was tested, which story it belongs to, why no AS covers it.
|
|
102
|
-
3. Prompt: **"Run `/mf-plan <spec-path> 'Add AS for <description>'` to add the missing scenario
|
|
118
|
+
3. Prompt: **"Run `/mf-plan <spec-path> 'Add AS for <description>'` to add the missing scenario, then re-run `/mf-build`."**
|
|
103
119
|
|
|
104
120
|
Do not silently fix the test and move on. A test that has no corresponding AS means the spec is incomplete — the spec must be updated first.
|
|
105
121
|
|
|
@@ -173,32 +173,43 @@ Include 1-sentence rationale for each disposition. Be honest — don't reject va
|
|
|
173
173
|
|
|
174
174
|
Show adjudicated findings using the reviewer output format plus Disposition and Rationale fields.
|
|
175
175
|
|
|
176
|
-
Then present the decision:
|
|
177
|
-
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
176
|
+
Then present the decision using the `AskUserQuestion` tool:
|
|
177
|
+
|
|
178
|
+
```json
|
|
179
|
+
{
|
|
180
|
+
"questions": [
|
|
181
|
+
{
|
|
182
|
+
"question": "How to proceed with N accepted findings? RECOMMENDATION: Choose A if mostly Medium fixes, B if any Critical/High findings.",
|
|
183
|
+
"header": "Apply Findings",
|
|
184
|
+
"multiSelect": false,
|
|
185
|
+
"options": [
|
|
186
|
+
{"label": "A) Apply all accepted — bulk-apply all fixes at once | Trade-off: fast vs. no per-finding control"},
|
|
187
|
+
{"label": "B) Review each — walk through one by one, accept/reject/modify | Trade-off: precise control vs. slower"}
|
|
188
|
+
]
|
|
189
|
+
}
|
|
190
|
+
]
|
|
191
|
+
}
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Score: if most findings are High/Critical, recommend B. If mostly Medium with clear fixes, recommend A.
|
|
195
|
+
|
|
196
|
+
If user picks B: for each finding, use `AskUserQuestion`:
|
|
197
|
+
|
|
198
|
+
```json
|
|
199
|
+
{
|
|
200
|
+
"questions": [
|
|
201
|
+
{
|
|
202
|
+
"question": "Finding [C-1]: <title>\n<flaw summary>\nRECOMMENDATION: Choose A — <adjudication rationale>.",
|
|
203
|
+
"header": "Finding C-1",
|
|
204
|
+
"multiSelect": false,
|
|
205
|
+
"options": [
|
|
206
|
+
{"label": "A) Accept — apply the suggested fix"},
|
|
207
|
+
{"label": "B) Modify — accept with changes (describe your modification)"},
|
|
208
|
+
{"label": "C) Reject — skip this finding"}
|
|
209
|
+
]
|
|
210
|
+
}
|
|
211
|
+
]
|
|
212
|
+
}
|
|
202
213
|
```
|
|
203
214
|
|
|
204
215
|
## Phase 7: Apply
|
|
@@ -215,7 +226,7 @@ Reviewers: N lenses
|
|
|
215
226
|
Findings: X total → Y accepted, Z rejected
|
|
216
227
|
Severity: N Critical, N High, N Medium
|
|
217
228
|
Files modified: [list]
|
|
218
|
-
Next: /mf-
|
|
229
|
+
Next: /mf-build to implement, or /mf-plan to regenerate if major changes.
|
|
219
230
|
```
|
|
220
231
|
|
|
221
232
|
If a reviewer returns > 7 findings, take only top 7 by severity. If a reviewer fails, proceed with remaining reviewers.
|
|
@@ -22,9 +22,41 @@ echo "=== DEBUG ===" && \
|
|
|
22
22
|
|
|
23
23
|
**Secrets (hard block):** If count > 0, show matched lines and STOP. Do not commit.
|
|
24
24
|
|
|
25
|
-
**Debug code (soft warn):** If count > 0, show matched lines.
|
|
25
|
+
**Debug code (soft warn):** If count > 0, show matched lines. Use `AskUserQuestion` to confirm:
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"questions": [
|
|
30
|
+
{
|
|
31
|
+
"question": "Found <N> debug statements (console.log, debugger, etc.) in the diff. Are these intentional?",
|
|
32
|
+
"header": "Debug Code",
|
|
33
|
+
"multiSelect": false,
|
|
34
|
+
"options": [
|
|
35
|
+
{"label": "Yes, intentional — proceed with commit"},
|
|
36
|
+
{"label": "No, remove them first"}
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
```
|
|
26
42
|
|
|
27
|
-
**Large diff:** If > 10 files or > 300 lines,
|
|
43
|
+
**Large diff:** If > 10 files or > 300 lines, use `AskUserQuestion` to confirm:
|
|
44
|
+
|
|
45
|
+
```json
|
|
46
|
+
{
|
|
47
|
+
"questions": [
|
|
48
|
+
{
|
|
49
|
+
"question": "Large commit detected (<N> files, <M> lines). Large commits are harder to review and revert.",
|
|
50
|
+
"header": "Large Commit",
|
|
51
|
+
"multiSelect": false,
|
|
52
|
+
"options": [
|
|
53
|
+
{"label": "Proceed — commit everything as one"},
|
|
54
|
+
{"label": "Split — I'll stage specific files myself"}
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
```
|
|
28
60
|
|
|
29
61
|
---
|
|
30
62
|
|
|
@@ -67,12 +99,7 @@ Never stage: `.env`, credentials, build artifacts, generated files, binaries > 1
|
|
|
67
99
|
## Step 5 — Commit
|
|
68
100
|
|
|
69
101
|
```bash
|
|
70
|
-
git commit -m "
|
|
71
|
-
type(scope): description
|
|
72
|
-
|
|
73
|
-
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
74
|
-
EOF
|
|
75
|
-
)"
|
|
102
|
+
git commit -m "type(scope): description"
|
|
76
103
|
```
|
|
77
104
|
|
|
78
105
|
**Do NOT push** unless user explicitly asks.
|
|
@@ -29,7 +29,24 @@ bash scripts/build-test.sh --filter "<test name>"
|
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
- **FAILS** → reproduced. Continue.
|
|
32
|
-
- **PASSES** → hypothesis may be wrong.
|
|
32
|
+
- **PASSES** → hypothesis may be wrong. Use `AskUserQuestion`:
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"questions": [
|
|
37
|
+
{
|
|
38
|
+
"question": "The test passes with current code — the bug isn't reproduced yet. How to proceed?",
|
|
39
|
+
"header": "Test Passes Unexpectedly",
|
|
40
|
+
"multiSelect": false,
|
|
41
|
+
"options": [
|
|
42
|
+
{"label": "Provide different repro steps or environment details"},
|
|
43
|
+
{"label": "The bug may be environment-specific — describe the setup"},
|
|
44
|
+
{"label": "Skip test-first for this bug — fix directly"}
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
```
|
|
33
50
|
|
|
34
51
|
---
|
|
35
52
|
|
|
@@ -2,21 +2,24 @@ Generate spec with acceptance scenarios from description or existing spec.
|
|
|
2
2
|
|
|
3
3
|
## Question Format
|
|
4
4
|
|
|
5
|
-
When presenting
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
5
|
+
When presenting questions to the user with multiple options, use the `AskUserQuestion` tool.
|
|
6
|
+
|
|
7
|
+
**Schema:**
|
|
8
|
+
```json
|
|
9
|
+
{
|
|
10
|
+
"questions": [
|
|
11
|
+
{
|
|
12
|
+
"question": "<plain-language problem statement — what needs deciding and why. Include RECOMMENDATION: Choose [X] because [one-line reason]>",
|
|
13
|
+
"header": "<short label>",
|
|
14
|
+
"multiSelect": false,
|
|
15
|
+
"options": [
|
|
16
|
+
{"label": "A) <option> — <1-line rationale> | Fit: X/10 | Trade-off: <gain vs. lose>"},
|
|
17
|
+
{"label": "B) <option> — <1-line rationale> | Fit: X/10 | Trade-off: <gain vs. lose>"},
|
|
18
|
+
{"label": "C) <option> — <1-line rationale> | Fit: X/10 | Trade-off: <gain vs. lose>"}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
}
|
|
20
23
|
```
|
|
21
24
|
|
|
22
25
|
**Fit scoring calibration:**
|
|
@@ -29,9 +32,9 @@ Q<N>: <Plain-language problem statement — what needs deciding and why>
|
|
|
29
32
|
Rules:
|
|
30
33
|
- 2-4 options per question. Never more than 4.
|
|
31
34
|
- Every option must have a Fit score AND a Trade-off. No score without rationale.
|
|
32
|
-
- RECOMMENDATION is mandatory. Pick one. State why.
|
|
35
|
+
- RECOMMENDATION is mandatory in the question text. Pick one. State why.
|
|
33
36
|
- If two options score within 1 point, flag it: "Close call — A and B are both strong. Leaning A because [reason]."
|
|
34
|
-
-
|
|
37
|
+
- Pass all questions in a single `AskUserQuestion` call (not one-by-one) unless the answer to Q1 changes what Q2 should be.
|
|
35
38
|
|
|
36
39
|
---
|
|
37
40
|
|
|
@@ -275,21 +278,23 @@ Before finalizing, scan the spec for gaps. Check BOTH the spec content AND the a
|
|
|
275
278
|
| Priority consistency | P0 story with only 1 happy path AS? |
|
|
276
279
|
| Constraint coverage | Which constraint has no AS verifying it? |
|
|
277
280
|
|
|
278
|
-
Identify the top 3-5 ambiguities (most impactful first). Present
|
|
279
|
-
|
|
280
|
-
```
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
281
|
+
Identify the top 3-5 ambiguities (most impactful first). Present all at once using the `AskUserQuestion` tool (see Question Format at top). Example call:
|
|
282
|
+
|
|
283
|
+
```json
|
|
284
|
+
{
|
|
285
|
+
"questions": [
|
|
286
|
+
{
|
|
287
|
+
"question": "Auth strategy not specified — spec mentions 'logged-in users' but no auth mechanism. RECOMMENDATION: Choose A — single-service app, session auth is simplest path.",
|
|
288
|
+
"header": "Auth Strategy",
|
|
289
|
+
"multiSelect": false,
|
|
290
|
+
"options": [
|
|
291
|
+
{"label": "A) Session-based auth (cookie) — traditional, simple server-side | Fit: 8/10 | Trade-off: simple setup vs. harder to scale across services"},
|
|
292
|
+
{"label": "B) JWT (stateless tokens) — API-friendly, no server session | Fit: 7/10 | Trade-off: scalable vs. token revocation complexity"},
|
|
293
|
+
{"label": "C) Defer — add auth story later when auth requirements are clearer | Fit: 5/10 | Trade-off: unblocks now vs. may require spec rewrite later"}
|
|
294
|
+
]
|
|
295
|
+
}
|
|
296
|
+
]
|
|
297
|
+
}
|
|
293
298
|
```
|
|
294
299
|
|
|
295
300
|
If 0 questions remain, you MUST state why — not just "spec is clear." Cite at minimum:
|
|
@@ -317,7 +322,7 @@ Show:
|
|
|
317
322
|
- AS count
|
|
318
323
|
- Directory structure created
|
|
319
324
|
- Implementation order: which stories to implement first (by priority + dependency)
|
|
320
|
-
- Next steps: "Implement stories in order. Use `/mf-
|
|
325
|
+
- Next steps: "Implement stories in order. Use `/mf-build` to verify each story. For complex specs, run `/mf-challenge` first."
|
|
321
326
|
|
|
322
327
|
---
|
|
323
328
|
|
|
@@ -425,21 +430,23 @@ Display to the user:
|
|
|
425
430
|
S-001, S-003
|
|
426
431
|
```
|
|
427
432
|
|
|
428
|
-
Present the decision using
|
|
429
|
-
|
|
430
|
-
```
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
433
|
+
Present the decision using the `AskUserQuestion` tool:
|
|
434
|
+
|
|
435
|
+
```json
|
|
436
|
+
{
|
|
437
|
+
"questions": [
|
|
438
|
+
{
|
|
439
|
+
"question": "Apply these changes to <feature> spec? RECOMMENDATION: Choose A — <reason based on change count and complexity>.",
|
|
440
|
+
"header": "Apply Changes",
|
|
441
|
+
"multiSelect": false,
|
|
442
|
+
"options": [
|
|
443
|
+
{"label": "A) Apply all — accept the full change report as shown | Fit: N/10 | Trade-off: fast vs. no per-item control"},
|
|
444
|
+
{"label": "B) Review each — walk through changes one by one, accept/reject/modify | Fit: N/10 | Trade-off: precise control vs. slower"},
|
|
445
|
+
{"label": "C) Reject all — discard and start over | Fit: N/10 | Trade-off: clean slate vs. loses work"}
|
|
446
|
+
]
|
|
447
|
+
}
|
|
448
|
+
]
|
|
449
|
+
}
|
|
443
450
|
```
|
|
444
451
|
|
|
445
452
|
> **⛔ MUST wait for user confirmation before applying.**
|
|
@@ -22,7 +22,7 @@ Step 2 → (Optional) /mf-challenge docs/specs/<feature>/<feature>.md
|
|
|
22
22
|
Skip for simple CRUD or small features.
|
|
23
23
|
|
|
24
24
|
Step 3 → Implement in chunks. After each chunk:
|
|
25
|
-
/mf-
|
|
25
|
+
/mf-build
|
|
26
26
|
Repeat until chunk is green.
|
|
27
27
|
|
|
28
28
|
Step 4 → /mf-review (before merge)
|
|
@@ -41,7 +41,7 @@ Step 1 → /mf-plan docs/specs/<feature>/<feature>.md "description of changes"
|
|
|
41
41
|
snapshot first, then applies changes. Manual edits bypass snapshot protection.
|
|
42
42
|
|
|
43
43
|
Step 2 → Implement code changes.
|
|
44
|
-
/mf-
|
|
44
|
+
/mf-build
|
|
45
45
|
Fix until green.
|
|
46
46
|
|
|
47
47
|
Step 4 → /mf-review → /mf-commit
|
|
@@ -99,7 +99,7 @@ Is this a brand new feature (no existing spec or code)?
|
|
|
99
99
|
│ │ └─ No → Update Feature workflow. Start with /mf-plan.
|
|
100
100
|
│ │
|
|
101
101
|
│ └─ Is the change very small (< 5 lines, behavior unchanged)?
|
|
102
|
-
│ └─ Yes → Skip spec update. Just /mf-
|
|
102
|
+
│ └─ Yes → Skip spec update. Just /mf-build and /mf-commit.
|
|
103
103
|
```
|
|
104
104
|
|
|
105
105
|
---
|
|
@@ -170,7 +170,7 @@ Files to delete: [list]
|
|
|
170
170
|
|
|
171
171
|
| Workflow | Estimated Tokens | When |
|
|
172
172
|
|----------|-----------------|------|
|
|
173
|
-
| `/mf-
|
|
173
|
+
| `/mf-build` (incremental) | 5–10k | Daily, after each code chunk |
|
|
174
174
|
| `/mf-fix` (single bug) | 3–5k | As bugs arise |
|
|
175
175
|
| `/mf-commit` | 2–4k | Each commit |
|
|
176
176
|
| `/mf-review` (diff-based) | 10–20k | Before merge |
|
|
@@ -178,7 +178,7 @@ Files to delete: [list]
|
|
|
178
178
|
| `/mf-challenge` (adversarial) | 15–30k | After /mf-plan, for complex features |
|
|
179
179
|
| Full audit (manual) | 100k+ | Before release, quarterly |
|
|
180
180
|
|
|
181
|
-
**Rule of thumb:** Daily work uses templates + `/mf-
|
|
181
|
+
**Rule of thumb:** Daily work uses templates + `/mf-build` → low token cost.
|
|
182
182
|
Save `/mf-plan` and full audits for significant milestones.
|
|
183
183
|
|
|
184
184
|
---
|