Shorter README with nothing that goes stale; honest rulebook budget; complete cycle instructions
ci / tests (macos-latest, python 3.10) (push) Canceled after 0s
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.10) (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

README cut by about 40 percent, with tests that refuse version numbers,
counts, years and a word ceiling. The rulebook budget now counts characters
as well as lines. Folded lessons no longer count as loose notes, reading a
lesson no longer invalidates a cycle, and the cycle brief answers the twenty
gaps the first real cycle reported. Adds `sisi cycle check`.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Fable 5.2 committed 2026-11-23 03:16:06 -07:00
1 parent 4a2905ba80
commit e5b603486b
12 files changed
+1026 -317

No files matched your search

+4 -4
View File
@@ -156,7 +156,7 @@ default the agent is proceeding on. Work that does not depend on it continues. `
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
The design folds such a ledger and its routing table into the shared store. Built so far, sisi only reads an optional
ledger file, to match delegations with sessions when it builds the task set.
## Part 3: learning that compounds
@@ -220,7 +220,7 @@ 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.
(`sisi checks` does this); 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
@@ -255,7 +255,7 @@ replaced, the person's version stays and the item is queued for re-testing again
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
session records stay in scratch 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:
@@ -325,7 +325,7 @@ 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.
1. Delegation tooling is folded into sisi in the design; only the optional ledger read is built.
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
+5 -4
View File
@@ -25,8 +25,9 @@ Wiring is always by reference: an import line, a symlink to the generated rulebo
shell hook command first checks the sisi launcher still exists, so deleting the sisi folder without
uninstalling makes hooks exit silently instead of erroring on every turn. The per-tool translation
between each tool's hook JSON and the gate lives in `sisi/hookio.py`; the adapters live in
`sisi/adapters.py`; the textual JSON editing lives in `sisi/hookjson.py`. Hooks fail open: any error
lets the agent finish.
`sisi/adapters.py`; the textual JSON editing lives in `sisi/hookjson.py`. Install also links any
skills shipped under `canon/skills` into `~/.agents/skills`; `sisi doctor` reports the linked
state. Hooks fail open: any error lets the agent finish.
## Claude Code
@@ -179,7 +180,7 @@ Code-compatible configuration; whether sisi's Claude hooks fire under Grok is no
Rulebook symlink at `~/.config/crush/CRUSH.md` (or `$XDG_CONFIG_HOME/crush/CRUSH.md`, honoured as
`crush dirs` confirms; one of Crush's default global context paths, confirmed from the binary's own
configuration schema). Crush hooks currently support only `PreToolUse`, which is not a turn gate, so
configuration schema). Crush hooks support only `PreToolUse`, which is not a turn gate, so
sisi wires no hooks. Revisit when its session/turn hook events ship.
## Aider
@@ -198,6 +199,6 @@ hooks. There is nothing T3- or Orca-specific to wire; wire the providers and bot
## Not wired
Roo Code was discontinued (2026-05-15) and gets no wiring; any remaining installs still read project
Roo Code was discontinued and gets no wiring; any remaining installs still read project
`AGENTS.md`. Agents beyond the list above that read a project `AGENTS.md` (Factory, Warp, Junie and
similar) are covered by the project file, with no per-tool wiring and no gate.
+36 -13
View File
@@ -47,17 +47,17 @@ what "done" means, verifying, or being sent back by the gate.
5. **Recurring lessons get stronger.** Each lesson has a strength: 1 (a note), 2 (a candidate rule),
3 (enforced). A recurrence after at least two showings since the last promotion moves it up one
step — each step needs its own fresh evidence. A strength-2 lesson
becomes a real rule only through consolidation (below), because the rulebook has a hard budget of
120 lines and must not grow. A strength-3 lesson needs a check the gate can run; a folded lesson
becomes a real rule only through consolidation (below), because the rulebook has hard budgets of
120 lines and 7,200 characters and must not grow. A strength-3 lesson needs a check the gate can run; a folded lesson
shown 20 times with no recurrence is retired from the notes (it stays in history); a lesson that
still recurs at strength 3 is withdrawn, and the same wording will not be learned again.
6. **Consolidation happens in a cycle**, run by whichever agent is working — see below.
## The cycle (`sisi cycle`)
Consolidation is due when 5 or more lessons have been recorded since the last cycle, or a lesson is
waiting to move up a step, or the learned notes pass their size limit, or more than 30 lessons are
still loose (or their one-line headings pass the 1,500-character budget) — the loose list stays short
Consolidation is due when enough lessons have been recorded since the last cycle, or a lesson is
waiting to move up a step, or the learned notes or the loose lessons pass their limits (`sisi cycle
due` states the live reason and its limit) — the loose list stays short
by construction, because the brief's first instruction is to fold lessons into the recipe or entry
for their kind of work, or lift several into one rule, so they leave it. That is a counter check, not a
schedule: it runs at session start, at the end of every turn in the gate, and in the output of
@@ -71,24 +71,47 @@ lessons that say the same thing; lift specific lessons into one general rule; fo
entry it belongs to; say which existing rule text gets shorter so the book does not grow; write checks
for strength-3 lessons). The agent answers with one JSON file:
The brief names the scratch path to write it to, lists every valid rule, recipe and verifier id
(with each recipe's one-line applies-to and the rule number-to-id map), shows full lesson text when
it fits its stated text budget (otherwise it says to run `sisi lessons show ID`), and puts the full
format behind `sisi cycle help`. `sisi cycle check FILE` (or `--dry-run`) validates and prints
exactly what would change, changing nothing.
```json
{"version": 1, "base": "<base version from the brief>", "summary": "one line",
"rules": [{"id": "rule-id", "title": "Title", "body": "text, ending with Why: ...", "action": "add|replace"}],
"rules": [{"id": "rule-id", "title": "Title", "body": "text, ending with Why: ...", "action": "add|replace",
"shortens": "rule-id: what is removed (required when the book would grow in characters)"}],
"disable_rules": ["rule-id"],
"notes": [{"lesson": 3, "action": "merge|fold-into-rule|fold-into-entry|retire|withdraw|keep",
"into": "rule or entry id", "merged_into": 4,
"when": "at least 5 terms (optional; sets the lesson's when-terms)"}],
"notes": [{"lesson": 3, "action": "merge|fold-into-rule|fold-into-entry|retire|withdraw|keep|set-when|create-entry|keep-as-draft",
"into": "rule/entry id or [ids]", "merged_into": 4, "note": "split text (optional)",
"when": "at least 5 terms (optional)", "entry_kind": "recipe|verifier", "entry_text": "full file (create-entry)",
"reason": "why it stays a draft (keep-as-draft)"}],
"enforced": [{"lesson": 3, "type": "command", "cmd": "...", "expect": {"exit": 0}, "timeout_s": 30},
{"lesson": 4, "type": "contract-requirement", "when": "parser",
"require_kind": "parsing", "max_rung": 2}]}
```
`fold-into-entry` appends a dated field-note bullet (the lesson's change, or `note`) to
`notes/<id>.md` and marks the lesson applied; `into` may be a list, and two notes for one lesson
with different `note` text split a compound lesson. `create-entry` creates a personal recipe or
verifier entry in the overlay, lint-checked; `keep-as-draft` keeps it as a draft with a reason.
`set-when` only sets when-terms. Merge only lessons requesting the same change, into the older or
more general one, which keeps its text and count; the other becomes superseded and needs no action.
Tool lessons cannot be done in a cycle: they stay in `sisi backlog`, except merging a duplicate.
Retire only what is fully folded and quiet (folded, at least 20 listed/read, no recurrences after
first listing); folding in this cycle does not make it quiet. The learned-notes limit counts only
`length(change)` of active strength-1 loose learned notes: folded lessons no longer count, which
is why folding (or merging, retiring, withdrawing, enforcing) reduces it.
`sisi cycle apply FILE` checks the file before writing anything: every lesson id exists, the base
version is still current, changed rules keep their id and their Why, named `sisi` commands and
enforced programs exist, and the resulting rulebook is inside the budget and no longer than before
unless a rule was replaced. The base version plus the personal-data lock means two sessions
consolidating at once cannot overwrite each other: the second apply is refused and told to read a
fresh brief. A successful apply is one commit in your personal repository, with before-and-after
enforced programs exist, and the resulting rulebook is inside both budgets (120 lines and 7,200
characters) and no longer in characters than before unless `shortens` names what was removed.
Rules are re-wrapped to 100 characters on apply. The base version covers only what a cycle may
change (lesson content and status, rules, notes, enforced checks), not listed/read counters, and
lessons recorded since the brief are left for the next cycle; a stale refusal names exactly what
changed. The base version plus the personal-data lock means two sessions consolidating at once
cannot overwrite each other: the second apply is refused and told to read a fresh brief. A successful apply is one commit in your personal repository, with before-and-after
measurements. `sisi cycle revert` undoes the newest applied cycle exactly (the changed files byte for
byte, and the lesson rows it touched). `sisi cycle status` shows each cycle with what happened since:
deliveries, send-backs each, median time, and recurrences of the lessons it touched. A cycle whose
+2 -2
View File
@@ -34,8 +34,8 @@ 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;
- `rung`: 1 proof, model checking or types; 2 property-based testing, fuzzing,
differential, mutation; 3 examples; 4 golden files and snapshots;
5 judged rubric; 6 human.
- `languages`: comma list, or `any`.
- `kinds`: any of general, concurrency, parsing, money, state-machine,