agentic-sdlc-wizard 1.23.0 → 1.25.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/.claude-plugin/marketplace.json +24 -0
- package/.claude-plugin/plugin.json +12 -0
- package/CHANGELOG.md +31 -0
- package/CLAUDE_CODE_SDLC_WIZARD.md +104 -19
- package/README.md +27 -2
- package/cli/init.js +14 -11
- package/cli/templates/settings.json +1 -0
- package/hooks/hooks.json +37 -0
- package/hooks/instructions-loaded-check.sh +66 -0
- package/{cli/templates/hooks → hooks}/sdlc-prompt-check.sh +1 -1
- package/{cli/templates/hooks → hooks}/tdd-pretool-check.sh +0 -0
- package/package.json +4 -1
- package/{cli/templates/skills → skills}/sdlc/SKILL.md +35 -14
- package/{cli/templates/skills → skills}/setup/SKILL.md +10 -0
- package/{cli/templates/skills → skills}/update/SKILL.md +5 -6
- package/cli/templates/hooks/instructions-loaded-check.sh +0 -35
- /package/{cli/templates/skills → skills}/feedback/SKILL.md +0 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "sdlc-wizard-marketplace",
|
|
3
|
+
"owner": {
|
|
4
|
+
"name": "Stefan Ayala",
|
|
5
|
+
"email": "stefan@baseinfinity.dev"
|
|
6
|
+
},
|
|
7
|
+
"metadata": {
|
|
8
|
+
"description": "SDLC enforcement plugins for AI-assisted development",
|
|
9
|
+
"version": "1.0.0"
|
|
10
|
+
},
|
|
11
|
+
"plugins": [
|
|
12
|
+
{
|
|
13
|
+
"name": "sdlc-wizard",
|
|
14
|
+
"source": ".",
|
|
15
|
+
"description": "SDLC enforcement for AI agents — TDD, planning, self-review, CI shepherd",
|
|
16
|
+
"version": "1.25.0",
|
|
17
|
+
"author": {
|
|
18
|
+
"name": "Stefan Ayala"
|
|
19
|
+
},
|
|
20
|
+
"category": "productivity",
|
|
21
|
+
"tags": ["sdlc", "tdd", "code-quality", "testing"]
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "sdlc-wizard",
|
|
3
|
+
"version": "1.25.0",
|
|
4
|
+
"description": "SDLC enforcement for AI agents — TDD, planning, self-review, CI shepherd",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Stefan Ayala",
|
|
7
|
+
"url": "https://github.com/BaseInfinity"
|
|
8
|
+
},
|
|
9
|
+
"repository": "https://github.com/BaseInfinity/agentic-ai-sdlc-wizard",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"keywords": ["sdlc", "tdd", "code-quality", "ai-agent", "developer-tools"]
|
|
12
|
+
}
|
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,37 @@ All notable changes to the SDLC Wizard.
|
|
|
4
4
|
|
|
5
5
|
> **Note:** This changelog is for humans to read. Don't manually apply these changes - just run the wizard ("Check for SDLC wizard updates") and it handles everything automatically.
|
|
6
6
|
|
|
7
|
+
## [1.25.0] - 2026-04-04
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
- Claude Code plugin format — single source of truth: `skills/` and `hooks/` at repo root serve plugin + CLI. `.claude-plugin/plugin.json` manifest, `hooks/hooks.json` with `${CLAUDE_PLUGIN_ROOT}`, `.claude-plugin/marketplace.json` for self-hosted marketplace. Absorbs #66 + #87 (#89)
|
|
11
|
+
- 6 distribution channels — npm, plugin, curl install script, Homebrew tap, gh CLI extension, GitHub Releases (#90)
|
|
12
|
+
- `install.sh` curl-pipeable installer — download guard, strict mode, Node.js >= 18 check, `--global` flag, terminal-aware colors. 20 tests (structural + integration)
|
|
13
|
+
- `.github/workflows/release.yml` — tag-push automation with npm publish --provenance (SLSA), GitHub Release via softprops/action-gh-release@v2. 14 tests
|
|
14
|
+
- External repos: `BaseInfinity/homebrew-sdlc-wizard` (Homebrew tap), `BaseInfinity/gh-sdlc-wizard` (gh CLI extension)
|
|
15
|
+
- 25 plugin format tests, 34 distribution tests (20 install + 14 release workflow)
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
- CI shepherd: enforce reading CI logs on pass AND fail (not just failures). Pre-release CI audit across merged PRs added to release planning gate
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
- CLI `init.js` reads skills/hooks from repo root (single source, no duplication)
|
|
22
|
+
- Dogfood `.claude/` uses symlinks to root skills/hooks
|
|
23
|
+
- README: added curl, Homebrew, gh extension, GitHub install methods
|
|
24
|
+
- CI_CD.md: added release.yml documentation + NPM_TOKEN secret
|
|
25
|
+
|
|
26
|
+
## [1.24.0] - 2026-04-04
|
|
27
|
+
|
|
28
|
+
### Added
|
|
29
|
+
- Hook `if` conditionals — CC v2.1.85+ `if` field on PreToolUse hook. TDD check only spawns for source files (repo: `.github/workflows/*`, template: `src/**`). Documented in wizard CC features section with matcher-vs-if comparison table (#68)
|
|
30
|
+
- Autocompact tuning guidance — `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE` and `CLAUDE_CODE_AUTO_COMPACT_WINDOW` env vars with community-recommended thresholds (75% for 200K, 30% for 1M). 1M vs 200K context window comparison table. Setup wizard Step 9.5 for context window configuration (#88)
|
|
31
|
+
- 6 hook tests for `if` field (52 total hook tests)
|
|
32
|
+
- 5 autocompact/context tests (70 total self-update tests)
|
|
33
|
+
|
|
34
|
+
### Fixed
|
|
35
|
+
- E2E tdd_red detection — three bugs since inception: test-only scenarios scored 0 (missing elif branch), golden outputs were .txt not JSON, golden-scores.json encoded the bug it was meant to catch. Codex cross-model review caught regex false-positive + missing JSON pairing (#86)
|
|
36
|
+
- 29 deterministic + 9 regression tests for tdd_red fix
|
|
37
|
+
|
|
7
38
|
## [1.23.0] - 2026-04-01
|
|
8
39
|
|
|
9
40
|
### Added
|
|
@@ -338,6 +338,29 @@ Skills can now reference companion files using `${CLAUDE_SKILL_DIR}`. Useful if
|
|
|
338
338
|
|
|
339
339
|
Hook events now include `agent_id` and `agent_type` fields. Hooks can behave differently for subagents vs the main agent if needed.
|
|
340
340
|
|
|
341
|
+
### Hook `if` Conditionals (v2.1.85+)
|
|
342
|
+
|
|
343
|
+
The `if` field on individual hook handlers filters by tool name AND arguments using permission rule syntax. The hook process only spawns when the condition matches — reducing unnecessary process spawns.
|
|
344
|
+
|
|
345
|
+
```json
|
|
346
|
+
{
|
|
347
|
+
"type": "command",
|
|
348
|
+
"if": "Write(src/**) Edit(src/**) MultiEdit(src/**)",
|
|
349
|
+
"command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/tdd-pretool-check.sh"
|
|
350
|
+
}
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
| Field | Level | Matches On | Syntax |
|
|
354
|
+
|-------|-------|------------|--------|
|
|
355
|
+
| `matcher` | Group (all hooks in array) | Tool name only | Regex (`Write\|Edit`) |
|
|
356
|
+
| `if` | Individual handler | Tool name + arguments | Permission rule (`Edit(src/**)`) |
|
|
357
|
+
|
|
358
|
+
**Pattern examples:** `Edit(*.ts)`, `Write(src/**)`, `Bash(git *)`. Same syntax as `allowedTools` in settings.json.
|
|
359
|
+
|
|
360
|
+
**Only works on tool-use events:** `PreToolUse`, `PostToolUse`, `PostToolUseFailure`. Adding `if` to non-tool events prevents the hook from running.
|
|
361
|
+
|
|
362
|
+
**CUSTOMIZE:** Replace `src/**` with your source directory pattern. The wizard generates this based on your project structure detected in Step 0.4.
|
|
363
|
+
|
|
341
364
|
### Security Hardening (v2.1.49-v2.1.78)
|
|
342
365
|
|
|
343
366
|
Several fixes that strengthen wizard enforcement:
|
|
@@ -693,12 +716,66 @@ Two tools for managing context — use the right one:
|
|
|
693
716
|
- `/clear` after 2+ failed corrections on the same issue (context is polluted with bad approaches — start fresh with a better prompt)
|
|
694
717
|
- After committing a PR, `/clear` before starting the next feature
|
|
695
718
|
|
|
696
|
-
**Auto-compact** fires automatically at ~95% context capacity.
|
|
719
|
+
**Auto-compact** fires automatically at ~95% context capacity. Claude Code handles this by default — but the default threshold may not be ideal for all use cases (see "Autocompact Tuning" below). The SDLC skill suggests `/compact` during CI idle time as a "context GC" opportunity.
|
|
697
720
|
|
|
698
721
|
**What survives `/compact`:** Key decisions, code changes, task state (as a summary). What can be lost: detailed early-conversation instructions not in CLAUDE.md, specific file contents read long ago.
|
|
699
722
|
|
|
700
723
|
**Best practice:** Put persistent instructions in CLAUDE.md (survives both `/compact` and `/clear`), not in conversation.
|
|
701
724
|
|
|
725
|
+
### Autocompact Tuning
|
|
726
|
+
|
|
727
|
+
Override the default auto-compact threshold with environment variables. These are community-discovered settings referenced in upstream issues ([#34332](https://github.com/anthropics/claude-code/issues/34332), [#42375](https://github.com/anthropics/claude-code/issues/42375)) — not yet officially documented by Anthropic:
|
|
728
|
+
|
|
729
|
+
| Variable | What It Does | Default |
|
|
730
|
+
|----------|-------------|---------|
|
|
731
|
+
| `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE` | Trigger compaction at this % of context capacity (1-100) | ~95% |
|
|
732
|
+
| `CLAUDE_CODE_AUTO_COMPACT_WINDOW` | Override context capacity in tokens (useful for 1M models) | Model default |
|
|
733
|
+
|
|
734
|
+
Set these in your shell profile (`~/.bashrc`, `~/.zshrc`) or per-project `.envrc`:
|
|
735
|
+
|
|
736
|
+
```bash
|
|
737
|
+
# Example: compact earlier on a 200K model
|
|
738
|
+
export CLAUDE_AUTOCOMPACT_PCT_OVERRIDE=75
|
|
739
|
+
```
|
|
740
|
+
|
|
741
|
+
**Community-recommended thresholds by use case:**
|
|
742
|
+
|
|
743
|
+
| Use Case | AUTOCOMPACT % | Why |
|
|
744
|
+
|----------|--------------|-----|
|
|
745
|
+
| General development (200K) | 75% | Leaves room for implementation after planning |
|
|
746
|
+
| Complex refactors (200K) | 80% | Slightly more context before compaction |
|
|
747
|
+
| CI pipelines | 60% | Short tasks, compact early to stay fast |
|
|
748
|
+
| 1M context model | 30% | See "1M vs 200K" below — 95% on 1M wastes budget |
|
|
749
|
+
| Short tasks | 60-70% | Less context needed, compact early |
|
|
750
|
+
|
|
751
|
+
**Important:** Values above the default ~95% threshold have no effect — you can only trigger compaction *earlier*, not later. Noise (progress ticks, thinking blocks, stale reads) makes up 50-70% of session tokens, so threshold tuning matters less than noise reduction (scoped reads, subagents, `/compact` between phases).
|
|
752
|
+
|
|
753
|
+
**Note:** These env vars may change as Claude Code evolves. Check [Claude Code settings docs](https://docs.anthropic.com/en/docs/claude-code/settings) for the latest supported configuration.
|
|
754
|
+
|
|
755
|
+
### 1M vs 200K Context Window
|
|
756
|
+
|
|
757
|
+
Claude Code supports both 200K and 1M context windows. Choose based on your task:
|
|
758
|
+
|
|
759
|
+
| | 200K Context | 1M Context |
|
|
760
|
+
|---|---|---|
|
|
761
|
+
| **Best for** | Normal SDLC cycles (plan → TDD → review) | Multi-feature releases, deep codebase exploration |
|
|
762
|
+
| **Typical usage** | 50-80K tokens per task | 200K+ tokens for complex workflows |
|
|
763
|
+
| **Cost** | Lower total cost per session | ~5x more tokens consumed (cost scales linearly) |
|
|
764
|
+
| **Auto-compact** | Default 95% works well | Reported to fire at ~76K ([issue #34332](https://github.com/anthropics/claude-code/issues/34332)) |
|
|
765
|
+
| **Suggested override** | `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE=75` | `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE=30` or `CLAUDE_CODE_AUTO_COMPACT_WINDOW=400000` |
|
|
766
|
+
|
|
767
|
+
**Default to 200K.** Normal SDLC tasks (single feature, bug fix, refactor) rarely exceed 80K tokens. The 200K window handles this with room to spare.
|
|
768
|
+
|
|
769
|
+
**Switch to 1M when:**
|
|
770
|
+
- Implementing multiple related features in one session
|
|
771
|
+
- Deep research across a large codebase (reading 20+ files)
|
|
772
|
+
- Multi-agent workflows that accumulate context
|
|
773
|
+
- Complex debugging sessions that need full history
|
|
774
|
+
|
|
775
|
+
**Cost awareness:** No per-token premium since March 2026, but total cost scales linearly with context consumed. A 900K-token session costs ~$4.50 in input alone. Use `/cost` to monitor.
|
|
776
|
+
|
|
777
|
+
**1M autocompact workaround:** On 1M models, the default auto-compact has been reported to fire too early (~76K, per [issue #34332](https://github.com/anthropics/claude-code/issues/34332)). Community workaround: set `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE=30` or `CLAUDE_CODE_AUTO_COMPACT_WINDOW=400000` to use more of the window.
|
|
778
|
+
|
|
702
779
|
---
|
|
703
780
|
|
|
704
781
|
## Example Workflow (End-to-End)
|
|
@@ -1059,8 +1136,10 @@ Feature branches still recommended for solo devs (keeps main clean, easy rollbac
|
|
|
1059
1136
|
- **No** → Skip CI shepherd entirely (Claude still runs local tests, just doesn't interact with CI after pushing)
|
|
1060
1137
|
|
|
1061
1138
|
**What the CI shepherd does:**
|
|
1062
|
-
1. **CI fix loop:** After pushing, Claude watches CI via `gh pr checks`, reads
|
|
1063
|
-
2. **
|
|
1139
|
+
1. **CI fix loop:** After pushing, Claude watches CI via `gh pr checks`, reads logs on **pass and fail** (`gh run view <RUN_ID> --log`, not just `--log-failed`), diagnoses and fixes failures, pushes again (max 2 attempts)
|
|
1140
|
+
2. **Log review on pass:** Passing CI can still hide warnings, skipped steps, degraded scores, or silent test exclusions. A green checkmark is necessary but not sufficient — always read the logs
|
|
1141
|
+
3. **Review feedback loop:** After CI passes and logs look clean, Claude reads automated review comments, implements valid suggestions, pushes and re-reviews (max 3 iterations)
|
|
1142
|
+
4. **Pre-release CI audit:** Before cutting any release, review CI runs across ALL PRs merged since last release. Look for warnings in passing runs, degraded scores, skipped suites. Use `gh run list` + `gh run view <ID> --log`
|
|
1064
1143
|
|
|
1065
1144
|
**Recommendation:** Yes if you have CI configured. The shepherd closes the loop between "local tests pass" and "PR is actually ready to merge."
|
|
1066
1145
|
|
|
@@ -1127,7 +1206,7 @@ Claude scans for:
|
|
|
1127
1206
|
├── Test frameworks: detected from config files and test patterns
|
|
1128
1207
|
├── Lint/format tools: from config files
|
|
1129
1208
|
├── CI/CD: .github/workflows/, .gitlab-ci.yml, etc.
|
|
1130
|
-
├── Feature docs: *
|
|
1209
|
+
├── Feature docs: *_DOCS.md, docs/features/, docs/decisions/
|
|
1131
1210
|
├── README, CLAUDE.md, ARCHITECTURE.md
|
|
1132
1211
|
│
|
|
1133
1212
|
├── Deployment targets (for ARCHITECTURE.md environments):
|
|
@@ -1544,6 +1623,7 @@ Create `.claude/settings.json`:
|
|
|
1544
1623
|
"hooks": [
|
|
1545
1624
|
{
|
|
1546
1625
|
"type": "command",
|
|
1626
|
+
"if": "Write(src/**) Edit(src/**) MultiEdit(src/**)",
|
|
1547
1627
|
"command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/tdd-pretool-check.sh"
|
|
1548
1628
|
}
|
|
1549
1629
|
]
|
|
@@ -1595,7 +1675,7 @@ The `allowedTools` array is auto-generated based on your stack detected in Step
|
|
|
1595
1675
|
| Hook | When It Fires | Purpose |
|
|
1596
1676
|
|------|---------------|---------|
|
|
1597
1677
|
| `UserPromptSubmit` | Every message you send | Baseline SDLC reminder, skill auto-invoke |
|
|
1598
|
-
| `PreToolUse` | Before Claude edits files | TDD check: "Did you write the test first?" |
|
|
1678
|
+
| `PreToolUse` | Before Claude edits files | TDD check: "Did you write the test first?" Uses `if` field to only fire on source files |
|
|
1599
1679
|
|
|
1600
1680
|
### How Skill Auto-Invoke Works
|
|
1601
1681
|
|
|
@@ -1646,7 +1726,7 @@ Workflow phases:
|
|
|
1646
1726
|
3. Implementation (TDD after compact)
|
|
1647
1727
|
4. SELF-REVIEW (/code-review) → BEFORE presenting to user
|
|
1648
1728
|
|
|
1649
|
-
Quick refs: SDLC.md | TESTING.md | *
|
|
1729
|
+
Quick refs: SDLC.md | TESTING.md | *_DOCS.md for feature
|
|
1650
1730
|
EOF
|
|
1651
1731
|
```
|
|
1652
1732
|
|
|
@@ -1729,7 +1809,7 @@ TodoWrite([
|
|
|
1729
1809
|
{ content: "Present approach + STATE CONFIDENCE LEVEL", status: "pending", activeForm: "Presenting approach" },
|
|
1730
1810
|
{ content: "Signal ready - user exits plan mode", status: "pending", activeForm: "Awaiting plan approval" },
|
|
1731
1811
|
// TRANSITION PHASE (After plan mode, before compact)
|
|
1732
|
-
{ content: "Doc sync: update feature docs
|
|
1812
|
+
{ content: "Doc sync: update or create feature docs — MUST be current before commit", status: "pending", activeForm: "Syncing feature docs" },
|
|
1733
1813
|
{ content: "Request /compact before TDD", status: "pending", activeForm: "Requesting compact" },
|
|
1734
1814
|
// IMPLEMENTATION PHASE (After compact)
|
|
1735
1815
|
{ content: "TDD RED: Write failing test FIRST", status: "pending", activeForm: "Writing failing test" },
|
|
@@ -1786,7 +1866,7 @@ TodoWrite([
|
|
|
1786
1866
|
|
|
1787
1867
|
**Workflow:**
|
|
1788
1868
|
1. **Plan Mode** (editing blocked): Research → Write plan file → Present approach + confidence
|
|
1789
|
-
2. **Transition** (after approval): Doc sync (update feature docs
|
|
1869
|
+
2. **Transition** (after approval): Doc sync (update or create feature docs — MUST be current before commit) → Request /compact
|
|
1790
1870
|
3. **Implementation** (after compact): TDD RED → GREEN → PASS
|
|
1791
1871
|
|
|
1792
1872
|
**Before TDD, MUST ask:** "Docs updated. Run `/compact` before implementation?"
|
|
@@ -2286,10 +2366,10 @@ Create `CLAUDE.md` in your project root. This is your project-specific configura
|
|
|
2286
2366
|
- Follow conventional commits: `type(scope): description`
|
|
2287
2367
|
- NEVER commit with failing tests
|
|
2288
2368
|
|
|
2289
|
-
##
|
|
2369
|
+
## Feature Docs
|
|
2290
2370
|
|
|
2291
|
-
- Before coding a feature: READ its `*
|
|
2292
|
-
- After completing work: UPDATE the
|
|
2371
|
+
- Before coding a feature: READ its `*_DOCS.md` file
|
|
2372
|
+
- After completing work: UPDATE the feature doc (or create one if 3+ files touched)
|
|
2293
2373
|
|
|
2294
2374
|
## Testing Notes
|
|
2295
2375
|
|
|
@@ -2417,7 +2497,7 @@ If deployment fails or post-deploy verification catches issues:
|
|
|
2417
2497
|
|
|
2418
2498
|
**SDLC.md:**
|
|
2419
2499
|
```markdown
|
|
2420
|
-
<!-- SDLC Wizard Version: 1.
|
|
2500
|
+
<!-- SDLC Wizard Version: 1.25.0 -->
|
|
2421
2501
|
<!-- Setup Date: [DATE] -->
|
|
2422
2502
|
<!-- Completed Steps: step-0.1, step-0.2, step-0.4, step-1, step-2, step-3, step-4, step-5, step-6, step-7, step-8, step-9 -->
|
|
2423
2503
|
<!-- Git Workflow: [PRs or Solo] -->
|
|
@@ -2741,7 +2821,7 @@ Want me to file these? (yes/no/not now)
|
|
|
2741
2821
|
|
|
2742
2822
|
| Learning Type | Update Where |
|
|
2743
2823
|
|---------------|--------------|
|
|
2744
|
-
| Feature-specific gotchas, decisions | Feature docs (`*
|
|
2824
|
+
| Feature-specific gotchas, decisions | Feature docs (`*_DOCS.md`, e.g., `AUTH_DOCS.md`) |
|
|
2745
2825
|
| Testing patterns, gotchas | `TESTING.md` |
|
|
2746
2826
|
| Architecture decisions | `ARCHITECTURE.md` |
|
|
2747
2827
|
| Commands, general project context | `CLAUDE.md` (or `/revise-claude-md`) |
|
|
@@ -2760,14 +2840,16 @@ Want me to file these? (yes/no/not now)
|
|
|
2760
2840
|
|
|
2761
2841
|
### Feature Documentation
|
|
2762
2842
|
|
|
2763
|
-
|
|
2843
|
+
Feature docs are living documents — the single source of truth for each feature, kept current just like `TESTING.md` and `ARCHITECTURE.md`. Use `*_DOCS.md` as the standard pattern:
|
|
2764
2844
|
|
|
2765
2845
|
| Pattern | When to Use | Example |
|
|
2766
2846
|
|---------|-------------|---------|
|
|
2767
|
-
| `*
|
|
2847
|
+
| `*_DOCS.md` | Per-feature living docs (primary) | `AUTH_DOCS.md`, `PAYMENTS_DOCS.md`, `SEARCH_DOCS.md` |
|
|
2768
2848
|
| `docs/decisions/NNN-title.md` (ADR) | Architecture decisions that need rationale | `docs/decisions/001-use-postgres.md` |
|
|
2769
2849
|
| `docs/features/name.md` | Feature docs in a `docs/` directory | `docs/features/auth.md` |
|
|
2770
2850
|
|
|
2851
|
+
**When to create a feature doc:** If a feature touches 3+ files and no `*_DOCS.md` exists, create one. Keep it simple — what the feature does, key decisions, gotchas. The doc grows with the feature over time.
|
|
2852
|
+
|
|
2771
2853
|
**Feature doc template:**
|
|
2772
2854
|
|
|
2773
2855
|
```markdown
|
|
@@ -2806,12 +2888,14 @@ What are the trade-offs? What becomes easier/harder?
|
|
|
2806
2888
|
|
|
2807
2889
|
Store ADRs in `docs/decisions/`. Number sequentially. Claude reads these during planning to understand why things are built the way they are.
|
|
2808
2890
|
|
|
2809
|
-
**Keeping docs in sync with code:**
|
|
2891
|
+
**Keeping docs in sync with code (REQUIRED):**
|
|
2810
2892
|
|
|
2811
|
-
Docs
|
|
2893
|
+
Docs MUST be current before commit. Stale docs mislead future sessions, waste tokens, and cause wrong implementations. The SDLC skill enforces this:
|
|
2812
2894
|
|
|
2813
2895
|
- During planning, Claude reads feature docs for the area being changed
|
|
2814
|
-
- If the code change contradicts what the doc says
|
|
2896
|
+
- If the code change contradicts what the doc says → MUST update the doc
|
|
2897
|
+
- If the code change extends documented behavior → MUST add to the doc
|
|
2898
|
+
- If a `ROADMAP.md` exists → update it (mark items done, add new items). ROADMAP feeds CHANGELOG — keeping it current means releases write themselves
|
|
2815
2899
|
- The "After Session" step routes learnings to the right doc
|
|
2816
2900
|
- Plan files get closed out — if the session's work came from a plan, it gets deleted or marked complete so future sessions aren't misled
|
|
2817
2901
|
- Stale docs cause low confidence — if Claude struggles, the doc may need updating
|
|
@@ -3158,6 +3242,7 @@ Claude writes code → self-review passes → handoff.json (round 1)
|
|
|
3158
3242
|
- `-c 'model_reasoning_effort="xhigh"'` — Maximum reasoning depth. This is where you get the most value. Testing showed `xhigh` caught 3 findings that `high` missed on the same content.
|
|
3159
3243
|
- `-s danger-full-access` — Full filesystem read/write so the reviewer can read your actual code.
|
|
3160
3244
|
- `-o .reviews/latest-review.md` — Save the review output for Claude to read back.
|
|
3245
|
+
- **Claude Code sandbox bypass required:** Codex's Rust binary needs access to macOS system configuration APIs (`SCDynamicStore`) during initialization. Claude Code's sandbox blocks this, causing `codex exec` to crash with `panicked: Attempted to create a NULL object`. When running from within Claude Code, use `dangerouslyDisableSandbox: true` on the Bash tool call. This only bypasses CC's sandbox for the Codex process — Codex's own sandbox (`-s danger-full-access`) still applies. Known issue: [openai/codex#15640](https://github.com/openai/codex/issues/5914).
|
|
3161
3246
|
|
|
3162
3247
|
**Tool-agnostic principle:** The core idea is "use a different model as an independent reviewer." Codex CLI is the concrete example today, but any competing AI tool that can read files and produce structured feedback works. The value comes from the independence and different training, not the specific tool.
|
|
3163
3248
|
|
|
@@ -3329,7 +3414,7 @@ Walk through updates? (y/n)
|
|
|
3329
3414
|
Store wizard state in `SDLC.md` as metadata comments (invisible to readers, parseable by Claude):
|
|
3330
3415
|
|
|
3331
3416
|
```markdown
|
|
3332
|
-
<!-- SDLC Wizard Version: 1.
|
|
3417
|
+
<!-- SDLC Wizard Version: 1.25.0 -->
|
|
3333
3418
|
<!-- Setup Date: 2026-01-24 -->
|
|
3334
3419
|
<!-- Completed Steps: step-0.1, step-0.2, step-1, step-2, step-3, step-4, step-5, step-6, step-7, step-8, step-9 -->
|
|
3335
3420
|
<!-- Git Workflow: PRs -->
|
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
A **self-evolving Software Development Life Cycle (SDLC) enforcement system for AI coding agents**. Makes Claude plan before coding, test before shipping, and ask when uncertain. Measures itself getting better over time.
|
|
4
4
|
|
|
5
|
+
**Built on 15+ years of SDET and QA engineering experience** — battle-tested patterns from real production systems, baked into an AI agent that follows tried-and-true software quality practices so you don't have to enforce them manually.
|
|
6
|
+
|
|
5
7
|
## Install
|
|
6
8
|
|
|
7
9
|
**Requires [Claude Code](https://docs.anthropic.com/en/docs/claude-code/overview)** (Anthropic's CLI for Claude).
|
|
@@ -15,11 +17,34 @@ Then start (or restart) Claude Code — type `/exit` then `claude` to reload hoo
|
|
|
15
17
|
<details>
|
|
16
18
|
<summary>Alternative install methods</summary>
|
|
17
19
|
|
|
18
|
-
**
|
|
20
|
+
**curl (no npm install needed):**
|
|
21
|
+
```bash
|
|
22
|
+
curl -fsSL https://raw.githubusercontent.com/BaseInfinity/agentic-ai-sdlc-wizard/main/install.sh | bash
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
**Homebrew:**
|
|
26
|
+
```bash
|
|
27
|
+
brew install BaseInfinity/sdlc-wizard/sdlc-wizard
|
|
28
|
+
sdlc-wizard init
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
**GitHub CLI extension:**
|
|
32
|
+
```bash
|
|
33
|
+
gh extension install BaseInfinity/gh-sdlc-wizard
|
|
34
|
+
gh sdlc-wizard init
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**From GitHub (no npm registry needed):**
|
|
19
38
|
```bash
|
|
20
39
|
npx github:BaseInfinity/agentic-ai-sdlc-wizard init
|
|
21
40
|
```
|
|
22
41
|
|
|
42
|
+
**Install CLI globally:**
|
|
43
|
+
```bash
|
|
44
|
+
npm install -g agentic-sdlc-wizard
|
|
45
|
+
sdlc-wizard init
|
|
46
|
+
```
|
|
47
|
+
|
|
23
48
|
**Manual:** Download `CLAUDE_CODE_SDLC_WIZARD.md` to your project and tell Claude `Run the SDLC wizard setup`.
|
|
24
49
|
</details>
|
|
25
50
|
|
|
@@ -204,7 +229,7 @@ This isn't the only Claude Code SDLC tool. Here's an honest comparison:
|
|
|
204
229
|
| Document | What It Covers |
|
|
205
230
|
|----------|---------------|
|
|
206
231
|
| [ARCHITECTURE.md](ARCHITECTURE.md) | System design, 5-layer diagram, data flows, file structure |
|
|
207
|
-
| [CI_CD.md](CI_CD.md) | All
|
|
232
|
+
| [CI_CD.md](CI_CD.md) | All 5 workflows, E2E scoring, tier system, SDP, integrity checks |
|
|
208
233
|
| [SDLC.md](SDLC.md) | Version tracking, enforcement rules, SDLC configuration |
|
|
209
234
|
| [TESTING.md](TESTING.md) | Testing philosophy, test diamond, TDD approach |
|
|
210
235
|
| [CHANGELOG.md](CHANGELOG.md) | Version history, what changed and when |
|
package/cli/init.js
CHANGED
|
@@ -11,18 +11,21 @@ const YELLOW = '\x1b[33m';
|
|
|
11
11
|
const MAGENTA = '\x1b[35m';
|
|
12
12
|
const CYAN = '\x1b[36m';
|
|
13
13
|
|
|
14
|
+
const REPO_ROOT = path.join(__dirname, '..');
|
|
14
15
|
const TEMPLATES_DIR = path.join(__dirname, 'templates');
|
|
15
|
-
const WIZARD_DOC = path.join(
|
|
16
|
+
const WIZARD_DOC = path.join(REPO_ROOT, 'CLAUDE_CODE_SDLC_WIZARD.md');
|
|
16
17
|
|
|
18
|
+
// Skills and hooks live at repo root (single source of truth for both plugin and CLI)
|
|
19
|
+
// Only settings.json remains in cli/templates/ (CLI-specific hook config)
|
|
17
20
|
const FILES = [
|
|
18
|
-
{ src: 'settings.json', dest: '.claude/settings.json' },
|
|
19
|
-
{ src: 'hooks/sdlc-prompt-check.sh', dest: '.claude/hooks/sdlc-prompt-check.sh', executable: true },
|
|
20
|
-
{ src: 'hooks/tdd-pretool-check.sh', dest: '.claude/hooks/tdd-pretool-check.sh', executable: true },
|
|
21
|
-
{ src: 'hooks/instructions-loaded-check.sh', dest: '.claude/hooks/instructions-loaded-check.sh', executable: true },
|
|
22
|
-
{ src: 'skills/sdlc/SKILL.md', dest: '.claude/skills/sdlc/SKILL.md' },
|
|
23
|
-
{ src: 'skills/setup/SKILL.md', dest: '.claude/skills/setup/SKILL.md' },
|
|
24
|
-
{ src: 'skills/update/SKILL.md', dest: '.claude/skills/update/SKILL.md' },
|
|
25
|
-
{ src: 'skills/feedback/SKILL.md', dest: '.claude/skills/feedback/SKILL.md' },
|
|
21
|
+
{ src: 'settings.json', dest: '.claude/settings.json', base: TEMPLATES_DIR },
|
|
22
|
+
{ src: 'hooks/sdlc-prompt-check.sh', dest: '.claude/hooks/sdlc-prompt-check.sh', executable: true, base: REPO_ROOT },
|
|
23
|
+
{ src: 'hooks/tdd-pretool-check.sh', dest: '.claude/hooks/tdd-pretool-check.sh', executable: true, base: REPO_ROOT },
|
|
24
|
+
{ src: 'hooks/instructions-loaded-check.sh', dest: '.claude/hooks/instructions-loaded-check.sh', executable: true, base: REPO_ROOT },
|
|
25
|
+
{ src: 'skills/sdlc/SKILL.md', dest: '.claude/skills/sdlc/SKILL.md', base: REPO_ROOT },
|
|
26
|
+
{ src: 'skills/setup/SKILL.md', dest: '.claude/skills/setup/SKILL.md', base: REPO_ROOT },
|
|
27
|
+
{ src: 'skills/update/SKILL.md', dest: '.claude/skills/update/SKILL.md', base: REPO_ROOT },
|
|
28
|
+
{ src: 'skills/feedback/SKILL.md', dest: '.claude/skills/feedback/SKILL.md', base: REPO_ROOT },
|
|
26
29
|
];
|
|
27
30
|
|
|
28
31
|
const WIZARD_HOOK_MARKERS = FILES
|
|
@@ -80,7 +83,7 @@ function planOperations(targetDir, { force }) {
|
|
|
80
83
|
|
|
81
84
|
for (const file of FILES) {
|
|
82
85
|
const destPath = path.join(targetDir, file.dest);
|
|
83
|
-
const srcPath = path.join(TEMPLATES_DIR, file.src);
|
|
86
|
+
const srcPath = path.join(file.base || TEMPLATES_DIR, file.src);
|
|
84
87
|
const exists = fs.existsSync(destPath);
|
|
85
88
|
|
|
86
89
|
if (exists && file.dest === '.claude/settings.json') {
|
|
@@ -245,7 +248,7 @@ function check(targetDir, { json = false } = {}) {
|
|
|
245
248
|
|
|
246
249
|
for (const file of FILES) {
|
|
247
250
|
const destPath = path.join(targetDir, file.dest);
|
|
248
|
-
const srcPath = path.join(TEMPLATES_DIR, file.src);
|
|
251
|
+
const srcPath = path.join(file.base || TEMPLATES_DIR, file.src);
|
|
249
252
|
results.push(checkFile(srcPath, destPath, file.dest, file.executable || false));
|
|
250
253
|
}
|
|
251
254
|
|
package/hooks/hooks.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "SDLC Wizard enforcement hooks",
|
|
3
|
+
"hooks": {
|
|
4
|
+
"UserPromptSubmit": [
|
|
5
|
+
{
|
|
6
|
+
"hooks": [
|
|
7
|
+
{
|
|
8
|
+
"type": "command",
|
|
9
|
+
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/sdlc-prompt-check.sh"
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"PreToolUse": [
|
|
15
|
+
{
|
|
16
|
+
"matcher": "Write|Edit|MultiEdit",
|
|
17
|
+
"hooks": [
|
|
18
|
+
{
|
|
19
|
+
"type": "command",
|
|
20
|
+
"if": "Write(src/**) Edit(src/**) MultiEdit(src/**)",
|
|
21
|
+
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/tdd-pretool-check.sh"
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"InstructionsLoaded": [
|
|
27
|
+
{
|
|
28
|
+
"hooks": [
|
|
29
|
+
{
|
|
30
|
+
"type": "command",
|
|
31
|
+
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/instructions-loaded-check.sh"
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# InstructionsLoaded hook - validates SDLC files exist at session start
|
|
3
|
+
# Fires when Claude loads instructions (session start/resume)
|
|
4
|
+
# Available since Claude Code v2.1.69
|
|
5
|
+
# Note: no set -e — this hook must always exit 0 to not block session start
|
|
6
|
+
|
|
7
|
+
PROJECT_DIR="${CLAUDE_PROJECT_DIR:-.}"
|
|
8
|
+
MISSING=""
|
|
9
|
+
|
|
10
|
+
if [ ! -f "$PROJECT_DIR/SDLC.md" ]; then
|
|
11
|
+
MISSING="${MISSING:+${MISSING}, }SDLC.md"
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
if [ ! -f "$PROJECT_DIR/TESTING.md" ]; then
|
|
15
|
+
MISSING="${MISSING:+${MISSING}, }TESTING.md"
|
|
16
|
+
fi
|
|
17
|
+
|
|
18
|
+
if [ -n "$MISSING" ]; then
|
|
19
|
+
echo "WARNING: Missing SDLC wizard files: ${MISSING}"
|
|
20
|
+
echo "Invoke Skill tool, skill=\"setup-wizard\" to generate them."
|
|
21
|
+
fi
|
|
22
|
+
|
|
23
|
+
# Version update check (non-blocking, best-effort)
|
|
24
|
+
SDLC_MD="$PROJECT_DIR/SDLC.md"
|
|
25
|
+
if [ -f "$SDLC_MD" ]; then
|
|
26
|
+
INSTALLED_VERSION=$(grep -o 'SDLC Wizard Version: [0-9.]*' "$SDLC_MD" | head -1 | sed 's/SDLC Wizard Version: //')
|
|
27
|
+
if [ -n "$INSTALLED_VERSION" ] && command -v npm > /dev/null 2>&1; then
|
|
28
|
+
LATEST_VERSION=$(npm view agentic-sdlc-wizard version 2>/dev/null) || true
|
|
29
|
+
if [ -n "$LATEST_VERSION" ] && [ "$LATEST_VERSION" != "$INSTALLED_VERSION" ]; then
|
|
30
|
+
echo "SDLC Wizard update available: ${INSTALLED_VERSION} → ${LATEST_VERSION} (run /update-wizard)"
|
|
31
|
+
fi
|
|
32
|
+
fi
|
|
33
|
+
fi
|
|
34
|
+
|
|
35
|
+
# Cross-model review staleness check (non-blocking, best-effort)
|
|
36
|
+
if command -v codex > /dev/null 2>&1 && [ -d "$PROJECT_DIR/.reviews" ]; then
|
|
37
|
+
REVIEW_FILE="$PROJECT_DIR/.reviews/latest-review.md"
|
|
38
|
+
if [ -f "$REVIEW_FILE" ]; then
|
|
39
|
+
# Get file modification time (macOS stat -f %m, Linux stat -c %Y)
|
|
40
|
+
if stat -f %m "$REVIEW_FILE" > /dev/null 2>&1; then
|
|
41
|
+
REVIEW_MTIME=$(stat -f %m "$REVIEW_FILE")
|
|
42
|
+
else
|
|
43
|
+
REVIEW_MTIME=$(stat -c %Y "$REVIEW_FILE" 2>/dev/null || echo "0")
|
|
44
|
+
fi
|
|
45
|
+
NOW=$(date +%s)
|
|
46
|
+
REVIEW_AGE=$(( (NOW - REVIEW_MTIME) / 86400 ))
|
|
47
|
+
# Count commits since last review
|
|
48
|
+
COMMITS_SINCE=$(git -C "$PROJECT_DIR" log --oneline --after="@${REVIEW_MTIME}" 2>/dev/null | wc -l | tr -d ' ') || true
|
|
49
|
+
if [ "$REVIEW_AGE" -gt 3 ] && [ "${COMMITS_SINCE:-0}" -gt 5 ]; then
|
|
50
|
+
echo "WARNING: ${COMMITS_SINCE} commits over ${REVIEW_AGE}d since last cross-model review — reviews may not be running. Verify: codex exec \"echo test\""
|
|
51
|
+
fi
|
|
52
|
+
fi
|
|
53
|
+
fi
|
|
54
|
+
|
|
55
|
+
# Claude Code version check (non-blocking, best-effort)
|
|
56
|
+
if command -v claude > /dev/null 2>&1 && command -v npm > /dev/null 2>&1; then
|
|
57
|
+
CC_LOCAL=$(claude --version 2>/dev/null | grep -o '[0-9][0-9.]*' | head -1) || true
|
|
58
|
+
if [ -n "$CC_LOCAL" ]; then
|
|
59
|
+
CC_LATEST=$(npm view @anthropic-ai/claude-code version 2>/dev/null) || true
|
|
60
|
+
if [ -n "$CC_LATEST" ] && [ "$CC_LATEST" != "$CC_LOCAL" ]; then
|
|
61
|
+
echo "Claude Code update available: ${CC_LOCAL} → ${CC_LATEST} (run: npm install -g @anthropic-ai/claude-code)"
|
|
62
|
+
fi
|
|
63
|
+
fi
|
|
64
|
+
fi
|
|
65
|
+
|
|
66
|
+
exit 0
|
|
@@ -24,7 +24,7 @@ SDLC BASELINE:
|
|
|
24
24
|
5. ALL TESTS MUST PASS BEFORE COMMIT - NO EXCEPTIONS
|
|
25
25
|
|
|
26
26
|
AUTO-INVOKE SKILL (Claude MUST do this FIRST):
|
|
27
|
-
- implement/fix/refactor/feature/bug/build/test/TDD → Invoke: Skill tool, skill="sdlc"
|
|
27
|
+
- implement/fix/refactor/feature/bug/build/test/TDD/release/publish/deploy → Invoke: Skill tool, skill="sdlc"
|
|
28
28
|
- DON'T invoke for: questions, explanations, reading/exploring code, simple queries
|
|
29
29
|
- DON'T wait for user to type /sdlc - AUTO-INVOKE based on task type
|
|
30
30
|
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentic-sdlc-wizard",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.25.0",
|
|
4
4
|
"description": "SDLC enforcement for Claude Code — hooks, skills, and wizard setup in one command",
|
|
5
5
|
"bin": {
|
|
6
6
|
"sdlc-wizard": "./cli/bin/sdlc-wizard.js"
|
|
7
7
|
},
|
|
8
8
|
"files": [
|
|
9
9
|
"cli/",
|
|
10
|
+
"skills/",
|
|
11
|
+
"hooks/",
|
|
12
|
+
".claude-plugin/",
|
|
10
13
|
"CLAUDE_CODE_SDLC_WIZARD.md",
|
|
11
14
|
"CHANGELOG.md"
|
|
12
15
|
],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: sdlc
|
|
3
|
-
description: Full SDLC workflow for implementing features, fixing bugs, refactoring code, testing,
|
|
3
|
+
description: Full SDLC workflow for implementing features, fixing bugs, refactoring code, testing, releasing, publishing, and deploying. Use this skill when implementing, fixing, refactoring, testing, adding features, building new code, or releasing/publishing/deploying.
|
|
4
4
|
argument-hint: [task description]
|
|
5
5
|
effort: high
|
|
6
6
|
---
|
|
@@ -27,7 +27,7 @@ TodoWrite([
|
|
|
27
27
|
{ content: "Present approach + STATE CONFIDENCE LEVEL", status: "pending", activeForm: "Presenting approach" },
|
|
28
28
|
{ content: "Signal ready - user exits plan mode", status: "pending", activeForm: "Awaiting plan approval" },
|
|
29
29
|
// TRANSITION PHASE (After plan mode)
|
|
30
|
-
{ content: "Doc sync: update feature docs
|
|
30
|
+
{ content: "Doc sync: update or create feature docs — MUST be current before commit", status: "pending", activeForm: "Syncing feature docs" },
|
|
31
31
|
// IMPLEMENTATION PHASE
|
|
32
32
|
{ content: "TDD RED: Write failing test FIRST", status: "pending", activeForm: "Writing failing test" },
|
|
33
33
|
{ content: "TDD GREEN: Implement, verify test passes", status: "pending", activeForm: "Implementing feature" },
|
|
@@ -269,6 +269,8 @@ codex exec \
|
|
|
269
269
|
|
|
270
270
|
**Always use `xhigh` reasoning effort.** Lower settings miss subtle errors (wrong-generation references, stale pricing, cross-file inconsistencies).
|
|
271
271
|
|
|
272
|
+
**Sandbox note:** Codex's Rust binary requires access to macOS system configuration APIs (`SCDynamicStore`) during sandbox initialization. Claude Code's sandbox blocks this access, causing `codex exec` to crash with `system-configuration panicked: Attempted to create a NULL object`. When running `codex exec` from within Claude Code, you MUST use `dangerouslyDisableSandbox: true` on the Bash tool call. This is safe — Codex has its own sandbox (`-s danger-full-access` is already specified), and the CC sandbox bypass only affects the Codex process. This is a known Codex issue ([#15640](https://github.com/openai/codex/issues/15640)).
|
|
273
|
+
|
|
272
274
|
If CERTIFIED → proceed to CI. If NOT CERTIFIED → go to dialogue loop.
|
|
273
275
|
|
|
274
276
|
### Step 3: Dialogue Loop
|
|
@@ -518,13 +520,16 @@ Local tests pass -> Commit -> Push -> Watch CI
|
|
|
518
520
|
**The full shepherd sequence — every step is mandatory:**
|
|
519
521
|
1. Push changes to remote
|
|
520
522
|
2. Watch CI: `gh pr checks --watch`
|
|
521
|
-
3.
|
|
522
|
-
4. If CI
|
|
523
|
-
5.
|
|
524
|
-
6.
|
|
523
|
+
3. Read CI logs — **pass or fail**: `gh run view <RUN_ID> --log` (not just `--log-failed`). Passing CI can still hide warnings, skipped steps, or degraded scores. Don't just check the green checkmark
|
|
524
|
+
4. If CI fails → diagnose from logs, fix, push again (max 2 attempts)
|
|
525
|
+
5. If CI passes → read ALL review comments: `gh api repos/OWNER/REPO/pulls/PR/comments`
|
|
526
|
+
6. Fix valid suggestions, push, iterate until clean
|
|
527
|
+
7. Only then: explicit merge with `gh pr merge --squash`
|
|
525
528
|
|
|
526
529
|
**Why this is non-negotiable:** PR #145 auto-merged a release before review feedback was read. CI reviewer found a P1 dead-code bug that shipped to main. The fix required a follow-up commit. Auto-merge cost more time than the shepherd loop would have taken.
|
|
527
530
|
|
|
531
|
+
**Why read passing logs:** v1.24.0 release only read logs on failure (round 1), then just checked the green checkmark on round 2. Passing CI can hide warnings, skipped steps, degraded E2E scores, or silent test exclusions. A green checkmark is necessary but not sufficient.
|
|
532
|
+
|
|
528
533
|
**Context GC (compact during idle):** While waiting for CI (typically 3-5 min), suggest `/compact` if the conversation is long. Think of it like a time-based garbage collector — idle time + high memory pressure = good time to collect. Don't suggest on short conversations.
|
|
529
534
|
|
|
530
535
|
**CI failures follow same rules as test failures:**
|
|
@@ -572,6 +577,7 @@ CI passes -> Read review suggestions
|
|
|
572
577
|
- `/clear` after 2+ failed corrections (context polluted — start fresh with better prompt)
|
|
573
578
|
- Auto-compact fires at ~95% capacity — no manual management needed
|
|
574
579
|
- After committing a PR, `/clear` before starting the next feature
|
|
580
|
+
- **Autocompact tuning:** Set `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE` to trigger compaction earlier (75% for 200K, 30% for 1M). On 1M models, the default fires at ~76K — set 30% or `CLAUDE_CODE_AUTO_COMPACT_WINDOW=400000` to use the full context window. See wizard doc "Autocompact Tuning" for full details
|
|
575
581
|
|
|
576
582
|
**`--bare` mode (v2.1.81+):** `claude -p "prompt" --bare` skips ALL hooks, skills, LSP, and plugins. This is a complete wizard bypass — no SDLC enforcement, no TDD checks, no planning hooks. Use only for scripted headless calls (CI pipelines, automation) where you explicitly don't want wizard enforcement. Never use `--bare` for normal development work.
|
|
577
583
|
|
|
@@ -610,10 +616,13 @@ Before implementing any release items:
|
|
|
610
616
|
2. **Plan each at 95% confidence** — For each item: what files change, what tests prove it works, what's the blast radius. If confidence < 95% on any item, flag it
|
|
611
617
|
3. **Identify blocks** — Which items depend on others? What must go first?
|
|
612
618
|
4. **Present all plans together** — User reviews the complete batch, not one at a time. This catches conflicts, sequencing issues, and scope creep before any code is written
|
|
613
|
-
5. **
|
|
619
|
+
5. **Pre-release CI audit** — Before cutting the release, review CI runs across ALL PRs merged since last release. Look for: warnings in passing runs, degraded E2E scores, skipped test suites, silent failures masked by `continue-on-error`. Use `gh run list` + `gh run view <ID> --log` to audit. A green checkmark is necessary but not sufficient
|
|
620
|
+
6. **User approves, then implement** — Full SDLC per item (TDD RED → GREEN → self-review), in the prioritized order
|
|
614
621
|
|
|
615
622
|
**Why batch planning works:** Ad-hoc one-at-a-time implementation leads to unvalidated additions and scope creep. Batch planning catches problems early — if you can't plan it at 95%, you're not ready to ship it.
|
|
616
623
|
|
|
624
|
+
**Why pre-release CI audit:** v1.24.0 shipped without auditing CI logs across merged PRs #150-#152. Passing CI doesn't mean nothing fishy got through — warnings, degraded scores, and skipped steps can hide in green runs.
|
|
625
|
+
|
|
617
626
|
## Deployment Tasks (If Task Involves Deploy)
|
|
618
627
|
|
|
619
628
|
**When to check:** Task mentions "deploy", "release", "push to prod", "staging", etc.
|
|
@@ -659,14 +668,26 @@ Before implementing any release items:
|
|
|
659
668
|
|
|
660
669
|
**THE RULE:** Delete old code first. If it breaks, fix it properly.
|
|
661
670
|
|
|
662
|
-
## Documentation Sync (During Planning)
|
|
671
|
+
## Documentation Sync (REQUIRED — During Planning)
|
|
672
|
+
|
|
673
|
+
Feature docs MUST be current before commit. Docs are code — stale docs mislead future sessions, waste tokens, and cause wrong implementations.
|
|
674
|
+
|
|
675
|
+
**Standard pattern:** `*_DOCS.md` — living documents that grow with the feature (e.g., `AUTH_DOCS.md`, `PAYMENTS_DOCS.md`, `SEARCH_DOCS.md`). Same philosophy as `TESTING.md` and `ARCHITECTURE.md` — one source of truth per topic, kept current.
|
|
663
676
|
|
|
664
|
-
|
|
677
|
+
```
|
|
678
|
+
┌─────────────────────────────────────────────────────────────────────┐
|
|
679
|
+
│ DOCS MUST BE CURRENT BEFORE COMMIT. │
|
|
680
|
+
│ │
|
|
681
|
+
│ Stale docs = wrong implementations = wasted sessions. │
|
|
682
|
+
│ If you changed the feature, update its doc. No exceptions. │
|
|
683
|
+
└─────────────────────────────────────────────────────────────────────┘
|
|
684
|
+
```
|
|
665
685
|
|
|
666
|
-
1. **During planning**, read feature docs for the area being changed (`*
|
|
667
|
-
2. If your code change contradicts what the doc says → update the doc
|
|
668
|
-
3. If your code change extends behavior the doc describes → add to the doc
|
|
669
|
-
4. If no
|
|
686
|
+
1. **During planning**, read feature docs for the area being changed (`*_DOCS.md`, `docs/features/`, `docs/decisions/`)
|
|
687
|
+
2. If your code change contradicts what the doc says → MUST update the doc
|
|
688
|
+
3. If your code change extends behavior the doc describes → MUST add to the doc
|
|
689
|
+
4. If no `*_DOCS.md` exists and the feature touches 3+ files → create one. Keep it simple: what the feature does, key decisions, gotchas. Same structure as TESTING.md (topic-focused, not exhaustive)
|
|
690
|
+
5. If the project has a `ROADMAP.md` → update it (mark items done, add new items). ROADMAP feeds CHANGELOG — keeping it current means releases write themselves
|
|
670
691
|
|
|
671
692
|
**Doc staleness signals:** Low confidence in an area often means the docs are stale, missing, or misleading. If you struggle during planning, check whether the docs match the actual code.
|
|
672
693
|
|
|
@@ -676,7 +697,7 @@ When a code change affects a documented feature, update the doc in the same PR:
|
|
|
676
697
|
|
|
677
698
|
If this session revealed insights, update the right place:
|
|
678
699
|
- **Testing patterns, gotchas** → `TESTING.md`
|
|
679
|
-
- **Feature-specific quirks** → Feature docs (`*
|
|
700
|
+
- **Feature-specific quirks** → Feature docs (`*_DOCS.md`, e.g., `AUTH_DOCS.md`)
|
|
680
701
|
- **Architecture decisions** → `docs/decisions/` (ADR format) or `ARCHITECTURE.md`
|
|
681
702
|
- **General project context** → `CLAUDE.md` (or `/revise-claude-md`)
|
|
682
703
|
- **Plan files** → If this session's work came from a plan file, delete it or mark it complete. Stale plans mislead future sessions into thinking work is still pending
|
|
@@ -171,6 +171,16 @@ Based on detected stack, suggest `allowedTools` entries for `.claude/settings.js
|
|
|
171
171
|
|
|
172
172
|
Present suggestions and let the user confirm.
|
|
173
173
|
|
|
174
|
+
### Step 9.5: Context Window Configuration
|
|
175
|
+
|
|
176
|
+
Recommend autocompact settings based on the user's context window:
|
|
177
|
+
|
|
178
|
+
- **200K models (default):** Suggest `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE=75` — leaves room for implementation after planning
|
|
179
|
+
- **1M models:** Suggest `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE=30` or `CLAUDE_CODE_AUTO_COMPACT_WINDOW=400000` — the default fires at ~76K on 1M, wasting 92% of the window
|
|
180
|
+
- **CI pipelines:** Suggest 60% — short tasks, compact early
|
|
181
|
+
|
|
182
|
+
Tell the user to add the export to their shell profile (`~/.bashrc`, `~/.zshrc`) or project `.envrc`. This is guidance, not enforcement — the wizard doesn't write shell profiles.
|
|
183
|
+
|
|
174
184
|
### Step 10: Customize Hooks
|
|
175
185
|
|
|
176
186
|
Update `tdd-pretool-check.sh` with the actual source directory (replace generic `/src/` pattern).
|
|
@@ -45,14 +45,13 @@ Extract the latest version from the first `## [X.X.X]` line.
|
|
|
45
45
|
Parse all CHANGELOG entries between the user's installed version and the latest. Present a clear summary:
|
|
46
46
|
|
|
47
47
|
```
|
|
48
|
-
Installed: 1.
|
|
49
|
-
Latest: 1.
|
|
48
|
+
Installed: 1.23.0
|
|
49
|
+
Latest: 1.25.0
|
|
50
50
|
|
|
51
51
|
What changed:
|
|
52
|
-
- [1.
|
|
53
|
-
- [1.
|
|
54
|
-
- [1.
|
|
55
|
-
- [1.20.0] Version-pinned CC update gate, Tier 1 flakiness fix, flaky test guidance, ...
|
|
52
|
+
- [1.25.0] Plugin format, 6 distribution channels (curl, Homebrew, gh, GitHub Releases), ...
|
|
53
|
+
- [1.24.0] Hook if conditionals, autocompact tuning + 1M/200K guidance, tdd_red fix, ...
|
|
54
|
+
- [1.23.0] Update notification hook, cross-model review standardization, ...
|
|
56
55
|
```
|
|
57
56
|
|
|
58
57
|
**If versions match:** Say "You're up to date! (version X.X.X)" and stop.
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# InstructionsLoaded hook - validates SDLC files exist at session start
|
|
3
|
-
# Fires when Claude loads instructions (session start/resume)
|
|
4
|
-
# Available since Claude Code v2.1.69
|
|
5
|
-
# Note: no set -e — this hook must always exit 0 to not block session start
|
|
6
|
-
|
|
7
|
-
PROJECT_DIR="${CLAUDE_PROJECT_DIR:-.}"
|
|
8
|
-
MISSING=""
|
|
9
|
-
|
|
10
|
-
if [ ! -f "$PROJECT_DIR/SDLC.md" ]; then
|
|
11
|
-
MISSING="${MISSING:+${MISSING}, }SDLC.md"
|
|
12
|
-
fi
|
|
13
|
-
|
|
14
|
-
if [ ! -f "$PROJECT_DIR/TESTING.md" ]; then
|
|
15
|
-
MISSING="${MISSING:+${MISSING}, }TESTING.md"
|
|
16
|
-
fi
|
|
17
|
-
|
|
18
|
-
if [ -n "$MISSING" ]; then
|
|
19
|
-
echo "WARNING: Missing SDLC wizard files: ${MISSING}"
|
|
20
|
-
echo "Invoke Skill tool, skill=\"setup-wizard\" to generate them."
|
|
21
|
-
fi
|
|
22
|
-
|
|
23
|
-
# Version update check (non-blocking, best-effort)
|
|
24
|
-
SDLC_MD="$PROJECT_DIR/SDLC.md"
|
|
25
|
-
if [ -f "$SDLC_MD" ]; then
|
|
26
|
-
INSTALLED_VERSION=$(grep -o 'SDLC Wizard Version: [0-9.]*' "$SDLC_MD" | head -1 | sed 's/SDLC Wizard Version: //')
|
|
27
|
-
if [ -n "$INSTALLED_VERSION" ] && command -v npm > /dev/null 2>&1; then
|
|
28
|
-
LATEST_VERSION=$(npm view agentic-sdlc-wizard version 2>/dev/null) || true
|
|
29
|
-
if [ -n "$LATEST_VERSION" ] && [ "$LATEST_VERSION" != "$INSTALLED_VERSION" ]; then
|
|
30
|
-
echo "SDLC Wizard update available: ${INSTALLED_VERSION} → ${LATEST_VERSION} (run /update-wizard)"
|
|
31
|
-
fi
|
|
32
|
-
fi
|
|
33
|
-
fi
|
|
34
|
-
|
|
35
|
-
exit 0
|
|
File without changes
|