Reference¶
kanso-runner reads no configuration file and no environment variable. Everything it needs comes from its command-line options, and the plans themselves are its only state. The skill has no settings either: where it is installed and the activation block decide when it applies (see Getting started).
kanso-runner next¶
Prints the next open step and its session prompt as JSON.
kanso-runner next --repository PATH --ref REF [--first PLAN] [--current PLAN] [--stopped [PLAN ...]]
| Option | Required | Meaning |
|---|---|---|
--repository |
Yes | A git repository or bare mirror. The plans are read from its git objects, so the working tree is not used. |
--ref |
Yes | The branch or other ref the plans are read from, such as main or origin/main. |
--first |
No | A plan the owner asked to go first, by name, such as music-ab. |
--current |
No | The plan in work, which goes on before older ones. |
--stopped |
No | Plans paused after failing steps, separated by spaces. They are skipped until they are left out again. |
Plans are named without path and suffix: music-ab stands for docs/music-ab-implementation-plan.md. A name that matches no plan is ignored.
kanso-runner --help and kanso-runner next --help print the usage.
Output¶
One line of JSON on standard output:
| Field | Meaning |
|---|---|
plan |
The plan's name, such as suite |
path |
The plan's path in the repository, such as docs/suite-implementation-plan.md |
step |
The step's text as written in the plan, including continuation lines |
prompt |
The session prompt for the agent |
Exit codes¶
| Code | Meaning |
|---|---|
0 |
A step was printed. |
1 |
A git command failed, for example because the ref does not exist. |
2 |
The command line was invalid, for example a required option is missing. |
3 |
No plan has an open step. Nothing is printed. |
It needs git on the PATH and Python 3.12 or later.
Plan format¶
| Element | Effect |
|---|---|
docs/<name>-implementation-plan.md |
A plan named <name>; only files directly under docs/ count |
## Steps … or ## Open work … |
Starts a section of steps, up to the next # or ## heading |
1. … or - … inside such a section |
One step; following lines that start with a space belong to it |
1. (owner) … or - (owner) … |
The owner's step, never picked |
## Design without a section of steps |
One step that asks the agent to split the design into steps |
Any other section, such as ## Open |
Notes, never picked |
Python API¶
Everything lives in kanso_runner.plans, and the package is typed.
PLAN_PATH = "docs/{name}-implementation-plan.md"
@dataclass(slots=True)
class Progress:
first: str | None
current: str | None
stopped: list[str]
def read_plans(repository: Path, ref: str) -> dict[str, str]: ...
def chosen(texts: dict[str, str], progress: Progress) -> tuple[str, str] | None: ...
def open_steps(text: str) -> list[str]: ...
def request(name: str, step: str) -> str: ...
read_plansreturns the text of every plan atref, keyed by name, oldest first. It raisessubprocess.CalledProcessErrorwhen git fails.Progressholds the owner's choice, the plan in work and the paused plans, the same as--first,--currentand--stopped.chosenreturns the next plan's name and its first open step, orNonewhen nothing is open.open_stepsreturns the open steps of one plan's text, in order.requestreturns the session prompt for one step.PLAN_PATHis the path of a plan, to format with its name.
Skill files¶
| Path | Contents |
|---|---|
skills/kanso/SKILL.md |
The workflow, companion guidance and links to every reference and profile |
skills/kanso/references/*.md |
Testing, architecture, dependencies, security and design, automation, data science and AI |
skills/kanso/profiles/*.md |
Python, TypeScript and JavaScript, Rust, Go, Java |
hooks/hooks.json |
The UserPromptSubmit hook of the Claude Code and Codex plugins |
.claude-plugin/, .codex-plugin/, .github/plugin/, .agents/plugins/ |
The plugin and marketplace manifests for Claude Code, Codex and GitHub Copilot |
Each release attaches kanso.zip, which holds the kanso skill folder and the licence.