kokoro-pipeline
v0.1.2
Published
After your AI builds the app from a kokoro-baton spec, run the follow-up tools in one go: parameter table, a spec for people, one spec per system checked against the code, a hands-on check list (Aegis) and a code review (Polish).
Maintainers
Readme
kokoro-pipeline
After your AI builds the app, run the follow-up tools in one go.
You decide what to build with kokoro-baton, your AI (Claude Code etc.) builds it from kokoro-spec.md, and then:
npx kokoro-pipeline after .runs, in this order:
| Step | Tool | What you get | AI |
|---|---|---|---|
| params | kokoro-kami params | a parameter table (Excel) of the tunable numbers in PARAMS | none |
| spec-doc | kokoro-writer spec-doc | a spec for people (AI writes only the overview and design approach; the rest is copied) | Writer once |
| system-docs | kokoro-writer system-docs | one spec per system, checked against the code by another AI | split + Writer and Fable per system |
| aegis | kokoro-aegis | a hands-on check list (aegis-report.md) | none |
| polish | kokoro-polish | a code review (kokoro-fixes.md) | Fable once |
- It asks once — it shows the steps and the estimated cost, then runs them without asking again.
--yesskips the question. - If a step stops, the others still run. A summary at the end shows what was made, what was skipped and why, and what stopped.
- The latest always has the same name. Before a step writes, the documents it made last time move to
previous/<date_time>/. Nothing is deleted. - The parameter table is remade only when it holds no edits you have not sent back (
npx kokoro-kami params <file> --apply). Otherwise that step is skipped, with the reason. - Steps that use AI need
ANTHROPIC_API_KEYand are skipped without it. About $2–2.70 in total for a 5–6 system app (estimate). - Choose steps with
--only params,aegisor--skip polish.--no-checkskips the AI check insidesystem-docs.
Did the spec change after the documents were made?
npx kokoro-pipeline status .Each document carries a small stamp of what it was made from (a fingerprint of the spec and code). status compares it with the files as they are now:
✗ outdated spec-for-readers.md ← kokoro-spec.md changed
✓ up to date aegis-report.md (2026-10-15)It also tells you if the parameter table has edits not sent back yet. To bring everything up to date, run after again. Documents made before stamps existed show as "no stamp".
Write your own recipe
Put the steps you want in a text file, one per line. The file a step makes is passed to the next step.
# Meeting notes → minutes → slides (everything after # is a note)
input: notes.md
writer --format minutes
check-point # stop here: open the file, fix it, press Enter
slidenpx kokoro-pipeline parts # what each step takes, gives, and costs
npx kokoro-pipeline new # a commented template (kokoro-flow.txt)
npx kokoro-pipeline check kokoro-flow.txt # read it first: says what will not connect, and why
npx kokoro-pipeline run kokoro-flow.txt # asks once (with the estimated cost), then runs- Steps:
writerkamislidebaton(text in, text out) andparamsspec-docsystem-docsaegispolish(they look at the project folder). - Results go into
<recipe name>-output/, numbered by line (1-writer.md,3-slide.md). On the next run, the old folder moves toprevious/<date_time>/. checkstops a recipe that cannot work, with the line number and the reason (e.g. "the previous step makes nothing that can be passed on — write a file name on this line").afteris the built-in recipe for after building (below).
When your AI runs it for you
Specs made with npx kokoro-baton end with an "After building" section. It asks your AI to run the no-AI steps (params, aegis) right away, and to ask you, with the cost, before the steps that use AI.
License
PolyForm Shield 1.0.0 — see LICENSE.
日本語
作った AI が作り終わったあとの道具を、決まった順にまとめて動かします。
npx kokoro-pipeline after .- 順番:パラメータ表(AI なし)→ 人が読む仕様書 → 仕組みの仕様書と照らし合わせ → 手で確かめる表(Aegis・AI なし)→ 研磨(Polish)
- 最初に 1 回だけ聞きます。 動かす段と費用の見込みを出してから聞き、そのあとは聞きません(
--yesで省けます)。 - 途中の段が止まっても、ほかの段は続けます。 最後に、できたもの・飛ばした理由・止まった段をまとめて出します。
- 最新は、いつも同じ名前です。 段が書く前に、前回その段が作った紙を
previous/<日付_時刻>/へ移します。消しません。 - パラメータ表は、コードへ戻していない直しが無いときだけ作り直します(戻すのは
npx kokoro-kami params <ファイル> --apply)。残っていれば、理由を言ってその段を飛ばします。 - AI を使う段は
ANTHROPIC_API_KEYが要り、無ければ飛ばします。仕組み 5〜6 個の作品で、合わせて約 300〜400 円の見込みです。 --only params,aegisや--skip polishで段を選べます。--no-checkで仕組みの仕様書の照らし合わせを外せます。
作ったあとで仕様を変えたとき
npx kokoro-pipeline status .紙の先頭には、何から作ったかの小さな印(仕様とコードの指紋)が入っています。status は、それを今のファイルと比べます。
✗ 古い spec-for-readers.md ← kokoro-spec.md が変わった
✓ 最新 aegis-report.md(2026-10-15)パラメータ表に、コードへ戻していない直しが残っていれば、それも言います。最新にするには、もう一度 after を動かします。この仕組みより前に作った紙は「印なし」と出ます。
自分でレシピを書く
段を 1 行に 1 つずつ、文字のファイルに書きます。前の段が出したファイルが、自動で次の段に渡ります。
# 会議メモ → 議事録 → スライド (# から後ろはメモ)
入力: メモ.md
writer --format minutes
確かめる # ここで止まる。開いて直したら Enter
slidenpx kokoro-pipeline parts # 段ごとの、受け取るもの・出すもの・費用
npx kokoro-pipeline new # 説明つきのひな形(kokoro-flow.txt)
npx kokoro-pipeline check kokoro-flow.txt # 動かす前に読む。つながらない所を理由つきで言う
npx kokoro-pipeline run kokoro-flow.txt # 最初に 1 回だけ(費用の見込みつきで)聞いて、動かす- 段:
writerkamislidebaton(文を受け取り、文を出す)と、paramsspec-docsystem-docsaegispolish(作品のフォルダを見る)。 - できたものは
<レシピの名前>-output/に、行の番号つきで入ります(1-writer.md・3-slide.md)。次に動かすと、前のフォルダはprevious/<日付_時刻>/へ移ります。 checkは、動かないレシピを行の番号と理由つきで止めます(例:「前の段は、次に渡せる 1 枚を出しません。この行にファイル名を書いてください」)。afterは、作り終わったあと用の組み込みのレシピです。npx kokoro-batonで作った指示書の最後には 「作り終わったら」 の節が付きます。作った AI は、AI を使わない段をすぐ動かし、AI を使う段は費用を言ってから、あなたに聞きます。
