/kapso:kapso-harnessfrom kapso
Writes or improves a Kapso harness for a domain by reading the repository in silence, proposing a harness structure with rules, skills, servers, and checks, then writing it on confirmation.
Ships in kapso. 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.
A harness is the domain layer a build loads: one directory holding the standing
rules and the module pages (always on), skills (on demand), delegates, tool
servers and hooks, listed per module in harness.yaml. The engine runs the
modules; the harness says how this domain does each one. Nothing goes in without a
named failure it prevents or a domain rule it carries.
The authoring page is https://docs.leeroo.com/docs/harnesses/write.md, the reference https://docs.leeroo.com/docs/reference/harness.md, the worked example https://docs.leeroo.com/docs/harnesses/example-trading.md. Read the page once before the first proposal.
The README and docs, the task runners (Makefile, justfile, tox, package scripts), the notebooks and their recurring cells, the tests and linters, CI, scripts run again and again, the data layout, tool configurations (dbt, Airflow, Terraform, a warehouse client), runbooks. Each is evidence for one part:
| Found in the repository | Becomes |
|---|---|
| a rule everyone follows (a convention, a prohibition, a review step) | a line in guardrails.md |
| a script run on every change, a procedure written down | a skill, with the script inside it |
| data or a system reached through a client, a credential, a role | a server |
| a validator, a test suite, a scan | a check on the verification page, a hook when a tool call reveals it |
| a judgment the team asks a reviewer for | a delegate |
| a module the repository says nothing about | left out, and one question later |
The domain in a sentence; the standing rules (four to seven) with where each came
from; the candidate skills, servers, delegates and checks, each with its
evidence ("scripts/leakage_scan.py runs in CI on every PR"); the modules where
the repository gave nothing; and the tree as it will be written. Nothing is
written before the user confirms. Pages under forty lines; every skill named on
its module's page; a task value (a limit, a path, a deadline, a metric) never in
the harness: say where it is, not what it is.
kapso harness new churn --config kapso-config.yaml # harness.yaml + instructions/guardrails.md, valid as written
The harness goes where the repository loads it from (load_harness("../harnesses/trading"),
the brief's Harness line, a README line), resolved from the repository's own
directory — the proposal names that absolute path, and the files land there and
nowhere else (a harness written one directory up is one the repository cannot find).
Then the proposal's files: the module pages (instructions/<module>.md for
setup, ideation, implementation, verification, feedback, learning,
deployment, only where the domain has a say), skills/<name>/SKILL.md with its
front matter (name equal to the directory, a description that names the
situation), agents/<name>.md, mcp.json and servers/, hooks/<name>/hook.json
with its script, requirements.txt named by environment.python. Every
attachment listed on every module that should carry it; a list is complete,
nothing is inherited. A secret is referenced by variable name, never written.
For each module the repository said nothing about, one question, with the guide's example for that module as the prompt ("In verification the trading example runs a leakage scan and asks an auditor; what must hold here before a candidate counts?"). At most eight questions in all. Choose the cheapest form for the answer and say why in a sentence:
| The answer is | The form |
|---|---|
| a step that must always happen | one line on the module page |
| a procedure for a recurring situation | a skill |
| a deterministic operation | a script inside the skill |
| a judgment a session cannot make alone | a delegate |
| data or a system to reach | a server |
| a mistake a tool call reveals | a hook |
kapso harness check ./churn --config kapso-config.yaml
Green is no failure and no warning. A needs line is this machine's (a package,
a program, a variable, a GPU), reported separately and not a failure; say what
it is and leave it to the user. Fix every failure and every warning (a skill no
page names, a file no module lists, a long page) before offering the run.
One build on a real task of the domain with --harness ./churn, through
kapso-build; then this skill's improve flow on its trace. Never launch it
unasked.
kapso trace ../churn-campaign
kapso trace ../churn-campaign --json
Read where attempts diverged (one ran the scan and one did not, one burned its budget on a fetch), which hooks fired and on what, what verification voided and with which finding, what feedback kept asking for, which skills no session opened. Each is one edit:
Propose the smallest edit in the cheapest form, with the attempt that shows the
failure (its node and branch), and ask one question in all — the word on the
proposal; a choice of form is made and stated, not asked. On the word, apply it,
bump version in harness.yaml, run kapso harness check again. A resume refuses
a changed harness; the next campaign carries the new version.
kapso harness export ./churn --host claude_code --to . --config kapso-config.yaml # or --host codex
Writes the skills, delegates and servers as the files a session of that host
discovers, and the standing rules as kapso-harness-<name>.md with the line that
includes it from CLAUDE.md or AGENTS.md (never written to). Hooks stay behind,
as do the module pages and the routing: those are a campaign's. An existing
destination refuses the whole export by name.
check passes) after every module is written, not only at the end.check rejects them, and they are the config's or the brief's.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub leeroo-ai/kapso --plugin kapso6 skills in this plugin
/kapsoOperate Kapso (PyPI leeroo-kapso), the engine that runs experiments toward a measurable objective, deploys the best solution and learns from every run, from a coding session — launch a build and hand it off, follow it with kapso watch, answer a campaign that is WAITING ON YOU, tell a slow run from a dead one and stop or resume it, learn from a finished campaign into your bank, serve a build or this session the experience it should start from, deploy the winner, and run the harness and experience verbs. Use when the user mentions Kapso or kapso build, watch, inbox, resume, stop, learn, experience, harness, deploy or doctor, asks how a campaign is doing, or says a run died. Do not use for ordinary code edits, for writing the objective and its evaluation (kapso-build does that), for reading a finished run's result (kapso-review does that), or inside a Kapso campaign session, which never launches another campaign./kapso-buildTurn what the user wants built into a Kapso campaign — discover the repository's data, evaluation and domain in silence, write the brief (objective, how it is measured, baseline, target, rules, budget), get the evaluation approved through kapso-evaluation, and launch detached with the handoff. Use when the user says build X and verify it, I need Y that meets Z, improve W, make this pass the benchmark, get the metric above a number, ship a model that meets a bar, or runs /kapso:build. Do not use for a one-file change with an obvious fix, for operating a campaign already running (the kapso skill), or inside a Kapso campaign session./kapso-evaluationGive a Kapso build an evaluation it can protect — audit the evaluator the repository has against the contract, or build one from the success criterion and the data, run the baseline, and get the protocol approved in one message. Use when kapso-build hands over the repository's findings before a launch; called by kapso-build, never from a menu. Do not use on its own, for a campaign already running, or inside a Kapso campaign session./kapso-reviewRead a finished Kapso run and say what it did — the winning branch's diff in outline, the evaluation evidence with its version, the attempts that were voided and why, the ideas rejected, the reviewers' risks, the spend, and the next action in one line. Use when a campaign has finished and the user asks what happened, why this attempt won, what it changed, whether it is safe to merge, or runs /kapso:review; also for the material of a write-up. Do not use for a campaign still running (the kapso skill follows it), for writing a harness from the run (kapso-harness improve), or inside a Kapso campaign session./kapso-setupSet Kapso up on this machine from nothing to a green doctor, in one pass — detect what is there, install the leeroo-kapso package and the coding-agent CLIs it drives, run the logins, write the keys to .env, verify with kapso doctor, and orient the user on the harness and experience to start from. Use when the user says set up kapso, install kapso, get kapso working, runs /kapso:setup, or when any kapso command fails on a missing package, CLI, login or key. Do not use for a package problem unrelated to Kapso, or inside a Kapso campaign session.Other plugins' skills for the same job