Skip to content

feat(kaizen): 5.1.0 — three ideas from Compound Engineering, approvals "ask" fixes - #48

Merged
Lingelo merged 8 commits into
mainfrom
ccr-da05f190-uiybw9
Oct 29, 2026
Merged

Lingelo merged 8 commits into
mainfrom
ccr-da05f190-uiybw9

Conversation

@Lingelo

@Lingelo Lingelo commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

Summary

Kaizen 5.1.0. Three ideas from the latest Compound Engineering releases (3.29–3.33), adapted to Kaizen's gates. A refreshed comparison with Spec Kit 1.2.5 and Compound Engineering 3.33.2. And fixes for what the review of this branch found in the 5.0.0 approvals: "ask" flow. No breaking change.

Added / changed

  • The review flags what nobody asked for (CE #1852). The reviewer contract's intent check now runs in both directions:

    • a public surface (endpoint, flag, config key, export) that the plan's Out of scope or units rule out;
    • a new package that the standard library or an existing helper already covers.

    Each finding must be quoted, and correctness owns the check, so small diffs get it too.

  • retire_when names a check that runs without changing the repo (CE #1772). /kaizen:prune-learnings runs that check itself. If the condition is met but the workaround is still in the code, the learning stays and the report recommends removing the workaround; Kaizen never removes it on its own. Also: learnings validate refuses a retire_when that is not a single string, and learnings list --retire lists the learnings that declare one.

  • watch-pr asks whether an old PR still belongs (CE #1909). The new kaizen pr overlap --base <ref> reports, from local git:

    • PR files the base modified, moved or deleted;
    • folders the base removed under a path the PR adds;
    • whether the base already carries the PR's patches.

    watch-pr then gives one verdict: Update, Rework or Close. It never closes the PR itself and never rebases.

  • Docs: positioning.md refreshed; pr-watch.svg regenerated from diagrams.mjs.

Fixed (5.0.0 approvals: "ask")

  • node "$K" confirm <code> now reaches Claude Code's prompt. The hook only matched the literal kaizen.mjs confirm, so the documented call always failed. The hook now sees every confirm call. It requires confirm to run on its own, with the code written out. As a result:
    • a mark left by a declined prompt can no longer be reused by another visible call;
    • confirm … && git push can no longer slip a push through.
  • The git pre-push hook guards Claude's pushes in "ask" mode.
    • From Claude Code (CLAUDECODE set), it only lets through the push the review hook just put to the user: same branch and commit, within 10 min, once.
    • From the user's own terminal, it only prints a reminder.
    • The review hook now also matches /usr/bin/git push and global options before push.
  • friction metrics in "ask" mode:
    • a push is no longer counted twice;
    • new fields pushed_without_review (counted in the waiver share) and unreviewed_from_terminal.
  • approvals.mjs reuses pendingWaiver / pendingDeploy instead of copying their lifetimes. JSON state helpers are shared in lib.mjs, and reading the state no longer creates .kaizen/state/. The push gates read checkPush's ask field; status uses approvalMode.
  • pr overlap:
    • reads raw paths (-z), so non-ASCII folders are compared correctly;
    • an empty git cherry no longer counts as "absorbed".

Test plan

  • node --test plugins/kaizen/tests/*.test.mjs plugins/kaizen-ops/tests/*.test.mjs: 228 pass, with and without CLAUDECODE
  • New or updated tests:
    • confirm forms (prompted, refused when the code is in a variable or the call is chained);
    • git hook from Claude Code and from a terminal;
    • push spellings;
    • friction in "ask" mode;
    • learnings validate / list --retire;
    • pr overlap (non-ASCII folder, absorbed PR, empty cherry)
  • diagrams.test.mjs passes after regenerating the SVGs; I opened pr-watch.svg to check the render

🤖 Generated with Claude Code

https://claude.ai/code/session_01HajgyyYNKjohDErB6g1YMt

The reviewer contract's intent check now runs both ways: a public surface the plan's
Out of scope or units rule out, and a new package the standard library or an existing
helper already covers (both quoted). correctness owns it, so small diffs get it too.
Adapted from Compound Engineering 3.30.5 (#1852).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01HajgyyYNKjohDErB6g1YMt
…ts on it

A learning's retirement condition now names the external change and a check that
runs without changing the repo. prune-learnings runs it itself (learnings list
--retire): met while the workaround is still in the code keeps the learning and
recommends removing the workaround, never removes it. validate refuses a
retire_when that is not one string. Adapted from Compound Engineering 3.29.0 (#1772).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01HajgyyYNKjohDErB6g1YMt
New pr overlap --base <ref> (local git): PR files the base modified, moved or
deleted since the merge-base, folders the base removed under a path the PR adds,
and a PR whose patches the base already carries. When it overlaps, watch-pr judges
Update, Rework (smallest rework, then stops) or Close (evidence, never closes the
PR) before the first cycle and again when the base moved. Path overlap, never age.
Adapted from Compound Engineering 3.33.0 (#1909).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01HajgyyYNKjohDErB6g1YMt
…ering 3.33.2, release 5.1.0

Positioning: Spec Kit's ecosystem (extensions, presets, bundles, workflows, governance
presets), Compound Engineering's cross-model opinions, simplify and babysit, and what
Kaizen 5.1.0 took back (and why cross-model review is left out). CHANGELOG 5.1.0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01HajgyyYNKjohDErB6g1YMt
… it absorbed

git diff without -z quotes non-ASCII paths, so a folder like docs/é looked removed
from the base. An empty git cherry (stale checkout, merge-only head) no longer counts
as absorbed. Review findings on this branch.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01HajgyyYNKjohDErB6g1YMt
…de's pushes

The review hook only matched the literal kaizen.mjs confirm, so the documented
node "$K" confirm <code> never reached Claude Code's prompt and confirm always
refused. Every confirm call is now seen and must run alone with the code written
out, so a declined prompt's mark cannot be reused by another visible call and
confirm … && git push no longer slips a push past the gate.

In "ask" mode the git pre-push hook now refuses a push from Claude Code
(CLAUDECODE set) that the review hook did not put to the user, and lets the
prompted one through once; pushes from the user's terminal still only remind.
The review hook also sees /usr/bin/git push and global options before push.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01HajgyyYNKjohDErB6g1YMt
@Lingelo Lingelo changed the title feat(kaizen): 5.1.0 — three ideas from Compound Engineering, positioning refreshed feat(kaizen): 5.1.0 — three ideas from Compound Engineering, approvals "ask" fixes Oct 29, 2026
…es once

friction no longer double-counts an "ask" push (the git hook only logs pushes
from the user's terminal), reports pushed_without_review and counts it in the
waiver share. approvals.mjs reuses pendingWaiver/pendingDeploy instead of copying
their lifetimes; JSON state helpers move to lib.mjs, and reading the state no
longer creates .kaizen/state/. The push gates read checkPush's ask; status uses
approvalMode.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01HajgyyYNKjohDErB6g1YMt
@Lingelo
Lingelo merged commit 068f5be into main Oct 29, 2026
6 checks passed
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.

2 participants