@warnyin/sdlc 0.3.0 → 0.5.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 +147 -95
- package/README.md +91 -84
- package/bin/cli.mjs +13 -2
- package/lib/observe.mjs +187 -174
- package/package.json +1 -1
- package/payload/adapters/claude/commands/sdlc/build.md +5 -5
- package/payload/adapters/claude/commands/sdlc/contract.md +5 -5
- package/payload/adapters/claude/commands/sdlc/design.md +5 -5
- package/payload/adapters/claude/commands/sdlc/feedback.md +5 -0
- package/payload/adapters/claude/commands/sdlc/new.md +5 -5
- package/payload/adapters/claude/commands/sdlc/review.md +5 -5
- package/payload/adapters/claude/commands/sdlc/ship.md +5 -5
- package/payload/adapters/claude/commands/sdlc/verify.md +5 -5
- package/payload/playbook/README.md +32 -30
- package/payload/playbook/auto.md +66 -31
- package/payload/playbook/build.md +26 -23
- package/payload/playbook/contract.md +26 -23
- package/payload/playbook/design.md +23 -20
- package/payload/playbook/feedback.md +69 -0
- package/payload/playbook/new.md +25 -22
- package/payload/playbook/next.md +14 -12
- package/payload/playbook/review.md +26 -17
- package/payload/playbook/ship.md +33 -24
- package/payload/playbook/verify.md +37 -24
package/payload/playbook/auto.md
CHANGED
|
@@ -1,31 +1,66 @@
|
|
|
1
|
-
# /sdlc:auto <title|change-id> — the whole pipeline, one command
|
|
2
|
-
|
|
3
|
-
Runs new → [design] → contract → build → verify → [review] → ship, each stage by
|
|
4
|
-
its own playbook, WITHOUT pausing for the human except on the Autonomy-policy
|
|
5
|
-
escalation conditions:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
-
|
|
26
|
-
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
1
|
+
# /sdlc:auto <title|change-id> — the whole pipeline, one command
|
|
2
|
+
|
|
3
|
+
Runs new → [design] → contract → build → verify → [review] → ship, each stage by
|
|
4
|
+
its own playbook, WITHOUT pausing for the human except on the Autonomy-policy
|
|
5
|
+
escalation conditions — each with the choice `--auto` may pre-approve:
|
|
6
|
+
|
|
7
|
+
| Condition | Pre-approvable as |
|
|
8
|
+
|---|---|
|
|
9
|
+
| a `[NEEDS CLARIFICATION]` the agent cannot resolve alone | assume-safe and continue · or stop and ask |
|
|
10
|
+
| verify failed more than 3 rounds | keep iterating · or stop |
|
|
11
|
+
| review found blockers | fix and continue · or stop for the human |
|
|
12
|
+
| ship needs human approval (deep tier / hard-floor: security, payments, data-loss, irreversible) | ship · or stop before ship |
|
|
13
|
+
| token budget exceeded (if the user set one) | continue · or stop |
|
|
14
|
+
|
|
15
|
+
`/sdlc:auto` and any stage command given `--auto` run in unattended mode below.
|
|
16
|
+
|
|
17
|
+
## Unattended mode — gather, confirm, run (in that order)
|
|
18
|
+
|
|
19
|
+
1. **Gather.** Triage the tier, read `npx @warnyin/sdlc status`, resolve the entry
|
|
20
|
+
stage, and collect every question you would otherwise raise mid-run. This step
|
|
21
|
+
writes NOTHING: no `change.md`, no journal entry, no gate, no active-change
|
|
22
|
+
pointer. A run that never gets confirmed must leave the repository unchanged.
|
|
23
|
+
2. **Confirm.** One message, and it must be decidable item by item:
|
|
24
|
+
- scope as you understood it, and the tier you triaged with its reason
|
|
25
|
+
- every ambiguity, each with the assumption you intend to act on
|
|
26
|
+
- one line per row of the escalation table above, each stating the choice you
|
|
27
|
+
want pre-approved, and each refusable on its own. For the ship row, name the
|
|
28
|
+
hard-floor surface it covers — never fold it into a general "run without me".
|
|
29
|
+
If the human declines or edits any item, nothing has been written yet: revise
|
|
30
|
+
the summary and ask again, or stop. Do not start work on a partial yes.
|
|
31
|
+
3. **Run.** Only now write anything. Work stage by stage to ship.
|
|
32
|
+
|
|
33
|
+
**Pre-authorization covers this run only.** It is never persisted to config, never
|
|
34
|
+
remembered for the next change, and never inherited by a resumed run — a resume
|
|
35
|
+
asks again. A condition outside the confirmed set stops the run and asks, exactly
|
|
36
|
+
as if no flag had been passed; treat that as a fact, not a judgement call.
|
|
37
|
+
|
|
38
|
+
Record every escalation you reach:
|
|
39
|
+
`node sdlc/.hooks/journal.mjs note escalation condition=<name> preauth=<yes|no>`
|
|
40
|
+
— `yes` when a pre-approval let you pass it, `no` when you stopped and asked.
|
|
41
|
+
|
|
42
|
+
Entry stage — resolve this first, never assume `new`:
|
|
43
|
+
- Run `npx @warnyin/sdlc status`. If the argument names an active change (or one
|
|
44
|
+
is active and the argument describes it), RESUME: map its status to the entry
|
|
45
|
+
stage with `next.md` §2 and start the pipeline there.
|
|
46
|
+
- Resume never rewrites an existing `change.md` — a change already triaged keeps
|
|
47
|
+
its tier, Delta and Assumptions. Re-run a stage only if its output is missing
|
|
48
|
+
or the validator rejects it.
|
|
49
|
+
- Start at `new` only when the argument matches no active change.
|
|
50
|
+
- With `--auto` on a stage command: the stage still does its own work first, then
|
|
51
|
+
the pipeline continues from there. A stage typed earlier than what the change's
|
|
52
|
+
status maps to is skipped with a one-line announcement, never re-run — the
|
|
53
|
+
pipeline is a ratchet.
|
|
54
|
+
|
|
55
|
+
Rules:
|
|
56
|
+
- Announce the plan in ≤3 lines after triage (id, tier, task count, entry stage),
|
|
57
|
+
so a resume is never silent. Then work.
|
|
58
|
+
- Between stages run `npx @warnyin/sdlc validate <id>` — a red validator is a
|
|
59
|
+
hard stop for that stage, not a suggestion.
|
|
60
|
+
- On escalation NOT pre-approved for this run: stop at the exact step, state what
|
|
61
|
+
is needed in ≤5 lines, wait. When the human answers, resume from that step —
|
|
62
|
+
never restart the pipeline. One that IS pre-approved: take the approved choice,
|
|
63
|
+
journal it, and keep going without asking.
|
|
64
|
+
- On completion report one line: shipped + digest path + total cost if known.
|
|
65
|
+
|
|
66
|
+
This is orchestrator mode: the human describes the outcome and walks away.
|
|
@@ -1,23 +1,26 @@
|
|
|
1
|
-
# /sdlc:build <id> — implement (Run the harness)
|
|
2
|
-
|
|
3
|
-
Precondition: status ≥ contracted (vibe tier is exempt from contracts).
|
|
4
|
-
Set `status: building`.
|
|
5
|
-
|
|
6
|
-
Mode by size:
|
|
7
|
-
- **Conductor** (≤2 tasks): implement in this session, task by task.
|
|
8
|
-
- **Orchestrator** (>2 tasks): fan out one `sdlc-builder` subagent per task in a
|
|
9
|
-
`[P]` wave; serialize between dependent waves. Each builder receives ONLY:
|
|
10
|
-
its task line, `contract/tests.md`, the touched capability's spec, and steering
|
|
11
|
-
matching its file area — never the whole change history.
|
|
12
|
-
|
|
13
|
-
Rules for whoever implements:
|
|
14
|
-
- Follow steering pointers the moment the PostToolUse hook emits them.
|
|
15
|
-
- Never edit `sdlc/specs/**`, archive, journals, or lint/test configs to go
|
|
16
|
-
green — hooks deny the first two; the rest is the config-protection rule.
|
|
17
|
-
- Per-task self-check = that task's tests + lint only; the full test run belongs
|
|
18
|
-
to /sdlc:verify (moved, not removed).
|
|
19
|
-
- Tick `- [x]` in `## Tasks` as each task lands; note surprises in one line max.
|
|
20
|
-
- Honor `[tier:x]` markers when delegating (see routing.md).
|
|
21
|
-
|
|
22
|
-
Done when all tasks are ticked and the code compiles/lints.
|
|
23
|
-
`node sdlc/.hooks/journal.mjs note build tasks=<n>` then → /sdlc:verify.
|
|
1
|
+
# /sdlc:build <id> — implement (Run the harness)
|
|
2
|
+
|
|
3
|
+
Precondition: status ≥ contracted (vibe tier is exempt from contracts).
|
|
4
|
+
Set `status: building`.
|
|
5
|
+
|
|
6
|
+
Mode by size:
|
|
7
|
+
- **Conductor** (≤2 tasks): implement in this session, task by task.
|
|
8
|
+
- **Orchestrator** (>2 tasks): fan out one `sdlc-builder` subagent per task in a
|
|
9
|
+
`[P]` wave; serialize between dependent waves. Each builder receives ONLY:
|
|
10
|
+
its task line, `contract/tests.md`, the touched capability's spec, and steering
|
|
11
|
+
matching its file area — never the whole change history.
|
|
12
|
+
|
|
13
|
+
Rules for whoever implements:
|
|
14
|
+
- Follow steering pointers the moment the PostToolUse hook emits them.
|
|
15
|
+
- Never edit `sdlc/specs/**`, archive, journals, or lint/test configs to go
|
|
16
|
+
green — hooks deny the first two; the rest is the config-protection rule.
|
|
17
|
+
- Per-task self-check = that task's tests + lint only; the full test run belongs
|
|
18
|
+
to /sdlc:verify (moved, not removed).
|
|
19
|
+
- Tick `- [x]` in `## Tasks` as each task lands; note surprises in one line max.
|
|
20
|
+
- Honor `[tier:x]` markers when delegating (see routing.md).
|
|
21
|
+
|
|
22
|
+
Done when all tasks are ticked and the code compiles/lints.
|
|
23
|
+
`node sdlc/.hooks/journal.mjs note build tasks=<n>` then → /sdlc:verify.
|
|
24
|
+
|
|
25
|
+
`--auto`: do this stage, then continue to ship under `auto.md`'s unattended
|
|
26
|
+
mode — gather, confirm once, run. The stage still does its own work first.
|
|
@@ -1,23 +1,26 @@
|
|
|
1
|
-
# /sdlc:contract <id> — tests + evals before code
|
|
2
|
-
|
|
3
|
-
The contract IS the handshake. Nothing in `## Tasks` may be implemented while
|
|
4
|
-
status is `new`.
|
|
5
|
-
|
|
6
|
-
1. From the Delta scenarios, write `contract/tests.md` (≤60 lines): one row per
|
|
7
|
-
behavior — Given/When/Then, kind, mapped requirement. List what is explicitly
|
|
8
|
-
out of scope and why.
|
|
9
|
-
2. Deep tier (standard optional): write `contract/evals.md` (≤40 lines) — the
|
|
10
|
-
trajectory + quality rubric the sdlc-evaluator will score.
|
|
11
|
-
3. Generate failing tests: delegate to the `sdlc-contractor` agent (cheap tier)
|
|
12
|
-
with ONLY tests.md + the delta + the project's test conventions. Run the test
|
|
13
|
-
command from `sdlc/harness.md` — every new test must FAIL (red) now; a test
|
|
14
|
-
that passes before implementation tests nothing.
|
|
15
|
-
4. Adversarial check instead of human approval: ask the `sdlc-quality` agent to
|
|
16
|
-
attack the contract — uncovered scenarios, untestable rows, missing edge
|
|
17
|
-
cases vs the delta. Fix findings; one round is usually enough, two max.
|
|
18
|
-
5. `npx @warnyin/sdlc validate <id>` clean → set frontmatter `status: contracted`
|
|
19
|
-
and `node sdlc/.hooks/journal.mjs note contract tests=<n>`.
|
|
20
|
-
|
|
21
|
-
Escalate only if the delta itself turns out ambiguous (back to /sdlc:new step 5).
|
|
22
|
-
|
|
23
|
-
Next: /sdlc:build.
|
|
1
|
+
# /sdlc:contract <id> — tests + evals before code
|
|
2
|
+
|
|
3
|
+
The contract IS the handshake. Nothing in `## Tasks` may be implemented while
|
|
4
|
+
status is `new`.
|
|
5
|
+
|
|
6
|
+
1. From the Delta scenarios, write `contract/tests.md` (≤60 lines): one row per
|
|
7
|
+
behavior — Given/When/Then, kind, mapped requirement. List what is explicitly
|
|
8
|
+
out of scope and why.
|
|
9
|
+
2. Deep tier (standard optional): write `contract/evals.md` (≤40 lines) — the
|
|
10
|
+
trajectory + quality rubric the sdlc-evaluator will score.
|
|
11
|
+
3. Generate failing tests: delegate to the `sdlc-contractor` agent (cheap tier)
|
|
12
|
+
with ONLY tests.md + the delta + the project's test conventions. Run the test
|
|
13
|
+
command from `sdlc/harness.md` — every new test must FAIL (red) now; a test
|
|
14
|
+
that passes before implementation tests nothing.
|
|
15
|
+
4. Adversarial check instead of human approval: ask the `sdlc-quality` agent to
|
|
16
|
+
attack the contract — uncovered scenarios, untestable rows, missing edge
|
|
17
|
+
cases vs the delta. Fix findings; one round is usually enough, two max.
|
|
18
|
+
5. `npx @warnyin/sdlc validate <id>` clean → set frontmatter `status: contracted`
|
|
19
|
+
and `node sdlc/.hooks/journal.mjs note contract tests=<n>`.
|
|
20
|
+
|
|
21
|
+
Escalate only if the delta itself turns out ambiguous (back to /sdlc:new step 5).
|
|
22
|
+
|
|
23
|
+
Next: /sdlc:build.
|
|
24
|
+
|
|
25
|
+
`--auto`: do this stage, then continue to ship under `auto.md`'s unattended
|
|
26
|
+
mode — gather, confirm once, run. The stage still does its own work first.
|
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
# /sdlc:design <id> — decisions & trade-offs (deep tier, or on signal)
|
|
2
|
-
|
|
3
|
-
Run only when: tier is deep, OR the change needs an architectural decision
|
|
4
|
-
(new dependency, schema change, cross-capability contract). Otherwise skip —
|
|
5
|
-
an empty Design section is garbage.
|
|
6
|
-
|
|
7
|
-
1. Read `change.md`, the full spec of every touched capability, and any steering
|
|
8
|
-
whose scope matches. Nothing else by default.
|
|
9
|
-
2. Gather in parallel, judge serially: fan out read-only subagents for research
|
|
10
|
-
(one per question: prior art in this repo, external constraint, data shape).
|
|
11
|
-
The DECISION is made in the main loop — never delegated, never parallel.
|
|
12
|
-
3. Fill `## Design` with decision lines only:
|
|
13
|
-
`- decision: <what> · alternatives: <a/b> · because: <why>`
|
|
14
|
-
Never restate the delta. Respect the tier cap (deep total ≤150).
|
|
15
|
-
4. Escalate to the human ONLY for decisions listed in
|
|
16
|
-
`sdlc/harness.md § Autonomy policy` (irreversible or hard-floor). Everything
|
|
17
|
-
else: decide, record, move on.
|
|
18
|
-
5. `npx @warnyin/sdlc validate <id>`.
|
|
19
|
-
|
|
20
|
-
Next: /sdlc:contract.
|
|
1
|
+
# /sdlc:design <id> — decisions & trade-offs (deep tier, or on signal)
|
|
2
|
+
|
|
3
|
+
Run only when: tier is deep, OR the change needs an architectural decision
|
|
4
|
+
(new dependency, schema change, cross-capability contract). Otherwise skip —
|
|
5
|
+
an empty Design section is garbage.
|
|
6
|
+
|
|
7
|
+
1. Read `change.md`, the full spec of every touched capability, and any steering
|
|
8
|
+
whose scope matches. Nothing else by default.
|
|
9
|
+
2. Gather in parallel, judge serially: fan out read-only subagents for research
|
|
10
|
+
(one per question: prior art in this repo, external constraint, data shape).
|
|
11
|
+
The DECISION is made in the main loop — never delegated, never parallel.
|
|
12
|
+
3. Fill `## Design` with decision lines only:
|
|
13
|
+
`- decision: <what> · alternatives: <a/b> · because: <why>`
|
|
14
|
+
Never restate the delta. Respect the tier cap (deep total ≤150).
|
|
15
|
+
4. Escalate to the human ONLY for decisions listed in
|
|
16
|
+
`sdlc/harness.md § Autonomy policy` (irreversible or hard-floor). Everything
|
|
17
|
+
else: decide, record, move on.
|
|
18
|
+
5. `npx @warnyin/sdlc validate <id>`.
|
|
19
|
+
|
|
20
|
+
Next: /sdlc:contract.
|
|
21
|
+
|
|
22
|
+
`--auto`: do this stage, then continue to ship under `auto.md`'s unattended
|
|
23
|
+
mode — gather, confirm once, run. The stage still does its own work first.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# /sdlc:feedback [bug|idea] <one line> — file an issue upstream
|
|
2
|
+
|
|
3
|
+
Reports a bug, a rough edge, or a missing feature in the **framework itself** to
|
|
4
|
+
`warnyin/warnyin-sdlc`. Bugs in the project you are working on belong in that
|
|
5
|
+
project's own tracker — say so and stop.
|
|
6
|
+
|
|
7
|
+
1. Collect context in one shot; never interrogate the human for it:
|
|
8
|
+
- version: `npx @warnyin/sdlc version` · node: `node --version` · OS and arch
|
|
9
|
+
- tool adapter: `tools:` in `sdlc/config.yaml`
|
|
10
|
+
- active change id + status: `npx @warnyin/sdlc status --json`
|
|
11
|
+
Any field you cannot read is `unknown` — continue, and never guess a value.
|
|
12
|
+
2. If the invocation carried no description, ask once, in one message: what you
|
|
13
|
+
did, what you expected, what happened instead.
|
|
14
|
+
3. Look for it first, when `gh` is available:
|
|
15
|
+
`gh issue list --repo warnyin/warnyin-sdlc --search "<keywords>" --state all --limit 5`.
|
|
16
|
+
Choose `<keywords>` yourself — two to four plain words, letters/digits/hyphen
|
|
17
|
+
only — never the reporter's raw sentence: it reaches the shell as an argument
|
|
18
|
+
exactly like the title does. If an existing thread matches, show it and ask
|
|
19
|
+
whether to comment there rather than open a duplicate.
|
|
20
|
+
4. Redact before the draft is shown to anyone or sent anywhere:
|
|
21
|
+
- absolute paths → project-relative paths (a home directory or host name in a
|
|
22
|
+
path identifies the reporter's machine and employer)
|
|
23
|
+
- token-, key-, password- and connection-string-shaped values → `<redacted>`,
|
|
24
|
+
and tell the human which values you removed
|
|
25
|
+
- never copy the contents of `sdlc/context/constitution.md`, steering files,
|
|
26
|
+
`.env` files, credential files, journals, or diffs into the report
|
|
27
|
+
- this is a rule list, not a guarantee: the human reading the draft is the
|
|
28
|
+
real control, so never claim the report has been fully scrubbed
|
|
29
|
+
5. Show the full draft — destination repo, title, labels, complete body — and ask
|
|
30
|
+
for approval. No network call happens before that approval. On anything other
|
|
31
|
+
than approval: revise the draft and ask again.
|
|
32
|
+
6. Submit, once approved:
|
|
33
|
+
- `gh auth status` must report an authenticated **github.com** account; an
|
|
34
|
+
enterprise-only login goes to step 7 instead of publishing to the wrong host
|
|
35
|
+
- `gh issue create --repo warnyin/warnyin-sdlc --title "<title>"
|
|
36
|
+
--label <bug|enhancement> --body-file -`, body on stdin
|
|
37
|
+
- never pass the body as an inline `--body` argument: report text carries
|
|
38
|
+
backticks, quotes and newlines — inline it breaks on PowerShell and is a
|
|
39
|
+
shell-injection path straight from human-written text
|
|
40
|
+
- the title is human text on a command line too: write it yourself as a plain
|
|
41
|
+
summary (≤80 chars, no newline, no `` ` ``, `$`, `"`, `\`, `|`, `;`, `&`),
|
|
42
|
+
never paste the reporter's words in raw. If a needed character is not
|
|
43
|
+
allowed, reword the title — do not escape your way around it
|
|
44
|
+
- report the resulting issue URL back
|
|
45
|
+
7. Fallback when `gh` is absent, logged out, or not on github.com — a normal
|
|
46
|
+
path, not an error: hand over a prefilled link
|
|
47
|
+
`https://github.com/warnyin/warnyin-sdlc/issues/new?labels=<label>&title=<t>&body=<b>`
|
|
48
|
+
with `<t>` and `<b>` URL-encoded. If the encoded link exceeds ~6000 characters,
|
|
49
|
+
truncate the body it carries and tell the human to paste the rest from the
|
|
50
|
+
draft shown above.
|
|
51
|
+
|
|
52
|
+
Body shape (keep it this short — a maintainer triages it in one screen):
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
### What happened
|
|
56
|
+
<one paragraph, redacted>
|
|
57
|
+
|
|
58
|
+
### Expected
|
|
59
|
+
<one line>
|
|
60
|
+
|
|
61
|
+
### Steps
|
|
62
|
+
1. <command or stage>
|
|
63
|
+
|
|
64
|
+
### Environment
|
|
65
|
+
sdlc <version> · node <version> · <os> · adapter <tool> · change <id> [<status>]
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Labels: `bug` for something broken, `enhancement` for an idea or a request.
|
|
69
|
+
Nothing else is attached — no logs, no journal, no diff.
|
package/payload/playbook/new.md
CHANGED
|
@@ -1,22 +1,25 @@
|
|
|
1
|
-
# /sdlc:new <title> — open a change (Requirements)
|
|
2
|
-
|
|
3
|
-
1. Triage the tier with `sdlc/harness.md § Tier triage`. Hard-floor surface
|
|
4
|
-
(security, payments, data-loss, irreversible) forces `deep` — no override
|
|
5
|
-
without an explicit user instruction (record it in Assumptions).
|
|
6
|
-
2. Create `sdlc/changes/<kebab-id>/change.md` from the tier's template at
|
|
7
|
-
`sdlc/.playbook/templates/change-{vibe|standard|deep}.md` — copy the
|
|
8
|
-
structure exactly, respect the cap comment.
|
|
9
|
-
3. Ground the delta: grep `## Purpose` of every `sdlc/specs/*/spec.md`; open the
|
|
10
|
-
FULL spec only for capabilities this change touches. Name each `## Delta:`
|
|
11
|
-
after an existing capability, or a new kebab-case capability.
|
|
12
|
-
4. Write Why (≤5 lines, no solutioning) and the Delta requirements
|
|
13
|
-
(`ADDED/MODIFIED/REMOVED Requirement` + WHEN/THEN scenarios — grammar in the
|
|
14
|
-
delta-spec-format skill). Then Tasks with `[P]` and `[tier:x]` markers.
|
|
15
|
-
5. Ambiguity policy (AI-driven): make the safest assumption and record it under
|
|
16
|
-
`## Assumptions` with why it is safe. Use `[NEEDS CLARIFICATION: q]` ONLY for
|
|
17
|
-
facts you cannot obtain or safely assume — then ask the user those questions
|
|
18
|
-
now, in one batch, and resolve every marker.
|
|
19
|
-
6. `node sdlc/.hooks/journal.mjs set-active <id>` then
|
|
20
|
-
`npx @warnyin/sdlc validate <id>` — fix errors. Status stays `new`.
|
|
21
|
-
|
|
22
|
-
Next: deep tier or risky decision → /sdlc:design; otherwise /sdlc:contract.
|
|
1
|
+
# /sdlc:new <title> — open a change (Requirements)
|
|
2
|
+
|
|
3
|
+
1. Triage the tier with `sdlc/harness.md § Tier triage`. Hard-floor surface
|
|
4
|
+
(security, payments, data-loss, irreversible) forces `deep` — no override
|
|
5
|
+
without an explicit user instruction (record it in Assumptions).
|
|
6
|
+
2. Create `sdlc/changes/<kebab-id>/change.md` from the tier's template at
|
|
7
|
+
`sdlc/.playbook/templates/change-{vibe|standard|deep}.md` — copy the
|
|
8
|
+
structure exactly, respect the cap comment.
|
|
9
|
+
3. Ground the delta: grep `## Purpose` of every `sdlc/specs/*/spec.md`; open the
|
|
10
|
+
FULL spec only for capabilities this change touches. Name each `## Delta:`
|
|
11
|
+
after an existing capability, or a new kebab-case capability.
|
|
12
|
+
4. Write Why (≤5 lines, no solutioning) and the Delta requirements
|
|
13
|
+
(`ADDED/MODIFIED/REMOVED Requirement` + WHEN/THEN scenarios — grammar in the
|
|
14
|
+
delta-spec-format skill). Then Tasks with `[P]` and `[tier:x]` markers.
|
|
15
|
+
5. Ambiguity policy (AI-driven): make the safest assumption and record it under
|
|
16
|
+
`## Assumptions` with why it is safe. Use `[NEEDS CLARIFICATION: q]` ONLY for
|
|
17
|
+
facts you cannot obtain or safely assume — then ask the user those questions
|
|
18
|
+
now, in one batch, and resolve every marker.
|
|
19
|
+
6. `node sdlc/.hooks/journal.mjs set-active <id>` then
|
|
20
|
+
`npx @warnyin/sdlc validate <id>` — fix errors. Status stays `new`.
|
|
21
|
+
|
|
22
|
+
Next: deep tier or risky decision → /sdlc:design; otherwise /sdlc:contract.
|
|
23
|
+
|
|
24
|
+
`--auto`: do this stage, then continue to ship under `auto.md`'s unattended
|
|
25
|
+
mode — gather, confirm once, run. The stage still does its own work first.
|
package/payload/playbook/next.md
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
# /sdlc:next — where am I, what now (read-only)
|
|
2
|
-
|
|
3
|
-
1. Run `npx @warnyin/sdlc status`.
|
|
4
|
-
2. For each active change map status → next command:
|
|
5
|
-
- `new` + markers unresolved → resolve questions (playbook new.md §5)
|
|
6
|
-
- `new` (clean) → /sdlc:design (deep/signal) or /sdlc:contract
|
|
7
|
-
- `contracted` → /sdlc:build
|
|
8
|
-
- `building` → /sdlc:build (finish open tasks)
|
|
9
|
-
- `verified` → /sdlc:review (if signals) or /sdlc:ship
|
|
10
|
-
3. If nothing is active: suggest /sdlc:new, or /sdlc:observe if archived changes
|
|
11
|
-
have unread digests.
|
|
12
|
-
4. Answer in ≤5 lines. Create or modify nothing.
|
|
1
|
+
# /sdlc:next — where am I, what now (read-only)
|
|
2
|
+
|
|
3
|
+
1. Run `npx @warnyin/sdlc status`.
|
|
4
|
+
2. For each active change map status → next command:
|
|
5
|
+
- `new` + markers unresolved → resolve questions (playbook new.md §5)
|
|
6
|
+
- `new` (clean) → /sdlc:design (deep/signal) or /sdlc:contract
|
|
7
|
+
- `contracted` → /sdlc:build
|
|
8
|
+
- `building` → /sdlc:build (finish open tasks)
|
|
9
|
+
- `verified` → /sdlc:review (if signals) or /sdlc:ship
|
|
10
|
+
3. If nothing is active: suggest /sdlc:new, or /sdlc:observe if archived changes
|
|
11
|
+
have unread digests.
|
|
12
|
+
4. Answer in ≤5 lines. Create or modify nothing.
|
|
13
|
+
5. When the remaining path is more than one stage, add one line: the same command
|
|
14
|
+
with `--auto` confirms once and runs to ship.
|
|
@@ -1,17 +1,26 @@
|
|
|
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. Otherwise skip silently — a ceremonial review is garbage.
|
|
5
|
-
|
|
6
|
-
1. Fan out in parallel, all read-only, each with the diff + change.md only:
|
|
7
|
-
- `sdlc-architect` (deepest): design integrity, coupling, contract drift.
|
|
8
|
-
- `sdlc-security` (balanced): injection, authz, secrets, unsafe deps.
|
|
9
|
-
- `sdlc-quality` (cheap): contract coverage gaps, edge cases, dead code.
|
|
10
|
-
- `sdlc-ops` (cheap): config, migrations, rollback, observability impact.
|
|
11
|
-
2. Merge findings in the main loop. Classify: blocker | improvement | note.
|
|
12
|
-
3. Blockers → append as fix tasks and route back to /sdlc:build (counts toward
|
|
13
|
-
the same 3-round budget as verify). Improvements: apply if ≤5 min each,
|
|
14
|
-
otherwise record one line in the change for the digest.
|
|
15
|
-
4. `node sdlc/.hooks/journal.mjs note review blockers=<n>`.
|
|
16
|
-
|
|
17
|
-
|
|
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. Otherwise skip silently — a ceremonial review is garbage.
|
|
5
|
+
|
|
6
|
+
1. Fan out in parallel, all read-only, each with the diff + change.md only:
|
|
7
|
+
- `sdlc-architect` (deepest): design integrity, coupling, contract drift.
|
|
8
|
+
- `sdlc-security` (balanced): injection, authz, secrets, unsafe deps.
|
|
9
|
+
- `sdlc-quality` (cheap): contract coverage gaps, edge cases, dead code.
|
|
10
|
+
- `sdlc-ops` (cheap): config, migrations, rollback, observability impact.
|
|
11
|
+
2. Merge findings in the main loop. Classify: blocker | improvement | note.
|
|
12
|
+
3. Blockers → append as fix tasks and route back to /sdlc:build (counts toward
|
|
13
|
+
the same 3-round budget as verify). Improvements: apply if ≤5 min each,
|
|
14
|
+
otherwise record one line in the change for the digest.
|
|
15
|
+
4. `node sdlc/.hooks/journal.mjs note review blockers=<n> mode=<panel|solo>`.
|
|
16
|
+
`mode=panel` when the four agents produced the findings; `mode=solo` when the
|
|
17
|
+
panel cannot run — subagents unavailable or disallowed — and the main loop
|
|
18
|
+
reviewed its own work through those four lenses instead. Run it that way
|
|
19
|
+
rather than skipping the review, and say so in the note: a self-review that
|
|
20
|
+
is recorded as a panel is worse than no review, because it reads as
|
|
21
|
+
independent evidence months later.
|
|
22
|
+
|
|
23
|
+
Pass condition: zero open blockers. Next: /sdlc:ship.
|
|
24
|
+
|
|
25
|
+
`--auto`: do this stage, then continue to ship under `auto.md`'s unattended
|
|
26
|
+
mode — gather, confirm once, run. The stage still does its own work first.
|
package/payload/playbook/ship.md
CHANGED
|
@@ -1,24 +1,33 @@
|
|
|
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
|
-
3. **Learn** — delegate to `sdlc-learner` (cheap) with the archived change.md +
|
|
14
|
-
its journal.ndjson. It proposes ≤3 items: add-rule (with evidence pointer) /
|
|
15
|
-
expire-or-demote (rule or steering that never fired) / harness tweak.
|
|
16
|
-
Apply reductions and demotions immediately (they always save tokens).
|
|
17
|
-
Additions to always-loaded context are NOT applied — list them in the digest.
|
|
18
|
-
4. **Digest** — write `sdlc/changes/archive/<date>-<id>/digest.md` (≤15 lines):
|
|
19
|
-
what shipped, spec deltas merged, assumptions made, verify rounds, tokens/cost
|
|
20
|
-
(from journal `session` events), learner proposals awaiting the human.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
+
3. **Learn** — delegate to `sdlc-learner` (cheap) with the archived change.md +
|
|
14
|
+
its journal.ndjson. It proposes ≤3 items: add-rule (with evidence pointer) /
|
|
15
|
+
expire-or-demote (rule or steering that never fired) / harness tweak.
|
|
16
|
+
Apply reductions and demotions immediately (they always save tokens).
|
|
17
|
+
Additions to always-loaded context are NOT applied — list them in the digest.
|
|
18
|
+
4. **Digest** — write `sdlc/changes/archive/<date>-<id>/digest.md` (≤15 lines):
|
|
19
|
+
what shipped, spec deltas merged, assumptions made, verify rounds, tokens/cost
|
|
20
|
+
(from journal `session` events), learner proposals awaiting the human.
|
|
21
|
+
When any verify or review note carries `mode=solo`, the digest SHALL say which
|
|
22
|
+
outcomes were self-produced. A reader months from now cannot otherwise tell a
|
|
23
|
+
panel's verdict from the author's own.
|
|
24
|
+
When any `escalation` event carries `preauth=yes`, the digest SHALL list those
|
|
25
|
+
pre-authorized escalations by condition — the points where a human would normally
|
|
26
|
+
have stood and, this run, did not.
|
|
27
|
+
5. Close the gate: `node sdlc/.hooks/journal.mjs close`. Tell the user in one
|
|
28
|
+
line: shipped + where the digest is.
|
|
29
|
+
|
|
30
|
+
The digest is the async human touchpoint — reviewable and revertible later.
|
|
31
|
+
|
|
32
|
+
`--auto`: do this stage, then continue to ship under `auto.md`'s unattended
|
|
33
|
+
mode — gather, confirm once, run. The stage still does its own work first.
|
|
@@ -1,24 +1,37 @@
|
|
|
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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
+
On failure:
|
|
17
|
+
- Cluster failures by root cause (one line each) and append the cluster note to
|
|
18
|
+
the change's `## Tasks` area as unchecked fix tasks.
|
|
19
|
+
- `node sdlc/.hooks/journal.mjs note verify result=fail round=<n> mode=<panel|solo>`
|
|
20
|
+
- Route back to /sdlc:build. Maximum 3 rounds total; on the 4th failure STOP and
|
|
21
|
+
escalate to the human with the cluster history (Autonomy policy condition).
|
|
22
|
+
- Never lower the bar: do not edit tests/evals to pass unless the contract
|
|
23
|
+
itself was wrong — changing the contract reopens the adversarial check.
|
|
24
|
+
|
|
25
|
+
On pass: set `status: verified`,
|
|
26
|
+
`node sdlc/.hooks/journal.mjs note verify result=pass round=<n> mode=<panel|solo>`.
|
|
27
|
+
|
|
28
|
+
`mode=panel` only when independent agents produced the judgment; `mode=solo` when
|
|
29
|
+
the main loop judged its own work. Every verify note carries it, pass or fail —
|
|
30
|
+
`/sdlc:observe` reports a change as self-judged from this field, and omitting it
|
|
31
|
+
leaves the record silently indistinguishable from an independent one.
|
|
32
|
+
|
|
33
|
+
Next: review signals present (deep tier, security-touching diff, >10 files)
|
|
34
|
+
→ /sdlc:review; otherwise → /sdlc:ship.
|
|
35
|
+
|
|
36
|
+
`--auto`: do this stage, then continue to ship under `auto.md`'s unattended
|
|
37
|
+
mode — gather, confirm once, run. The stage still does its own work first.
|