Skip to content

v2.0.0: four phases (Intent, Plan, Build, Evidence) and one script - #33

Merged
cskwork merged 2 commits into
mainfrom
feat/v2-four-phase
Oct 12, 2026
Merged

cskwork merged 2 commits into
mainfrom
feat/v2-four-phase

Conversation

@cskwork

@cskwork cskwork commented Oct 12, 2026 •

Copy link
Copy Markdown
Owner

Summary

v2.0.0 rebuilds sdlc-kit around four phases — Intent → Plan → Build → Evidence — driven by one script, sdlc.sh.

  • Smaller. Prompts and templates go from about 23,700 words to 3,922. The scripts go from about 7,000 lines to 477.
  • Explores before coding. Parallel scouts write refs/. One PLAN.md holds AS-IS → TO-BE, side effects, risk flags and the QA scenarios.
  • Routes failures by cause, not by percentage. sdlc.sh score computes the route. It goes to Plan on a plan-caused or repeated failure. It delivers when every must scenario passes and at least 95% of all scenarios pass. It goes to the human when the scenarios that could not run are what blocks delivery. Otherwise it goes back to Build. Each kind of return is capped at three.

Why: on small tasks the old kit took 842–916 s against 85 s without it, at the same accuracy (PR #26). Local stores held 19 open features and 0 closed ones.

Details: log/changelog-v2.0.0.md.

Verification

  • bash tests/selftest.sh: 95 checks PASS on macOS /bin/bash 3.2, with BSD awk, with LC_ALL=C, and with CI=1, which turns symlink skips into failures. The checks cover:
    • prompt budgets;
    • gates and stops;
    • the routing boundaries (95.0% delivers, 94.x builds, a plan cause goes to Plan, a must BLOCKED goes to the human) and the caps;
    • scenario history;
    • review binding and delivery authority;
    • legacy stores;
    • a four-phase lifecycle run on a CLI fixture.
  • Each regression check written for a review finding was first run against the pre-fix script, and it failed there.
  • Legacy store: on a copy of a real 12-feature v0 store, status takes 0.2 s (v0 took over 30 s). It reports every feature as legacy, and the original store is unchanged.
  • Real-agent E2E: a fresh agent took one request through all four phases on a fixture with two hidden rules.
    • It found both rules during Intent.
    • It stopped for the human at intent and at the plan, where the public-API flag was set.
    • It scored 14/14, including four scenarios that QA added.
    • It shipped one local commit.
    • Its feedback led to six kit fixes.
  • Adversarial review: three rounds, each by a fresh reviewer, and every round returned FAIL. All blocking findings were fixed.
    • The round-3 blocker: score exited silently with code 128 when the project root was not a git repo. A new check covers it and fails on the old script.
  • Ultra review (/code-review ultra) found 10 issues. It ran on the v2 content only: 24 files, 3,896 lines. The 54 pure deletions of v0 files were left out to fit the 8,000-line limit.
    • All 10 are fixed in 4ee1186.
    • The new ultra regression group has 8 checks. 7 of them fail on the previous script. The 8th, for the Git Bash // root, cannot be reproduced on macOS.
  • CI on Linux, macOS and Windows: see the checks on this PR.

Breaking change

  • AGENTS.md, init.sh, gates/, tools/ and the v0 templates are removed.
  • v0 features show as legacy. Finish them with v0.27.0, or close them with sdlc.sh close <slug> dropped "<reason>".
  • lazymode and .sdlc/memory are still read.

Merging to main updates every clone that follows main.

…cript

Rebuild the kit around four phases with one script, sdlc.sh.

- Intent records the request, what was understood and its risks.
- Plan runs parallel read-only scouts into refs/ and compacts them into one
  PLAN.md: AS-IS to TO-BE, side effects, risk flags and the QA scenarios.
- Build makes the smallest complete change and commits it; a separate
  adversarial reviewer passes it, and three FAILs stop the loop.
- Evidence runs every scenario as its persona through the real interface.
  sdlc.sh score validates and routes it: a plan-caused or repeated failure
  goes to Plan, every must scenario passing and >= 95% overall delivers,
  scenarios that could not run go to the human, otherwise Build. Each return
  is capped at three; a stop holds until approve plan --human.

A review PASS needs a new round and binds to the reviewed commit; scenarios
are never dropped from evidence; close re-checks the gates and needs
"Authorized: yes" for pr or deploy. init uses .git/info/exclude and changes
no tracked file.

Prompts and templates drop from about 23,700 words to 3,902; scripts from
about 7,000 lines to 448. Selftest: 87 checks plus a four-phase lifecycle on
a CLI fixture. A real agent ran one feature through all four phases on a
fixture with hidden rules and shipped it at 14/14.

BREAKING CHANGE: AGENTS.md, init.sh, gates/ and tools/ are replaced by
SKILL.md, phases/, roles/ and sdlc.sh. v0 features show as legacy; finish
them with v0.27.0. lazymode and .sdlc/memory still read.
- One shared awk uncomment() removes only the <!-- --> span and keeps the
  text around it; three copies of the old line-skipping code are gone.
- An unknown human_gates word warns and fails closed to "intent plan";
  case and duplicates are normalized, and a leading "# comment" is no
  longer read as a value.
- approve plan --agent keeps the review FAIL count; only the human or a
  counted return to plan resets it.
- A review records the HEAD of the project root's repository and of every
  repository under the root (heads:); score refuses a Commit in a
  repository the review did not see, so a sibling or linked-worktree path
  can no longer dodge the binding.
- CI sets MSYS=winsymlinks:nativestrict again, and under CI the symlink
  checks fail instead of skipping.
- A Results log path containing ".." (either separator) is refused.
- The human withdraws a scenario only QA added by deleting its evidence row
  and approving the plan; such an approval is no longer short-circuited as
  "already approved".
- The store walk-up stops when dirname returns its own input (Git Bash //).
- Commit and Delivered hashes may be 64 characters (SHA-256 repositories).

Selftest: 95 checks, including the new "ultra" regression group; 7 of its
8 checks fail against the previous sdlc.sh.
@cskwork
cskwork merged commit ac41f08 into main Oct 12, 2026
3 checks passed
@cskwork
cskwork deleted the feat/v2-four-phase branch October 12, 2026 04:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant