claude-devkit-cli 1.3.3 → 1.4.0

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.
@@ -1,22 +1,29 @@
1
+ ---
2
+ description: Generate spec with acceptance scenarios from description or existing spec
3
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion, Agent
4
+ ---
1
5
  Generate spec with acceptance scenarios from description or existing spec.
2
6
 
3
7
  ## Question Format
4
8
 
5
- When presenting a question to the user with multiple options, ALWAYS use this structured format:
6
-
7
- ```
8
- Q<N>: <Plain-language problem statement — what needs deciding and why>
9
-
10
- A) <option> — <1-line rationale>
11
- Fit: X/10 | Trade-off: <what you gain vs. lose>
12
-
13
- B) <option> — <1-line rationale>
14
- Fit: X/10 | Trade-off: <what you gain vs. lose>
15
-
16
- C) <option> — <1-line rationale> (if applicable)
17
- Fit: X/10 | Trade-off: <what you gain vs. lose>
18
-
19
- RECOMMENDATION: [A/B/C] — <one-sentence reason>
9
+ When presenting questions to the user with multiple options, use the `AskUserQuestion` tool.
10
+
11
+ **Schema:**
12
+ ```json
13
+ {
14
+ "questions": [
15
+ {
16
+ "question": "<plain-language problem statement — what needs deciding and why. Include RECOMMENDATION: Choose [X] because [one-line reason]>",
17
+ "header": "<short label>",
18
+ "multiSelect": false,
19
+ "options": [
20
+ {"label": "A) <option> — <1-line rationale> | Fit: X/10 | Trade-off: <gain vs. lose>"},
21
+ {"label": "B) <option> — <1-line rationale> | Fit: X/10 | Trade-off: <gain vs. lose>"},
22
+ {"label": "C) <option> — <1-line rationale> | Fit: X/10 | Trade-off: <gain vs. lose>"}
23
+ ]
24
+ }
25
+ ]
26
+ }
20
27
  ```
21
28
 
22
29
  **Fit scoring calibration:**
@@ -29,9 +36,9 @@ Q<N>: <Plain-language problem statement — what needs deciding and why>
29
36
  Rules:
30
37
  - 2-4 options per question. Never more than 4.
31
38
  - Every option must have a Fit score AND a Trade-off. No score without rationale.
32
- - RECOMMENDATION is mandatory. Pick one. State why.
39
+ - RECOMMENDATION is mandatory in the question text. Pick one. State why.
33
40
  - If two options score within 1 point, flag it: "Close call — A and B are both strong. Leaning A because [reason]."
34
- - Present all questions at once (not one-by-one) unless the answer to Q1 changes what Q2 should be.
41
+ - Pass all questions in a single `AskUserQuestion` call (not one-by-one) unless the answer to Q1 changes what Q2 should be.
35
42
 
36
43
  ---
37
44
 
@@ -275,21 +282,23 @@ Before finalizing, scan the spec for gaps. Check BOTH the spec content AND the a
275
282
  | Priority consistency | P0 story with only 1 happy path AS? |
276
283
  | Constraint coverage | Which constraint has no AS verifying it? |
277
284
 
278
- Identify the top 3-5 ambiguities (most impactful first). Present each using the **Question Format** (see top of this file). Example:
279
-
280
- ```
281
- Q1: Auth strategy not specified — spec mentions "logged-in users" but no auth mechanism.
282
-
283
- A) Session-based auth (cookie) — traditional, simple server-side
284
- Fit: 8/10 | Trade-off: simple setup vs. harder to scale across services
285
-
286
- B) JWT (stateless tokens) — API-friendly, no server session
287
- Fit: 7/10 | Trade-off: scalable vs. token revocation complexity
288
-
289
- C) Deferadd auth story later when auth requirements are clearer
290
- Fit: 5/10 | Trade-off: unblocks now vs. may require spec rewrite later
291
-
292
- RECOMMENDATION: A — single-service app, session auth is simplest path.
285
+ Identify the top 3-5 ambiguities (most impactful first). Present all at once using the `AskUserQuestion` tool (see Question Format at top). Example call:
286
+
287
+ ```json
288
+ {
289
+ "questions": [
290
+ {
291
+ "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.",
292
+ "header": "Auth Strategy",
293
+ "multiSelect": false,
294
+ "options": [
295
+ {"label": "A) Session-based auth (cookie) — traditional, simple server-side | Fit: 8/10 | Trade-off: simple setup vs. harder to scale across services"},
296
+ {"label": "B) JWT (stateless tokens) API-friendly, no server session | Fit: 7/10 | Trade-off: scalable vs. token revocation complexity"},
297
+ {"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"}
298
+ ]
299
+ }
300
+ ]
301
+ }
293
302
  ```
294
303
 
295
304
  If 0 questions remain, you MUST state why — not just "spec is clear." Cite at minimum:
@@ -317,7 +326,7 @@ Show:
317
326
  - AS count
318
327
  - Directory structure created
319
328
  - Implementation order: which stories to implement first (by priority + dependency)
320
- - Next steps: "Implement stories in order. Use `/mf-test` to verify each story. For complex specs, run `/mf-challenge` first."
329
+ - Next steps: "Implement stories in order. Use `/mf-build` to verify each story. For complex specs, run `/mf-challenge` first."
321
330
 
322
331
  ---
323
332
 
@@ -425,21 +434,23 @@ Display to the user:
425
434
  S-001, S-003
426
435
  ```
427
436
 
428
- Present the decision using **Question Format**:
429
-
430
- ```
431
- Q1: Apply these changes to <feature> spec?
432
-
433
- A) Apply all — accept the full change report as shown
434
- Fit: N/10 | Trade-off: fast vs. no per-item control
435
-
436
- B) Review each — walk through changes one by one, accept/reject/modify
437
- Fit: N/10 | Trade-off: precise control vs. slower
438
-
439
- C) Reject alldiscard and start over
440
- Fit: N/10 | Trade-off: clean slate vs. loses work
441
-
442
- RECOMMENDATION: [A or B] — <reason based on change count and complexity>
437
+ Present the decision using the `AskUserQuestion` tool:
438
+
439
+ ```json
440
+ {
441
+ "questions": [
442
+ {
443
+ "question": "Apply these changes to <feature> spec? RECOMMENDATION: Choose A <reason based on change count and complexity>.",
444
+ "header": "Apply Changes",
445
+ "multiSelect": false,
446
+ "options": [
447
+ {"label": "A) Apply all — accept the full change report as shown | Fit: N/10 | Trade-off: fast vs. no per-item control"},
448
+ {"label": "B) Review eachwalk through changes one by one, accept/reject/modify | Fit: N/10 | Trade-off: precise control vs. slower"},
449
+ {"label": "C) Reject all — discard and start over | Fit: N/10 | Trade-off: clean slate vs. loses work"}
450
+ ]
451
+ }
452
+ ]
453
+ }
443
454
  ```
444
455
 
445
456
  > **⛔ MUST wait for user confirmation before applying.**
@@ -1,3 +1,7 @@
1
+ ---
2
+ description: Pre-merge code review — security, correctness, spec alignment
3
+ allowed-tools: Read, Bash, Glob, Grep
4
+ ---
1
5
  Pre-merge code review — security, correctness, spec alignment.
2
6
 
3
7
  ## Phase 0: Understand Intent
@@ -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-test
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-test
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-test and /mf-commit.
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-test` (incremental) | 5–10k | Daily, after each code chunk |
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-test` → low token cost.
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
  ---