@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
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
# /sdlc:review <id> — agent panel (signal-triggered)
|
|
2
|
-
|
|
3
|
-
Run when: tier deep, OR the diff touches auth/payments/data handling, OR >10
|
|
4
|
-
files changed, OR the change has a non-empty `lenses`. Otherwise skip silently — a
|
|
5
|
-
ceremonial review is garbage.
|
|
6
|
-
|
|
7
|
-
1. Fan out in parallel, all read-only, each with the diff + change.md only:
|
|
8
|
-
- `sdlc-architect` (deepest): design integrity, coupling, contract drift.
|
|
9
|
-
- `sdlc-security` (balanced): injection, authz, secrets, unsafe deps.
|
|
10
|
-
- `sdlc-quality` (cheap): contract coverage gaps, edge cases, dead code.
|
|
11
|
-
- `sdlc-ops` (cheap): config, migrations, rollback, observability impact.
|
|
12
|
-
- Plus one reviewer per recorded lens, only for lenses whose stages include review:
|
|
13
|
-
its review focus from `lenses.md`, per `lenses.md` § Using a recorded lens.
|
|
14
|
-
Run it as a read-only subagent when possible; the four core reviewers still run.
|
|
15
|
-
2. Merge findings in the main loop. Classify: blocker | improvement | note.
|
|
16
|
-
3. Blockers → append as fix tasks and route back to /sdlc:build (counts toward
|
|
17
|
-
the same 3-round budget as verify). Improvements: apply if ≤5 min each,
|
|
18
|
-
otherwise record one line in the change for the digest.
|
|
19
|
-
4. `node sdlc/.hooks/journal.mjs note review blockers=<n> mode=<panel|solo>`.
|
|
20
|
-
`mode=panel` only when every reviewer that ran — the four and each lens — was an
|
|
21
|
-
independent agent; `mode=solo` when the
|
|
22
|
-
panel cannot run — subagents unavailable or disallowed — and the main loop
|
|
23
|
-
reviewed its own work through those four lenses instead. Run it that way
|
|
24
|
-
rather than skipping the review, and say so in the note: a self-review that
|
|
25
|
-
is recorded as a panel is worse than no review, because it reads as
|
|
26
|
-
independent evidence months later.
|
|
27
|
-
|
|
28
|
-
Pass condition: zero open blockers. Next: /sdlc:ship.
|
|
29
|
-
|
|
30
|
-
`--auto`: do this stage, then continue to ship under `auto.md`'s unattended
|
|
31
|
-
mode — gather, confirm once, run. The stage still does its own work first.
|
|
1
|
+
# /sdlc:review <id> — agent panel (signal-triggered)
|
|
2
|
+
|
|
3
|
+
Run when: tier deep, OR the diff touches auth/payments/data handling, OR >10
|
|
4
|
+
files changed, OR the change has a non-empty `lenses`. Otherwise skip silently — a
|
|
5
|
+
ceremonial review is garbage.
|
|
6
|
+
|
|
7
|
+
1. Fan out in parallel, all read-only, each with the diff + change.md only:
|
|
8
|
+
- `sdlc-architect` (deepest): design integrity, coupling, contract drift.
|
|
9
|
+
- `sdlc-security` (balanced): injection, authz, secrets, unsafe deps.
|
|
10
|
+
- `sdlc-quality` (cheap): contract coverage gaps, edge cases, dead code.
|
|
11
|
+
- `sdlc-ops` (cheap): config, migrations, rollback, observability impact.
|
|
12
|
+
- Plus one reviewer per recorded lens, only for lenses whose stages include review:
|
|
13
|
+
its review focus from `lenses.md`, per `lenses.md` § Using a recorded lens.
|
|
14
|
+
Run it as a read-only subagent when possible; the four core reviewers still run.
|
|
15
|
+
2. Merge findings in the main loop. Classify: blocker | improvement | note.
|
|
16
|
+
3. Blockers → append as fix tasks and route back to /sdlc:build (counts toward
|
|
17
|
+
the same 3-round budget as verify). Improvements: apply if ≤5 min each,
|
|
18
|
+
otherwise record one line in the change for the digest.
|
|
19
|
+
4. `node sdlc/.hooks/journal.mjs note review blockers=<n> mode=<panel|solo>`.
|
|
20
|
+
`mode=panel` only when every reviewer that ran — the four and each lens — was an
|
|
21
|
+
independent agent; `mode=solo` when the
|
|
22
|
+
panel cannot run — subagents unavailable or disallowed — and the main loop
|
|
23
|
+
reviewed its own work through those four lenses instead. Run it that way
|
|
24
|
+
rather than skipping the review, and say so in the note: a self-review that
|
|
25
|
+
is recorded as a panel is worse than no review, because it reads as
|
|
26
|
+
independent evidence months later.
|
|
27
|
+
|
|
28
|
+
Pass condition: zero open blockers. Next: /sdlc:ship.
|
|
29
|
+
|
|
30
|
+
`--auto`: do this stage, then continue to ship under `auto.md`'s unattended
|
|
31
|
+
mode — gather, confirm once, run. The stage still does its own work first.
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
# Model routing
|
|
2
|
-
|
|
3
|
-
Generic tiers only — the harness adapter maps them to real models
|
|
4
|
-
(Claude Code agents: cheap→haiku, balanced→sonnet, deepest→opus).
|
|
5
|
-
|
|
6
|
-
| Task kind | Tier | Why |
|
|
7
|
-
|---|---|---|
|
|
8
|
-
| requirements shaping, architecture, deep design | deepest | judgment-heavy, small volume |
|
|
9
|
-
| standard implementation (sdlc-builder) | balanced | quality/cost sweet spot |
|
|
10
|
-
| test generation (sdlc-contractor) | cheap | mechanical from the contract table |
|
|
11
|
-
| eval judging (sdlc-evaluator) | cheap | rubric scoring, high volume |
|
|
12
|
-
| review panel passes | cheap–balanced | parallel, bounded scope |
|
|
13
|
-
| learning distillation (sdlc-learner) | cheap | summarization over journals |
|
|
14
|
-
|
|
15
|
-
Rules:
|
|
16
|
-
- Task lines in change.md may carry `[tier:cheap|balanced|deepest]`; default = balanced.
|
|
17
|
-
- Never send a mechanical task to deepest "to be safe" — that is the waste the
|
|
18
|
-
routing table exists to prevent.
|
|
19
|
-
- Escalate one tier only after a concrete failure at the current tier (journal it).
|
|
1
|
+
# Model routing
|
|
2
|
+
|
|
3
|
+
Generic tiers only — the harness adapter maps them to real models
|
|
4
|
+
(Claude Code agents: cheap→haiku, balanced→sonnet, deepest→opus).
|
|
5
|
+
|
|
6
|
+
| Task kind | Tier | Why |
|
|
7
|
+
|---|---|---|
|
|
8
|
+
| requirements shaping, architecture, deep design | deepest | judgment-heavy, small volume |
|
|
9
|
+
| standard implementation (sdlc-builder) | balanced | quality/cost sweet spot |
|
|
10
|
+
| test generation (sdlc-contractor) | cheap | mechanical from the contract table |
|
|
11
|
+
| eval judging (sdlc-evaluator) | cheap | rubric scoring, high volume |
|
|
12
|
+
| review panel passes | cheap–balanced | parallel, bounded scope |
|
|
13
|
+
| learning distillation (sdlc-learner) | cheap | summarization over journals |
|
|
14
|
+
|
|
15
|
+
Rules:
|
|
16
|
+
- Task lines in change.md may carry `[tier:cheap|balanced|deepest]`; default = balanced.
|
|
17
|
+
- Never send a mechanical task to deepest "to be safe" — that is the waste the
|
|
18
|
+
routing table exists to prevent.
|
|
19
|
+
- Escalate one tier only after a concrete failure at the current tier (journal it).
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
# sdlc rules card
|
|
2
|
-
<!-- ≤40 lines · embedded verbatim in non-Claude tool adapters; Claude gets the same rules enforced by hooks. -->
|
|
3
|
-
|
|
4
|
-
- Work flows through `sdlc/changes/<id>/change.md`: new → [design] → contract → build → verify → [review] → ship.
|
|
5
|
-
- NEVER edit `sdlc/specs/**` or `sdlc/changes/archive/**` by hand. Living specs change only
|
|
6
|
-
via a change's `## Delta:` section, merged by `npx @warnyin/sdlc archive <id>` at ship.
|
|
7
|
-
- NEVER hand-edit `journal.ndjson` or `sdlc/.state/**` — they are machine-owned.
|
|
8
|
-
- Write tests + evals (`contract/`) BEFORE code. No implementation while status is `new`.
|
|
9
|
-
- Ambiguity: make the safest assumption and record it under `## Assumptions`; use
|
|
10
|
-
`[NEEDS CLARIFICATION: q]` only for facts you cannot obtain —
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
1
|
+
# sdlc rules card
|
|
2
|
+
<!-- ≤40 lines · embedded verbatim in non-Claude tool adapters; Claude gets the same rules enforced by hooks. -->
|
|
3
|
+
|
|
4
|
+
- Work flows through `sdlc/changes/<id>/change.md`: new → [design] → contract → build → verify → [review] → ship.
|
|
5
|
+
- NEVER edit `sdlc/specs/**` or `sdlc/changes/archive/**` by hand. Living specs change only
|
|
6
|
+
via a change's `## Delta:` section, merged by `npx @warnyin/sdlc archive <id>` at ship.
|
|
7
|
+
- NEVER hand-edit `journal.ndjson` or `sdlc/.state/**` — they are machine-owned.
|
|
8
|
+
- Write tests + evals (`contract/`) BEFORE code. No implementation while status is `new`.
|
|
9
|
+
- Ambiguity: make the safest assumption and record it under `## Assumptions`; use
|
|
10
|
+
`[NEEDS CLARIFICATION: q]` only for facts you cannot obtain — ask those in rounds ordered
|
|
11
|
+
by dependency, each with a recommended answer; resolve all before contract.
|
|
12
|
+
- Respect line caps written in each template comment; run `npx @warnyin/sdlc validate <id>`
|
|
13
|
+
before claiming any gate passed — a red validator means the gate did NOT pass.
|
|
14
|
+
- Constitution edits go through /sdlc:steer only; always-loaded context ≤ 60 lines total.
|
|
15
|
+
- Verify = real test run + eval rubric. Max 3 fix rounds, then escalate to the human.
|
|
16
|
+
- Hard-floor (security, payments, data-loss, irreversible): tier = deep, human approves ship.
|
|
17
|
+
- Before editing an area, read any steering file whose `pathMatch` covers it.
|
package/payload/playbook/ship.md
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
# /sdlc:ship <id> — merge, archive, learn, digest
|
|
2
|
-
|
|
3
|
-
Precondition: `status: verified` (+ review passed when it ran).
|
|
4
|
-
|
|
5
|
-
1. **Policy check** (`sdlc/harness.md § Autonomy policy`): if this change is NOT
|
|
6
|
-
auto-shippable (deep/hard-floor), show the human a 5-line summary (why, delta
|
|
7
|
-
heads, verify result, cost so far) and wait for approval. Otherwise proceed.
|
|
8
|
-
2. Open the gate and archive mechanically:
|
|
9
|
-
`node sdlc/.hooks/journal.mjs open-ship <id>`
|
|
10
|
-
`npx @warnyin/sdlc archive <id>`
|
|
11
|
-
(validates --strict, merges every Delta into `sdlc/specs/`, promotes evals,
|
|
12
|
-
stamps `status: shipped`, moves the folder to `changes/archive/<date>-<id>/`).
|
|
13
|
-
Any `⚠ MODIFIED Requirement …` line means the new body carried away a scenario
|
|
14
|
-
the spec still promised: confirm it was intended and name it in the digest.
|
|
15
|
-
3. **Learn** — delegate to `sdlc-learner` (cheap) with the archived change.md +
|
|
16
|
-
its journal.ndjson. It proposes ≤3 items: add-rule (with evidence pointer) /
|
|
17
|
-
expire-or-demote (rule or steering that never fired) / harness tweak.
|
|
18
|
-
Apply reductions and demotions immediately (they always save tokens).
|
|
19
|
-
Additions to always-loaded context are NOT applied — list them in the digest.
|
|
20
|
-
4. **Digest** — write `sdlc/changes/archive/<date>-<id>/digest.md` (≤15 lines):
|
|
21
|
-
what shipped, spec deltas merged, assumptions made, verify rounds, tokens/cost
|
|
22
|
-
(from journal `session` events), learner proposals awaiting the human.
|
|
23
|
-
When any verify or review note carries `mode=solo`, the digest SHALL say which
|
|
24
|
-
outcomes were self-produced. A reader months from now cannot otherwise tell a
|
|
25
|
-
panel's verdict from the author's own.
|
|
26
|
-
When any `escalation` event carries `preauth=yes`, the digest SHALL list those
|
|
27
|
-
pre-authorized escalations by condition — the points where a human would normally
|
|
28
|
-
have stood and, this run, did not.
|
|
29
|
-
5. Close the gate: `node sdlc/.hooks/journal.mjs close`. Tell the user in one
|
|
30
|
-
line: shipped + where the digest is.
|
|
31
|
-
|
|
32
|
-
The digest is the async human touchpoint — reviewable and revertible later.
|
|
33
|
-
|
|
34
|
-
`--auto`: do this stage, then continue to ship under `auto.md`'s unattended
|
|
35
|
-
mode — gather, confirm once, run. The stage still does its own work first.
|
|
1
|
+
# /sdlc:ship <id> — merge, archive, learn, digest
|
|
2
|
+
|
|
3
|
+
Precondition: `status: verified` (+ review passed when it ran).
|
|
4
|
+
|
|
5
|
+
1. **Policy check** (`sdlc/harness.md § Autonomy policy`): if this change is NOT
|
|
6
|
+
auto-shippable (deep/hard-floor), show the human a 5-line summary (why, delta
|
|
7
|
+
heads, verify result, cost so far) and wait for approval. Otherwise proceed.
|
|
8
|
+
2. Open the gate and archive mechanically:
|
|
9
|
+
`node sdlc/.hooks/journal.mjs open-ship <id>`
|
|
10
|
+
`npx @warnyin/sdlc archive <id>`
|
|
11
|
+
(validates --strict, merges every Delta into `sdlc/specs/`, promotes evals,
|
|
12
|
+
stamps `status: shipped`, moves the folder to `changes/archive/<date>-<id>/`).
|
|
13
|
+
Any `⚠ MODIFIED Requirement …` line means the new body carried away a scenario
|
|
14
|
+
the spec still promised: confirm it was intended and name it in the digest.
|
|
15
|
+
3. **Learn** — delegate to `sdlc-learner` (cheap) with the archived change.md +
|
|
16
|
+
its journal.ndjson. It proposes ≤3 items: add-rule (with evidence pointer) /
|
|
17
|
+
expire-or-demote (rule or steering that never fired) / harness tweak.
|
|
18
|
+
Apply reductions and demotions immediately (they always save tokens).
|
|
19
|
+
Additions to always-loaded context are NOT applied — list them in the digest.
|
|
20
|
+
4. **Digest** — write `sdlc/changes/archive/<date>-<id>/digest.md` (≤15 lines):
|
|
21
|
+
what shipped, spec deltas merged, assumptions made, verify rounds, tokens/cost
|
|
22
|
+
(from journal `session` events), learner proposals awaiting the human.
|
|
23
|
+
When any verify or review note carries `mode=solo`, the digest SHALL say which
|
|
24
|
+
outcomes were self-produced. A reader months from now cannot otherwise tell a
|
|
25
|
+
panel's verdict from the author's own.
|
|
26
|
+
When any `escalation` event carries `preauth=yes`, the digest SHALL list those
|
|
27
|
+
pre-authorized escalations by condition — the points where a human would normally
|
|
28
|
+
have stood and, this run, did not.
|
|
29
|
+
5. Close the gate: `node sdlc/.hooks/journal.mjs close`. Tell the user in one
|
|
30
|
+
line: shipped + where the digest is.
|
|
31
|
+
|
|
32
|
+
The digest is the async human touchpoint — reviewable and revertible later.
|
|
33
|
+
|
|
34
|
+
`--auto`: do this stage, then continue to ship under `auto.md`'s unattended
|
|
35
|
+
mode — gather, confirm once, run. The stage still does its own work first.
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
# /sdlc:steer — manage the static/dynamic boundary
|
|
2
|
-
|
|
3
|
-
The ONLY sanctioned way to edit always-loaded context.
|
|
4
|
-
|
|
5
|
-
1. `node sdlc/.hooks/journal.mjs open-steer`
|
|
6
|
-
2. Apply the requested edits:
|
|
7
|
-
- New knowledge → a steering file with the LEAST resident inclusion mode that
|
|
8
|
-
works: `agent` > `manual` > `paths` > `always` (always needs justification).
|
|
9
|
-
- Constitution edits: SHALL/SHALL NOT lines only. If the always-budget
|
|
10
|
-
(60 lines) would overflow, something must be demoted or deleted first —
|
|
11
|
-
name the displaced line explicitly.
|
|
12
|
-
3. Hygiene pass (do it every time, it is 30 seconds):
|
|
13
|
-
- `/sdlc:observe` data — steering never pointer-hit across the last N changes
|
|
14
|
-
→ propose demote (`paths`→`manual`) or delete.
|
|
15
|
-
- Rules with no guard/journal evidence of ever mattering → propose expiry.
|
|
16
|
-
- Apply what the user agrees to (reductions may be applied without asking).
|
|
17
|
-
4. `npx @warnyin/sdlc validate` — the always-budget check must be green.
|
|
18
|
-
5. `node sdlc/.hooks/journal.mjs close`
|
|
19
|
-
|
|
20
|
-
Learning direction is one-way by design: content flows from always → paths →
|
|
21
|
-
manual → deleted as evidence accumulates. Getting leaner is the success metric.
|
|
1
|
+
# /sdlc:steer — manage the static/dynamic boundary
|
|
2
|
+
|
|
3
|
+
The ONLY sanctioned way to edit always-loaded context.
|
|
4
|
+
|
|
5
|
+
1. `node sdlc/.hooks/journal.mjs open-steer`
|
|
6
|
+
2. Apply the requested edits:
|
|
7
|
+
- New knowledge → a steering file with the LEAST resident inclusion mode that
|
|
8
|
+
works: `agent` > `manual` > `paths` > `always` (always needs justification).
|
|
9
|
+
- Constitution edits: SHALL/SHALL NOT lines only. If the always-budget
|
|
10
|
+
(60 lines) would overflow, something must be demoted or deleted first —
|
|
11
|
+
name the displaced line explicitly.
|
|
12
|
+
3. Hygiene pass (do it every time, it is 30 seconds):
|
|
13
|
+
- `/sdlc:observe` data — steering never pointer-hit across the last N changes
|
|
14
|
+
→ propose demote (`paths`→`manual`) or delete.
|
|
15
|
+
- Rules with no guard/journal evidence of ever mattering → propose expiry.
|
|
16
|
+
- Apply what the user agrees to (reductions may be applied without asking).
|
|
17
|
+
4. `npx @warnyin/sdlc validate` — the always-budget check must be green.
|
|
18
|
+
5. `node sdlc/.hooks/journal.mjs close`
|
|
19
|
+
|
|
20
|
+
Learning direction is one-way by design: content flows from always → paths →
|
|
21
|
+
manual → deleted as evidence accumulates. Getting leaner is the success metric.
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
# /sdlc:verify <id> — the feedback loop
|
|
2
|
-
|
|
3
|
-
Two halves, both must pass. Verification is against the CONTRACT, not vibes.
|
|
4
|
-
|
|
5
|
-
1. **Tests (deterministic)**: run the full test command from `sdlc/harness.md`.
|
|
6
|
-
Every row of `contract/tests.md` must be covered by a passing test.
|
|
7
|
-
2. **Evals (non-deterministic)** — when `contract/evals.md` exists: delegate to
|
|
8
|
-
the `sdlc-evaluator` agent (cheap) with the rubric + the diff + the task log;
|
|
9
|
-
it returns a score per rubric line. Pass bar is written in the file.
|
|
10
|
-
If the evaluator cannot run — subagents unavailable or disallowed in this
|
|
11
|
-
session — score in the main loop instead and record that. A panel that could
|
|
12
|
-
not run is a fact to write down, never a reason to stop the pipeline; but a
|
|
13
|
-
run that judged its own work is weaker evidence and must not read as if a
|
|
14
|
-
panel had agreed.
|
|
15
|
-
|
|
16
|
-
3. **Lens bars** — a non-empty `lenses`, whether or not `evals.md` exists: every lens bar
|
|
17
|
-
must appear as a `tests.md` row or an `evals.md` line; a lens with its bars in neither
|
|
18
|
-
is a contract gap and fails verify.
|
|
19
|
-
|
|
20
|
-
On failure:
|
|
21
|
-
- Cluster failures by root cause (one line each) and append the cluster note to
|
|
22
|
-
the change's `## Tasks` area as unchecked fix tasks.
|
|
23
|
-
- `node sdlc/.hooks/journal.mjs note verify result=fail round=<n> mode=<panel|solo>`
|
|
24
|
-
- Route back to /sdlc:build. Maximum 3 rounds total; on the 4th failure STOP and
|
|
25
|
-
escalate to the human with the cluster history (Autonomy policy condition).
|
|
26
|
-
- Never lower the bar: do not edit tests/evals to pass unless the contract
|
|
27
|
-
itself was wrong — changing the contract reopens the adversarial check.
|
|
28
|
-
|
|
29
|
-
On pass: set `status: verified`,
|
|
30
|
-
`node sdlc/.hooks/journal.mjs note verify result=pass round=<n> mode=<panel|solo>`.
|
|
31
|
-
|
|
32
|
-
`mode=panel` only when independent agents produced the judgment; `mode=solo` when
|
|
33
|
-
the main loop judged its own work. Every verify note carries it, pass or fail —
|
|
34
|
-
`/sdlc:observe` reports a change as self-judged from this field, and omitting it
|
|
35
|
-
leaves the record silently indistinguishable from an independent one.
|
|
36
|
-
|
|
37
|
-
Next: review signals present (deep tier, security-touching diff, >10 files,
|
|
38
|
-
a non-empty `lenses`)
|
|
39
|
-
→ /sdlc:review; otherwise → /sdlc:ship.
|
|
40
|
-
|
|
41
|
-
`--auto`: do this stage, then continue to ship under `auto.md`'s unattended
|
|
42
|
-
mode — gather, confirm once, run. The stage still does its own work first.
|
|
1
|
+
# /sdlc:verify <id> — the feedback loop
|
|
2
|
+
|
|
3
|
+
Two halves, both must pass. Verification is against the CONTRACT, not vibes.
|
|
4
|
+
|
|
5
|
+
1. **Tests (deterministic)**: run the full test command from `sdlc/harness.md`.
|
|
6
|
+
Every row of `contract/tests.md` must be covered by a passing test.
|
|
7
|
+
2. **Evals (non-deterministic)** — when `contract/evals.md` exists: delegate to
|
|
8
|
+
the `sdlc-evaluator` agent (cheap) with the rubric + the diff + the task log;
|
|
9
|
+
it returns a score per rubric line. Pass bar is written in the file.
|
|
10
|
+
If the evaluator cannot run — subagents unavailable or disallowed in this
|
|
11
|
+
session — score in the main loop instead and record that. A panel that could
|
|
12
|
+
not run is a fact to write down, never a reason to stop the pipeline; but a
|
|
13
|
+
run that judged its own work is weaker evidence and must not read as if a
|
|
14
|
+
panel had agreed.
|
|
15
|
+
|
|
16
|
+
3. **Lens bars** — a non-empty `lenses`, whether or not `evals.md` exists: every lens bar
|
|
17
|
+
must appear as a `tests.md` row or an `evals.md` line; a lens with its bars in neither
|
|
18
|
+
is a contract gap and fails verify.
|
|
19
|
+
|
|
20
|
+
On failure:
|
|
21
|
+
- Cluster failures by root cause (one line each) and append the cluster note to
|
|
22
|
+
the change's `## Tasks` area as unchecked fix tasks.
|
|
23
|
+
- `node sdlc/.hooks/journal.mjs note verify result=fail round=<n> mode=<panel|solo>`
|
|
24
|
+
- Route back to /sdlc:build. Maximum 3 rounds total; on the 4th failure STOP and
|
|
25
|
+
escalate to the human with the cluster history (Autonomy policy condition).
|
|
26
|
+
- Never lower the bar: do not edit tests/evals to pass unless the contract
|
|
27
|
+
itself was wrong — changing the contract reopens the adversarial check.
|
|
28
|
+
|
|
29
|
+
On pass: set `status: verified`,
|
|
30
|
+
`node sdlc/.hooks/journal.mjs note verify result=pass round=<n> mode=<panel|solo>`.
|
|
31
|
+
|
|
32
|
+
`mode=panel` only when independent agents produced the judgment; `mode=solo` when
|
|
33
|
+
the main loop judged its own work. Every verify note carries it, pass or fail —
|
|
34
|
+
`/sdlc:observe` reports a change as self-judged from this field, and omitting it
|
|
35
|
+
leaves the record silently indistinguishable from an independent one.
|
|
36
|
+
|
|
37
|
+
Next: review signals present (deep tier, security-touching diff, >10 files,
|
|
38
|
+
a non-empty `lenses`)
|
|
39
|
+
→ /sdlc:review; otherwise → /sdlc:ship.
|
|
40
|
+
|
|
41
|
+
`--auto`: do this stage, then continue to ship under `auto.md`'s unattended
|
|
42
|
+
mode — gather, confirm once, run. The stage still does its own work first.
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: <kebab-id>
|
|
3
|
-
tier: deep
|
|
4
|
-
status: new
|
|
5
|
-
---
|
|
6
|
-
# Change: <title>
|
|
7
|
-
<!-- cap:150 · deep tier: hard-floor surface (security/payments/data-loss/irreversible) or new/multi-capability delta. Human gates apply per Autonomy policy. -->
|
|
8
|
-
|
|
9
|
-
## Why (≤5 lines)
|
|
10
|
-
<problem + outcome. No solutioning.>
|
|
11
|
-
|
|
12
|
-
## Assumptions
|
|
13
|
-
- <assumption made instead of asking, with the reason it is safe>
|
|
14
|
-
|
|
15
|
-
## Delta: <capability>
|
|
16
|
-
|
|
17
|
-
### ADDED Requirement: <name>
|
|
18
|
-
The system SHALL <behavior>.
|
|
19
|
-
|
|
20
|
-
#### Scenario: <name>
|
|
21
|
-
- WHEN <condition>
|
|
22
|
-
- THEN <observable outcome>
|
|
23
|
-
|
|
24
|
-
## Design
|
|
25
|
-
<!-- decisions & trade-offs only — never restate the delta. Escalate irreversible decisions per Autonomy policy. -->
|
|
26
|
-
- decision: <what> · alternatives: <a/b> · because: <why>
|
|
27
|
-
|
|
28
|
-
## Tasks
|
|
29
|
-
- [ ] T1 <task> [P] [tier:balanced]
|
|
1
|
+
---
|
|
2
|
+
id: <kebab-id>
|
|
3
|
+
tier: deep
|
|
4
|
+
status: new
|
|
5
|
+
---
|
|
6
|
+
# Change: <title>
|
|
7
|
+
<!-- cap:150 · deep tier: hard-floor surface (security/payments/data-loss/irreversible) or new/multi-capability delta. Human gates apply per Autonomy policy. -->
|
|
8
|
+
|
|
9
|
+
## Why (≤5 lines)
|
|
10
|
+
<problem + outcome. No solutioning.>
|
|
11
|
+
|
|
12
|
+
## Assumptions
|
|
13
|
+
- <assumption made instead of asking, with the reason it is safe>
|
|
14
|
+
|
|
15
|
+
## Delta: <capability>
|
|
16
|
+
|
|
17
|
+
### ADDED Requirement: <name>
|
|
18
|
+
The system SHALL <behavior>.
|
|
19
|
+
|
|
20
|
+
#### Scenario: <name>
|
|
21
|
+
- WHEN <condition>
|
|
22
|
+
- THEN <observable outcome>
|
|
23
|
+
|
|
24
|
+
## Design
|
|
25
|
+
<!-- decisions & trade-offs only — never restate the delta. Escalate irreversible decisions per Autonomy policy. -->
|
|
26
|
+
- decision: <what> · alternatives: <a/b> · because: <why>
|
|
27
|
+
|
|
28
|
+
## Tasks
|
|
29
|
+
- [ ] T1 <task> [P] [tier:balanced]
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: <kebab-id>
|
|
3
|
-
tier: standard
|
|
4
|
-
status: new
|
|
5
|
-
---
|
|
6
|
-
# Change: <title>
|
|
7
|
-
<!-- cap:100 · standard tier. Delta sections ARE the spec change — merged mechanically at ship, never re-narrated. -->
|
|
8
|
-
|
|
9
|
-
## Why (≤5 lines)
|
|
10
|
-
<problem + outcome. No solutioning.>
|
|
11
|
-
|
|
12
|
-
## Assumptions
|
|
13
|
-
- <assumption made instead of asking, with the reason it is safe — delete section if none>
|
|
14
|
-
<!-- unresolved ambiguity the agent cannot assume → [NEEDS CLARIFICATION: question] inline where it bites -->
|
|
15
|
-
|
|
16
|
-
## Delta: <capability>
|
|
17
|
-
|
|
18
|
-
### ADDED Requirement: <name>
|
|
19
|
-
The system SHALL <behavior>.
|
|
20
|
-
|
|
21
|
-
#### Scenario: <name>
|
|
22
|
-
- WHEN <condition>
|
|
23
|
-
- THEN <observable outcome>
|
|
24
|
-
|
|
25
|
-
## Tasks
|
|
26
|
-
<!-- [P] = parallelizable wave · [tier:cheap|balanced|deepest] per the routing table in harness.md -->
|
|
27
|
-
- [ ] T1 <task> [P] [tier:balanced]
|
|
28
|
-
- [ ] T2 <task> [tier:cheap]
|
|
1
|
+
---
|
|
2
|
+
id: <kebab-id>
|
|
3
|
+
tier: standard
|
|
4
|
+
status: new
|
|
5
|
+
---
|
|
6
|
+
# Change: <title>
|
|
7
|
+
<!-- cap:100 · standard tier. Delta sections ARE the spec change — merged mechanically at ship, never re-narrated. -->
|
|
8
|
+
|
|
9
|
+
## Why (≤5 lines)
|
|
10
|
+
<problem + outcome. No solutioning.>
|
|
11
|
+
|
|
12
|
+
## Assumptions
|
|
13
|
+
- <assumption made instead of asking, with the reason it is safe — delete section if none>
|
|
14
|
+
<!-- unresolved ambiguity the agent cannot assume → [NEEDS CLARIFICATION: question] inline where it bites -->
|
|
15
|
+
|
|
16
|
+
## Delta: <capability>
|
|
17
|
+
|
|
18
|
+
### ADDED Requirement: <name>
|
|
19
|
+
The system SHALL <behavior>.
|
|
20
|
+
|
|
21
|
+
#### Scenario: <name>
|
|
22
|
+
- WHEN <condition>
|
|
23
|
+
- THEN <observable outcome>
|
|
24
|
+
|
|
25
|
+
## Tasks
|
|
26
|
+
<!-- [P] = parallelizable wave · [tier:cheap|balanced|deepest] per the routing table in harness.md -->
|
|
27
|
+
- [ ] T1 <task> [P] [tier:balanced]
|
|
28
|
+
- [ ] T2 <task> [tier:cheap]
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: <kebab-id>
|
|
3
|
-
tier: vibe
|
|
4
|
-
status: new
|
|
5
|
-
---
|
|
6
|
-
# Change: <title>
|
|
7
|
-
<!-- cap:40 · vibe tier = one file, no contract. Reversible, no behavior-contract change, ≤2 files. -->
|
|
8
|
-
|
|
9
|
-
## Why (≤3 lines)
|
|
10
|
-
<problem + outcome>
|
|
11
|
-
|
|
12
|
-
## Assumptions
|
|
13
|
-
- <assumption the agent made instead of asking — delete section if none>
|
|
14
|
-
|
|
15
|
-
## Tasks
|
|
16
|
-
- [ ] T1 <task>
|
|
17
|
-
|
|
18
|
-
## Receipt (filled at ship)
|
|
19
|
-
- files touched: · test result: · cost:
|
|
1
|
+
---
|
|
2
|
+
id: <kebab-id>
|
|
3
|
+
tier: vibe
|
|
4
|
+
status: new
|
|
5
|
+
---
|
|
6
|
+
# Change: <title>
|
|
7
|
+
<!-- cap:40 · vibe tier = one file, no contract. Reversible, no behavior-contract change, ≤2 files. -->
|
|
8
|
+
|
|
9
|
+
## Why (≤3 lines)
|
|
10
|
+
<problem + outcome>
|
|
11
|
+
|
|
12
|
+
## Assumptions
|
|
13
|
+
- <assumption the agent made instead of asking — delete section if none>
|
|
14
|
+
|
|
15
|
+
## Tasks
|
|
16
|
+
- [ ] T1 <task>
|
|
17
|
+
|
|
18
|
+
## Receipt (filled at ship)
|
|
19
|
+
- files touched: · test result: · cost:
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
# @warnyin/sdlc project config — machine-read; keep minimal.
|
|
2
|
-
language: en
|
|
3
|
-
tools: [] # filled by `warnyin-sdlc init`
|
|
4
|
-
# Optional price table for cost reporting (USD per 1M tokens).
|
|
5
|
-
# prices:
|
|
6
|
-
# claude-sonnet-5: { input: 3, output: 15, cacheRead: 0.3 }
|
|
7
|
-
#
|
|
8
|
-
#
|
|
1
|
+
# @warnyin/sdlc project config — machine-read; keep minimal.
|
|
2
|
+
language: en
|
|
3
|
+
tools: [] # filled by `warnyin-sdlc init`
|
|
4
|
+
# Optional price table for cost reporting (USD per 1M tokens).
|
|
5
|
+
# prices:
|
|
6
|
+
# claude-sonnet-5: { input: 3, output: 15, cacheRead: 0.3 }
|
|
7
|
+
# Once a day a SessionStart hook asks the npm registry whether a newer @warnyin/sdlc exists
|
|
8
|
+
# and, if so, tells the agent to mention `npx @warnyin/sdlc update`. It never updates by
|
|
9
|
+
# itself. Uncomment to switch it off (CI or NO_UPDATE_NOTIFIER in the env also do).
|
|
10
|
+
# updateCheck: false
|
|
11
|
+
# Optional per-artifact cap overrides (see lib/caps.mjs for defaults).
|
|
12
|
+
# caps: {}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
# Constitution — <project>
|
|
2
|
-
<!-- cap:30 · ALWAYS LOADED: every line here costs tokens in EVERY turn. Prove residency or move it to steering. -->
|
|
3
|
-
|
|
4
|
-
## Stack (facts only, max 3 lines)
|
|
5
|
-
- <runtime / framework / db — one line each>
|
|
6
|
-
|
|
7
|
-
## Hard rules (SHALL / SHALL NOT only — no advice)
|
|
8
|
-
- The agent SHALL NOT edit `sdlc/specs/**` or `sdlc/changes/archive/**` outside `/sdlc:ship`.
|
|
9
|
-
- The agent SHALL record every assumption in the change's `## Assumptions` before acting on it.
|
|
10
|
-
- <add a rule each time the agent misbehaves; each new rule must displace an old one once the always-budget (60 lines) is full>
|
|
11
|
-
|
|
12
|
-
## Workflow
|
|
13
|
-
- Changes flow: new → [design] → contract → build → verify → [review] → ship.
|
|
14
|
-
- Tier by stakes: vibe | standard | deep — triage table lives in `sdlc/harness.md`.
|
|
1
|
+
# Constitution — <project>
|
|
2
|
+
<!-- cap:30 · ALWAYS LOADED: every line here costs tokens in EVERY turn. Prove residency or move it to steering. -->
|
|
3
|
+
|
|
4
|
+
## Stack (facts only, max 3 lines)
|
|
5
|
+
- <runtime / framework / db — one line each>
|
|
6
|
+
|
|
7
|
+
## Hard rules (SHALL / SHALL NOT only — no advice)
|
|
8
|
+
- The agent SHALL NOT edit `sdlc/specs/**` or `sdlc/changes/archive/**` outside `/sdlc:ship`.
|
|
9
|
+
- The agent SHALL record every assumption in the change's `## Assumptions` before acting on it.
|
|
10
|
+
- <add a rule each time the agent misbehaves; each new rule must displace an old one once the always-budget (60 lines) is full>
|
|
11
|
+
|
|
12
|
+
## Workflow
|
|
13
|
+
- Changes flow: new → [design] → contract → build → verify → [review] → ship.
|
|
14
|
+
- Tier by stakes: vibe | standard | deep — triage table lives in `sdlc/harness.md`.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
# Eval contract — <change-id>
|
|
2
|
-
<!-- cap:40 · verifies the non-deterministic half: trajectory + quality. Scored by sdlc-evaluator (cheap tier). -->
|
|
3
|
-
|
|
4
|
-
## Rubric (score 1–5 each)
|
|
5
|
-
- Trajectory: did the agent read the contract before writing code? run tests before claiming done?
|
|
6
|
-
- Quality: <change-specific bars>
|
|
7
|
-
|
|
8
|
-
## Pass bar
|
|
9
|
-
- all scores ≥ 4 · failures route back to `/sdlc:build` with a cluster note
|
|
1
|
+
# Eval contract — <change-id>
|
|
2
|
+
<!-- cap:40 · verifies the non-deterministic half: trajectory + quality. Scored by sdlc-evaluator (cheap tier). -->
|
|
3
|
+
|
|
4
|
+
## Rubric (score 1–5 each)
|
|
5
|
+
- Trajectory: did the agent read the contract before writing code? run tests before claiming done?
|
|
6
|
+
- Quality: <change-specific bars>
|
|
7
|
+
|
|
8
|
+
## Pass bar
|
|
9
|
+
- all scores ≥ 4 · failures route back to `/sdlc:build` with a cluster note
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
# Test contract — <change-id>
|
|
2
|
-
<!-- cap:60 · written BEFORE code. This is the deterministic half of the contract with the AI; failing tests are generated from this table. -->
|
|
3
|
-
|
|
4
|
-
| # | Given / When / Then | Kind (unit/int/e2e) | Maps to requirement |
|
|
5
|
-
|---|---|---|---|
|
|
6
|
-
| 1 | <g/w/t> | unit | <requirement name> |
|
|
7
|
-
|
|
8
|
-
## Out of scope (explicitly untested + why)
|
|
9
|
-
- <item — reason>
|
|
1
|
+
# Test contract — <change-id>
|
|
2
|
+
<!-- cap:60 · written BEFORE code. This is the deterministic half of the contract with the AI; failing tests are generated from this table. -->
|
|
3
|
+
|
|
4
|
+
| # | Given / When / Then | Kind (unit/int/e2e) | Maps to requirement |
|
|
5
|
+
|---|---|---|---|
|
|
6
|
+
| 1 | <g/w/t> | unit | <requirement name> |
|
|
7
|
+
|
|
8
|
+
## Out of scope (explicitly untested + why)
|
|
9
|
+
- <item — reason>
|