agentic-sdlc-wizard 1.15.0 → 1.18.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.
- package/CHANGELOG.md +26 -0
- package/CLAUDE_CODE_SDLC_WIZARD.md +231 -156
- package/README.md +51 -35
- package/cli/bin/sdlc-wizard.js +14 -3
- package/cli/init.js +202 -10
- package/cli/templates/hooks/instructions-loaded-check.sh +1 -1
- package/cli/templates/hooks/sdlc-prompt-check.sh +16 -5
- package/cli/templates/skills/sdlc/SKILL.md +159 -30
- package/cli/templates/skills/setup/SKILL.md +176 -0
- package/cli/templates/skills/update/SKILL.md +141 -0
- package/package.json +1 -1
- package/cli/templates/skills/testing/SKILL.md +0 -97
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: sdlc
|
|
3
|
-
description: Full SDLC workflow for implementing features, fixing bugs, refactoring code, and creating new functionality. Use this skill when implementing, fixing, refactoring, adding features, or building new code.
|
|
3
|
+
description: Full SDLC workflow for implementing features, fixing bugs, refactoring code, testing, and creating new functionality. Use this skill when implementing, fixing, refactoring, testing, adding features, or building new code.
|
|
4
4
|
argument-hint: [task description]
|
|
5
5
|
effort: high
|
|
6
6
|
---
|
|
@@ -18,17 +18,16 @@ TodoWrite([
|
|
|
18
18
|
// PLANNING PHASE (Plan Mode for non-trivial tasks)
|
|
19
19
|
{ content: "Find and read relevant documentation", status: "in_progress", activeForm: "Reading docs" },
|
|
20
20
|
{ content: "Assess doc health - flag issues (ask before cleaning)", status: "pending", activeForm: "Checking doc health" },
|
|
21
|
-
{ content: "DRY scan: What patterns exist to reuse?", status: "pending", activeForm: "Scanning for reusable patterns" },
|
|
21
|
+
{ content: "DRY scan: What patterns exist to reuse? New pattern = get approval", status: "pending", activeForm: "Scanning for reusable patterns" },
|
|
22
22
|
{ content: "Blast radius: What depends on code I'm changing?", status: "pending", activeForm: "Checking dependencies" },
|
|
23
23
|
{ content: "Design system check (if UI change)", status: "pending", activeForm: "Checking design system" },
|
|
24
24
|
{ content: "Restate task in own words - verify understanding", status: "pending", activeForm: "Verifying understanding" },
|
|
25
25
|
{ content: "Scrutinize test design - right things tested? Follow TESTING.md?", status: "pending", activeForm: "Reviewing test approach" },
|
|
26
26
|
{ content: "Present approach + STATE CONFIDENCE LEVEL", status: "pending", activeForm: "Presenting approach" },
|
|
27
27
|
{ content: "Signal ready - user exits plan mode", status: "pending", activeForm: "Awaiting plan approval" },
|
|
28
|
-
// TRANSITION PHASE (After plan mode
|
|
28
|
+
// TRANSITION PHASE (After plan mode)
|
|
29
29
|
{ content: "Update feature docs with discovered gotchas", status: "pending", activeForm: "Updating feature docs" },
|
|
30
|
-
|
|
31
|
-
// IMPLEMENTATION PHASE (After compact)
|
|
30
|
+
// IMPLEMENTATION PHASE
|
|
32
31
|
{ content: "TDD RED: Write failing test FIRST", status: "pending", activeForm: "Writing failing test" },
|
|
33
32
|
{ content: "TDD GREEN: Implement, verify test passes", status: "pending", activeForm: "Implementing feature" },
|
|
34
33
|
{ content: "Run lint/typecheck", status: "pending", activeForm: "Running lint and typecheck" },
|
|
@@ -40,15 +39,38 @@ TodoWrite([
|
|
|
40
39
|
{ content: "Self-review: run /code-review", status: "pending", activeForm: "Running code review" },
|
|
41
40
|
{ content: "Security review (if warranted)", status: "pending", activeForm: "Checking security implications" },
|
|
42
41
|
{ content: "Cross-model review (if configured — see below)", status: "pending", activeForm: "Running cross-model review" },
|
|
42
|
+
{ content: "Scope guard: only changes related to task? No legacy/fallback code left?", status: "pending", activeForm: "Checking scope and legacy code" },
|
|
43
43
|
// CI FEEDBACK LOOP (if CI monitoring enabled in setup - skip if no CI)
|
|
44
44
|
{ content: "Commit and push to remote", status: "pending", activeForm: "Pushing to remote" },
|
|
45
45
|
{ content: "Watch CI - fix failures, iterate until green (max 2x)", status: "pending", activeForm: "Watching CI" },
|
|
46
46
|
{ content: "Read CI review - implement valid suggestions, iterate until clean", status: "pending", activeForm: "Addressing CI review feedback" },
|
|
47
|
+
{ content: "Post-deploy verification (if deploy task — see Deployment Tasks)", status: "pending", activeForm: "Verifying deployment" },
|
|
47
48
|
// FINAL
|
|
48
|
-
{ content: "Present summary: changes, tests, CI status", status: "pending", activeForm: "Presenting final summary" }
|
|
49
|
+
{ content: "Present summary: changes, tests, CI status", status: "pending", activeForm: "Presenting final summary" },
|
|
50
|
+
{ content: "Capture learnings (if any — update TESTING.md, CLAUDE.md, or feature docs)", status: "pending", activeForm: "Capturing session learnings" }
|
|
49
51
|
])
|
|
50
52
|
```
|
|
51
53
|
|
|
54
|
+
## SDLC Quality Checklist (Scoring Rubric)
|
|
55
|
+
|
|
56
|
+
Your work is scored on these criteria. **Critical** criteria are must-pass.
|
|
57
|
+
|
|
58
|
+
| Criterion | Points | Critical? | What Counts |
|
|
59
|
+
|-----------|--------|-----------|-------------|
|
|
60
|
+
| task_tracking | 1 | | Use TodoWrite or TaskCreate |
|
|
61
|
+
| confidence | 1 | | State HIGH/MEDIUM/LOW |
|
|
62
|
+
| tdd_red | 2 | **YES** | Write/edit test files BEFORE implementation files |
|
|
63
|
+
| plan_mode_outline | 1 | | Outline steps before coding |
|
|
64
|
+
| plan_mode_tool | 1 | | Use TodoWrite/TaskCreate/EnterPlanMode |
|
|
65
|
+
| tdd_green_ran | 1 | | Run tests, show runner output |
|
|
66
|
+
| tdd_green_pass | 1 | | All tests pass in final run |
|
|
67
|
+
| self_review | 1 | **YES** | Read back files/diffs you modified |
|
|
68
|
+
| clean_code | 1 | | One coherent approach, no dead code |
|
|
69
|
+
|
|
70
|
+
**Total: 10 points** (11 for UI tasks, +1 for design_system check)
|
|
71
|
+
|
|
72
|
+
Critical miss on `tdd_red` or `self_review` = process failure regardless of total score.
|
|
73
|
+
|
|
52
74
|
## New Pattern & Test Design Scrutiny (PLANNING)
|
|
53
75
|
|
|
54
76
|
**New design patterns require human approval:**
|
|
@@ -68,22 +90,20 @@ TodoWrite([
|
|
|
68
90
|
|
|
69
91
|
**Workflow:**
|
|
70
92
|
1. **Plan Mode** (editing blocked): Research -> Write plan file -> Present approach + confidence
|
|
71
|
-
2. **Transition** (after approval): Update feature docs
|
|
72
|
-
3. **Implementation
|
|
73
|
-
|
|
74
|
-
**Before TDD, MUST ask:** "Docs updated. Run `/compact` before implementation?"
|
|
93
|
+
2. **Transition** (after approval): Update feature docs
|
|
94
|
+
3. **Implementation**: TDD RED -> GREEN -> PASS
|
|
75
95
|
|
|
76
96
|
## Confidence Check (REQUIRED)
|
|
77
97
|
|
|
78
98
|
Before presenting approach, STATE your confidence:
|
|
79
99
|
|
|
80
|
-
| Level | Meaning | Action |
|
|
81
|
-
|
|
82
|
-
| HIGH (90%+) | Know exactly what to do | Present approach, proceed after approval |
|
|
83
|
-
| MEDIUM (60-89%) | Solid approach, some uncertainty | Present approach, highlight uncertainties |
|
|
84
|
-
| LOW (<60%) | Not sure | ASK USER before proceeding |
|
|
85
|
-
| FAILED 2x | Something's wrong | STOP. ASK USER immediately |
|
|
86
|
-
| CONFUSED | Can't diagnose why something is failing | STOP. Describe what you tried, ask for help |
|
|
100
|
+
| Level | Meaning | Action | Effort |
|
|
101
|
+
|-------|---------|--------|--------|
|
|
102
|
+
| HIGH (90%+) | Know exactly what to do | Present approach, proceed after approval | `high` (default) |
|
|
103
|
+
| MEDIUM (60-89%) | Solid approach, some uncertainty | Present approach, highlight uncertainties | `high` (default) |
|
|
104
|
+
| LOW (<60%) | Not sure | ASK USER before proceeding | Consider `/effort max` |
|
|
105
|
+
| FAILED 2x | Something's wrong | STOP. ASK USER immediately | Try `/effort max` |
|
|
106
|
+
| CONFUSED | Can't diagnose why something is failing | STOP. Describe what you tried, ask for help | Try `/effort max` |
|
|
87
107
|
|
|
88
108
|
## Self-Review Loop (CRITICAL)
|
|
89
109
|
|
|
@@ -116,38 +136,100 @@ PLANNING -> DOCS -> TDD RED -> TDD GREEN -> Tests Pass -> Self-Review
|
|
|
116
136
|
|
|
117
137
|
**Prerequisites:** Codex CLI installed (`npm i -g @openai/codex`), OpenAI API key set.
|
|
118
138
|
|
|
119
|
-
|
|
139
|
+
### Round 1: Initial Review
|
|
140
|
+
|
|
120
141
|
1. After self-review passes, write `.reviews/handoff.json`:
|
|
121
142
|
```jsonc
|
|
122
143
|
{
|
|
123
144
|
"review_id": "feature-xyz-001",
|
|
124
145
|
"status": "PENDING_REVIEW",
|
|
146
|
+
"round": 1,
|
|
125
147
|
"files_changed": ["src/auth.ts", "tests/auth.test.ts"],
|
|
126
148
|
"review_instructions": "Review for security, edge cases, and correctness",
|
|
127
149
|
"artifact_path": ".reviews/feature-xyz-001/"
|
|
128
150
|
}
|
|
129
151
|
```
|
|
130
|
-
2.
|
|
152
|
+
2. Run the independent reviewer:
|
|
131
153
|
```bash
|
|
132
154
|
codex exec \
|
|
133
155
|
-c 'model_reasoning_effort="xhigh"' \
|
|
134
156
|
-s danger-full-access \
|
|
135
157
|
-o .reviews/latest-review.md \
|
|
136
158
|
"You are an independent code reviewer. Read .reviews/handoff.json, \
|
|
137
|
-
review the listed files
|
|
159
|
+
review the listed files. Output each finding with: an ID (1, 2, ...), \
|
|
160
|
+
severity (P0/P1/P2), description, and a 'certify condition' stating \
|
|
161
|
+
what specific change would resolve it. \
|
|
138
162
|
End with CERTIFIED or NOT CERTIFIED."
|
|
139
163
|
```
|
|
140
|
-
3.
|
|
164
|
+
3. If CERTIFIED → proceed to CI. If NOT CERTIFIED → go to Round 2.
|
|
165
|
+
|
|
166
|
+
### Round 2+: Dialogue Loop
|
|
167
|
+
|
|
168
|
+
When the reviewer finds issues, respond per-finding instead of silently fixing everything:
|
|
169
|
+
|
|
170
|
+
1. Write `.reviews/response.json`:
|
|
171
|
+
```jsonc
|
|
172
|
+
{
|
|
173
|
+
"review_id": "feature-xyz-001",
|
|
174
|
+
"round": 2,
|
|
175
|
+
"responding_to": ".reviews/latest-review.md",
|
|
176
|
+
"responses": [
|
|
177
|
+
{ "finding": "1", "action": "FIXED", "summary": "Added missing validation" },
|
|
178
|
+
{ "finding": "2", "action": "DISPUTED", "justification": "This is intentional — see CODE_REVIEW_EXCEPTIONS.md" },
|
|
179
|
+
{ "finding": "3", "action": "ACCEPTED", "summary": "Will add test coverage" }
|
|
180
|
+
]
|
|
181
|
+
}
|
|
182
|
+
```
|
|
183
|
+
- **FIXED**: "I fixed this. Here is what changed." Reviewer verifies.
|
|
184
|
+
- **DISPUTED**: "This is intentional/incorrect. Here is why." Reviewer accepts or rejects.
|
|
185
|
+
- **ACCEPTED**: "You are right. Fixing now." (Same as FIXED, batched.)
|
|
186
|
+
|
|
187
|
+
2. Update `handoff.json` with `"status": "PENDING_RECHECK"`, increment `round`, add `"response_path"` and `"previous_review"` fields.
|
|
188
|
+
|
|
189
|
+
3. Run targeted recheck (NOT a full re-review):
|
|
190
|
+
```bash
|
|
191
|
+
codex exec \
|
|
192
|
+
-c 'model_reasoning_effort="xhigh"' \
|
|
193
|
+
-s danger-full-access \
|
|
194
|
+
-o .reviews/latest-review.md \
|
|
195
|
+
"You are doing a TARGETED RECHECK. First read .reviews/handoff.json \
|
|
196
|
+
to find the previous_review path — read that file for the original \
|
|
197
|
+
findings and certify conditions. Then read .reviews/response.json \
|
|
198
|
+
for the author's responses. For each: \
|
|
199
|
+
FIXED → verify the fix against the original certify condition. \
|
|
200
|
+
DISPUTED → evaluate the justification (ACCEPT if sound, REJECT if not). \
|
|
201
|
+
ACCEPTED → verify it was applied. \
|
|
202
|
+
Do NOT raise new findings unless P0 (critical/security). \
|
|
203
|
+
New observations go in 'Notes for next review' (non-blocking). \
|
|
204
|
+
End with CERTIFIED or NOT CERTIFIED."
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
4. If CERTIFIED → done. If NOT CERTIFIED (rejected disputes or failed fixes) → fix rejected items and repeat.
|
|
208
|
+
|
|
209
|
+
### Convergence
|
|
210
|
+
|
|
211
|
+
Max 3 recheck rounds (4 total including initial review). If still NOT CERTIFIED after round 4, escalate to the user with a summary of open findings. Don't spin indefinitely.
|
|
141
212
|
|
|
142
213
|
```
|
|
143
|
-
Self-review passes →
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
214
|
+
Self-review passes → handoff.json (round 1, PENDING_REVIEW)
|
|
215
|
+
|
|
|
216
|
+
Reviewer: FULL REVIEW (structured findings)
|
|
217
|
+
|
|
|
218
|
+
CERTIFIED? → YES → CI feedback loop
|
|
219
|
+
|
|
|
220
|
+
NO (findings with IDs + certify conditions)
|
|
221
|
+
|
|
|
222
|
+
Claude writes response.json:
|
|
223
|
+
FIXED / DISPUTED / ACCEPTED per finding
|
|
224
|
+
|
|
|
225
|
+
handoff.json (round 2+, PENDING_RECHECK)
|
|
226
|
+
|
|
|
227
|
+
Reviewer: TARGETED RECHECK (previous findings only)
|
|
228
|
+
|
|
|
229
|
+
All resolved? → YES → CERTIFIED
|
|
230
|
+
|
|
|
231
|
+
NO → fix rejected items, repeat
|
|
232
|
+
(max 3 rechecks, then escalate to user)
|
|
151
233
|
```
|
|
152
234
|
|
|
153
235
|
**Tool-agnostic:** The value is adversarial diversity (different model, different blind spots), not the specific tool. Any competing AI reviewer works.
|
|
@@ -161,11 +243,41 @@ During self-review, critique tests HARDER than app code:
|
|
|
161
243
|
2. **Tests prove correctness?** - Or just verify current behavior?
|
|
162
244
|
3. **Follow our philosophies (TESTING.md)?**
|
|
163
245
|
- Testing Diamond (integration-heavy)?
|
|
164
|
-
- Minimal mocking (
|
|
246
|
+
- Minimal mocking (see table below)?
|
|
165
247
|
- Real fixtures from captured data?
|
|
166
248
|
|
|
167
249
|
**Tests are the foundation.** Bad tests = false confidence = production bugs.
|
|
168
250
|
|
|
251
|
+
### Minimal Mocking Philosophy
|
|
252
|
+
|
|
253
|
+
| What | Mock? | Why |
|
|
254
|
+
|------|-------|-----|
|
|
255
|
+
| Database | NEVER | Use test DB or in-memory |
|
|
256
|
+
| Cache | NEVER | Use isolated test instance |
|
|
257
|
+
| External APIs | YES | Real calls = flaky + expensive |
|
|
258
|
+
| Time/Date | YES | Determinism |
|
|
259
|
+
|
|
260
|
+
**Mocks MUST come from REAL captured data** — capture real API responses, save to fixtures directory, import in tests. Never guess mock shapes.
|
|
261
|
+
|
|
262
|
+
### Unit Tests = Pure Logic ONLY
|
|
263
|
+
|
|
264
|
+
A function qualifies for unit testing ONLY if:
|
|
265
|
+
- No database calls
|
|
266
|
+
- No external API calls
|
|
267
|
+
- No file system access
|
|
268
|
+
- No cache calls
|
|
269
|
+
- Input -> Output transformation only
|
|
270
|
+
|
|
271
|
+
Everything else needs integration tests.
|
|
272
|
+
|
|
273
|
+
### TDD Tests Must PROVE
|
|
274
|
+
|
|
275
|
+
| Phase | What It Proves |
|
|
276
|
+
|-------|----------------|
|
|
277
|
+
| RED | Test FAILS -> Bug exists or feature missing |
|
|
278
|
+
| GREEN | Test PASSES -> Fix works or feature implemented |
|
|
279
|
+
| Forever | Regression protection |
|
|
280
|
+
|
|
169
281
|
## Flaky Test Recovery
|
|
170
282
|
|
|
171
283
|
When a test fails intermittently:
|
|
@@ -350,6 +462,16 @@ CI passes -> Read review suggestions
|
|
|
350
462
|
|
|
351
463
|
**If ARCHITECTURE.md has no Environments section:** Ask user "How do you deploy to [target]?" before proceeding.
|
|
352
464
|
|
|
465
|
+
**After deploying — Post-Deploy Verification:**
|
|
466
|
+
1. Read ARCHITECTURE.md → Find the Post-Deploy Verification table
|
|
467
|
+
2. Run health check for the target environment
|
|
468
|
+
3. Check logs for new errors
|
|
469
|
+
4. Run smoke tests if configured
|
|
470
|
+
5. Monitor error rates for 15 min (production only)
|
|
471
|
+
6. If issues found → rollback first, then start new SDLC loop to fix
|
|
472
|
+
|
|
473
|
+
**If ARCHITECTURE.md has no Post-Deploy section:** Ask user "How do you verify [target] is working after deploy?"
|
|
474
|
+
|
|
353
475
|
## DELETE Legacy Code
|
|
354
476
|
|
|
355
477
|
- Legacy code? DELETE IT
|
|
@@ -358,6 +480,13 @@ CI passes -> Read review suggestions
|
|
|
358
480
|
|
|
359
481
|
**THE RULE:** Delete old code first. If it breaks, fix it properly.
|
|
360
482
|
|
|
483
|
+
## After Session (Capture Learnings)
|
|
484
|
+
|
|
485
|
+
If this session revealed insights, update the right place:
|
|
486
|
+
- **Testing patterns, gotchas** → `TESTING.md`
|
|
487
|
+
- **Feature-specific quirks** → Feature docs (`*_PLAN.md`)
|
|
488
|
+
- **General project context** → `CLAUDE.md` (or `/revise-claude-md`)
|
|
489
|
+
|
|
361
490
|
---
|
|
362
491
|
|
|
363
492
|
**Full reference:** SDLC.md
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: setup-wizard
|
|
3
|
+
description: Interactive project setup wizard that scans the codebase, asks all 16 configuration questions, generates SDLC files (CLAUDE.md, SDLC.md, TESTING.md, ARCHITECTURE.md), and verifies the installation. Use this skill when setting up the SDLC wizard for the first time or re-running setup.
|
|
4
|
+
argument-hint: [optional: regenerate | verify-only]
|
|
5
|
+
effort: high
|
|
6
|
+
---
|
|
7
|
+
# Setup Wizard - Interactive Project Configuration
|
|
8
|
+
|
|
9
|
+
## Task
|
|
10
|
+
$ARGUMENTS
|
|
11
|
+
|
|
12
|
+
## Purpose
|
|
13
|
+
|
|
14
|
+
You are an interactive setup wizard. Your job is to scan the project, ask the user ALL configuration questions, and generate the SDLC files. DO NOT skip questions. DO NOT make assumptions. The user's answers drive the output.
|
|
15
|
+
|
|
16
|
+
## MANDATORY FIRST ACTION: Read the Wizard Doc
|
|
17
|
+
|
|
18
|
+
**Before doing ANYTHING else**, use the Read tool to read the ENTIRE `CLAUDE_CODE_SDLC_WIZARD.md` file. This file contains all templates, examples, and instructions you need. You CANNOT do this setup correctly without reading it first. Do NOT rely on summaries or references — read the full file now.
|
|
19
|
+
|
|
20
|
+
After reading, use it as the source of truth for every step below.
|
|
21
|
+
|
|
22
|
+
## Execution Checklist
|
|
23
|
+
|
|
24
|
+
Follow these steps IN ORDER. Do not skip or combine steps.
|
|
25
|
+
|
|
26
|
+
### Step 1: Auto-Scan the Project
|
|
27
|
+
|
|
28
|
+
Scan the project root for:
|
|
29
|
+
- Package managers: package.json, Cargo.toml, go.mod, pyproject.toml, Gemfile, build.gradle, pom.xml
|
|
30
|
+
- Source directories: src/, app/, lib/, server/, pkg/, cmd/
|
|
31
|
+
- Test directories: tests/, __tests__/, spec/, test files matching *_test.*, test_*.*
|
|
32
|
+
- Test frameworks: from config files (jest.config, vitest.config, pytest.ini, etc.)
|
|
33
|
+
- Lint/format tools: .eslintrc, biome.json, .prettierrc, rustfmt.toml, etc.
|
|
34
|
+
- CI/CD: .github/workflows/, .gitlab-ci.yml, Jenkinsfile
|
|
35
|
+
- Feature docs: *_PLAN.md, *_DOCS.md, *_SPEC.md, docs/
|
|
36
|
+
- Deployment: Dockerfile, vercel.json, fly.toml, netlify.toml, Procfile, k8s/
|
|
37
|
+
- Design system: tailwind.config.*, .storybook/, theme files, CSS custom properties
|
|
38
|
+
- Existing docs: README.md, CLAUDE.md, ARCHITECTURE.md
|
|
39
|
+
|
|
40
|
+
Present findings to the user in a clear summary with detected values.
|
|
41
|
+
|
|
42
|
+
### Step 2: Ask ALL 17 Questions
|
|
43
|
+
|
|
44
|
+
Ask every question. Pre-fill detected values but let the user confirm or override.
|
|
45
|
+
|
|
46
|
+
**Project Structure:**
|
|
47
|
+
1. Source directory (detected or ask)
|
|
48
|
+
2. Test directory (detected or ask)
|
|
49
|
+
3. Test framework (detected or ask)
|
|
50
|
+
|
|
51
|
+
**Commands:**
|
|
52
|
+
4. Lint command
|
|
53
|
+
5. Type-check command
|
|
54
|
+
6. Run all tests command
|
|
55
|
+
7. Run single test file command
|
|
56
|
+
8. Production build command
|
|
57
|
+
9. Deployment setup (detected environments, confirm or customize)
|
|
58
|
+
|
|
59
|
+
**Infrastructure:**
|
|
60
|
+
10. Database(s) used
|
|
61
|
+
11. Caching layer (Redis, etc.)
|
|
62
|
+
12. Test duration (<1 min, 1-5 min, 5+ min)
|
|
63
|
+
|
|
64
|
+
**Output Preferences:**
|
|
65
|
+
13. Response detail level (small/medium/large)
|
|
66
|
+
|
|
67
|
+
**Testing Philosophy:**
|
|
68
|
+
14. Testing approach (strict TDD, test-after, mixed, minimal, none yet)
|
|
69
|
+
15. Test types wanted (unit, integration, E2E, API)
|
|
70
|
+
16. Mocking philosophy (minimal, heavy, no mocking)
|
|
71
|
+
|
|
72
|
+
**Coverage:**
|
|
73
|
+
17. Code coverage preferences (enforce threshold, report only, AI suggestions, skip)
|
|
74
|
+
|
|
75
|
+
DO NOT proceed to file generation until ALL 17 questions have answers.
|
|
76
|
+
|
|
77
|
+
### Step 3: Generate CLAUDE.md
|
|
78
|
+
|
|
79
|
+
Using the user's answers, generate `CLAUDE.md` with:
|
|
80
|
+
- Project overview (from scan results)
|
|
81
|
+
- Commands table (Q4-Q8 answers)
|
|
82
|
+
- Code style section (from detected linters/formatters)
|
|
83
|
+
- Architecture summary (from scan)
|
|
84
|
+
- Special notes (from Q9-Q11)
|
|
85
|
+
|
|
86
|
+
Reference: See "Step 3" in `CLAUDE_CODE_SDLC_WIZARD.md` for the full template.
|
|
87
|
+
|
|
88
|
+
### Step 4: Generate SDLC.md
|
|
89
|
+
|
|
90
|
+
Generate `SDLC.md` with the full SDLC checklist customized to the project:
|
|
91
|
+
- Plan mode guidance
|
|
92
|
+
- TDD workflow with project-specific commands
|
|
93
|
+
- Self-review steps
|
|
94
|
+
- CI feedback loop (if CI detected)
|
|
95
|
+
- Confidence levels
|
|
96
|
+
|
|
97
|
+
Include metadata comments:
|
|
98
|
+
```
|
|
99
|
+
<!-- SDLC Wizard Version: [version from CLAUDE_CODE_SDLC_WIZARD.md] -->
|
|
100
|
+
<!-- Setup Date: [today's date] -->
|
|
101
|
+
<!-- Completed Steps: 0.4, 1-10 -->
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Reference: See "Step 4" in `CLAUDE_CODE_SDLC_WIZARD.md` for the full template.
|
|
105
|
+
|
|
106
|
+
### Step 5: Generate TESTING.md
|
|
107
|
+
|
|
108
|
+
Generate `TESTING.md` based on Q13-Q16 answers:
|
|
109
|
+
- Testing Diamond visualization
|
|
110
|
+
- Test types and their purposes
|
|
111
|
+
- Mocking rules (from Q15)
|
|
112
|
+
- Test file organization (from Q2, Q3)
|
|
113
|
+
- Coverage config (from Q16)
|
|
114
|
+
- Framework-specific patterns
|
|
115
|
+
|
|
116
|
+
Reference: See "Step 5" in `CLAUDE_CODE_SDLC_WIZARD.md` for the full template.
|
|
117
|
+
|
|
118
|
+
### Step 6: Generate ARCHITECTURE.md
|
|
119
|
+
|
|
120
|
+
Generate `ARCHITECTURE.md` with:
|
|
121
|
+
- System overview diagram (from scan)
|
|
122
|
+
- Component descriptions
|
|
123
|
+
- Environments table (from Q8.5)
|
|
124
|
+
- Deployment checklist
|
|
125
|
+
- Key technical decisions
|
|
126
|
+
|
|
127
|
+
Reference: See "Step 6" in `CLAUDE_CODE_SDLC_WIZARD.md` for the full template.
|
|
128
|
+
|
|
129
|
+
### Step 7: Generate DESIGN_SYSTEM.md (If UI Detected)
|
|
130
|
+
|
|
131
|
+
Only if design system artifacts were found in Step 1:
|
|
132
|
+
- Extract colors, fonts, spacing from config
|
|
133
|
+
- Document component patterns
|
|
134
|
+
- Reference design sources (Storybook, Figma, etc.)
|
|
135
|
+
|
|
136
|
+
Skip this step if no UI/design system detected.
|
|
137
|
+
|
|
138
|
+
### Step 8: Configure Tool Permissions
|
|
139
|
+
|
|
140
|
+
Based on detected stack, suggest `allowedTools` entries for `.claude/settings.json`:
|
|
141
|
+
- Package manager commands (npm, pnpm, yarn, cargo, go, pip, etc.)
|
|
142
|
+
- Build/test commands
|
|
143
|
+
- CI tools (gh)
|
|
144
|
+
|
|
145
|
+
Present suggestions and let the user confirm.
|
|
146
|
+
|
|
147
|
+
### Step 9: Customize Hooks
|
|
148
|
+
|
|
149
|
+
Update `tdd-pretool-check.sh` with the actual source directory from Q1 (replace generic `/src/` pattern).
|
|
150
|
+
|
|
151
|
+
### Step 10: Verify Setup
|
|
152
|
+
|
|
153
|
+
Run verification checks:
|
|
154
|
+
1. All generated files exist and are non-empty
|
|
155
|
+
2. Hooks are executable (`chmod +x`)
|
|
156
|
+
3. `settings.json` is valid JSON
|
|
157
|
+
4. Skill frontmatter is correct (name, effort fields)
|
|
158
|
+
5. `.gitignore` has required entries (.claude/plans/, .claude/settings.local.json)
|
|
159
|
+
|
|
160
|
+
Report any issues found.
|
|
161
|
+
|
|
162
|
+
### Step 11: Instruct Restart
|
|
163
|
+
|
|
164
|
+
Tell the user:
|
|
165
|
+
> Setup complete. Hooks and settings load at session start.
|
|
166
|
+
> **Exit Claude Code and restart it** for the new configuration to take effect.
|
|
167
|
+
> On restart, the SDLC hook will fire and you'll see the checklist in every response.
|
|
168
|
+
|
|
169
|
+
## Rules
|
|
170
|
+
|
|
171
|
+
- NEVER skip a question. If the user says "I don't know", record that and move on.
|
|
172
|
+
- NEVER assume answers. If auto-scan can't detect something, ASK.
|
|
173
|
+
- ALWAYS show detected values and let the user confirm or override.
|
|
174
|
+
- ALWAYS generate metadata comments in SDLC.md (version, date, steps).
|
|
175
|
+
- If the user passes `regenerate` as an argument, skip Q&A and regenerate files from existing SDLC.md metadata.
|
|
176
|
+
- If the user passes `verify-only` as an argument, skip to Step 10 (verify) only.
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: update-wizard
|
|
3
|
+
description: Smart update for SDLC wizard — shows changelog, compares files, lets you selectively adopt changes while preserving customizations.
|
|
4
|
+
argument-hint: [optional: check-only | force-all]
|
|
5
|
+
effort: high
|
|
6
|
+
---
|
|
7
|
+
# Update Wizard - Smart SDLC Update
|
|
8
|
+
|
|
9
|
+
## Task
|
|
10
|
+
$ARGUMENTS
|
|
11
|
+
|
|
12
|
+
## Purpose
|
|
13
|
+
|
|
14
|
+
You are a guided update assistant. Your job is to check what version the user has, show what changed, and walk them through selectively adopting updates while preserving their customizations. DO NOT blindly overwrite files. Show diffs and let the user decide.
|
|
15
|
+
|
|
16
|
+
## MANDATORY FIRST ACTION: Read the Wizard Doc
|
|
17
|
+
|
|
18
|
+
**Before doing ANYTHING else**, use the Read tool to read the `CLAUDE_CODE_SDLC_WIZARD.md` file — specifically the "Staying Updated (Idempotent Wizard)" section near the end. This contains the update URLs, version tracking format, and step registry you need. Do NOT proceed without reading it first.
|
|
19
|
+
|
|
20
|
+
## Execution Checklist
|
|
21
|
+
|
|
22
|
+
Follow these steps IN ORDER. Do not skip or combine steps.
|
|
23
|
+
|
|
24
|
+
### Step 1: Read Installed Version
|
|
25
|
+
|
|
26
|
+
Read `SDLC.md` and extract the version from the metadata comment:
|
|
27
|
+
```
|
|
28
|
+
<!-- SDLC Wizard Version: X.X.X -->
|
|
29
|
+
```
|
|
30
|
+
If no version comment exists, treat as `0.0.0` (first-time setup — suggest running `/setup-wizard` instead).
|
|
31
|
+
|
|
32
|
+
Also note the completed steps from `<!-- Completed Steps: ... -->`.
|
|
33
|
+
|
|
34
|
+
### Step 2: Fetch Latest CHANGELOG
|
|
35
|
+
|
|
36
|
+
Use WebFetch to fetch the CHANGELOG:
|
|
37
|
+
```
|
|
38
|
+
https://raw.githubusercontent.com/BaseInfinity/agentic-ai-sdlc-wizard/main/CHANGELOG.md
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Extract the latest version from the first `## [X.X.X]` line.
|
|
42
|
+
|
|
43
|
+
### Step 3: Compare Versions and Show What Changed
|
|
44
|
+
|
|
45
|
+
Parse all CHANGELOG entries between the user's installed version and the latest. Present a clear summary:
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
Installed: 1.15.0
|
|
49
|
+
Latest: 1.18.0
|
|
50
|
+
|
|
51
|
+
What changed:
|
|
52
|
+
- [1.18.0] Added /update-wizard skill, ...
|
|
53
|
+
- [1.17.0] Consolidated /testing into /sdlc, ...
|
|
54
|
+
- [1.16.0] Cross-model review protocol, ...
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**If versions match:** Say "You're up to date! (version X.X.X)" and stop.
|
|
58
|
+
|
|
59
|
+
**If user passed `check-only`:** Stop here after showing what changed. Do not apply anything.
|
|
60
|
+
|
|
61
|
+
### Step 4: Run Drift Detection
|
|
62
|
+
|
|
63
|
+
Run the CLI drift checker to see per-file status:
|
|
64
|
+
```bash
|
|
65
|
+
npx agentic-sdlc-wizard check
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
This reports each managed file as MATCH, CUSTOMIZED, MISSING, or DRIFT. Present the results.
|
|
69
|
+
|
|
70
|
+
### Step 5: Fetch Latest Wizard Doc
|
|
71
|
+
|
|
72
|
+
Use WebFetch to fetch the latest wizard:
|
|
73
|
+
```
|
|
74
|
+
https://raw.githubusercontent.com/BaseInfinity/agentic-ai-sdlc-wizard/main/CLAUDE_CODE_SDLC_WIZARD.md
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
This is the source of truth for all templates, hooks, skills, and step registry.
|
|
78
|
+
|
|
79
|
+
### Step 6: Present Per-File Update Plan
|
|
80
|
+
|
|
81
|
+
For each managed file from the `sdlc-wizard check` output:
|
|
82
|
+
|
|
83
|
+
| Status | Action |
|
|
84
|
+
|--------|--------|
|
|
85
|
+
| MATCH | Skip — already current |
|
|
86
|
+
| MISSING | Recommend install — show what the file does |
|
|
87
|
+
| CUSTOMIZED | Show what changed in latest vs user's version. Ask: adopt, skip, or merge? |
|
|
88
|
+
| DRIFT | Flag the issue (e.g., missing executable permission). Offer to fix |
|
|
89
|
+
|
|
90
|
+
Read both the installed file and the latest template content. Present a human-readable summary of differences — not a raw diff, but "what was added/changed/removed and why."
|
|
91
|
+
|
|
92
|
+
**If user passed `force-all`:** Skip per-file approval and apply all updates.
|
|
93
|
+
|
|
94
|
+
### Step 7: Handle settings.json Specially
|
|
95
|
+
|
|
96
|
+
NEVER overwrite settings.json. Instead:
|
|
97
|
+
|
|
98
|
+
1. Read the user's current settings.json
|
|
99
|
+
2. Compare against the latest template's hook definitions
|
|
100
|
+
3. Describe what hooks changed (added, updated, removed)
|
|
101
|
+
4. Offer to merge: update wizard hooks while preserving all custom hooks, permissions, and other settings
|
|
102
|
+
|
|
103
|
+
The CLI's `init --force` already has smart merge logic for settings.json. If the manual merge gets complicated, suggest: `npx agentic-sdlc-wizard init --force` (it preserves custom hooks).
|
|
104
|
+
|
|
105
|
+
### Step 8: Apply Selected Changes
|
|
106
|
+
|
|
107
|
+
For each file the user approved:
|
|
108
|
+
- Use the Edit tool to update the file content
|
|
109
|
+
- For complete replacements (MISSING files), use Write
|
|
110
|
+
- For settings.json, apply the merge from Step 7
|
|
111
|
+
|
|
112
|
+
### Step 9: Bump Version Metadata
|
|
113
|
+
|
|
114
|
+
Update the version in `SDLC.md`:
|
|
115
|
+
```
|
|
116
|
+
<!-- SDLC Wizard Version: X.X.X -->
|
|
117
|
+
```
|
|
118
|
+
Set it to the latest version.
|
|
119
|
+
|
|
120
|
+
Also update the completed steps if new steps were applied:
|
|
121
|
+
```
|
|
122
|
+
<!-- Completed Steps: step-0.1, step-0.2, ..., step-update-wizard -->
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Step 10: Verify
|
|
126
|
+
|
|
127
|
+
Run drift detection again:
|
|
128
|
+
```bash
|
|
129
|
+
npx agentic-sdlc-wizard check
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Report final status. All updated files should show MATCH. Files the user chose to skip will still show CUSTOMIZED — that's fine, it's their choice.
|
|
133
|
+
|
|
134
|
+
## Rules
|
|
135
|
+
|
|
136
|
+
1. **NEVER modify CLAUDE.md.** It is fully custom to the user's project. The wizard never touches it.
|
|
137
|
+
2. **NEVER auto-apply without showing what will change first** (unless `force-all` was passed).
|
|
138
|
+
3. **Offline fallback:** If WebFetch fails (network unavailable), tell the user: "Cannot reach GitHub. Run `npx agentic-sdlc-wizard init --force` to update from your locally installed CLI version instead."
|
|
139
|
+
4. **First-time users:** If SDLC.md doesn't exist or has no version metadata, suggest `/setup-wizard` instead of `/update-wizard`.
|
|
140
|
+
5. **Respect customizations.** When a file is CUSTOMIZED, the user made intentional changes. Show what's different and let them decide — don't pressure them to adopt the latest.
|
|
141
|
+
6. **Reference the wizard doc** for full protocol details (step registry, URLs, version tracking) rather than hardcoding values in this skill.
|