@warnyin/sdlc 0.6.0 → 0.8.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 +258 -200
- package/README.md +92 -91
- package/bin/cli.mjs +682 -641
- package/lib/active.mjs +199 -0
- package/lib/caps.mjs +1 -0
- package/lib/lenses.mjs +48 -0
- package/lib/skills.mjs +148 -0
- package/lib/validate.mjs +2 -0
- package/package.json +42 -42
- package/payload/adapters/claude/skills/sdlc-conventions/SKILL.md +30 -27
- package/payload/hooks/_shared.mjs +8 -20
- package/payload/hooks/guard-writes.mjs +10 -6
- package/payload/hooks/inject-context.mjs +4 -2
- package/payload/hooks/journal.mjs +16 -8
- package/payload/hooks/session-summary.mjs +3 -1
- package/payload/hooks/validate-artifact.mjs +7 -3
- package/payload/playbook/README.md +32 -32
- package/payload/playbook/contract.md +29 -26
- package/payload/playbook/design.md +28 -23
- package/payload/playbook/lenses.md +64 -0
- package/payload/playbook/new.md +33 -25
- package/payload/playbook/next.md +24 -14
- package/payload/playbook/review.md +31 -26
- package/payload/playbook/verify.md +42 -37
- package/payload/templates/harness.md +2 -1
package/README.md
CHANGED
|
@@ -1,91 +1,92 @@
|
|
|
1
|
-
# @warnyin/sdlc
|
|
2
|
-
|
|
3
|
-
**Spec-driven, AI-driven SDLC for coding agents — token-lean by construction.**
|
|
4
|
-
|
|
5
|
-
Operationalizes the *"New SDLC with Vibe Coding"* (Day-1) work process: the human configures
|
|
6
|
-
the harness once; the AI drives changes end-to-end through contract-first gates; deterministic
|
|
7
|
-
hooks and a validator enforce the rules; a journal prices every change in real tokens.
|
|
8
|
-
|
|
9
|
-
Inspired by OpenSpec (delta specs, archive lifecycle), spec-kit (artifact grammar), and
|
|
10
|
-
Kiro (steering + enforced hooks) — tuned for minimum context residency.
|
|
11
|
-
|
|
12
|
-
## Install
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
cd your-project
|
|
16
|
-
npx @warnyin/sdlc init # interactive picker; tools already in the project are pre-selected
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
The picker is a checkbox list — arrows move, `space` toggles, typing filters, `ctrl+a` selects
|
|
20
|
-
everything on screen, `enter` confirms. Skip it in CI or scripts:
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
npx @warnyin/sdlc init --tool claude,cursor # explicit list
|
|
24
|
-
npx @warnyin/sdlc init --tool all # every supported tool
|
|
25
|
-
npx @warnyin/sdlc init --tool none # sdlc/ framework only, no agent adapters
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
Then in your coding agent:
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
/sdlc:init # interview → constitution + harness (the one human gate)
|
|
32
|
-
/sdlc:auto Add rate limiting # AI runs new → contract → build → verify → ship
|
|
33
|
-
/sdlc:auto add-rate-limiting # already opened it with /sdlc:new? auto resumes from there
|
|
34
|
-
/sdlc:new Add rate limiting --auto # any stage takes --auto: confirm once, then run to ship
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
`--auto` asks everything up front — scope, tier, each ambiguity, and every escalation
|
|
38
|
-
it wants pre-approved as its own line you can refuse — then runs unattended. Nothing
|
|
39
|
-
is written until you confirm, the approval covers that run only, and anything you did
|
|
40
|
-
not pre-approve still stops and asks.
|
|
41
|
-
|
|
42
|
-
## How it works
|
|
43
|
-
|
|
44
|
-
```
|
|
45
|
-
sdlc/
|
|
46
|
-
├── context/constitution.md ≤30 lines — the ONLY always-loaded prose (hook-injected)
|
|
47
|
-
├── context/steering/*.md scoped knowledge · inclusion: always|paths|manual|agent
|
|
48
|
-
├── harness.md tools, model routing, tier triage, autonomy policy
|
|
49
|
-
├── specs/<capability>/ living specs — WHEN/THEN SHALL, merged mechanically at ship
|
|
50
|
-
├── changes/<id>/ one change: change.md (Why+Delta+Tasks) + contract/
|
|
51
|
-
└── changes/archive/ shipped changes + digests (the async human touchpoint)
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
- **Contract-first**: tests + evals are written *before* code and gate everything after.
|
|
55
|
-
- **AI-driven, exception-only humans**: the autonomy policy in `harness.md` decides what
|
|
56
|
-
auto-ships and what escalates (hard-floor: security/payments/data-loss/irreversible).
|
|
57
|
-
- **Managed hooks** (Claude Code): SessionStart injects ≤60 lines of static context;
|
|
58
|
-
PreToolUse write-locks living specs; PostToolUse validates caps and points at steering;
|
|
59
|
-
Stop journals real token usage. Other tools get the same rules as prose + the validator.
|
|
60
|
-
- **Self-improving, leaner over time**: a post-ship learner proposes rules with evidence;
|
|
61
|
-
the always-loaded budget is fixed, so learning must distill, not accumulate.
|
|
62
|
-
- **Measured**: `npx @warnyin/sdlc observe` — tokens/cost per change, first-pass rate,
|
|
63
|
-
lead time, dead steering, context-overflow flags.
|
|
64
|
-
|
|
65
|
-
## CLI
|
|
66
|
-
|
|
67
|
-
```
|
|
68
|
-
warnyin-sdlc init [--tool all|none|a,b] scaffold + adapters + hooks (picker when omitted)
|
|
69
|
-
warnyin-sdlc update [--force] refresh payload, guarded prune of stale files
|
|
70
|
-
warnyin-sdlc validate [id] [--strict]
|
|
71
|
-
warnyin-sdlc status | observe [--json]
|
|
72
|
-
warnyin-sdlc archive <id> merge deltas into living specs + archive
|
|
73
|
-
warnyin-sdlc
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
· `/sdlc:
|
|
80
|
-
· `/sdlc:
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
`sdlc/.
|
|
90
|
-
|
|
91
|
-
|
|
1
|
+
# @warnyin/sdlc
|
|
2
|
+
|
|
3
|
+
**Spec-driven, AI-driven SDLC for coding agents — token-lean by construction.**
|
|
4
|
+
|
|
5
|
+
Operationalizes the *"New SDLC with Vibe Coding"* (Day-1) work process: the human configures
|
|
6
|
+
the harness once; the AI drives changes end-to-end through contract-first gates; deterministic
|
|
7
|
+
hooks and a validator enforce the rules; a journal prices every change in real tokens.
|
|
8
|
+
|
|
9
|
+
Inspired by OpenSpec (delta specs, archive lifecycle), spec-kit (artifact grammar), and
|
|
10
|
+
Kiro (steering + enforced hooks) — tuned for minimum context residency.
|
|
11
|
+
|
|
12
|
+
## Install
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
cd your-project
|
|
16
|
+
npx @warnyin/sdlc init # interactive picker; tools already in the project are pre-selected
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
The picker is a checkbox list — arrows move, `space` toggles, typing filters, `ctrl+a` selects
|
|
20
|
+
everything on screen, `enter` confirms. Skip it in CI or scripts:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npx @warnyin/sdlc init --tool claude,cursor # explicit list
|
|
24
|
+
npx @warnyin/sdlc init --tool all # every supported tool
|
|
25
|
+
npx @warnyin/sdlc init --tool none # sdlc/ framework only, no agent adapters
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Then in your coding agent:
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
/sdlc:init # interview → constitution + harness (the one human gate)
|
|
32
|
+
/sdlc:auto Add rate limiting # AI runs new → contract → build → verify → ship
|
|
33
|
+
/sdlc:auto add-rate-limiting # already opened it with /sdlc:new? auto resumes from there
|
|
34
|
+
/sdlc:new Add rate limiting --auto # any stage takes --auto: confirm once, then run to ship
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
`--auto` asks everything up front — scope, tier, each ambiguity, and every escalation
|
|
38
|
+
it wants pre-approved as its own line you can refuse — then runs unattended. Nothing
|
|
39
|
+
is written until you confirm, the approval covers that run only, and anything you did
|
|
40
|
+
not pre-approve still stops and asks.
|
|
41
|
+
|
|
42
|
+
## How it works
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
sdlc/
|
|
46
|
+
├── context/constitution.md ≤30 lines — the ONLY always-loaded prose (hook-injected)
|
|
47
|
+
├── context/steering/*.md scoped knowledge · inclusion: always|paths|manual|agent
|
|
48
|
+
├── harness.md tools, model routing, tier triage, autonomy policy
|
|
49
|
+
├── specs/<capability>/ living specs — WHEN/THEN SHALL, merged mechanically at ship
|
|
50
|
+
├── changes/<id>/ one change: change.md (Why+Delta+Tasks) + contract/
|
|
51
|
+
└── changes/archive/ shipped changes + digests (the async human touchpoint)
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
- **Contract-first**: tests + evals are written *before* code and gate everything after.
|
|
55
|
+
- **AI-driven, exception-only humans**: the autonomy policy in `harness.md` decides what
|
|
56
|
+
auto-ships and what escalates (hard-floor: security/payments/data-loss/irreversible).
|
|
57
|
+
- **Managed hooks** (Claude Code): SessionStart injects ≤60 lines of static context;
|
|
58
|
+
PreToolUse write-locks living specs; PostToolUse validates caps and points at steering;
|
|
59
|
+
Stop journals real token usage. Other tools get the same rules as prose + the validator.
|
|
60
|
+
- **Self-improving, leaner over time**: a post-ship learner proposes rules with evidence;
|
|
61
|
+
the always-loaded budget is fixed, so learning must distill, not accumulate.
|
|
62
|
+
- **Measured**: `npx @warnyin/sdlc observe` — tokens/cost per change, first-pass rate,
|
|
63
|
+
lead time, dead steering, context-overflow flags.
|
|
64
|
+
|
|
65
|
+
## CLI
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
warnyin-sdlc init [--tool all|none|a,b] scaffold + adapters + hooks (picker when omitted)
|
|
69
|
+
warnyin-sdlc update [--force] refresh payload, guarded prune of stale files
|
|
70
|
+
warnyin-sdlc validate [id] [--strict]
|
|
71
|
+
warnyin-sdlc status | observe [--json]
|
|
72
|
+
warnyin-sdlc archive <id> merge deltas into living specs + archive
|
|
73
|
+
warnyin-sdlc skills [--json] installed Claude skills/agents, for lens resolution
|
|
74
|
+
warnyin-sdlc version | --version print the installed framework version
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Commands (in your agent)
|
|
78
|
+
|
|
79
|
+
`/sdlc:init` · `/sdlc:auto` · `/sdlc:new` · `/sdlc:design` · `/sdlc:contract` · `/sdlc:build`
|
|
80
|
+
· `/sdlc:verify` · `/sdlc:review` · `/sdlc:ship` · `/sdlc:observe` · `/sdlc:converge`
|
|
81
|
+
· `/sdlc:steer` · `/sdlc:next` · `/sdlc:feedback`
|
|
82
|
+
|
|
83
|
+
Playbooks live in `sdlc/.playbook/` — behavior is defined once there; commands are thin pointers.
|
|
84
|
+
|
|
85
|
+
## Development
|
|
86
|
+
|
|
87
|
+
Zero dependencies, Node ≥ 20. `npm test` runs the black-box suite (temp dirs, real CLI spawns).
|
|
88
|
+
This repo self-hosts: its own development flows through `sdlc/changes/`. After cloning, run
|
|
89
|
+
`npm run setup:dogfood` to regenerate the installer-owned mirrors (`sdlc/.playbook/`,
|
|
90
|
+
`sdlc/.hooks/`, `.claude/`).
|
|
91
|
+
|
|
92
|
+
MIT
|