kaizen-agent 1.5.5 → 1.5.6
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/cli/state.test.ts +5 -1
- package/cli/state.ts +8 -4
- package/package.json +1 -1
- package/skills/kaizen/spec.md +12 -0
package/cli/state.test.ts
CHANGED
|
@@ -57,7 +57,11 @@ test("statusOf: waiting beats stage, mtime decides running vs stalled", () => {
|
|
|
57
57
|
});
|
|
58
58
|
|
|
59
59
|
test("columnOf: every stage word lands somewhere", () => {
|
|
60
|
-
expect(["plan", "build", "review", "done", "abandoned", "weird"].map(columnOf)).toEqual([1, 2, 3, 4, 4, 1]);
|
|
60
|
+
expect(["plan", "build", "review", "done", "abandoned", "weird"].map((s) => columnOf(s))).toEqual([1, 2, 3, 4, 4, 1]);
|
|
61
|
+
expect(columnOf("implement", "approvals.review")).toBe(3);
|
|
62
|
+
expect(columnOf("implement", "findings")).toBe(3);
|
|
63
|
+
expect(columnOf("implement", "approvals.each_file")).toBe(2);
|
|
64
|
+
expect(columnOf("plan", "approvals.plan")).toBe(1);
|
|
61
65
|
});
|
|
62
66
|
|
|
63
67
|
test("inbox round-trips and ignores malformed lines", () => {
|
package/cli/state.ts
CHANGED
|
@@ -348,12 +348,16 @@ export function statusOf(r: Run, now: number): Status {
|
|
|
348
348
|
return now - r.moved < RUNNING_WITHIN_MS ? "running" : "stalled";
|
|
349
349
|
}
|
|
350
350
|
|
|
351
|
-
// A stage this build has never heard of still belongs somewhere visible
|
|
352
|
-
//
|
|
353
|
-
|
|
351
|
+
// A stage this build has never heard of still belongs somewhere visible. What the
|
|
352
|
+
// run is waiting on says where it really is (a run awaiting the review approval is
|
|
353
|
+
// in Review whatever its stage word), and PLANNING is the honest guess otherwise:
|
|
354
|
+
// the run has started and has not finished.
|
|
355
|
+
export function columnOf(stage: string, awaiting: string | null = null) {
|
|
354
356
|
if (stage === "build") return 2;
|
|
355
357
|
if (stage === "review") return 3;
|
|
356
358
|
if (stage === "done" || stage === "abandoned") return 4;
|
|
359
|
+
if (awaiting === "approvals.review" || awaiting === "findings") return 3;
|
|
360
|
+
if (awaiting === "approvals.each_file") return 2;
|
|
357
361
|
return 1;
|
|
358
362
|
}
|
|
359
363
|
|
|
@@ -588,7 +592,7 @@ export function boardCards(states: string[], now: number): Card[] {
|
|
|
588
592
|
}
|
|
589
593
|
for (const r of readRuns(st)) {
|
|
590
594
|
next.push({
|
|
591
|
-
kind: "run", id: r.id, status: statusOf(r, now), text: short(r.id), state: st, where, column: columnOf(r.stage), moved: r.moved,
|
|
595
|
+
kind: "run", id: r.id, status: statusOf(r, now), text: short(r.id), state: st, where, column: columnOf(r.stage, r.awaiting), moved: r.moved,
|
|
592
596
|
title: requestTitle(body(st, r.id)),
|
|
593
597
|
awaiting: r.stage === "abandoned" ? null : r.awaiting,
|
|
594
598
|
dim: r.stage === "abandoned",
|
package/package.json
CHANGED
package/skills/kaizen/spec.md
CHANGED
|
@@ -104,6 +104,18 @@ Write into `00-request.md`: the verbatim request, the deliverable, what done mea
|
|
|
104
104
|
and what wrong means. Record in `state.json`: `id`, `mode`, `runner`, `agent`, `track`,
|
|
105
105
|
`stage: "plan"`, `awaiting: null`.
|
|
106
106
|
|
|
107
|
+
`stage` takes exactly one of five words, and boards key their columns on them:
|
|
108
|
+
`plan`, `build`, `review`, `done`, `abandoned`. Set it when the stage starts —
|
|
109
|
+
`build` before the builder touches anything, `review` before the reviewer reads — as
|
|
110
|
+
its own write, not tacked onto a longer command that may not finish. Any other word
|
|
111
|
+
(`implement`, `fix`, `building`) is unknown to every reader and shows as still planning.
|
|
112
|
+
|
|
113
|
+
`awaiting` is `null` or the config key of the approval being waited on —
|
|
114
|
+
`approvals.plan`, `approvals.review`, `approvals.each_file` — or `findings` when the
|
|
115
|
+
run has stopped for the user to pick which review findings to fix. Boards read it to
|
|
116
|
+
say what a run is waiting for and where it sits; a word outside this list is shown but
|
|
117
|
+
not understood.
|
|
118
|
+
|
|
107
119
|
`agent` is the tool this run is happening in — `claude`, `codex`, `agy`, `opencode`,
|
|
108
120
|
`gemini`, or `cursor` — written once at intake and never changed, so a board can say
|
|
109
121
|
which agent to look for when a run is waiting. The tool running this stage knows what
|