agentic-sdlc-wizard 1.15.0 → 1.20.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 +45 -0
- package/CLAUDE_CODE_SDLC_WIZARD.md +398 -183
- 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 +188 -33
- package/cli/templates/skills/setup/SKILL.md +178 -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,97 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: testing
|
|
3
|
-
description: TDD and testing philosophy for writing tests, test-driven development, integration tests, and unit tests. Use this skill when writing tests, doing TDD, or debugging test issues.
|
|
4
|
-
argument-hint: [test type] [target]
|
|
5
|
-
effort: high
|
|
6
|
-
---
|
|
7
|
-
# Testing Skill - TDD & Testing Philosophy
|
|
8
|
-
|
|
9
|
-
## Task
|
|
10
|
-
$ARGUMENTS
|
|
11
|
-
|
|
12
|
-
## Testing Diamond (CRITICAL)
|
|
13
|
-
|
|
14
|
-
```
|
|
15
|
-
/\ <- Few E2E (automated or manual sign-off at end)
|
|
16
|
-
/ \
|
|
17
|
-
/ \
|
|
18
|
-
/------\
|
|
19
|
-
| | <- MANY Integration (real DB, real cache - BEST BANG FOR BUCK)
|
|
20
|
-
| |
|
|
21
|
-
\------/
|
|
22
|
-
\ /
|
|
23
|
-
\ /
|
|
24
|
-
\/ <- Few Unit (pure logic only)
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
**Why Integration Tests are Best Bang for Buck:**
|
|
28
|
-
- **Speed**: Fast enough to run on every change
|
|
29
|
-
- **Stability**: Touch real code, not mocks that lie
|
|
30
|
-
- **Confidence**: If they pass, production usually works
|
|
31
|
-
- **Real bugs**: Integration tests with real DB catch real bugs
|
|
32
|
-
- Unit tests with mocks can "pass" while production fails
|
|
33
|
-
|
|
34
|
-
## Minimal Mocking Philosophy
|
|
35
|
-
|
|
36
|
-
| What | Mock? | Why |
|
|
37
|
-
|------|-------|-----|
|
|
38
|
-
| Database | NEVER | Use test DB or in-memory |
|
|
39
|
-
| Cache | NEVER | Use isolated test instance |
|
|
40
|
-
| External APIs | YES | Real calls = flaky + expensive |
|
|
41
|
-
| Time/Date | YES | Determinism |
|
|
42
|
-
|
|
43
|
-
**Mocks MUST come from REAL captured data:**
|
|
44
|
-
- Capture real API response
|
|
45
|
-
- Save to your fixtures directory (Claude will discover where yours is, e.g., `tests/fixtures/`, `test-data/`, etc.)
|
|
46
|
-
- Import in tests
|
|
47
|
-
- Never guess mock shapes!
|
|
48
|
-
|
|
49
|
-
## TDD Tests Must PROVE
|
|
50
|
-
|
|
51
|
-
| Phase | What It Proves |
|
|
52
|
-
|-------|----------------|
|
|
53
|
-
| RED | Test FAILS -> Bug exists or feature missing |
|
|
54
|
-
| GREEN | Test PASSES -> Fix works or feature implemented |
|
|
55
|
-
| Forever | Regression protection |
|
|
56
|
-
|
|
57
|
-
**WRONG approach:**
|
|
58
|
-
```
|
|
59
|
-
// Writing test that passes with current (buggy) code
|
|
60
|
-
assert currentBuggyBehavior == currentBuggyBehavior // pseudocode
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
**CORRECT approach:**
|
|
64
|
-
```
|
|
65
|
-
// Writing test that FAILS with buggy code, PASSES with fix
|
|
66
|
-
assert result.status == 'success' // pseudocode - adapt to your framework
|
|
67
|
-
assert result.data != null
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
## Unit Tests = Pure Logic ONLY
|
|
71
|
-
|
|
72
|
-
A function qualifies for unit testing ONLY if:
|
|
73
|
-
- No database calls
|
|
74
|
-
- No external API calls
|
|
75
|
-
- No file system access
|
|
76
|
-
- No cache calls
|
|
77
|
-
- Input -> Output transformation only
|
|
78
|
-
|
|
79
|
-
Everything else needs integration tests.
|
|
80
|
-
|
|
81
|
-
## When Stuck on Tests
|
|
82
|
-
|
|
83
|
-
1. Add console.logs -> Check output
|
|
84
|
-
2. Run single test in isolation
|
|
85
|
-
3. Check fixtures match real API
|
|
86
|
-
4. **STILL stuck?** ASK USER
|
|
87
|
-
|
|
88
|
-
## After Session (Capture Learnings)
|
|
89
|
-
|
|
90
|
-
If this session revealed testing insights, update the right place:
|
|
91
|
-
- **Testing patterns, gotchas** -> `TESTING.md`
|
|
92
|
-
- **Feature-specific test quirks** -> Feature docs (`*_PLAN.md`)
|
|
93
|
-
- **General project context** -> `CLAUDE.md` (or `/revise-claude-md`)
|
|
94
|
-
|
|
95
|
-
---
|
|
96
|
-
|
|
97
|
-
**Full reference:** TESTING.md
|