/agents:ishikari <task> [repo path] [--parallel <n>]from agents
Run the Ishikari workflow on a task - ants review it, plan it, build it in parallel worktrees, check and fix it, test it combined, and merge it in a straight line - asking the user only while planning, then running on its own. Use when the user runs /ishikari, or says run ishikari, use the ants, or build this with Ishikari. Needs Claude Code's Workflow tool and a git repo.
Ships in agents. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Drive four workflows for one task: plan, build, finish, then the retrospective. A running workflow cannot ask the user, so this skill runs them in turn. It asks the user only the investigator ant's questions in step 2, plus one fast path confirm for a trivial task (2b). Answering them approves the whole run, merge to main included. Never ask for approval of the plans. After that, never ask: decide by the rules in steps 3 and 4 and report at the end.
Design, rules and diagram: design/index.md.
| File | Job |
|---|---|
scripts/ishikari.py | setup, config; sole logbook writer |
scripts/ishikari-plan.js | check the investigator's plans |
scripts/ishikari-build.js | build, check, fix, combined test |
scripts/ishikari-finish.js | merge, upkeep, move main |
scripts/ishikari-retro.js | retrospective of the run, read only |
scripts/ant.py | ant skills' fixed steps: base, scope, tests, session |
scripts/anteater.py | Ant Eater: token cost per ant, no AI |
assets/prices.json | API list prices Ant Eater costs with |
assets/anteater.html | Ant Eater's page |
assets/prompts/investigator.md | the investigator's brief: ask, specs, plans |
tests/test_ishikari.py | tool: setup, logbook, guards |
tests/test_workflows.mjs | script logic, with stand-in ants |
tests/test_anteater.py | Ant Eater: counts, labels, limit, page |
Tests: timeout 120 python3 tests/test_ishikari.py,
timeout 120 node --test tests/test_workflows.mjs and
timeout 120 python3 tests/test_anteater.py and
timeout 120 python3 tests/test_ant.py.
Ant skills: five ants load a skill of their own in its Ishikari mode, and read the skill file when the skill does not load. The ant's prompt keeps the run's paths, git steps and JSON reply; the skill holds how to do the job. Each skill also runs by hand, outside Ishikari.
| Ant | Skill |
|---|---|
| investigator | investigator-ant |
| detective | detective-ant |
| janitor | janitor-ant |
| judge, juror | judge-ant |
| retrospective | retrospective-ant |
| docs | docs |
All paths are relative to this skill's folder. Ishikari keeps its state in
~/.ishikari/<repo>-<hash>/, outside the repo; nothing there is committed.
Setup copies the four scripts into <repo>/.git/ishikari/workflows/<run>/,
inside the working directory, so the Workflow tool may load them by
scriptPath; each run has its own copy.
python3 <env.tool> save <env.state> <env.run> <stage> with stage plan,
build, finish or retro. It writes <stage>-<n>.json in the run's plans
folder, numbered per stage. Save each live investigator reply the same way,
as stage investigate. The retrospective ant reads them.save is also how the logbook is written: every workflow result carries a
log list, one entry per ant reply plus the stage summary, and save
appends it. No ant writes the logbook. A line
ishikari: logbook append failed: ... on stderr: say so in the report and
carry on.save also writes the run's
tokens.json through scripts/anteater.py snapshot. A line
ishikari: anteater snapshot failed: ... on stderr: say so in the report
and carry on. To watch a run's cost live the user runs
python3 <skill>/scripts/anteater.py; see its --help.log. Recover its trail from the Workflow tool's journal:
python3 <env.tool> log recover <env.state> <env.run> <transcriptDir>/journal.jsonl.
Never recover a workflow you resume: the resumed result logs every ant.agent() call returns, so they need no stop./ask-simple skill, and only in step 2 (if
/ask-simple is unavailable, ask directly in chat format). Never
answer for the user. Never edit the product spec, the tech spec or a
plan yourself: the investigator writes them.scriptPath from env.workflows,
args as a JSON object, never a string. A workflow that was killed or
paused, or that crashed part way: run it again with the same scriptPath
and args plus resumeFromRunId, so ants that already replied are not run
again. Never start it fresh while its ants may still be alive.ishikari.py do. The one exception is the fast path (2b), and even there
the logbook goes through ishikari.py.stage: 'error': show reason, build nothing more, and go
to the retrospective (section 5). A stop is never silent: the retrospective still runs.| Cap | Value | Where |
|---|---|---|
| Workers at once (default) | 1 | build MAX_WORKERS |
Workers at once, with --parallel | 5 | build MAX_PARALLEL |
| Tries per bug, then escalated | 3 | build MAX_TRIES |
| Fix rounds per fix loop | 3 | build MAX_ROUNDS |
| Combined test rounds | 2 | build |
Questions per /ask-simple call | 4 | investigator-ant skill |
| Researchers at once | 5 | investigator-ant skill |
| Plan check, send-backs | 1 | skill rule, step 2c |
| Plans per spec id, at least | 1 | plan coverage check |
| Build rounds for merge bugs, waiting | 2 | skill rule, step 4 |
| Check-fix rounds | 1 | finish checkFixDone |
| Janitor runs at changed lines | 100+ | finish JANITOR_MIN_LINES |
| Judge pass score (out of 10) | 7 | finish PASS |
| Judge fix rounds, per finish | 1 | finish |
| Jurors at once (3+ tasks, default) | 1 | finish MAX_JURORS |
Jurors at once, with --parallel | 5 | finish MAX_JURORS |
| Files per worker plan, about | 3 | investigator-ant skill |
A task enters a fix loop after its first check, and again after a stuck build, a changed base or a clash; each loop has its own 3 rounds.
--parallel <n> in the arguments, n from 2 to 5: keep it as parallel.
Without it parallel is 1, the default: the tasks are still split, one
worker ant per plan, but a single worker, detective or juror runs at any
moment. With it, up to n run at once. Researchers are read only and stay at
5 either way. Any other value: say --parallel takes a whole number from 2 to 5 and stop, before setup.python3 <skill>/scripts/ishikari.py setup <repo> [--main <branch>].
Keep its JSON as env for every step. Its workflows field holds the four
script paths (plan, build, finish, retro). It also holds testCommand and checkCommand once saved for
this repo. env.run is YYYYmmdd-HHMMSS-xxxx (4 hex digits).origin/HEAD if a local branch of that name exists, else
main, master, trunk. From a linked worktree, setup uses the main
checkout. That checkout must be on the main branch with no uncommitted
tracked changes.no main branch in <repo>: ...; pass --main <branch> or
main branch <m> does not exist in <top>; pass --main <branch>: ask the
user which branch, rerun with --main;<top> is on <x>, not the main branch <m>; check out <m> first,
<top> has uncommitted changes; commit or stash them first or
not a git repo: <repo>: show the message and stop;the <what> path ... has a space or a character ... or main branch name ... is not safe: the path or name cannot go into the ants' shell
commands. Show the message and stop; the user moves or renames it.One live investigator ant does all the planning: it asks, proves the task can be built, and writes two specs and every worker plan:
product_spec.md: the product's behaviours (B1, B2...) and invariants
(I1, I2...), each written so an ant can check it. Nothing else.tech_spec.md: the architecture and the code's shape.docs_brief.md: what the docs ant needs and cannot ask: purpose, readers,
scope, non-goals, the reasons behind the design, and the user's answer for
each root note and requirement file. Every docs question is asked here, in
planning.<id>.md: one thin plan per worker ant: its slice of the specs (files, the
spec ids it covers, interfaces, tests), with nothing copied from them. A
one-worker run has no plan file: the worker builds straight from the specs.It stays alive until its plans pass the check, or a fast path lands. The Agent tool is needed: without it, say so and stop; there is no other way to plan.
opus,
effort low). Its prompt is
assets/prompts/investigator.md plus the
inputs: the skill file <skill>/../investigator-ant/SKILL.md as an absolute
path, env.repo, env.main, env.state, the task, the plans folder
<env.state>/plans/<env.run>/, and env.testCommand and env.checkCommand
when saved. If the last line <run>/(janitor ant) of
python3 <env.tool> log status <env.state> says cleanup dropped, and
<env.state>/plans/<that run>/cleanup*.md exists, add one line to the task:
Also consider the cleanup plan at <file>. The investigator decides whether
to ask about it; never ask yourself.questions is not empty, ask them all in one
/ask-simple call (up to 4; fallback: ask directly in chat format), headed Questions <n>-<m> of about <m + remaining>, why lines added when set. Send the answers back to the SAME
agent with SendMessage, as JSON [{"question", "answer"}] ('' if
skipped). Never start a new investigator for an answer. This holds in both
of its parts: it may ask again while it designs.blocker set, at any point: stop the investigator with TaskStop, show the
reason, and go to the retrospective (section 5).productSpecWritten (part 1 is done): check that
<plans folder>/product_spec.md exists; if not, treat it as no
reply (2a.3). Keep its ids list. Save testCommand and checkCommand with
python3 <env.tool> config <env.state> <key> <value>, the value quoted as
one argument, and add them to env. config refuses a value with a line
break or a backtick: send its message to the SAME investigator once and
take the command from its next reply; refused again, treat it as no reply
(2a.3).
Then:
trivial: true: go to 2b;go on and continue at 2c.The investigator judged the task trivial (trivialWhy). It waits, alive.
/ask-simple: This looks trivial: <trivialWhy>. Take the fast path? Answers: Yes, fast path (Recommended), No, full plan. No: send
the investigator go on and continue at 2c.git -C <env.repo> worktree add -b ishikari/<env.run>/fast <env.state>/worktrees/<env.run>-fast <env.main>; edit and commit there.git -C <env.repo> branch --show-current is
env.main and git -C <env.repo> status --porcelain --untracked-files=no prints nothing; then
git -C <env.repo> merge --ff-only ishikari/<env.run>/fast, remove the
worktree (git -C <env.repo> worktree remove --force <env.state>/worktrees/<env.run>-fast)
and delete the branch (git -C <env.repo> branch -D ishikari/<env.run>/fast). Wrong branch, local changes or a refused
fast-forward (main moved on): never force it; escalate (step 3).[{"run": env.run, "who": "main session", "event": "fast path landed", "detail": "<sha>: <trivialWhy>"}] into python3 <env.tool> log append <env.state>.git -C <env.repo> worktree remove --force <env.state>/worktrees/<env.run>-fast),
delete the branch (git -C <env.repo> branch -D ishikari/<env.run>/fast, the edits go),
and send the investigator go on: a fast path was tried and given up: <why>. Continue at 2c, passing escalated: '<why>' to the plan check. The
run carries on without asking.tech_spec.md and one plan file per task. It may ask more questions
(2a.2 and 2a.3 hold). blocker: 2a.4.plansWritten: check that tech_spec.md and docs_brief.md exist in the plans folder, and
<id>.md for every plan in its plans list when there are two or more
(one plan: no plan file is written). A missing file is a problem to send
back (step 4).env.workflows.plan with {env, task, ids, plans, testCommand, checkCommand} from its reply, plus escalated after a given-up fast path.
No ant plans there: the script only checks the list (plan ids, loops in
after, two tasks on one file, paths inside the repo, and that every
behaviour and invariant id is covered by a plan and no plan covers an
unknown one) and logs the investigated entry.problems: send the list back to the SAME investigator once; it fixes the
plans and replies again. Run the check again with recheck: true. Problems
a second time: stop the investigator, show them, and go to the retrospective (section 5).plans: stop the investigator with TaskStop; its work is over. Do not ask.
Show the productSpec and techSpec paths and each plan's title, files,
covers and after as a note.cleanup: true to finish,
so cleanups never chain.env.workflows.build with {env, plans, parallel}. Later rounds pass bugs
instead of new plans, and parallel again. A detective reuses its worker's test result only when
the worktree's HEAD is the worker's sha and the tree is clean.awaiting review task. Drop every escalated,
blocked and error task, and every task whose after holds a dropped
one; repeat until no such task is left. Keep each dropped task, its bugs
and fix history for the report. A dropped task's branch is kept, never
deleted, so its work can be looked at.approved: [] and the drops,
so they reach the logbook. Nothing merges and main stays.stage: 'error' from build: show reason and go to the retrospective (section 5); nothing reached
main.env.workflows.finish with {env, approved, together, drop, round, landed, parallel}, plus cleanup: true for a cleanup run. approved items are
{id, branch, after} from the build result. round is this run's finish
number (1, then 2, ...): a later finish uses its own upkeep branches, so
branches kept by an earlier one stay. landed holds every task id the
earlier finishes of this run reported in merged: their branches are gone,
and a task built on one must not be blocked for it.bugs and waiting: run a new build round with both lists as bugs; each
item already holds {task, branch, bug, after}. Then finish again, without
asking: approved is that build's passing tasks plus every notMoved item
of the finish before (merged in its scratch copy, but main did not move, so
they still have to land). At most 2 such rounds per run; after that drop
what is left.sha, run git -C <env.repo> merge-base --is-ancestor <sha> <env.main>:
exit 0 means main holds the checked commit. mainMoved: true but it fails:
main did not move; treat the result as mainMoved: false, its merged
tasks as notMoved, and say so in the report. mainMoved: false but it
succeeds (the finisher died after the move): main did move; count the
notMoved tasks as landed and say so.checkFix set (check failed, no check-fix yet): run one build round with
bugs: [checkFix]: no branch, so a new task starts from the moved main.
Then finish again with checkFixDone: true (finish also assumes it when
check-fix is in approved or drop). checkFixRefused: the check
still fails; report check.output and go to the retrospective (section 5).mainMoved: false with no bugs left to fix: report the reason and go to
the retrospective (section 5). Nothing is lost; finish can run again once it is fixed.upkeepStopped set: the scratch copy could not be put back after a rejected
cleanup, judge fix or docs update, so the rest of upkeep was skipped. Main
still moved only to the last checked commit. Report it.together.sha) when the approved set
matches it or only adds tasks, main is an ancestor of it and git cherry
finds every reused task's commits in it; else it merges from main;git cherry; a task the
merger called merged but git finds missing comes back as a merge bug;parallel at once) and decides from their reports;
the score is its own call, not an average. Below 7: one fix round
(worker, then a detective that lands the fix), then a second score. At 7 or
more the same round still runs, only for the gaps the judge lists as
bugs (wrong behaviour, never a missing test alone). Still below 7: main moves
anyway and verdict.flagged is true;/docs in update mode on the final code (or updates
the documentation directly if /docs is unavailable), in its
own worktree; it lands only if the docs' own build.sh check (when
present) and the tests pass and it changed docs only. No docs/design/
(or old book): it runs /docs in create mode and writes docs/design/ from scratch,
taking the user's answers from docs_brief.md; it never asks. Dropped: its
branch ishikari/<run>/_docs is kept, docs.reason says why, main still
moves.verdict (score,
gaps; say FLAGGED when flagged), the cleanup: landed, or dropped with its
reason and branch, its plan offered as the next task, and the docs
update: landed, or dropped with its reason and branch.
Every workflow ant's result is in the logbook once its stage is saved (the
live investigator gets only an investigated entry); a crashed stage's
trail comes from log recover. End with where the full record is: python3 <env.tool> log status <env.state> <env.run>.env.workflows.retro with {env, outcome}: outcome says how the run
ended in a few words. The retrospective ant reads this run's logbook, the
plans folder (product spec, tech spec, plans, cleanup note, stage results), the
run's git history and Ishikari's own source, and writes
<env.state>/plans/<env.run>/retrospective.md. It is read only: it changes
no code, branch or repo file, and the script checks that: it compares the
repo's refs, worktrees and status before and after. Never act on its
findings yourself, except through Improve this skill.summary, the top 3 findings (category,
title, where) and the path to retrospective.md. stage: 'error': say
the retrospective failed and why; the run's result stands.When: after the final report, retrospective included. Judge the workflow and its ants, not the task. Signals, from this run only. No signal: say nothing. Up to 3 suggestions, costliest first.
where is a file under skills/.Skill note: line an ant left in its notes, detail or summary.error from a script or a prompt of this skill, not
from the task.Every suggestion follows skill_improvement.md. Read it first. Change nothing without a yes.
This is the one way a retrospective finding may be acted on in the run, and only after a yes.
Where it goes: the SKILL.md or script the signal names. A script change
comes with its test in tests/.
assets/anteater.html (opens in a new tab)assets/prices.json (opens in a new tab)assets/prompts/investigator.md (opens in a new tab)design/index.md (opens in a new tab)design/ishikari-metro.svg (opens in a new tab)design/metro.clj (opens in a new tab)scripts/ant.py (opens in a new tab)scripts/anteater.py (opens in a new tab)scripts/ishikari-build.js (opens in a new tab)scripts/ishikari-finish.js (opens in a new tab)scripts/ishikari-plan.js (opens in a new tab)scripts/ishikari-retro.js (opens in a new tab)scripts/ishikari.py (opens in a new tab)tests/test_ant.py (opens in a new tab)tests/test_anteater.py (opens in a new tab)tests/test_ishikari.py (opens in a new tab)tests/test_workflows.mjs (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub raveensrk/agent1 --plugin agents20 skills in this plugin
/all-doneThe last prompt before the user exits a session. Checks this session's work for loose ends - git state, things still running, leftover files, unverified work, dropped requests, the task list, open improvement notes, installed versus source - shows them in a question dialog, fixes the ones picked, offers to save the rest as tasks, then says whether it is safe to exit. Use when the user says all done, wrap up, am I safe to exit, closing check, or runs /all-done./ask-simpleAsk the user clear questions in simple language, as if they are new to the topic, so each one is easy to answer. Use when the user says ask simple questions, assume I am a newbie, keep it simple, explain like I am new, I do not understand your question, I do not know what you mean, idkwym, I do not understand your last response, or runs /ask-simple. Also use whenever a task needs the user's decision and they have asked for plain words. When run also ask about any open decisions remains to be answered. When invoked manually review the previous response and ask questions based on that./detective-antCheck a change against what it was asked to do - a task, an issue or a plan - and find real bugs, each with its cause and a fix plan a worker can build. Never edits code. In normal use it checks the current branch against main and the task text and answers in the session with pass or fail. Run by Ishikari's detective ant it checks a task or a fix and replies in the ant's JSON. Use when the user says check this against the task, does this do what the issue asked, find bugs in my branch, or runs /detective-ant./determinizeScan a directory and its agent instruction files, turn every rule a program can decide into a check, a guard or a git hook, and thin the instructions to decisions and routing. Use when the user says determinize, make this rule deterministic, convert these rules to checks, add a linter or a hook for a rule, thin an AGENTS.md, or asks which rules could be code instead of prose. Prints the per-rule plan and waits for a yes before writing./docsCreate, update or publish a repo's four books in docs/ - docs/design/ (the design doc and repo bible, complete enough that an engineer can rebuild the project from it alone), docs/manual/ (the user manual, in GNU manual chapter order, with real screenshots), docs/notes/ (working notes, tidied and listed) and docs/rules/ (the AI agent working rules, moved out of a thin AGENTS.md) - with D2/TALA and Mermaid diagrams, a build script for checks, a publish mode that makes the HTML, PDF and EPUB book in docs/book, a docs-only rebuild test and a fresh-reader manual test. Use when the user says create docs, write the docs, document this repo, write a design doc or repo bible, write the user manual, tidy the notes, thin AGENTS.md, move the rules, publish the book, docs book, update the docs, sync the docs, docs are stale or runs /docs. Run by hand after a task is done, or by Ishikari's docs ant after a merge; never on its own. Create mode researches first, interviews the user, waits for an OK on the outline, and works on a docs-book branch without pushing; called by an ant it takes its answers from the ant's docs brief and asks nothing. Update mode brings the docs in line with what changed and what was learned./docs-to-doorstopTurn a directory of docs and specs into a Doorstop requirements tree in ASPICE 4.0 form - the full V-model, SYS.1 to SYS.5, HWE.1 to HWE.4 and SWE.1 to SWE.6 - written in short, simple YAML items with D2, Mermaid or animated SVG diagrams where a picture explains it more simply. Scans the input first and asks every doubt before writing, then proves the tree with Doorstop and a bundled ASPICE checker. Use when the user says convert docs to doorstop, make requirements from these specs, ASPICE requirements, doorstop tree, or runs /docs-to-doorstop.