From 5e39baaa307fac64a630cdcffad1538f65c8bc5f Mon Sep 17 00:00:00 2001 From: Stephen Waits Date: Tue, 1 Dec 2026 14:53:49 -0700 Subject: [PATCH] Project rules organized Co-Authored-By: Claude Opus 5.5 --- .sisi/rules.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.sisi/rules.md b/.sisi/rules.md index fa178fc..81ee6c0 100644 --- a/.sisi/rules.md +++ b/.sisi/rules.md @@ -3,20 +3,20 @@ - sisi must work globally, for any agent in any harness (T3 Code or otherwise): rules, hooks and the loops are installed and enforced in every agent tool on the machine, not only Claude Code. [owner 2026-11-23] - Use no external dependencies and no cron jobs; run periodic upkeep from a counter or chance check during a normal turn, so the system improves just by being used. [owner 2026-11-23] - The real objective function is the one in SPEC.md; sisi always optimizes it by mechanisms (hooks, checks), never by good intentions, and never hard-codes a model or a harness. [owner 2026-11-23] -- Measure size budgets in the unit actually paid for (characters loaded per session), and say plainly whether loaded text grew or shrank after a change. [retro 2026-11-23] -- For classifier, matcher or lookup changes, have a different worker write the labelled set and report only held-out accuracy, prototype on a blind set, give three real rows and three real inputs from the live data as test cases, and name every flag the matcher takes — a tuner scoring its own labels or a made-up row overstates accuracy. [retro 2026-11-23] [retro 2026-11-24] -- Detached background workers must start with python3 -B (no bytecode in shared state) and print no user-facing output whose only reader is a log; in tests send output to temp files, not pipes, and pass stdin explicitly (input or DEVNULL) — open pipes or inherited stdin hang under some shells. [retro 2026-11-23] -- Add a test-base guard that fails any test modifying files under the repo product tree, and run hook-imported modules under python3 -X importtime, keeping the added import time under 20 ms — stray writes and slow hooks go unnoticed. [retro 2026-11-23] -- Test config-file-editing code against hostile pre-existing state: symlinks, read-only files, commented or trailing-comma JSON, duplicate entries, edits between install and uninstall — it fails on real user files otherwise. [retro 2026-11-23] -- When a check fails, store and show the lines that identify the failure (FAIL and ERROR blocks, else first and last 40 lines) before the tail — the cause is often far above the end of the output. [retro 2026-11-23] - Scoring a piece of work: it can ALWAYS be done better, so every retro names a concrete way it could have scored better even when nothing went wrong; and scores are kept in the terms the objective lists (value, verified evidence, elapsed time, compute and tool cost, attention, getting better), never in terms of its own. [owner 2026-11-23] -- For a brief with a numeric acceptance value or check-skipping limit, compute the number from the formula and put the worked figure in the brief, name the event the count starts from, and require a test where that event happens twice. [retro 2026-11-24] -- Never pass --help or any probe argument to a command that changes things until its usage is known from the source or the README; read the usage there first. [retro 2026-11-24] - A project's rules and learning live inside that project, in .sisi/ at the project root, never in a subfolder; whether .sisi/ is git-ignored is the user's choice, and sisi must work either way (owner: 'Personally I'd want this checked in and permanent'). [owner 2026-11-24] -- In this repo, finished work that passed its checks goes to main and to both remotes (origin and github) in the same step as the final report; the report names the commit and the GitHub test run [retro 2026-11-24] -- In this repo a new piece that arrives while a worker is busy goes at once to another worker in its own checkout and branch; a brief asks for one full test run per commit, the one inside 'sisi release', and only the tests for the change before that [retro 2026-11-25] -- In this repo, a change to the product is designed, briefed and asked about from an unknown user with other providers and plans: nothing tied to this owner's workers, harnesses, resellers or plans goes into canon/, and per-user choices (which model to use, what it costs them) are left to each user's sisi, never asked of the owner [retro 2026-11-25] -- In this repo, count loaded text as canon plus every header rules.py prints into a session, and check the budget against the diff before each merge, not only at the end [retro 2026-11-25] -- In this repo, any trial of sisi against a throwaway store also sets HOME to a temp folder (as the tests do), since a rules write re-points every agent tool's rulebook at the store in use; the brief says so and ends by showing ~/.claude/CLAUDE.md unchanged [retro 2026-11-26] -- When a worker's report says availability is 'not confirmed', probe it with a one-line dispatch before accepting the table [retro 2026-11-27] -- In this repo a test that calls sisi functions in-process goes through the in_process helper (temp home as well as temp store), every test class carries the guard that fails when the person's own rules file changes, and the lead compares ~/.claude/CLAUDE.md before and after any worker run that adds tests [retro 2026-11-28] +- Measure size budgets in the unit actually paid for (characters loaded per session), and say plainly whether loaded text grew or shrank after a change. [retro 2026-11-23] +- For classifier, matcher or lookup changes, have a different worker write the labelled set and report only held-out accuracy, prototype on a blind set, give three real rows and three real inputs from the live data, and name every flag the matcher takes. [retro 2026-11-23, 2026-11-24] +- Detached background workers must start with python3 -B and print no user-facing output whose only reader is a log; in tests send output to temp files, not pipes, and pass stdin explicitly. [retro 2026-11-23] +- Add a test-base guard that fails any test modifying files under the repo product tree, and run hook-imported modules under python3 -X importtime, keeping added import time under 20 ms. [retro 2026-11-23] +- Test config-file-editing code against hostile pre-existing state: symlinks, read-only files, commented or trailing-comma JSON, duplicate entries, edits between install and uninstall. [retro 2026-11-23] +- When a check fails, store and show the lines that identify the failure (FAIL and ERROR blocks, else first and last 40 lines) before the tail. [retro 2026-11-23] +- For a brief with a numeric acceptance value or check-skipping limit, compute the number from the formula and put the worked figure in the brief, name the event the count starts from, and require a test where that event happens twice. [retro 2026-11-24] +- Never pass --help or any probe argument to a command that changes things until its usage is known from the source or the README. [retro 2026-11-24] +- In this repo, finished work that passed its checks goes to main and to both remotes (origin and github) in the same step as the final report; the report names the commit and the GitHub test run. [retro 2026-11-24] +- In this repo a new piece that arrives while a worker is busy goes at once to another worker in its own checkout and branch; a brief asks for the one full test run inside 'sisi release' and only the tests for the change before that. [retro 2026-11-25] +- In this repo, a change to the product is designed, briefed and asked about from an unknown user with other providers and plans: nothing tied to this owner's workers, harnesses, resellers or plans goes into canon/, and per-user choices are left to each user's sisi. [retro 2026-11-25] +- In this repo, count loaded text as canon plus every header rules.py prints into a session, and check the budget against the diff before each merge. [retro 2026-11-25] +- In this repo, any trial of sisi against a throwaway store also sets HOME to a temp folder, since a rules write re-points every agent tool's rulebook at the store in use; the brief says so and ends by showing ~/.claude/CLAUDE.md unchanged. [retro 2026-11-26] +- When a worker's report says availability is 'not confirmed', probe it with a one-line dispatch before accepting the table. [retro 2026-11-27] +- In this repo a test that calls sisi functions in-process goes through the in_process helper (temp home as well as temp store), every test class carries the guard that fails when the person's own rules file changes, and the lead compares ~/.claude/CLAUDE.md before and after any worker run that adds tests. [retro 2026-11-28]