@warnyin/sdlc 0.8.0 → 0.10.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 +293 -258
- package/LICENSE +21 -21
- package/README.md +118 -92
- package/bin/cli.mjs +694 -682
- package/lib/active.mjs +199 -199
- package/lib/caps.mjs +46 -46
- package/lib/config.mjs +41 -41
- package/lib/delta.mjs +227 -227
- package/lib/frontmatter.mjs +59 -59
- package/lib/glob.mjs +29 -29
- package/lib/lenses.mjs +48 -48
- package/lib/manifest.mjs +99 -99
- package/lib/settings-merge.mjs +63 -63
- package/lib/skills.mjs +148 -148
- package/lib/update-notice.mjs +42 -0
- package/lib/validate.mjs +198 -198
- package/lib/version.mjs +23 -0
- package/package.json +42 -42
- package/payload/adapters/agents-md.md +8 -8
- package/payload/adapters/claude/agents/sdlc-architect.md +12 -12
- package/payload/adapters/claude/agents/sdlc-builder.md +14 -14
- package/payload/adapters/claude/agents/sdlc-contractor.md +13 -13
- package/payload/adapters/claude/agents/sdlc-evaluator.md +13 -13
- package/payload/adapters/claude/agents/sdlc-learner.md +16 -16
- package/payload/adapters/claude/agents/sdlc-ops.md +11 -11
- package/payload/adapters/claude/agents/sdlc-quality.md +13 -13
- package/payload/adapters/claude/agents/sdlc-security.md +12 -12
- package/payload/adapters/claude/commands/sdlc/converge.md +5 -5
- package/payload/adapters/claude/commands/sdlc/init.md +4 -4
- package/payload/adapters/claude/commands/sdlc/next.md +4 -4
- package/payload/adapters/claude/commands/sdlc/observe.md +4 -4
- package/payload/adapters/claude/commands/sdlc/steer.md +4 -4
- package/payload/adapters/claude/skills/contract-writing/SKILL.md +26 -26
- package/payload/adapters/claude/skills/delta-spec-format/SKILL.md +36 -36
- package/payload/adapters/claude/skills/sdlc-conventions/SKILL.md +30 -30
- package/payload/adapters/cline.md +8 -8
- package/payload/adapters/copilot.md +8 -8
- package/payload/adapters/cursor.mdc +7 -7
- package/payload/adapters/gemini.md +8 -8
- package/payload/adapters/windsurf.md +4 -4
- package/payload/hooks/_shared.mjs +138 -138
- package/payload/hooks/_update-notice.mjs +81 -0
- package/payload/hooks/check-update.mjs +45 -0
- package/payload/hooks/guard-writes.mjs +87 -87
- package/payload/hooks/inject-context.mjs +61 -57
- package/payload/hooks/journal.mjs +66 -66
- package/payload/hooks/session-summary.mjs +52 -52
- package/payload/hooks/validate-artifact.mjs +84 -84
- package/payload/playbook/README.md +32 -32
- package/payload/playbook/context.md +26 -26
- package/payload/playbook/contract.md +29 -29
- package/payload/playbook/converge.md +19 -19
- package/payload/playbook/design.md +28 -28
- package/payload/playbook/init.md +22 -22
- package/payload/playbook/lenses.md +64 -64
- package/payload/playbook/new.md +41 -33
- package/payload/playbook/next.md +24 -24
- package/payload/playbook/observe.md +20 -20
- package/payload/playbook/principles.md +28 -28
- package/payload/playbook/review.md +31 -31
- package/payload/playbook/routing.md +19 -19
- package/payload/playbook/rules-card.md +17 -16
- package/payload/playbook/ship.md +35 -35
- package/payload/playbook/steer.md +21 -21
- package/payload/playbook/verify.md +42 -42
- package/payload/templates/change-deep.md +29 -29
- package/payload/templates/change-standard.md +28 -28
- package/payload/templates/change-vibe.md +19 -19
- package/payload/templates/config.yaml +12 -8
- package/payload/templates/constitution.md +14 -14
- package/payload/templates/contract-evals.md +9 -9
- package/payload/templates/contract-tests.md +9 -9
- package/payload/templates/harness.md +34 -34
- package/payload/templates/spec.md +14 -14
- package/payload/templates/steering.md +9 -9
- package/scripts/validate.mjs +47 -47
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 warnyin
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 warnyin
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,92 +1,118 @@
|
|
|
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
|
-
|
|
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
|
+
## Releasing
|
|
93
|
+
|
|
94
|
+
Pushing a plain `vX.Y.Z` tag publishes that version. `.github/workflows/release.yml` runs the CI
|
|
95
|
+
jobs as a gate, checks the tag names `package.json`'s version, then runs `npm publish` with
|
|
96
|
+
provenance through npm trusted publishing. No npm token lives in the repo or its secrets.
|
|
97
|
+
|
|
98
|
+
One-time setup, by a package owner, before the first release tag is pushed (until then the
|
|
99
|
+
publish step fails and nothing is released):
|
|
100
|
+
1. On npmjs.com, open `@warnyin/sdlc` → Settings → Trusted Publisher → GitHub Actions and enter
|
|
101
|
+
organization/user `warnyin`, repository `warnyin-sdlc`, workflow filename `release.yml`,
|
|
102
|
+
no environment. If asked which actions to allow, allow `npm publish`, not stage-only.
|
|
103
|
+
2. Optional, after the first release by tag succeeds: under Publishing access, choose
|
|
104
|
+
"Require two-factor authentication and disallow tokens".
|
|
105
|
+
3. On GitHub, add a tag ruleset for `v*` so only maintainers can create or move release tags —
|
|
106
|
+
whoever can push the tag can publish.
|
|
107
|
+
|
|
108
|
+
Each release:
|
|
109
|
+
1. Bump `version` in `package.json`, add the `CHANGELOG.md` entry, commit `chore(release): X.Y.Z`.
|
|
110
|
+
2. `git tag vX.Y.Z && git push origin main vX.Y.Z`
|
|
111
|
+
3. Watch the `release` run in GitHub Actions, then confirm with `npm view @warnyin/sdlc version`.
|
|
112
|
+
|
|
113
|
+
A tag that disagrees with `package.json`, a pre-release tag, a tag not on `main`, or a red gate
|
|
114
|
+
publishes nothing. Every release becomes `latest`, so cut releases from `main` only. A published
|
|
115
|
+
version can never be reused: to back one out, `npm deprecate @warnyin/sdlc@X.Y.Z "<reason>"` and
|
|
116
|
+
release a fixed X.Y.Z+1.
|
|
117
|
+
|
|
118
|
+
MIT
|