sisi 0.1.0: a shared rulebook and verification tool for AI coding agents
ci / tests (macos-latest, python 3.11) (push) Canceled after 0s
ci / tests (macos-latest, python 3.13) (push) Canceled after 0s
ci / tests (macos-latest, python 3.9) (push) Canceled after 0s
ci / tests (ubuntu-latest, python 3.11) (push) Canceled after 0s
ci / tests (ubuntu-latest, python 3.13) (push) Canceled after 0s
ci / tests (ubuntu-latest, python 3.9) (push) Canceled after 0s

Contracts with a ladder of checks, an end-of-turn gate, retrospectives and
shared lessons, time-to-delivery measurement, a library of 140 verification
techniques and 20 recipes, personal data kept outside the clone, and
releases with rollback. Standard library only.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Fable 5.2 committed 2026-11-22 22:29:02 -07:00
commit 2fc1fe9c2d
223 files changed
+22163

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
# Documentation
| Page | Read it to |
|---|---|
| [../README.md](../README.md) | learn what sisi is, install it and try it |
| [design.md](design.md) | understand why sisi works the way it does, and what is built versus only designed |
| [personal-data.md](personal-data.md) | know where sisi keeps what it learns, how the overlay works, and what an update touches |
| [verifier-format.md](verifier-format.md) | write or review an entry in the verifier library (`verifiers/`) or a recipe (`done/`) |
| [developing.md](developing.md) | work on sisi while also using it: the source folder, stable releases and rollback |
| [../CONTRIBUTING.md](../CONTRIBUTING.md) | run the tests and send a change |
| [../SECURITY.md](../SECURITY.md) | understand what sisi runs, and report a problem |
| [../CHANGELOG.md](../CHANGELOG.md) | see what changed between versions |
The rulebook that agents actually read is [../canon/core.md](../canon/core.md).
+329
View File
@@ -0,0 +1,329 @@
# sisi: design
Status: this document describes the design of sisi and marks what is built and what is not. The section
"What is built" lists both. Where the text below says "sisi does" something that the list marks as not built,
read it as the intended design.
## Intent
AI coding tools execute well and understand poorly. An agent does not know what success means, so it guesses,
and sometimes it damages work that was already good. Nobody can list every such failure in advance, so the
system has to find them itself.
The end state: a person states a product and gets a verified product. Five objectives, each with the number
that shows it:
| Objective | Shown by |
|---|---|
| Work at a higher level (functions, modules, products) | size of verified work delivered per human message |
| Verifiable outcomes, formal where possible | share of delivered claims backed by a check that ran, by rung |
| Hands off | human minutes and blocking questions per delivered piece of work |
| Delivered sooner, with no weaker check | median time from request to verified result (`sisi time`) |
| Improves itself from use, everywhere | the numbers above, as trends, across all tools |
## The objective
Hard requirements come first: the result is correct, complete, verified at the rung its kind of claim needs,
and what the human meant. Among results that meet them, sisi minimises two things: the time from the request to
a verified result (time to delivery), and the number of times the human is interrupted. Speed is never bought
with a weaker check or a smaller result.
Time to delivery is measured, not guessed. Each time the end-of-turn gate lets a turn end it records one
delivery row: the time since the last message the human actually typed (hook feedback and tool results do not
count), how many times the gate sent the agent back, and how long the checks ran. `sisi time` shows the median
and 90th percentile for the last 7 days against the 7 days before, the share spent in checks, and the five
slowest checks; `sisi status` shows the 7-day median.
A learned change that speeds things up but fails a check is rejected. A learned change that keeps every check
passing but makes median delivery slower is flagged for reversal. (The measurement exists; the automatic
flagging belongs to the learning loop, which is not built.)
## Why the first design was thrown out
The first version was a rulebook of at most 120 lines, plus advice. It was attacked and found too small, for
these reasons, which still shape the design:
1. **It was advice.** The definition of done was prose in an instruction file. Nothing made an agent write it or
run it.
2. **It had a low ceiling.** Its only output was one rulebook. The best case was one good instruction file, then
a plateau.
3. **It ignored the main objective.** Product-level work was a late phase, and "not a new harness" was a stated
non-goal. Nothing in it could drive hours of work from one sentence.
4. **It treated the human as a cost.** The human can help define success; the first version only tried to ask
less.
5. **Its measurements were weak.** A classifier's opinion of transcripts, compared before and after with no
control group. And "fewer corrections, fewer questions" is also what a user who has given up looks like.
6. **It left the best data unused.** Records of delegated work, with outcomes, show that most rejections are
fixed by a better brief. The hand-off of intent is the largest known source of failure, and the first
version declared that out of scope.
7. **It ignored competing instructions.** Installed plugins can tell agents to do the opposite of the rulebook
(for example, forcing a question-and-answer design conversation before any work). The loudest instruction
wins.
8. **Formal methods were one line of text.** Agents fall back to example tests because the formal tools are not
installed or set up.
9. **It opened a hole.** Any agent could write "facts about the user" that every agent in every tool would then
obey. An agent misled by a web page could poison all of them.
## Goals
- Success is an executable artefact, enforced by the tools, not requested.
- One sentence can start work that runs to a verified result.
- The human's time goes to defining success, without blocking the work.
- What accumulates is capability (checks, verifiers, a calibrated judge of the human's taste, playbooks), not
only rules.
- One shared store for everything, used by every tool.
## Non-goals
- No cron, timers, daemons, or third-party Python packages. Everything runs because a tool was used or a
command was started.
- No new chat UI. sisi drives the existing command-line tools.
- No per-project tuning. The store is global. Contracts are per piece of work.
## Anti-goals
- An agent that asks nothing and delivers something wrong.
- Ceremony on small tasks.
- Changes nobody can see or undo.
- Scores that go up while the delivered work gets worse.
## Part 1: contracts that are enforced
A **contract** is a file that says how this piece of work will be known to be done. The agent writes it from the
request and the project. It holds:
- **checks**: each has the claim it supports, the command that tests it, the expected result, and its rung on
the ladder
- **invariants**: for existing work, what must not change or get worse, with a baseline captured before the
first edit
- **assumptions**: what the agent decided to fill gaps
- **open questions**: only those where the answer cannot be worked out and a wrong guess is expensive, each with
a default
The ladder, highest first:
1. Proof, model checking, the type system
2. Property-based tests, fuzzing, comparison with a reference
3. Example tests
4. Golden files and snapshots, including screenshots
5. A rubric scored by a judge model whose agreement with the human is measured
6. The human
`sisi verify` runs the contract and records every result in the shared store. A contract with top-level
`"parallel": true` runs its fast-tier checks at the same time (at most 4); a check with `"serial": true` always
runs alone. Results are reported in contract order either way.
**Enforcement.** The tool's end-of-turn hook calls `sisi verify`. If a contract exists and a check fails or was
not run, the agent is sent back with the failures and cannot report the work as done. If no contract exists and
the change is larger than a small threshold, the agent is sent back to write one. Small edits pass untouched.
Claude Code supports a blocking stop hook. The equivalent in OpenCode, Codex and Muse is not verified; where it
does not exist, verification is meant to run at the next session start and failures to be reported then (that
fallback is a design intention, not built).
**Floors.** Some kinds of claim have a minimum rung. Concurrency, parsing, money, state machines and data
migration may not rest on example tests alone. The floors are in `canon/floors.json`.
**Formal tooling is provisioned.** sisi keeps a verifier library: for each language and kind of claim, the
tool, a working template and a worked example (Kani and Verus for Rust, TLA+ or Quint and Alloy for designs,
property testing per language, screenshot comparison for UI). Each time a check was hard to set up, the set-up
is meant to be saved, so the next use is cheap.
**Feedback.** Feedback from the human becomes an amendment to the contract, restated in one line. Only what the
amendment covers may change, and the invariants are re-run. A UI that was good stays good unless the amendment
says otherwise.
## Part 2: the conductor (not built)
`sisi build "<what I want>"` would turn a statement into verified work. It can be started from a terminal or by
an agent inside any tool. It is a plain program that drives the installed command-line tools in headless mode.
Its state is on disk in the shared store, so a run survives the session that started it and can be resumed from
any tool. None of this exists yet; there is no `sisi build` and no `sisi inbox` command.
1. **Frame.** A strong model writes the product contract: acceptance checks for the whole, and for the core
logic a formal model where one applies. It fills everything it can from the oracle profile.
2. **One oracle round.** The human sees the contract and the few open questions, once, and corrects it. This is
the human defining success, and it is the highest-value minute in the run.
3. **Split.** The contract becomes a tree. Each node has its own contract and a brief generated from it, so a
brief always carries the success checks.
4. **Dispatch.** Nodes go to workers chosen from a routing record, in parallel where they do not share files.
5. **Close.** A node closes only when `sisi verify` passes on it. A failure is retried with the failing output,
then escalated to a stronger worker. Parents are re-verified when children land.
6. **Report.** What was built, every check and its rung, every assumption.
**The oracle queue.** A question that arises mid-run does not stop the run. It goes into a queue with the
default the agent is proceeding on. Work that does not depend on it continues. `sisi inbox` would show the
queue. An answer that differs from the default re-opens only the nodes that used it.
**Delegation records.** A person who already delegates work to cheaper models may keep a ledger of outcomes.
The design folds such a ledger and its routing table into the shared store. Today sisi only reads an optional
ledger file, to match delegations with sessions when it builds the task set.
## Part 3: learning that compounds
The data layer of this part is built; the model-driven loop that would act on it is not.
**Signals, strongest first.** The loop learns from outcomes that do not depend on a model's opinion:
1. Check results recorded by `sisi verify`.
2. Survival of work in git: was an agent's change reverted or rewritten within 14 days.
3. Delegation outcomes in a ledger.
4. The human's corrections and the agent's questions, read from transcripts by a classifier. Useful for finding
causes, weakest as proof.
**Trigger.** Each tool's session-start hook runs `sisi tick`, which returns quickly. The design has it start a
detached background run when there is work and budget, with one lock in the store preventing overlap, so a tick
from any tool processes sessions from all tools. Today `sisi tick` records the session baseline and checks the
wiring; it starts no background run.
**What the loop would produce.**
- **Rules.** One change at a time, each with its reason and evidence. The always-loaded core stays under 120
lines; the rest loads on demand.
- **The oracle profile.** What the human wants, so a thing is asked once ever.
- **A taste judge.** Every time the human judges an outcome ("this is worse"), the before, the after and the
verdict are saved. A judge is tuned on these and its agreement with the human on held-back verdicts is
measured. It may stand in for the human on rung 5 only for kinds of work where agreement is above 85%. This is
how taste becomes checkable.
- **The verifier library**, described in part 1.
- **Playbooks.** Runs that closed cleanly are mined too. The decomposition and checks that worked for a kind of
product are saved for the next one.
- **Brief templates**, from what the ledger shows fixed rejected work.
**Testing a change.** Splitting live sessions between old and new rules proves about one change every three or
four days, which is too slow. The main test is a task set built from the user's own work, re-run in the
background:
- **Human tasks.** A project as it was when a session began, the request the human typed, and what they ended up
accepting. In a census of one user's history, only a fraction of sessions were usable as tasks and a smaller
fraction had ground truth that could be fully trusted. From the day sisi is installed, every session is
recorded with its exact starting commit, so the set grows with use.
- **Brief tasks.** Records of delegated work, each an instruction, the work done, and whether it was accepted.
These test how instructions are written and which model suits which job.
A candidate change is run against a sample of tasks next to the current version, in separate copies of the
project. It is scored on: the accepted version's tests passing, closeness to what the human accepted, questions
asked, and whether its checks would have caught the failure that really happened. It ships only if it passes
every check and scores higher on tasks it was not written from; a change that is faster but fails a check is
rejected, however quick. Live sessions then confirm or reverse it, and a change that keeps the checks passing
but makes median time to delivery slower than before is flagged for reversal. The spend is capped by a budget
that favours flat-rate plans first, then the cheaper models.
Other things the loop would improve, besides rules: recipes are tightened whenever a bug gets past a passing
set of checks; techniques are ranked by how often they catch real failures; checks that never fail are flagged
(`sisi checks` does this today); new models are scored on the task set before routing changes.
**Owning the instruction surface.** `sisi audit` lists every source of instructions each tool loads
(instruction files, plugins, skills) and reports where they contradict the rulebook. Contradictions the loop
cannot remove itself would be put in the oracle queue.
## One shared store
One rulebook, one oracle profile, one set of contracts and results, one verifier library, one scoreboard. Tools
are connected by reference (an import line or a symlink), never by copy, so a change is live everywhere at the
next session. Every write to personal data is a git commit. Private session text and results live in scratch
(`~/.local/state/sisi/`) and are not committed. The layout as built is in `docs/personal-data.md`.
### Product and personal data are separate
sisi is two things on disk, and an update to one must never cost the other.
- **The product**: what a person clones. Code, the base rulebook, the base library of techniques and recipes,
defaults. sisi never writes into it at run time. `sisi update` replaces it.
- **Personal data**: everything sisi has learned for this person. It lives in one folder outside the clone
(`~/.local/share/sisi/`), with its own local git history so any change can be undone, and it is never touched
by an update. It holds the profile of what the person wants, the lessons, learned changes to the rulebook,
field notes, added or replaced techniques and recipes, the task set, results, settings and trusted projects.
- **Scratch**: things that can be rebuilt (the transcript index, locks, logs) stay in `~/.local/state/sisi/`.
Learned changes are stored as an overlay, not as edits to the product. Every base rule, technique and recipe
has a stable id. The overlay can add an item, replace one by id, or switch one off. What agents load is the
result of applying the overlay to the base, generated into the personal folder; the tools point at that
generated file.
On update the overlay is applied again to the new base. If the product changed an item the person's overlay
replaced, the person's version stays and the item is queued for re-testing against the new base version.
Personal data carries a format version, and `sisi update` migrates it after taking a backup.
One folder means one thing to back up or copy to another machine (`sisi export`, `sisi import`). Results and
session records stay in scratch for now and are included in the export. Nothing personal is ever placed in the
product, so the product can be published.
Any agent in any tool reads through the files or the CLI and writes through the CLI:
- `sisi note`: record a failure now (older; `sisi retro` is preferred).
- `sisi propose`: suggest a rule change (older; `sisi retro` is preferred).
- `sisi learn`: record something the human said. The entry is held in quarantine until the harvest finds those
words in a message the human typed in that session's transcript. An agent cannot invent a preference.
Models used by the loop run with no tools and return text. sisi's own code checks and writes that text, and
writes only inside the personal data folder (as overlay changes; see `docs/personal-data.md`), never into the
product. Text inside transcripts that the human did not type is data, never instruction.
## Scoreboard
`sisi scoreboard` shows weekly and per-repository trends computed from harvested sessions; `sisi status` shows
verification statistics. The design adds, per tool: verified work per human message; share of claims by rung;
blocking questions and human minutes per piece of work; share of agent changes surviving 14 days; taste-judge
agreement. The last two are not built.
## What is built
Built and covered by tests:
- The CLI and the shared store; contracts (`sisi contract`), `sisi verify` with fast and deep tiers and trust
for contracts that run commands.
- The end-of-turn gate (`sisi gate`) and session-start hook (`sisi tick`), wired into Claude Code with a
blocking hook; wiring (`sisi install`, `uninstall`, `doctor`) also points Codex and OpenCode at the rulebook,
where nothing blocks.
- The rulebook (`canon/core.md`), the minimum-rung floors, the verifier library and the recipes.
- Retrospectives and lessons (`sisi retro`, `sisi lessons`), `sisi learn` with quarantine, time to delivery
(`sisi time`), `sisi audit`.
- Personal data, the overlay, update, export and import, releases and rollback, promotion of a personal item
into the product.
- The data layer for learning: harvest of Claude Code transcripts, task set, ground truth, escape candidates,
check statistics, scoreboard.
Designed, not built:
- The conductor (`sisi build`) and the oracle queue (`sisi inbox`).
- The model-driven learning loop: background runs started from `sisi tick`, experiments on the task set, shipping
and removal of learned changes, brief templates, playbooks.
- The taste judge and rung 5 judging by a model.
- Blocking gates for tools other than Claude Code.
- Harvest sources other than Claude Code.
## Build order
1. Store, CLI, wiring into each tool, contract format, `sisi verify`, the end-of-turn gate, the first
verifier-library entries, rulebook version 0, `sisi audit`. Built.
2. Signals and scoreboard: transcript adapters, git survival, and a delegation ledger. Partly built (Claude Code
transcripts, task set, scoreboard; no git survival signal).
3. The conductor and the oracle queue. Not built.
4. The loop: coach, replay filter, experiments, shipping and removal. Not built.
5. The taste judge and playbooks. Not built.
sisi's own checks: wiring is idempotent and touches no other byte (property tests); the gate cannot be passed
with a failing or unrun check (property test over generated contracts); a rulebook change is visible to every
tool with no further command; `tick` returns quickly; no command writes inside the product at run time; the
learning loop, when built, cannot write outside the personal data folder; a conductor run killed at any step
resumes without redoing closed nodes (to be model-checked, then tested).
## Decisions
1. Delegation tooling is folded into sisi in the design; only the optional ledger read exists today.
2. The end-of-turn gate is on by default. Each check has a time limit, and after three send-backs in a row the
agent is let through with the result marked unverified. One setting turns the gate off.
3. Session text may be read by any provider the user already uses as a worker, never by a model whose id marks it
as training on prompts. This is a user setting, not something sisi decides for them.
4. Background spend has a default budget (a number of cheap calls and test runs a day). Not built, since no
background runs exist yet.
## Known limits
- Whether an agent understood cannot be proved. Survival in git and check results are evidence, with delay.
- A contract can be wrong. Passing checks prove the checks, so the product contract gets the one oracle round.
- Experiments at this volume detect large effects only.
- The taste judge is worthless until the human has given enough verdicts, and it is trusted per kind of work,
not globally.
- Blocking gates outside Claude Code, Muse's instruction path and Codex's hook format are unverified.
- This is several months of building. Each phase is useful on its own.
+67
View File
@@ -0,0 +1,67 @@
# Developing sisi
If you only use sisi, you can skip this page. Cloned it and ran `sisi install`? Nothing changes for you:
the clone is the installed copy.
## Two copies
When you both use sisi and work on it, keep them apart:
- the **source folder** (for example `~/src/sisi`): where you edit. It may be broken half the time.
- the **stable copy** in `~/.local/lib/sisi/`: what Claude Code, Codex and OpenCode actually run.
The stable copy is a set of releases, `~/.local/lib/sisi/releases/<UTC timestamp>/`, each holding only the product
files (`bin/`, `sisi/`, `canon/`, `verifiers/`, `done/`, `docs/`, `config.default.json`, `VERSION`; no tests, notes or contract).
A link called `current` points at the active one. `SISI_LIB` moves the whole folder (tests use it).
Once a `current` release exists, `sisi install` wires the hooks and `~/.local/bin/sisi` to
`~/.local/lib/sisi/current/bin/sisi`. A running tool never sees a half-written copy: a release is built under a
hidden name and renamed into place, and `current` is switched by writing a new link and renaming it over the old
one. A process that has started keeps running the release it started with.
One limit, measured on btrfs: a lookup that lands on the exact instant of the switch can fail to find `current`
(about 1 lookup in 40,000 during a switch). A hook that hits it fails open, as any hook error does, and the next
call finds the new release.
## Make a release
From the source folder:
sisi release # runs `sisi verify`; refuses if it fails
sisi release --deep # also needs the slow checks to pass
It copies the product files, switches `current`, rebuilds your rulebook with the new code, keeps the newest three
releases, and prints what changed. The first time, run `sisi install` afterwards so the tools point at the stable
copy (release tells you if they do not).
`sisi doctor` shows which copy is live, its release time, and whether the source folder is ahead of it.
## Roll back
sisi rollback
Switches `current` to the release before it and rebuilds the rulebook. It can be repeated until the oldest kept
release.
## Developer mode
sisi dev on [PATH] # remember where the source folder is (setting developer.source in your personal config)
sisi dev off
sisi dev status
Needed only when you run `sisi release` or `sisi promote` from somewhere else, such as through the installed
copy. Run from the source folder, they use that folder.
## Promote a personal addition
Rules, verifiers and recipes you added live in your personal overlay. To make one part of the product:
sisi promote <id> # shows what would be written, and every term it scrubbed
sisi promote <id> --apply # writes it into the source folder
It replaces your home path with `~`, your user name with `<user>`, email addresses with `<email>`, and any terms
listed under `developer.personal_terms` in your personal `config.json` with `<personal>`. If a personal term still
appears afterwards (for example in different capitals), it stops and names the lines; fix the overlay item and
try again. A rule goes into `canon/core.md` (replacing the rule with that id, or added as the next number); a
verifier into `verifiers/<section>/`; a recipe into `done/`. It never commits. Review the change, commit it, make a
release, then remove your overlay copy so the two do not drift apart.
+57
View File
@@ -0,0 +1,57 @@
# Product and personal data
sisi lives in three places. An update replaces the first and never touches the second.
| Place | Where | What | Written at run time |
|---|---|---|---|
| Product | the clone (`paths.REPO`) | code, `canon/core.md` (base rulebook), `verifiers/`, `done/`, `config.default.json`, `VERSION`, docs | never (a test enforces it; bytecode goes to scratch) |
| Personal data | `$SISI_DATA`, else `$XDG_DATA_HOME/sisi`, else `~/.local/share/sisi` | what sisi learned for this person; its own local git repository | yes, committed |
| Scratch | `$SISI_STATE`, else `~/.local/state/sisi` | `harvest.db`, locks, logs, session records, results, bytecode | yes, rebuildable |
Under `SISI_HOME` (tests) the personal folder is `$SISI_HOME/.local/share/sisi` unless `SISI_DATA` is set.
## Personal data layout
VERSION format version of this folder, a single integer (an update migrates older folders after taking a backup).
Not the product's release number: that is the VERSION file in the clone, shown by `sisi --version`
oracle.md what the person wants
overlay/ learned changes to the product (below)
notes/<id>.md field notes per verifier or recipe id
config.json settings (over config.default.json)
trusted.json projects whose contracts may run commands
lessons.jsonl sorted dump of the lessons database, committed whenever lessons change
learn-quarantine.jsonl, notes.jsonl, proposals.jsonl
retest.jsonl replaced items whose base changed in an update (id, old base hash, new base hash)
retro.db lessons database (sqlite; not in git; lessons.jsonl is its committed form)
generated/core.md the effective rulebook (not in git; rebuilt by `sisi build-canon`)
install/ manifest and original copies of the files `sisi install` edited (not in git)
backups/ copies taken before a migration or an update (not in git)
Git is private bookkeeping: author `sisi`, no hooks, no global git config needed, never pushed.
## Overlay
Ids: rules are `## 1. Title {#rule-id}` in `canon/core.md`; verifiers and recipes use their file stem.
overlay/rules/<id>.md `## Title` + body. A base id replaces that rule; a new id adds one
overlay/rules/disabled.txt ids switched off, one per line
overlay/rules/order.txt order of added rules (they follow the base rules)
overlay/verifiers/<section>/<id>.md a verifier in the library format: replaces the product's, or adds
overlay/verifiers/disabled.txt
overlay/done/<id>.md a recipe: replaces or adds
overlay/done/disabled.txt
overlay/bases.json per replacement, the hash of the base item it was made against
Commands: `sisi overlay list | diff | add-rule | replace-rule | disable-rule | enable-rule` (and the same for
`verifier` and `recipe`), `sisi overlay revert COMMIT`. Each change is one commit and rebuilds the rulebook.
The generated rulebook may not exceed 120 lines: a change that would pass it is refused, so a rule is added
by shortening or replacing another. `sisi canon cost` prints the always-loaded size.
On `sisi update` the overlay is applied to the new product. A replacement whose base item changed keeps the
person's version and is queued in `retest.jsonl` for the learning loop.
## Moving data
`sisi migrate` (also run by install and update) moves an older layout in, after a timestamped copy under
`backups/`. `sisi export [PATH]` / `sisi import PATH` carry personal data, results and session records as one
tar.gz.
+101
View File
@@ -0,0 +1,101 @@
# Verifier library: format and quality bar
The library exists so that an agent, in any tool, can answer two questions
without asking a human: "how do I know this works?" and "how do I know I am
done?". Agents query it with `sisi verifiers for "<claim>"` and `sisi done for
"<kind of work>"`. Every entry must be something an agent can act on in
minutes: a real tool, a real command, and a snippet it can paste into a
contract.
## Technique entries: `verifiers/<section>/<id>.md`
Sections: `design`, `prove`, `many-inputs`, `concurrency`, `test-quality`,
`regression`, `real-world`, `safety`, `intent`, `completeness`.
The file stem equals `id`. Lowercase, hyphens. The file starts with a header
of single-line `key: value` pairs between `---` lines:
```
---
id: cargo-mutants
title: Mutation testing for Rust with cargo-mutants
answers: Would my tests notice if this code were wrong?
rung: 2
section: test-quality
languages: rust
kinds: general, money, parsing
cost: medium
detect: cargo mutants --version
ran_here: no
verified: docs
---
```
- `answers`: the question, in plain words, that a passing run answers. This
is what the chooser matches on, so write it the way an agent would phrase
its doubt.
- `rung`: 1 proof, model checking or types; 2 property tests, fuzzing,
differential, mutation; 3 example tests; 4 golden files and snapshots;
5 judged rubric; 6 human.
- `languages`: comma list, or `any`.
- `kinds`: any of general, concurrency, parsing, money, state-machine,
migration, ui.
- `cost`: low, medium or high. Set-up plus run effort for a first use.
- `detect`: a shell command that exits 0 when the tool is installed. Empty if
the technique needs no tool.
- `ran_here`: yes only if you ran the minimal example on this machine and it
behaved as the entry says.
- `verified`: `ran` (you ran it), `docs` (commands and flags checked against
the tool's current official documentation or its `--help`), or `memory`
(neither; avoid this, and never use it silently).
Body headings, in this order, all required:
- `## Use when`: the situations and claims it fits. Two to five bullets.
- `## Do not use when`: where it is the wrong tool or a weaker one is enough.
- `## Set up`: install and project set-up commands.
- `## Minimal example`: the smallest complete, correct example. Real code.
- `## Run`: the exact command, and under a `Passing looks like:` line the
output or exit status that means success. Say how failure shows.
- `## As a contract check`: a JSON object for the `checks` array of
`.sisi/contract.json`, with `id`, `claim`, `kind`, `rung`, `cmd`, `expect`
(`exit`, optionally `stdout_contains`) and `timeout_s`. Whenever `timeout_s`
is over 60, include `"tier": "deep"`: fast checks (the default) may not
exceed 60 s, because they run in the end-of-turn gate. Deep checks run with
`sisi verify --deep`, in the background, and never block a turn by being slow.
Contract-level options: top-level `"parallel": true` makes `sisi verify` and
the gate run the fast-tier checks at the same time (at most 4; results still
come in contract order), and `"serial": true` on a check makes it always run
alone, for checks that share a port, a database or a build directory. Without
`parallel`, checks run one after another.
- `## What a pass does not prove`: the limits. Bounds, assumptions, things
that make a pass vacuous, and how to check that the check itself can fail.
Length: 30 to 80 lines. No history of the tool, no selling, no filler.
## Recipes: `done/<id>.md`
Header keys: `id`, `title`, `applies_to` (one line). Body headings, required:
- `## Done means`: the claims that must all be true, in plain words.
- `## Checks`: for each claim, the technique ids from `verifiers/` that can
show it, strongest first, and the minimum acceptable rung.
- `## Common false finishes`: the ways this kind of work looks done and is
not.
Length: 25 to 60 lines.
## Quality bar
- Commands and flags must be right. Check each against the tool's official
documentation or `--help`. A wrong flag costs an agent more than a missing
entry. If you cannot confirm something, say so in the entry.
- Run the minimal example when the tool is already installed on this machine.
Work only in a throwaway directory. Do not install toolchains globally and
do not change anything outside the sisi repository.
- Prefer the technique over the brand. If several tools do the same job in
different languages, one entry per language is right; two entries for the
same language and job is not, unless they differ in what they can show.
- Be honest about rung. A technique that samples is rung 2 at best.
- Use plain, direct English. Full sentences. No jargon the entry does not
explain.