@warnyin/sdlc 0.8.0 → 0.9.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.
Files changed (72) hide show
  1. package/CHANGELOG.md +274 -258
  2. package/LICENSE +21 -21
  3. package/README.md +92 -92
  4. package/bin/cli.mjs +682 -682
  5. package/lib/active.mjs +199 -199
  6. package/lib/caps.mjs +46 -46
  7. package/lib/config.mjs +41 -41
  8. package/lib/delta.mjs +227 -227
  9. package/lib/frontmatter.mjs +59 -59
  10. package/lib/glob.mjs +29 -29
  11. package/lib/lenses.mjs +48 -48
  12. package/lib/manifest.mjs +99 -99
  13. package/lib/settings-merge.mjs +63 -63
  14. package/lib/skills.mjs +148 -148
  15. package/lib/validate.mjs +198 -198
  16. package/package.json +42 -42
  17. package/payload/adapters/agents-md.md +8 -8
  18. package/payload/adapters/claude/agents/sdlc-architect.md +12 -12
  19. package/payload/adapters/claude/agents/sdlc-builder.md +14 -14
  20. package/payload/adapters/claude/agents/sdlc-contractor.md +13 -13
  21. package/payload/adapters/claude/agents/sdlc-evaluator.md +13 -13
  22. package/payload/adapters/claude/agents/sdlc-learner.md +16 -16
  23. package/payload/adapters/claude/agents/sdlc-ops.md +11 -11
  24. package/payload/adapters/claude/agents/sdlc-quality.md +13 -13
  25. package/payload/adapters/claude/agents/sdlc-security.md +12 -12
  26. package/payload/adapters/claude/commands/sdlc/converge.md +5 -5
  27. package/payload/adapters/claude/commands/sdlc/init.md +4 -4
  28. package/payload/adapters/claude/commands/sdlc/next.md +4 -4
  29. package/payload/adapters/claude/commands/sdlc/observe.md +4 -4
  30. package/payload/adapters/claude/commands/sdlc/steer.md +4 -4
  31. package/payload/adapters/claude/skills/contract-writing/SKILL.md +26 -26
  32. package/payload/adapters/claude/skills/delta-spec-format/SKILL.md +36 -36
  33. package/payload/adapters/claude/skills/sdlc-conventions/SKILL.md +30 -30
  34. package/payload/adapters/cline.md +8 -8
  35. package/payload/adapters/copilot.md +8 -8
  36. package/payload/adapters/cursor.mdc +7 -7
  37. package/payload/adapters/gemini.md +8 -8
  38. package/payload/adapters/windsurf.md +4 -4
  39. package/payload/hooks/_shared.mjs +138 -138
  40. package/payload/hooks/guard-writes.mjs +87 -87
  41. package/payload/hooks/inject-context.mjs +57 -57
  42. package/payload/hooks/journal.mjs +66 -66
  43. package/payload/hooks/session-summary.mjs +52 -52
  44. package/payload/hooks/validate-artifact.mjs +84 -84
  45. package/payload/playbook/README.md +32 -32
  46. package/payload/playbook/context.md +26 -26
  47. package/payload/playbook/contract.md +29 -29
  48. package/payload/playbook/converge.md +19 -19
  49. package/payload/playbook/design.md +28 -28
  50. package/payload/playbook/init.md +22 -22
  51. package/payload/playbook/lenses.md +64 -64
  52. package/payload/playbook/new.md +41 -33
  53. package/payload/playbook/next.md +24 -24
  54. package/payload/playbook/observe.md +20 -20
  55. package/payload/playbook/principles.md +28 -28
  56. package/payload/playbook/review.md +31 -31
  57. package/payload/playbook/routing.md +19 -19
  58. package/payload/playbook/rules-card.md +17 -16
  59. package/payload/playbook/ship.md +35 -35
  60. package/payload/playbook/steer.md +21 -21
  61. package/payload/playbook/verify.md +42 -42
  62. package/payload/templates/change-deep.md +29 -29
  63. package/payload/templates/change-standard.md +28 -28
  64. package/payload/templates/change-vibe.md +19 -19
  65. package/payload/templates/config.yaml +8 -8
  66. package/payload/templates/constitution.md +14 -14
  67. package/payload/templates/contract-evals.md +9 -9
  68. package/payload/templates/contract-tests.md +9 -9
  69. package/payload/templates/harness.md +34 -34
  70. package/payload/templates/spec.md +14 -14
  71. package/payload/templates/steering.md +9 -9
  72. 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,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
- MIT
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