kaizen-agent 1.7.1 → 1.7.3
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/LICENSE +21 -21
- package/README.md +657 -657
- package/agents/kaizen-builder.md +77 -77
- package/agents/kaizen-planner.md +250 -250
- package/agents/kaizen-reviewer.md +127 -127
- package/cli/dashboard.ts +1187 -1187
- package/cli/install.ts +947 -947
- package/cli/publish-gh.sh +27 -27
- package/cli/release.sh +45 -45
- package/cli/settings.ts +415 -415
- package/cli/state.test.ts +197 -197
- package/cli/state.ts +704 -704
- package/cli/web.ts +423 -423
- package/commands/kaizen-abort.md +5 -5
- package/commands/kaizen-approve.md +5 -5
- package/commands/kaizen-auto.md +6 -6
- package/commands/kaizen-backlog.md +5 -5
- package/commands/kaizen-config.md +5 -5
- package/commands/kaizen-full.md +5 -5
- package/commands/kaizen-init.md +5 -5
- package/commands/kaizen-install.md +5 -5
- package/commands/kaizen-lite.md +5 -5
- package/commands/kaizen-plan.md +6 -6
- package/commands/kaizen-reject.md +6 -6
- package/commands/kaizen-review.md +6 -6
- package/commands/kaizen-run.md +5 -5
- package/commands/kaizen-status.md +5 -5
- package/package.json +1 -1
- package/skills/kaizen/README.md +281 -281
- package/skills/kaizen/SKILL.md +440 -440
- package/skills/kaizen/adapters.md +77 -77
- package/skills/kaizen/config.default.yml +167 -167
- package/skills/kaizen/spec-build.md +119 -119
- package/skills/kaizen/spec-main.md +104 -104
- package/skills/kaizen/spec-plan.md +201 -201
- package/skills/kaizen/spec-review.md +121 -121
- package/skills/kaizen/spec.md +153 -153
- package/skills/kaizen-help/SKILL.md +129 -129
- package/web/board.html +17 -8
package/skills/kaizen/README.md
CHANGED
|
@@ -1,281 +1,281 @@
|
|
|
1
|
-
# Kaizen
|
|
2
|
-
|
|
3
|
-
Kaizen is a staged workflow for work that is too big to hand an AI in one go. Instead
|
|
4
|
-
of one agent that plans, writes, and then congratulates itself, the work is split into
|
|
5
|
-
three agents that never share a context window, with human approval stops in between.
|
|
6
|
-
You approve a plan before anything is produced, and an independent reviewer that never
|
|
7
|
-
saw the work being made checks it afterwards.
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
request -> PLAN -> [approval] -> IMPLEMENT -> REVIEW -> [fix loop] -> [approval] -> done
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
Everything a run knows lives in plain files under `.kaizen/`, so a run can be paused,
|
|
14
|
-
resumed tomorrow, resumed by a different session, or picked up by a different tool.
|
|
15
|
-
|
|
16
|
-
## Why the reviewer runs in a separate context
|
|
17
|
-
|
|
18
|
-
This is the one design decision worth understanding before you use it. An agent that
|
|
19
|
-
watched itself write the code will rationalize it — it remembers why every line seemed
|
|
20
|
-
reasonable, and that memory is exactly what stops it from finding the bug. The kaizen
|
|
21
|
-
reviewer starts fresh. It sees the plan, the diff, and the implementation notes, and
|
|
22
|
-
nothing else. It has no reason to defend anything.
|
|
23
|
-
|
|
24
|
-
The same split is why the planner does not implement: a plan written by the agent that
|
|
25
|
-
is about to do the work bends toward what is easy to write.
|
|
26
|
-
|
|
27
|
-
## Install
|
|
28
|
-
|
|
29
|
-
First get the skill onto your machine: copy or clone this directory somewhere Claude
|
|
30
|
-
can read it. Then ask Claude to install kaizen from there, and it will ask where the
|
|
31
|
-
workflow should live:
|
|
32
|
-
|
|
33
|
-
- **Global** — `~/.claude/skills/kaizen/` and `~/.claude/agents/kaizen-*.md`.
|
|
34
|
-
Available in every project, not shared with your team.
|
|
35
|
-
- **Per-project** — `.claude/skills/kaizen/` and `.claude/agents/kaizen-*.md`,
|
|
36
|
-
committed so the team gets the same workflow.
|
|
37
|
-
|
|
38
|
-
Both can coexist; the project copy wins. Install also offers to write the adapter
|
|
39
|
-
files from [`adapters.md`](adapters.md) so Codex and Antigravity follow the same spec.
|
|
40
|
-
|
|
41
|
-
The workflow is `SKILL.md`, the split spec (`spec.md` core plus `spec-plan.md`,
|
|
42
|
-
`spec-build.md`, `spec-review.md`, `spec-main.md` — each reader takes core plus one),
|
|
43
|
-
`config.default.yml`,
|
|
44
|
-
`adapters.md`, and this README, plus the three agent definitions `kaizen-planner.md`,
|
|
45
|
-
`kaizen-builder.md`, and `kaizen-reviewer.md`.
|
|
46
|
-
|
|
47
|
-
To set a repository up for runs, ask for `kaizen init`. That creates `.kaizen/` with a
|
|
48
|
-
copy of the `spec*.md` files, a config, and the gitignore entry.
|
|
49
|
-
|
|
50
|
-
## Your first run
|
|
51
|
-
|
|
52
|
-
Say what you want, and say the word kaizen:
|
|
53
|
-
|
|
54
|
-
> kaizen: add rate limiting to the public API
|
|
55
|
-
|
|
56
|
-
That is the whole invocation. The skill triggers on the word, so a plain sentence is
|
|
57
|
-
enough — no special syntax, no flags. `SKILL.md` also documents slash forms like
|
|
58
|
-
`/kaizen plan <request>`, `/kaizen status`, and `/kaizen approve`; those are shorthand
|
|
59
|
-
for the same requests, and they only work as literal slash commands if you have
|
|
60
|
-
installed a command file at `~/.claude/commands/kaizen.md`. Nothing here requires one.
|
|
61
|
-
Saying "kaizen status" or "approve the plan" works either way.
|
|
62
|
-
|
|
63
|
-
Then the run stops twice, and both stops want something specific from you.
|
|
64
|
-
|
|
65
|
-
**Stop one — the plan.** You get a written plan: what is wrong today, what would be
|
|
66
|
-
true instead, the approach chosen, what was rejected and why, and a plain-bullet
|
|
67
|
-
**Work list** of what will actually be done. If the request had genuine ambiguity, the
|
|
68
|
-
plan ends with open questions, and they reach you as a pick list of two to four
|
|
69
|
-
concrete options rather than an open prompt. You can always type something else.
|
|
70
|
-
|
|
71
|
-
Three things newcomers do not expect:
|
|
72
|
-
|
|
73
|
-
- **"Yes, but change X" is a normal answer.** You are not limited to approve or
|
|
74
|
-
reject. Approving with a modification — a different value, a dropped step — is
|
|
75
|
-
recorded in the approval file and binds the builder.
|
|
76
|
-
- **Rejecting is not a failure.** The reason is written down and handed back to the
|
|
77
|
-
stage that produced the artifact, which revises and re-presents.
|
|
78
|
-
- **The planner also lists out-of-scope suggestions** — things it noticed but did not
|
|
79
|
-
fold into the plan. Each is a separate yes or no. Saying nothing means no.
|
|
80
|
-
|
|
81
|
-
Nothing is produced until you clear this stop.
|
|
82
|
-
|
|
83
|
-
**Stop two — the review.** After the work is done, the reviewer reports findings with
|
|
84
|
-
severities, and the run stops before calling the work done. If a finding is below the
|
|
85
|
-
auto-fix threshold, or still open when the fix rounds run out, it is reported to you
|
|
86
|
-
rather than quietly patched.
|
|
87
|
-
|
|
88
|
-
## What a run decided not to do
|
|
89
|
-
|
|
90
|
-
Both stops throw things away. The planner's out-of-scope suggestions you did not take,
|
|
91
|
-
the low findings nobody fixed, the "later" you said at an approval — all real work, all
|
|
92
|
-
previously surviving only in the conversation.
|
|
93
|
-
|
|
94
|
-
Kaizen writes them down instead, into `06-backlog.md` inside the run that produced
|
|
95
|
-
them, so an item sits next to the plan and the review that explain it. You do not
|
|
96
|
-
maintain this file; it is written at the two moments the run already writes to disk —
|
|
97
|
-
recording the plan approval, and marking the run done — so there is nothing to
|
|
98
|
-
remember.
|
|
99
|
-
|
|
100
|
-
Every item is `open`, `done`, or `rejected`. **Rejected is a real answer**: most
|
|
101
|
-
suggestions are not worth doing, and without a way to decline one it stays on the list
|
|
102
|
-
forever. Rejecting takes a reason, which is what stops the same idea coming back three
|
|
103
|
-
runs later. Closed items stay in their run's file as record and are never printed
|
|
104
|
-
again.
|
|
105
|
-
|
|
106
|
-
Two commands read across all of it:
|
|
107
|
-
|
|
108
|
-
- **`kaizen backlog`** — every open item, grouped by the run it came from, newest
|
|
109
|
-
first, with items rescued from pruned runs last under *Orphaned*. Nothing done,
|
|
110
|
-
nothing rejected.
|
|
111
|
-
- **`kaizen status`** — every run you have, in four groups: waiting on you, in flight,
|
|
112
|
-
done, and abandoned, with the open backlog count at the bottom.
|
|
113
|
-
|
|
114
|
-
A run you abort is abandoned, not outstanding: it sits in its own group and its backlog
|
|
115
|
-
items stop being printed and stop being counted.
|
|
116
|
-
|
|
117
|
-
Status is read live from each run's `state.json`, so nothing gets renamed or moved when
|
|
118
|
-
a run finishes and no path you have written down elsewhere ever breaks.
|
|
119
|
-
|
|
120
|
-
One thing to know about pruning: `state.keep_runs` eventually deletes old run
|
|
121
|
-
directories. Before a run goes, its still-open items are moved into
|
|
122
|
-
`.kaizen/backlog.md` — that file exists only as an orphanage. `kaizen backlog` reads it
|
|
123
|
-
too and prints those items last, under *Orphaned*, so nothing outstanding disappears
|
|
124
|
-
just because its run did. Items already done or rejected are deleted with their run,
|
|
125
|
-
which is the point.
|
|
126
|
-
|
|
127
|
-
## A real run, start to finish
|
|
128
|
-
|
|
129
|
-
This one actually happened. The whole request was one line, said in passing:
|
|
130
|
-
|
|
131
|
-
> for this dropdown omarchy terminal can we make it much more to the bottom?
|
|
132
|
-
|
|
133
|
-
**Intake** wrote that down verbatim in `00-request.md`, along with what it could
|
|
134
|
-
establish on its own: the script is `~/.local/bin/omarchy-dropdown`, bound to
|
|
135
|
-
`SUPER + grave`, and its height comes from `OMARCHY_DROPDOWN_HEIGHT`, default `0.55`.
|
|
136
|
-
|
|
137
|
-
**The plan** noticed the request had two readings — the panel *extending* further down
|
|
138
|
-
versus the whole panel *sitting* lower — and, rather than asking which, argued for the
|
|
139
|
-
first and said so plainly:
|
|
140
|
-
|
|
141
|
-
> Reading (2) already has a knob — `GAP` (`omarchy-dropdown:13`) — and it does not do
|
|
142
|
-
> what the phrase wants. [...] Setting `GAP=200` moves the top down to y=230 but shrinks the height to 555,
|
|
143
|
-
> putting the bottom edge at 785 — *higher* than today.
|
|
144
|
-
|
|
145
|
-
It proposed `HEIGHT_FRACTION` `0.55 → 0.80`, and listed fixing the `GAP` asymmetry as
|
|
146
|
-
an out-of-scope suggestion rather than doing it.
|
|
147
|
-
|
|
148
|
-
**The approval** is the interesting part, because it was neither yes nor no:
|
|
149
|
-
|
|
150
|
-
> **Value changed: 0.80 → 0.70.** The user chose a smaller increase than proposed
|
|
151
|
-
> [...] Wherever the plan specifies `HEIGHT_FRACTION=0.80`, use **`0.70`** instead.
|
|
152
|
-
> Nothing else changes: same file, same three steps, same verification.
|
|
153
|
-
|
|
154
|
-
The out-of-scope `GAP` fix was explicitly not approved, which made it off-limits for
|
|
155
|
-
the rest of the run.
|
|
156
|
-
|
|
157
|
-
**The implementation** changed one token, verified the geometry arithmetic instead of
|
|
158
|
-
toggling the live window, and reported the thing it did not do:
|
|
159
|
-
|
|
160
|
-
> Live steps 3-6 of the plan's verification [...] were not run: this run was
|
|
161
|
-
> explicitly instructed not to toggle the live dropdown.
|
|
162
|
-
|
|
163
|
-
**The review** re-derived the numbers independently, confirmed the file said `0.70` and
|
|
164
|
-
not `0.80`, confirmed the `GAP` code was untouched — and found one thing nobody had
|
|
165
|
-
considered: a second monitor configured as portrait might report an untransformed
|
|
166
|
-
height, in which case the larger fraction could overflow where the old one did not.
|
|
167
|
-
|
|
168
|
-
> `FINDINGS: 0 critical, 0 high, 0 medium, 1 low`
|
|
169
|
-
|
|
170
|
-
Low is below the default fix threshold, so it was not auto-fixed. It was reported, with
|
|
171
|
-
the exact command to settle it when that monitor is next plugged in. The reviewer also
|
|
172
|
-
left a line in `memory.md`, which every later run in this directory reads:
|
|
173
|
-
|
|
174
|
-
> `GAP` cannot — `geometry()` subtracts `gap * 2` from the height but adds `gap` only
|
|
175
|
-
> once to `y`, so raising GAP moves the bottom edge *up*. Unfixed as of 2026-09-02.
|
|
176
|
-
|
|
177
|
-
One-line request, six files, one real finding, one lesson that outlives the run.
|
|
178
|
-
|
|
179
|
-
## Kaizen is not only for code
|
|
180
|
-
|
|
181
|
-
Every stage adapts to the **track** — the kind of work a run is doing, which is what
|
|
182
|
-
decides what *deliverable*, *verification*, and *finding* mean. A chapter, a landing
|
|
183
|
-
page, a migration runbook, and a research memo each get a reviewer that checks the
|
|
184
|
-
right things; a reviewer hunting race conditions in a manuscript is worse than none.
|
|
185
|
-
|
|
186
|
-
The track is inferred from your request and stated back to you in the plan, so you
|
|
187
|
-
correct a reading instead of categorizing your own work. You are never asked "is this
|
|
188
|
-
software or writing?"
|
|
189
|
-
|
|
190
|
-
## Configuration
|
|
191
|
-
|
|
192
|
-
Your settings live in `~/.kaizen/config.yml` and apply to every project — `/kaizen
|
|
193
|
-
config` edits that file. To make one project different, copy
|
|
194
|
-
[`config.default.yml`](config.default.yml) to `.kaizen/config.yml` there and override
|
|
195
|
-
only the keys you care about; anything absent falls back to the global file, then to
|
|
196
|
-
the defaults.
|
|
197
|
-
|
|
198
|
-
| Key | Default | Change it when |
|
|
199
|
-
|---|---|---|
|
|
200
|
-
| `mode` | `approve` | You want `plan-only` to think without building, `auto` to run unattended, or `review-only` to audit existing work |
|
|
201
|
-
| `approvals.plan` | `true` | Rarely. This is the stop that makes the workflow worth running |
|
|
202
|
-
| `approvals.review` | `false` | Set `true` to add a second human stop after the review; with `auto_fix` on it mostly re-approves a report you are already reading |
|
|
203
|
-
| `approvals.each_file` | `false` | You want to confirm every single file edit. Maximum control, slowest |
|
|
204
|
-
| `auto_fix.enabled` | `true` | Set `false` and every finding becomes your decision instead |
|
|
205
|
-
| `auto_fix.min_severity` | `high` | Lower to `medium` or `low` to have more auto-fixed; raise findings you see instead of auto-fixing |
|
|
206
|
-
| `auto_fix.max_iterations` | `2` | Fix/recheck rounds before whatever is left is escalated to you |
|
|
207
|
-
| `review.memory_max_lines` | `100` | The cap on `memory.md`, which every stage of every run reads. Raise only if the lessons are genuinely all load-bearing |
|
|
208
|
-
| `git.auto_commit` | `false` | Leave it. Kaizen does not commit or push unless you ask |
|
|
209
|
-
| `track.default` | `auto` (inferred) | A repo that is always one kind of work, e.g. a docs repo |
|
|
210
|
-
| `backlog.enabled` | `true` | Set `false` to skip both backlog capture points; the run still executes, just without a `06-backlog.md` |
|
|
211
|
-
| `backlog.file` | `06-backlog.md` | The per-run file name. Rarely. |
|
|
212
|
-
| `backlog.statuses` | `[open, done, rejected]` | Rarely. Only `open` items are printed |
|
|
213
|
-
| `backlog.orphan_file` | `backlog.md` | Where open items go when their run is pruned |
|
|
214
|
-
| `state.keep_runs` | `20` | You want a longer or shorter run history |
|
|
215
|
-
|
|
216
|
-
Mode never overrides a refusal: destructive or irreversible actions still get confirmed
|
|
217
|
-
even in `auto`.
|
|
218
|
-
|
|
219
|
-
## Where your files live
|
|
220
|
-
|
|
221
|
-
```
|
|
222
|
-
.kaizen/
|
|
223
|
-
spec.md # core contract, copied in by init
|
|
224
|
-
spec-plan.md # per-stage contracts; each reader takes core + one
|
|
225
|
-
spec-build.md
|
|
226
|
-
spec-review.md
|
|
227
|
-
spec-main.md
|
|
228
|
-
config.yml
|
|
229
|
-
memory.md # cross-run lessons, appended by the reviewer
|
|
230
|
-
backlog.md # orphanage only: open items rescued before pruning
|
|
231
|
-
runs/
|
|
232
|
-
2026-09-02-add-oauth/
|
|
233
|
-
00-request.md # the original request, verbatim
|
|
234
|
-
01-plan.md
|
|
235
|
-
02-approval.md # decisions, with reasons and timestamps
|
|
236
|
-
03-impl.md # what changed, which files, what was skipped
|
|
237
|
-
04-review.md # findings, severity-tagged
|
|
238
|
-
05-iterations/
|
|
239
|
-
01-fix.md
|
|
240
|
-
01-recheck.md
|
|
241
|
-
06-backlog.md # what this run deliberately did not do
|
|
242
|
-
state.json
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
`state.json` is the resume point — stage, mode, and what the run is waiting on:
|
|
246
|
-
|
|
247
|
-
```json
|
|
248
|
-
{
|
|
249
|
-
"id": "2026-09-02-add-oauth",
|
|
250
|
-
"mode": "approve",
|
|
251
|
-
"stage": "review",
|
|
252
|
-
"awaiting": "approvals.review",
|
|
253
|
-
"iteration": 1,
|
|
254
|
-
"updated": "2026-09-02T14:31:00+07:00"
|
|
255
|
-
}
|
|
256
|
-
```
|
|
257
|
-
|
|
258
|
-
If a repository has no `.kaizen/`, state goes to `~/.kaizen/` keyed by working
|
|
259
|
-
directory instead.
|
|
260
|
-
|
|
261
|
-
Run state is per-person and not worth committing; the workflow itself is. `init` writes
|
|
262
|
-
this gitignore stanza:
|
|
263
|
-
|
|
264
|
-
```gitignore
|
|
265
|
-
.kaizen/*
|
|
266
|
-
!.kaizen/spec*.md
|
|
267
|
-
!.kaizen/config.yml
|
|
268
|
-
```
|
|
269
|
-
|
|
270
|
-
## Where to go next
|
|
271
|
-
|
|
272
|
-
- [`spec.md`](spec.md) + [`spec-plan.md`](spec-plan.md), [`spec-build.md`](spec-build.md),
|
|
273
|
-
[`spec-review.md`](spec-review.md), [`spec-main.md`](spec-main.md) — the tool-neutral
|
|
274
|
-
stage contract, split so each reader loads only core plus its own stage: exactly what
|
|
275
|
-
that stage reads, writes, and must not do. If anything here and the spec disagree, the spec
|
|
276
|
-
wins.
|
|
277
|
-
- [`config.default.yml`](config.default.yml) — every key with its default and a comment.
|
|
278
|
-
- [`adapters.md`](adapters.md) — running kaizen from Codex or Antigravity, and handing a
|
|
279
|
-
half-finished run between tools.
|
|
280
|
-
- [`SKILL.md`](SKILL.md) — the instructions the agent itself follows. Read it if you want
|
|
281
|
-
to know what Claude is doing between your two approval stops.
|
|
1
|
+
# Kaizen
|
|
2
|
+
|
|
3
|
+
Kaizen is a staged workflow for work that is too big to hand an AI in one go. Instead
|
|
4
|
+
of one agent that plans, writes, and then congratulates itself, the work is split into
|
|
5
|
+
three agents that never share a context window, with human approval stops in between.
|
|
6
|
+
You approve a plan before anything is produced, and an independent reviewer that never
|
|
7
|
+
saw the work being made checks it afterwards.
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
request -> PLAN -> [approval] -> IMPLEMENT -> REVIEW -> [fix loop] -> [approval] -> done
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Everything a run knows lives in plain files under `.kaizen/`, so a run can be paused,
|
|
14
|
+
resumed tomorrow, resumed by a different session, or picked up by a different tool.
|
|
15
|
+
|
|
16
|
+
## Why the reviewer runs in a separate context
|
|
17
|
+
|
|
18
|
+
This is the one design decision worth understanding before you use it. An agent that
|
|
19
|
+
watched itself write the code will rationalize it — it remembers why every line seemed
|
|
20
|
+
reasonable, and that memory is exactly what stops it from finding the bug. The kaizen
|
|
21
|
+
reviewer starts fresh. It sees the plan, the diff, and the implementation notes, and
|
|
22
|
+
nothing else. It has no reason to defend anything.
|
|
23
|
+
|
|
24
|
+
The same split is why the planner does not implement: a plan written by the agent that
|
|
25
|
+
is about to do the work bends toward what is easy to write.
|
|
26
|
+
|
|
27
|
+
## Install
|
|
28
|
+
|
|
29
|
+
First get the skill onto your machine: copy or clone this directory somewhere Claude
|
|
30
|
+
can read it. Then ask Claude to install kaizen from there, and it will ask where the
|
|
31
|
+
workflow should live:
|
|
32
|
+
|
|
33
|
+
- **Global** — `~/.claude/skills/kaizen/` and `~/.claude/agents/kaizen-*.md`.
|
|
34
|
+
Available in every project, not shared with your team.
|
|
35
|
+
- **Per-project** — `.claude/skills/kaizen/` and `.claude/agents/kaizen-*.md`,
|
|
36
|
+
committed so the team gets the same workflow.
|
|
37
|
+
|
|
38
|
+
Both can coexist; the project copy wins. Install also offers to write the adapter
|
|
39
|
+
files from [`adapters.md`](adapters.md) so Codex and Antigravity follow the same spec.
|
|
40
|
+
|
|
41
|
+
The workflow is `SKILL.md`, the split spec (`spec.md` core plus `spec-plan.md`,
|
|
42
|
+
`spec-build.md`, `spec-review.md`, `spec-main.md` — each reader takes core plus one),
|
|
43
|
+
`config.default.yml`,
|
|
44
|
+
`adapters.md`, and this README, plus the three agent definitions `kaizen-planner.md`,
|
|
45
|
+
`kaizen-builder.md`, and `kaizen-reviewer.md`.
|
|
46
|
+
|
|
47
|
+
To set a repository up for runs, ask for `kaizen init`. That creates `.kaizen/` with a
|
|
48
|
+
copy of the `spec*.md` files, a config, and the gitignore entry.
|
|
49
|
+
|
|
50
|
+
## Your first run
|
|
51
|
+
|
|
52
|
+
Say what you want, and say the word kaizen:
|
|
53
|
+
|
|
54
|
+
> kaizen: add rate limiting to the public API
|
|
55
|
+
|
|
56
|
+
That is the whole invocation. The skill triggers on the word, so a plain sentence is
|
|
57
|
+
enough — no special syntax, no flags. `SKILL.md` also documents slash forms like
|
|
58
|
+
`/kaizen plan <request>`, `/kaizen status`, and `/kaizen approve`; those are shorthand
|
|
59
|
+
for the same requests, and they only work as literal slash commands if you have
|
|
60
|
+
installed a command file at `~/.claude/commands/kaizen.md`. Nothing here requires one.
|
|
61
|
+
Saying "kaizen status" or "approve the plan" works either way.
|
|
62
|
+
|
|
63
|
+
Then the run stops twice, and both stops want something specific from you.
|
|
64
|
+
|
|
65
|
+
**Stop one — the plan.** You get a written plan: what is wrong today, what would be
|
|
66
|
+
true instead, the approach chosen, what was rejected and why, and a plain-bullet
|
|
67
|
+
**Work list** of what will actually be done. If the request had genuine ambiguity, the
|
|
68
|
+
plan ends with open questions, and they reach you as a pick list of two to four
|
|
69
|
+
concrete options rather than an open prompt. You can always type something else.
|
|
70
|
+
|
|
71
|
+
Three things newcomers do not expect:
|
|
72
|
+
|
|
73
|
+
- **"Yes, but change X" is a normal answer.** You are not limited to approve or
|
|
74
|
+
reject. Approving with a modification — a different value, a dropped step — is
|
|
75
|
+
recorded in the approval file and binds the builder.
|
|
76
|
+
- **Rejecting is not a failure.** The reason is written down and handed back to the
|
|
77
|
+
stage that produced the artifact, which revises and re-presents.
|
|
78
|
+
- **The planner also lists out-of-scope suggestions** — things it noticed but did not
|
|
79
|
+
fold into the plan. Each is a separate yes or no. Saying nothing means no.
|
|
80
|
+
|
|
81
|
+
Nothing is produced until you clear this stop.
|
|
82
|
+
|
|
83
|
+
**Stop two — the review.** After the work is done, the reviewer reports findings with
|
|
84
|
+
severities, and the run stops before calling the work done. If a finding is below the
|
|
85
|
+
auto-fix threshold, or still open when the fix rounds run out, it is reported to you
|
|
86
|
+
rather than quietly patched.
|
|
87
|
+
|
|
88
|
+
## What a run decided not to do
|
|
89
|
+
|
|
90
|
+
Both stops throw things away. The planner's out-of-scope suggestions you did not take,
|
|
91
|
+
the low findings nobody fixed, the "later" you said at an approval — all real work, all
|
|
92
|
+
previously surviving only in the conversation.
|
|
93
|
+
|
|
94
|
+
Kaizen writes them down instead, into `06-backlog.md` inside the run that produced
|
|
95
|
+
them, so an item sits next to the plan and the review that explain it. You do not
|
|
96
|
+
maintain this file; it is written at the two moments the run already writes to disk —
|
|
97
|
+
recording the plan approval, and marking the run done — so there is nothing to
|
|
98
|
+
remember.
|
|
99
|
+
|
|
100
|
+
Every item is `open`, `done`, or `rejected`. **Rejected is a real answer**: most
|
|
101
|
+
suggestions are not worth doing, and without a way to decline one it stays on the list
|
|
102
|
+
forever. Rejecting takes a reason, which is what stops the same idea coming back three
|
|
103
|
+
runs later. Closed items stay in their run's file as record and are never printed
|
|
104
|
+
again.
|
|
105
|
+
|
|
106
|
+
Two commands read across all of it:
|
|
107
|
+
|
|
108
|
+
- **`kaizen backlog`** — every open item, grouped by the run it came from, newest
|
|
109
|
+
first, with items rescued from pruned runs last under *Orphaned*. Nothing done,
|
|
110
|
+
nothing rejected.
|
|
111
|
+
- **`kaizen status`** — every run you have, in four groups: waiting on you, in flight,
|
|
112
|
+
done, and abandoned, with the open backlog count at the bottom.
|
|
113
|
+
|
|
114
|
+
A run you abort is abandoned, not outstanding: it sits in its own group and its backlog
|
|
115
|
+
items stop being printed and stop being counted.
|
|
116
|
+
|
|
117
|
+
Status is read live from each run's `state.json`, so nothing gets renamed or moved when
|
|
118
|
+
a run finishes and no path you have written down elsewhere ever breaks.
|
|
119
|
+
|
|
120
|
+
One thing to know about pruning: `state.keep_runs` eventually deletes old run
|
|
121
|
+
directories. Before a run goes, its still-open items are moved into
|
|
122
|
+
`.kaizen/backlog.md` — that file exists only as an orphanage. `kaizen backlog` reads it
|
|
123
|
+
too and prints those items last, under *Orphaned*, so nothing outstanding disappears
|
|
124
|
+
just because its run did. Items already done or rejected are deleted with their run,
|
|
125
|
+
which is the point.
|
|
126
|
+
|
|
127
|
+
## A real run, start to finish
|
|
128
|
+
|
|
129
|
+
This one actually happened. The whole request was one line, said in passing:
|
|
130
|
+
|
|
131
|
+
> for this dropdown omarchy terminal can we make it much more to the bottom?
|
|
132
|
+
|
|
133
|
+
**Intake** wrote that down verbatim in `00-request.md`, along with what it could
|
|
134
|
+
establish on its own: the script is `~/.local/bin/omarchy-dropdown`, bound to
|
|
135
|
+
`SUPER + grave`, and its height comes from `OMARCHY_DROPDOWN_HEIGHT`, default `0.55`.
|
|
136
|
+
|
|
137
|
+
**The plan** noticed the request had two readings — the panel *extending* further down
|
|
138
|
+
versus the whole panel *sitting* lower — and, rather than asking which, argued for the
|
|
139
|
+
first and said so plainly:
|
|
140
|
+
|
|
141
|
+
> Reading (2) already has a knob — `GAP` (`omarchy-dropdown:13`) — and it does not do
|
|
142
|
+
> what the phrase wants. [...] Setting `GAP=200` moves the top down to y=230 but shrinks the height to 555,
|
|
143
|
+
> putting the bottom edge at 785 — *higher* than today.
|
|
144
|
+
|
|
145
|
+
It proposed `HEIGHT_FRACTION` `0.55 → 0.80`, and listed fixing the `GAP` asymmetry as
|
|
146
|
+
an out-of-scope suggestion rather than doing it.
|
|
147
|
+
|
|
148
|
+
**The approval** is the interesting part, because it was neither yes nor no:
|
|
149
|
+
|
|
150
|
+
> **Value changed: 0.80 → 0.70.** The user chose a smaller increase than proposed
|
|
151
|
+
> [...] Wherever the plan specifies `HEIGHT_FRACTION=0.80`, use **`0.70`** instead.
|
|
152
|
+
> Nothing else changes: same file, same three steps, same verification.
|
|
153
|
+
|
|
154
|
+
The out-of-scope `GAP` fix was explicitly not approved, which made it off-limits for
|
|
155
|
+
the rest of the run.
|
|
156
|
+
|
|
157
|
+
**The implementation** changed one token, verified the geometry arithmetic instead of
|
|
158
|
+
toggling the live window, and reported the thing it did not do:
|
|
159
|
+
|
|
160
|
+
> Live steps 3-6 of the plan's verification [...] were not run: this run was
|
|
161
|
+
> explicitly instructed not to toggle the live dropdown.
|
|
162
|
+
|
|
163
|
+
**The review** re-derived the numbers independently, confirmed the file said `0.70` and
|
|
164
|
+
not `0.80`, confirmed the `GAP` code was untouched — and found one thing nobody had
|
|
165
|
+
considered: a second monitor configured as portrait might report an untransformed
|
|
166
|
+
height, in which case the larger fraction could overflow where the old one did not.
|
|
167
|
+
|
|
168
|
+
> `FINDINGS: 0 critical, 0 high, 0 medium, 1 low`
|
|
169
|
+
|
|
170
|
+
Low is below the default fix threshold, so it was not auto-fixed. It was reported, with
|
|
171
|
+
the exact command to settle it when that monitor is next plugged in. The reviewer also
|
|
172
|
+
left a line in `memory.md`, which every later run in this directory reads:
|
|
173
|
+
|
|
174
|
+
> `GAP` cannot — `geometry()` subtracts `gap * 2` from the height but adds `gap` only
|
|
175
|
+
> once to `y`, so raising GAP moves the bottom edge *up*. Unfixed as of 2026-09-02.
|
|
176
|
+
|
|
177
|
+
One-line request, six files, one real finding, one lesson that outlives the run.
|
|
178
|
+
|
|
179
|
+
## Kaizen is not only for code
|
|
180
|
+
|
|
181
|
+
Every stage adapts to the **track** — the kind of work a run is doing, which is what
|
|
182
|
+
decides what *deliverable*, *verification*, and *finding* mean. A chapter, a landing
|
|
183
|
+
page, a migration runbook, and a research memo each get a reviewer that checks the
|
|
184
|
+
right things; a reviewer hunting race conditions in a manuscript is worse than none.
|
|
185
|
+
|
|
186
|
+
The track is inferred from your request and stated back to you in the plan, so you
|
|
187
|
+
correct a reading instead of categorizing your own work. You are never asked "is this
|
|
188
|
+
software or writing?"
|
|
189
|
+
|
|
190
|
+
## Configuration
|
|
191
|
+
|
|
192
|
+
Your settings live in `~/.kaizen/config.yml` and apply to every project — `/kaizen
|
|
193
|
+
config` edits that file. To make one project different, copy
|
|
194
|
+
[`config.default.yml`](config.default.yml) to `.kaizen/config.yml` there and override
|
|
195
|
+
only the keys you care about; anything absent falls back to the global file, then to
|
|
196
|
+
the defaults.
|
|
197
|
+
|
|
198
|
+
| Key | Default | Change it when |
|
|
199
|
+
|---|---|---|
|
|
200
|
+
| `mode` | `approve` | You want `plan-only` to think without building, `auto` to run unattended, or `review-only` to audit existing work |
|
|
201
|
+
| `approvals.plan` | `true` | Rarely. This is the stop that makes the workflow worth running |
|
|
202
|
+
| `approvals.review` | `false` | Set `true` to add a second human stop after the review; with `auto_fix` on it mostly re-approves a report you are already reading |
|
|
203
|
+
| `approvals.each_file` | `false` | You want to confirm every single file edit. Maximum control, slowest |
|
|
204
|
+
| `auto_fix.enabled` | `true` | Set `false` and every finding becomes your decision instead |
|
|
205
|
+
| `auto_fix.min_severity` | `high` | Lower to `medium` or `low` to have more auto-fixed; raise findings you see instead of auto-fixing |
|
|
206
|
+
| `auto_fix.max_iterations` | `2` | Fix/recheck rounds before whatever is left is escalated to you |
|
|
207
|
+
| `review.memory_max_lines` | `100` | The cap on `memory.md`, which every stage of every run reads. Raise only if the lessons are genuinely all load-bearing |
|
|
208
|
+
| `git.auto_commit` | `false` | Leave it. Kaizen does not commit or push unless you ask |
|
|
209
|
+
| `track.default` | `auto` (inferred) | A repo that is always one kind of work, e.g. a docs repo |
|
|
210
|
+
| `backlog.enabled` | `true` | Set `false` to skip both backlog capture points; the run still executes, just without a `06-backlog.md` |
|
|
211
|
+
| `backlog.file` | `06-backlog.md` | The per-run file name. Rarely. |
|
|
212
|
+
| `backlog.statuses` | `[open, done, rejected]` | Rarely. Only `open` items are printed |
|
|
213
|
+
| `backlog.orphan_file` | `backlog.md` | Where open items go when their run is pruned |
|
|
214
|
+
| `state.keep_runs` | `20` | You want a longer or shorter run history |
|
|
215
|
+
|
|
216
|
+
Mode never overrides a refusal: destructive or irreversible actions still get confirmed
|
|
217
|
+
even in `auto`.
|
|
218
|
+
|
|
219
|
+
## Where your files live
|
|
220
|
+
|
|
221
|
+
```
|
|
222
|
+
.kaizen/
|
|
223
|
+
spec.md # core contract, copied in by init
|
|
224
|
+
spec-plan.md # per-stage contracts; each reader takes core + one
|
|
225
|
+
spec-build.md
|
|
226
|
+
spec-review.md
|
|
227
|
+
spec-main.md
|
|
228
|
+
config.yml
|
|
229
|
+
memory.md # cross-run lessons, appended by the reviewer
|
|
230
|
+
backlog.md # orphanage only: open items rescued before pruning
|
|
231
|
+
runs/
|
|
232
|
+
2026-09-02-add-oauth/
|
|
233
|
+
00-request.md # the original request, verbatim
|
|
234
|
+
01-plan.md
|
|
235
|
+
02-approval.md # decisions, with reasons and timestamps
|
|
236
|
+
03-impl.md # what changed, which files, what was skipped
|
|
237
|
+
04-review.md # findings, severity-tagged
|
|
238
|
+
05-iterations/
|
|
239
|
+
01-fix.md
|
|
240
|
+
01-recheck.md
|
|
241
|
+
06-backlog.md # what this run deliberately did not do
|
|
242
|
+
state.json
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
`state.json` is the resume point — stage, mode, and what the run is waiting on:
|
|
246
|
+
|
|
247
|
+
```json
|
|
248
|
+
{
|
|
249
|
+
"id": "2026-09-02-add-oauth",
|
|
250
|
+
"mode": "approve",
|
|
251
|
+
"stage": "review",
|
|
252
|
+
"awaiting": "approvals.review",
|
|
253
|
+
"iteration": 1,
|
|
254
|
+
"updated": "2026-09-02T14:31:00+07:00"
|
|
255
|
+
}
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
If a repository has no `.kaizen/`, state goes to `~/.kaizen/` keyed by working
|
|
259
|
+
directory instead.
|
|
260
|
+
|
|
261
|
+
Run state is per-person and not worth committing; the workflow itself is. `init` writes
|
|
262
|
+
this gitignore stanza:
|
|
263
|
+
|
|
264
|
+
```gitignore
|
|
265
|
+
.kaizen/*
|
|
266
|
+
!.kaizen/spec*.md
|
|
267
|
+
!.kaizen/config.yml
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
## Where to go next
|
|
271
|
+
|
|
272
|
+
- [`spec.md`](spec.md) + [`spec-plan.md`](spec-plan.md), [`spec-build.md`](spec-build.md),
|
|
273
|
+
[`spec-review.md`](spec-review.md), [`spec-main.md`](spec-main.md) — the tool-neutral
|
|
274
|
+
stage contract, split so each reader loads only core plus its own stage: exactly what
|
|
275
|
+
that stage reads, writes, and must not do. If anything here and the spec disagree, the spec
|
|
276
|
+
wins.
|
|
277
|
+
- [`config.default.yml`](config.default.yml) — every key with its default and a comment.
|
|
278
|
+
- [`adapters.md`](adapters.md) — running kaizen from Codex or Antigravity, and handing a
|
|
279
|
+
half-finished run between tools.
|
|
280
|
+
- [`SKILL.md`](SKILL.md) — the instructions the agent itself follows. Read it if you want
|
|
281
|
+
to know what Claude is doing between your two approval stops.
|