The skill¶
Kanso is one Agent Skill: a short SKILL.md that every agent reads, six references it reads when a task touches their topic, and five language profiles it reads for the ecosystems a change affects. Its goal is to minimize the code you own and its maintenance cost while keeping correctness, security, safety, readability and testability.
The workflow¶
Every task runs through five steps. The examples show what each asks of an agent fixing a bug in RetroSpeedLab's leaderboard.
| Step | What the agent does | At RetroSpeedLab |
|---|---|---|
| 1. Discover | Reads the repository's instructions, traces the behavior through callers, tests, fixtures and configuration, detects the language and tools, and runs a baseline. For cross-module, risky or multi-step work, writes the plan under docs/ first. |
Reads AGENTS.md, finds where runs are stored and which pages read them, runs the checks once. |
| 2. Specify and test | Writes the changed behavior and its failure cases as Gherkin scenarios and sees them fail (RED) for the right reason before changing code. A fix starts by reproducing the defect. | A scenario: given a movie submitted twice, when the leaderboard is read, then the run appears once. It fails first. |
| 3. Reuse and design | Checks whether the change needs new code at all, reuses project code, platform features and adopted libraries first, and picks one open-source tool per new responsibility whose required features work without a freemium tier. Exposes new functionality through an API, never a one-off CLI script. | A unique key where runs are stored instead of filtering duplicates in every reader. |
| 4. Integrate | Works in small increments with versioned checks, a Makefile that runs them, Conventional Commits, and a uniquely versioned prerelease on every push to the default branch. | fix(leaderboard): a movie submitted twice counts once. |
| 5. Verify and report | Reviews the diff, runs the formatting, analysis, test, security and build checks, removes finished steps from the plan, and reports the outcome first, tied to the commands it ran and the gaps it could not close. | "Fixed; the new scenario and the full suite pass; the old duplicates in the database are not cleaned up yet." |
The agent asks before proceeding when an unresolved assumption could cause harm or substantial rework, and obtains authorization before irreversible or externally consequential actions, commits and deployments included.
Implementation plans¶
Before risky work, Kanso asks for a plan at docs/<task>-implementation-plan.md, or an existing task document under docs/. It records the assumptions that affect scope, behavior, data or risk, and every open item keeps its next action. Finished items leave the plan as soon as they are verified, and the plan is deleted when nothing is open, with any decision that still matters moved into the project's documentation. This makes the plan the single list of open work, which is what kanso-runner reads.
Companion guidance¶
SKILL.md folds the core of seven well-known skills into its own guidance, so it applies even when only Kanso is installed, and defers to them when they are:
| Companion | For |
|---|---|
| Ponytail | The smallest complete change |
| i-have-adhd | Outcome, decision or action first; numbered steps |
| Unslop | Prose that keeps the facts and the author's voice |
| Impostor Syndrome | Completion claims checked against evidence |
| Codebase Design | A small interface in front of cohesive behavior |
| Systematic Debugging | Reproduce, trace, test one hypothesis, add the regression test |
| Property-Based Testing | Rules that must hold across many inputs, such as a serialization round trip |
References¶
The agent reads a reference when the task touches its topic.
| Reference | Read for | Highlights |
|---|---|---|
| Testing | Behavior changes, regressions, characterization | Gherkin acceptance scenarios in .feature files; RED, GREEN, REFACTOR; a broken harness is no RED evidence |
| Architecture | Contracts, structure, composition, compatibility | Organize by feature; handwritten classes at most 100 lines; configuration validated once at startup; no silent fallbacks or hidden global state |
| Dependencies | Build versus reuse, dependency changes | Adopted library first; check maintenance, licence and footprint; pin and lock; no freemium tools |
| Security and design | Trust boundaries, safety, operational risk | A control per risk, from validated input and least privilege to atomic writes, timeouts and authorization for irreversible effects |
| Automation | Quality gates and tool configuration | One configuration per concern; pinned tools and CI actions; never weaken a gate to pass |
| Data science, analytics, and AI | Any change that touches data, metrics, models, prompts, retrieval or decisions supported by AI | Start from the decision and a simple baseline; define grain, keys and time zones; freeze the evaluation before tuning; typed, validated model output |
Language profiles¶
The agent reads a profile only for the ecosystems a change affects. Each has the same four sections: how to detect the setup, conventions, tool candidates and library candidates. Tools the repository already uses win over the candidates.
| Profile | Tool candidates for new projects (excerpt) |
|---|---|
| Python | uv, Ruff, Pyright, pytest with pytest-bdd, Hypothesis |
| TypeScript and JavaScript | Biome or Prettier, Biome or ESLint, tsc, Vitest, fast-check, Playwright, Knip |
| Rust | rustfmt, Clippy, cargo test, proptest, cargo-audit or cargo-deny |
| Go | gofmt, go vet, Staticcheck, go test with fuzzing and the race detector, govulncheck |
| Java | the Maven or Gradle wrapper, Spotless, Checkstyle or SpotBugs, JUnit, jqwik, ArchUnit |
The prompt hook¶
Skills are loaded when the agent decides they fit. The Claude Code and Codex plugins add a UserPromptSubmit hook (hooks/hooks.json) that echoes one line into every prompt:
Use the kanso skill for this prompt. Apply the guidance relevant to the task and respect repository contracts.
It runs a plain echo with a five-second timeout and reads nothing. Without a plugin, the activation block in the agent's instruction file does the same job.
Evidence¶
The agentic benchmark runs Claude Code on working fixtures with and without Kanso and grades every change with hidden acceptance and adversarial tests. A fix counts as proven only when the agent's own test fails on the original defect. In the registered run (3 scenarios, 2 arms, 5 runs each, Claude Code with claude-sonnet-5-5), both arms fixed all 15 defects; Kanso proved 15 of 15 fixes with a failing test against 8 of 15 for the baseline, at about 1.7 times the cost per run. The full report has every diff and transcript.