Rewrite README, update docs index and contributing, shorten developing guide
This commit is contained in:
1 parent
17bfd59aba
commit
7e6b9e8a8c
9 files changed
+126
-225
No files matched your search
@@ -6,8 +6,24 @@ All notable changes to this project are recorded here. The format follows
|
||||
|
||||
## Unreleased
|
||||
|
||||
### Removed
|
||||
|
||||
- `sisi note` and `sisi propose`: use `sisi retro` or `sisi learn`. Existing notes and proposal
|
||||
files in a personal store are no longer read.
|
||||
- `sisi audit` and the audit module.
|
||||
- Developer mode (`sisi dev on|off|status` and the developer-source entry in personal config).
|
||||
`sisi release` and `sisi promote` now act on the product folder of the launcher that is
|
||||
running: run `bin/sisi release` from the clone. Release, rollback and the stable copy remain.
|
||||
- `sisi build-canon` and `sisi canon cost` as public commands; the functions remain for install
|
||||
and other code, and `sisi doctor` now shows the always-loaded size.
|
||||
- `sisi migrate` as a command; `sisi update` performs the migration.
|
||||
|
||||
### Changed
|
||||
|
||||
- The package version is read from the VERSION file, the one source of truth.
|
||||
- The README is rewritten and shortened; contributions are judged against SPEC.md by
|
||||
requirement id.
|
||||
|
||||
- Request-time delivery no longer hands over a recipe on a weak match or for a question that names
|
||||
no work; reading lessons can no longer stale a learning round; the due test counts only lessons a
|
||||
round can act on.
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
# Contributing
|
||||
|
||||
Thanks for looking. sisi is small on purpose; this page says how to change it safely.
|
||||
Contributions are judged against [SPEC.md](SPEC.md) by requirement id: say in the change
|
||||
which requirement it serves, and expect review to check that claim first.
|
||||
|
||||
## Run the tests
|
||||
|
||||
|
||||
@@ -1,63 +1,43 @@
|
||||
# **sisi** is still improving
|
||||
|
||||
**Your AI agents get better at working for you on every turn, in every tool, automatically, just by
|
||||
being used. There is nothing to schedule or maintain.** Each piece of work ends with the agent
|
||||
recording how it could have gone better. That lesson goes into one store that every agent in every
|
||||
tool reads, so a later turn in any tool can start from it. A lesson that recurs after being shown is
|
||||
strengthened until an enforced check stops the mistake.
|
||||
**sisi** is the operating layer that makes an AI coding tool behave as the engineering
|
||||
organization described in [SPEC.md](SPEC.md): it understands intent, defines done before
|
||||
building, verifies with the minimum sufficient evidence, delivers fast, and improves from
|
||||
evidence after every piece of work. The host tool supplies the agent; **sisi** supplies the
|
||||
operating policy, the records, the gates, the learning loop and the orchestration record, so
|
||||
that behaviour is observable and improving rather than hoped for.
|
||||
|
||||
The direction is fixed: state an outcome at a higher level and get it back correct, complete,
|
||||
verified by the strongest method available and fast, with fewer interruptions. An agent writes
|
||||
down how success will be checked, runs those checks before saying it is done, and is sent back
|
||||
when they fail.
|
||||
It is for anyone who uses an AI coding CLI for real work and wants the result back correct,
|
||||
complete and verified, with less human attention spent checking it. One shared rulebook and
|
||||
one learning store serve every tool on the machine, connected by reference, never by copy, so
|
||||
a lesson learned in one tool is available in the next turn of any other.
|
||||
|
||||
sisi is a shared rulebook and a small command-line tool in plain Python with no dependencies. What
|
||||
it learns about you is kept outside the clone, so updating never loses it.
|
||||
**sisi** is a small command-line tool in plain Python with no dependencies. What it learns
|
||||
about you is kept outside the clone, so updating never loses it.
|
||||
|
||||
The name is recursive: its first word is the name itself. It is also a plain statement of where
|
||||
things stand: each turn leaves your tools a little better, and that work is never finished. What is
|
||||
not yet shown is that this makes agents measurably better over weeks of real use. `sisi improve`
|
||||
reports the counted evidence for that question, and it needs real use to have data.
|
||||
## What it does
|
||||
|
||||
## How it works
|
||||
- **An operating policy.** A short rulebook of strategic direction is always loaded. The
|
||||
agent works out the tactics. Each rule states the behaviour, the reason, and what enforces
|
||||
or measures it.
|
||||
- **Records.** Each piece of work can carry a contract of executable checks, a verification
|
||||
record that never reports an unrun check as passed, and delivery timing.
|
||||
- **Gates.** Where a host exposes the moments, hooks check at session start, at each prompt
|
||||
and at the end of a turn. A failing check sends the agent back; after bounded send-backs
|
||||
the work is let through marked unverified, so a broken check cannot trap a session.
|
||||
- **A learning loop.** Work ends with a recorded account of how it could have gone better.
|
||||
Lessons take effect in the personal store at once, are strengthened on recurrence, and are
|
||||
consolidated into rules, library entries and enforced checks.
|
||||
- **An orchestration record.** The workers on the machine are discovered, work is routed to
|
||||
the most affordable usable worker by judged results, and every judgement is recorded.
|
||||
|
||||
`sisi retro` ends each piece of work by recording how it could have gone better: the moment, the
|
||||
cause, and the change that would make a later agent do it right without being told, in the words a
|
||||
different agent would use for that work. The lesson takes effect in your personal store at once and
|
||||
is offered to later agents starting matching work. If the problem recurs after a lesson has been
|
||||
shown, it is strengthened: a note, a candidate rule, then an enforced check the gate runs.
|
||||
`sisi cycle` consolidates lessons into rules and library entries without growing the rulebook.
|
||||
Whether it is due is checked during normal use, so nothing is scheduled; see
|
||||
[docs/learning.md](docs/learning.md). `sisi lessons digest` prints what has been learned in plain
|
||||
words, grouped by topic. Where a tool allows it, the matching recipe and lessons are also delivered
|
||||
the moment a request arrives (`sisi prompt`), and each rule names the command that explains it
|
||||
(`sisi rule`). Delegated work is routed the same way, by measured results rather than a fixed
|
||||
list of models: `sisi workers` and `sisi delegate`; see [docs/workers.md](docs/workers.md).
|
||||
The verifier library ships techniques and recipes that say what done means for a kind of
|
||||
work, so agents query them instead of inventing a check. Format and quality bar:
|
||||
[docs/verifier-format.md](docs/verifier-format.md).
|
||||
|
||||
Improvement needs a way to tell success from failure:
|
||||
## Install
|
||||
|
||||
- **A contract of executable checks.** `.sisi/contract.json` lists the checks that decide success,
|
||||
each with its claim, a command, the result expected and its rung, plus invariants (what must not
|
||||
get worse), assumptions and open questions. The agent drafts it from the request.
|
||||
- **A ladder of six rungs.** Rung 1 proof, model checking or the type system; rung 2
|
||||
property-based testing, fuzzing or comparison with a reference; rung 3 examples; rung 4 golden
|
||||
files and snapshots, including screenshots; rung 5 a rubric scored by an independent judge; rung
|
||||
6 the human. Use the highest feasible rung; some claim kinds have a minimum (concurrency,
|
||||
parsing, money, state machines, data migration).
|
||||
- **An end-of-turn gate.** A hook runs `sisi verify` when the agent tries to finish. A failing or
|
||||
unrun check sends it back, a large change with no contract sends it back to write one, and small
|
||||
edits pass. After repeated send-backs it is let through marked unverified, so a broken check
|
||||
cannot trap a session.
|
||||
- **Time to delivery.** When the gate lets a turn end, sisi records how long the verified result
|
||||
took and how often the agent was sent back. `sisi time` reports it.
|
||||
- **One shared store.** Rulebook, lessons, results and settings are written once and read by every
|
||||
tool, connected by reference (an import line or a symlink), never by copy.
|
||||
|
||||
## Quick start
|
||||
|
||||
Requirements: Python 3.9 or newer, and `git`, on Linux or macOS. Windows is not supported (the code
|
||||
imports `fcntl`). The minimum Python version is proved by CI; the reasoning is in
|
||||
[CONTRIBUTING.md](CONTRIBUTING.md).
|
||||
Requirements: Python 3.9 or newer, and `git`, on Linux or macOS.
|
||||
|
||||
git clone https://github.com/swaits/sisi.git
|
||||
cd sisi
|
||||
@@ -65,134 +45,52 @@ imports `fcntl`). The minimum Python version is proved by CI; the reasoning is i
|
||||
bin/sisi install
|
||||
bin/sisi doctor
|
||||
|
||||
The dry run prints every change and makes none. Install backs up every file it edits, adds only an
|
||||
import line, a link, hook entries or a generated plugin, and skips a missing configuration folder.
|
||||
It links the command as `~/.local/bin/sisi`; make sure that folder is on your `PATH`, or call
|
||||
`bin/sisi` from the clone. `sisi doctor` shows what is wired and anything you must still do.
|
||||
The dry run prints every change and makes none. Install backs up every file it edits, adds
|
||||
only an import line, a link, hook entries or a generated plugin, and skips a missing
|
||||
configuration folder. It links the command as `~/.local/bin/sisi`; make sure that folder is
|
||||
on your `PATH`, or call `bin/sisi` from the clone. `sisi doctor` shows what is wired, the
|
||||
size of what is always loaded, and anything you must still do. Per-tool detail, limits and
|
||||
steps you must take are in [docs/harnesses.md](docs/harnesses.md). Where there is no gate,
|
||||
the rulebook still tells the agent to write and run a contract, but nothing enforces it.
|
||||
|
||||
For a first contract, change to one of your own projects and run
|
||||
`sisi contract init --goal "slugify() turns titles into URL slugs"`. That skeleton's placeholder
|
||||
check fails until you replace it. For a small function with a test next to it:
|
||||
For a first contract, change to one of your own projects and run `sisi contract init`. That
|
||||
skeleton's placeholder check fails until you replace it with a real command. With a hook
|
||||
wired you do not run the checks yourself: the agent writes the contract and the gate runs
|
||||
them. `sisi help` lists every command and what each exit code means.
|
||||
|
||||
{
|
||||
"id": "slugify",
|
||||
"goal": "slugify() turns titles into URL slugs",
|
||||
"checks": [
|
||||
{
|
||||
"id": "examples",
|
||||
"claim": "known titles give the expected slugs, and slugifying twice changes nothing",
|
||||
"kind": "general",
|
||||
"rung": 3,
|
||||
"cmd": "python3 -m unittest -q test_slugify",
|
||||
"expect": {"exit": 0},
|
||||
"timeout_s": 30
|
||||
}
|
||||
],
|
||||
"invariants": [],
|
||||
"assumptions": ["Non-ASCII letters are dropped, not transliterated."],
|
||||
"questions": []
|
||||
}
|
||||
## What it does to your tools, and how to undo it
|
||||
|
||||
Trimmed output:
|
||||
|
||||
$ sisi verify
|
||||
...
|
||||
OK
|
||||
|
||||
`sisi verify` succeeds only when every check passes; `sisi help` lists the other exit meanings.
|
||||
With a hook wired you do not run it yourself: the agent writes the contract and the gate runs it.
|
||||
|
||||
## Supported tools
|
||||
|
||||
Enforcement is what happens at the end of a turn; evidence is how the wiring was checked.
|
||||
`sisi doctor` gives the live state on your machine. Per-tool detail, limits and steps you must
|
||||
take are in [docs/harnesses.md](docs/harnesses.md).
|
||||
|
||||
| Tool | Enforcement | Evidence |
|
||||
|---|---|---|
|
||||
| Claude Code | blocks | ran end to end |
|
||||
| Codex CLI | blocks | documentation; session-start hook fired live |
|
||||
| Gemini CLI | blocks | documentation |
|
||||
| GitHub Copilot CLI | blocks | ran end to end |
|
||||
| Pi | blocks | documentation; extension loaded, tick ran live |
|
||||
| Qwen Code | blocks | documentation; session-start hook fired live |
|
||||
| Cursor (no confirmed global rulebook file) | sends a follow-up | documentation |
|
||||
| Aider (existing config file only) | rulebook only | documentation |
|
||||
| Amp | rulebook only | documentation |
|
||||
| Cline | rulebook only | documentation |
|
||||
| Crush | rulebook only | documentation |
|
||||
| Goose | rulebook only | documentation |
|
||||
| Grok CLI | rulebook only | verified with `grok inspect` |
|
||||
| Kiro | rulebook only | documentation |
|
||||
| Windsurf (pointer file) | rulebook only | documentation |
|
||||
| Zed | rulebook only | documentation |
|
||||
| Antigravity (through the shared Gemini file) | unknown | nothing wired separately |
|
||||
| Muse Code (through Claude Code or Codex files) | unknown | nothing wired directly |
|
||||
| OpenCode | unknown | documentation; plugin loading verified live |
|
||||
| Orca | through its provider | host app; nothing to wire |
|
||||
| T3 Code | through its provider | host app; nothing to wire |
|
||||
|
||||
Where there is no gate, the rulebook still tells the agent to write and run a contract, but nothing
|
||||
enforces it.
|
||||
|
||||
## The verifier library
|
||||
|
||||
sisi ships verification techniques and recipes that say what "done" means for a kind of work, such
|
||||
as a bug fix or a data migration. Each technique gives an example, the exact command, what passing
|
||||
looks like, and a check to paste into a contract. `sisi verifiers` and `sisi done` list them, so
|
||||
agents query them instead of inventing a check. Trimmed output:
|
||||
|
||||
$ sisi verifiers for "a parser that must not crash on hostile input"
|
||||
1. hostile-input-from-schema rung 2 cost medium installed: no
|
||||
2. klee rung 1 cost high installed: no
|
||||
|
||||
Matching is by word overlap, weighted toward the question each entry answers, so phrase the claim
|
||||
as a doubt and read the top results rather than trusting the first. `sisi verifiers show ID` prints
|
||||
an entry in full, `sisi verifiers doctor` reports installed tools, and `sisi done for "bug fix"`
|
||||
prints a recipe. Format and quality bar: [docs/verifier-format.md](docs/verifier-format.md).
|
||||
|
||||
## Where data lives, updating and uninstalling
|
||||
|
||||
- **The product** is the clone: code, base rulebook, library and defaults. It is never written at
|
||||
run time.
|
||||
- **The product** is the clone: code, base rulebook, library and defaults. It is never
|
||||
written at run time.
|
||||
- **What sisi learns for you** lives in `~/.local/share/sisi` (or `$SISI_DATA`), a local git
|
||||
repository that is never pushed.
|
||||
- **Scratch** that can be rebuilt lives in `~/.local/state/sisi` (or `$SISI_STATE`).
|
||||
|
||||
`sisi update` replaces only the product, after backing up your personal data, and reapplies what
|
||||
you learned. `sisi status` shows the live state; the layout is in
|
||||
`sisi update` replaces only the product, after backing up your personal data, and reapplies
|
||||
what you learned. `sisi status` shows the live state; the layout is in
|
||||
[docs/personal-data.md](docs/personal-data.md).
|
||||
|
||||
`sisi uninstall` removes the import line, hooks and links. A file you have not edited since install
|
||||
is restored byte for byte. A file you edited keeps your edits and loses only sisi's entries. A file
|
||||
sisi cannot edit with certainty is skipped and reported. Personal data and scratch are left for you
|
||||
to delete. The exact guarantee is in [docs/harnesses.md](docs/harnesses.md).
|
||||
|
||||
## Designed but not built
|
||||
|
||||
[docs/design.md](docs/design.md) separates what is built from what is not. The main missing pieces:
|
||||
|
||||
- The build conductor (`sisi build "<what I want>"`) and its question queue (`sisi inbox`).
|
||||
Neither command exists.
|
||||
- Replay experiments on a task set before a learned change ships, a separate coach run, brief
|
||||
templates and playbooks. Learned changes instead ship to your overlay first and are judged by
|
||||
measured deliveries, with exact revert as the safety net.
|
||||
- The taste judge (a model judging at rung 5), a git-survival signal, transcript harvest beyond
|
||||
Claude Code, and proven end-to-end enforcement in OpenCode, reported by `sisi doctor` as unknown.
|
||||
`sisi uninstall` removes the import line, hooks and links. A file you have not edited since
|
||||
install is restored byte for byte. A file you edited keeps your edits and loses only sisi's
|
||||
entries. A file sisi cannot edit with certainty is skipped and reported. Personal data and
|
||||
scratch are left for you to delete. The exact guarantee is in
|
||||
[docs/harnesses.md](docs/harnesses.md).
|
||||
|
||||
## Security
|
||||
|
||||
sisi runs commands from a project contract, so a contract you did not write is untrusted until you
|
||||
read it and run `sisi contract trust`; until then `sisi verify` refuses and the gate runs nothing.
|
||||
sisi does not sandbox what a trusted contract runs. See [SECURITY.md](SECURITY.md), including how
|
||||
sisi runs commands from a project contract, so a contract you did not write is untrusted
|
||||
until you read it and run `sisi contract trust`; until then the checks refuse to run. sisi
|
||||
does not sandbox what a trusted contract runs. See [SECURITY.md](SECURITY.md), including how
|
||||
to report a problem privately.
|
||||
|
||||
## Contributing
|
||||
## Where to read more
|
||||
|
||||
Running the tests, the standard-library-only rule, the library entry format, and what belongs in
|
||||
the product rather than your own overlay are in [CONTRIBUTING.md](CONTRIBUTING.md). For the release
|
||||
you have, run `sisi --version`; changes between releases are in [CHANGELOG.md](CHANGELOG.md), and
|
||||
all docs are indexed in [docs/README.md](docs/README.md).
|
||||
- [SPEC.md](SPEC.md) — the standard sisi is built and judged against.
|
||||
- [docs/target.md](docs/target.md) — how sisi meets that standard.
|
||||
- `sisi help` — every command, with no per-command reference kept in this file.
|
||||
- [docs/README.md](docs/README.md) — the index of the remaining documentation.
|
||||
- [CONTRIBUTING.md](CONTRIBUTING.md) — how to run the tests and send a change.
|
||||
- [CHANGELOG.md](CHANGELOG.md) — what changed.
|
||||
|
||||
## Licence
|
||||
|
||||
|
||||
+5
-1
@@ -3,14 +3,18 @@
|
||||
| Page | Read it to |
|
||||
|---|---|
|
||||
| [../README.md](../README.md) | learn what sisi is, install it and try it |
|
||||
| [../SPEC.md](../SPEC.md) | read the standard sisi is built and judged against |
|
||||
| [target.md](target.md) | see how sisi meets that standard |
|
||||
| [design.md](design.md) | understand why sisi works the way it does, and what is built versus only designed |
|
||||
| [learning.md](learning.md) | how a recorded lesson takes effect, is measured, strengthened, consolidated or withdrawn |
|
||||
| [workers.md](workers.md) | how the agent tools and models on the machine are found, chosen between by measured results, and run |
|
||||
| [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 |
|
||||
| [harnesses.md](harnesses.md) | see, per tool, what is wired, what blocks, and what is unproven |
|
||||
| [../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 |
|
||||
| [../CHANGELOG.md](../CHANGELOG.md) | see what changed |
|
||||
|
||||
The rulebook that agents actually read is [../canon/core.md](../canon/core.md).
|
||||
Run `sisi help` for every command; no per-command reference is kept in these pages.
|
||||
+5
-7
@@ -243,7 +243,7 @@ Other things the loop would improve, besides rules: recipes are tightened whenev
|
||||
set of checks; techniques are ranked by how often they catch real failures; checks that never fail are flagged
|
||||
(`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
|
||||
**Owning the instruction surface.** 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.
|
||||
|
||||
@@ -281,14 +281,12 @@ 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, in their words. It takes effect at once: user-tier
|
||||
statements are the owner's standing principles (`sisi oracle`), core statements are queued for the
|
||||
product, project statements are handed over to their project. Tiers follow the owner's two questions:
|
||||
does it apply to all projects where sisi may be used, and would it help every user who installs
|
||||
sisi? Both yes is a product change (`core`, in force at once through the overlay, written into the
|
||||
source tree by `sisi promote` on a developer install once folded, the personal copy dropped when
|
||||
source tree by `sisi promote` from the clone once folded, the personal copy dropped when
|
||||
the product contains it; on an ordinary install `sisi promote --export` writes a contribution file
|
||||
and nothing is ever sent automatically). The tool's own name never makes an item project-bound: how
|
||||
sisi itself should behave is core, wherever it was recorded.
|
||||
@@ -315,7 +313,7 @@ Built and covered by tests:
|
||||
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` live at once, time to delivery
|
||||
(`sisi time`), `sisi audit`.
|
||||
(`sisi time`).
|
||||
- Choosing the approach as a checked step: the contract design section, `sisi design`, the gate's
|
||||
design send-back on large changes, and request-time delivery of the standing principles for design
|
||||
or build requests. The rulebook's first rule states it and `sisi rule` reports its enforcement.
|
||||
@@ -323,7 +321,7 @@ Built and covered by tests:
|
||||
first-class, merged in rounds, and promoted into the rulebook as strategic behaviours past a
|
||||
threshold; the digest and `sisi improve` show them first. Three tiers (`core`, `user`, `project`)
|
||||
replace the two-way scope, with older universal items tiered by the next round, and `sisi promote`
|
||||
listing, writing (developer installs) or exporting core items.
|
||||
listing, writing (from the clone) or exporting core items.
|
||||
- The lesson loop: immediate effects in the overlay (field notes, draft recipes, learned notes, `sisi backlog`),
|
||||
moment-of-use delivery with recorded showings, per-lesson measurement, the strength ladder with enforced
|
||||
checks, `sisi cycle` (due counter, brief, validated apply under lock and base version, exact revert, status
|
||||
@@ -353,7 +351,7 @@ Designed, not built:
|
||||
## 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.
|
||||
verifier-library entries, rulebook version 0. 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.
|
||||
|
||||
+28
-45
@@ -1,67 +1,50 @@
|
||||
# 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.
|
||||
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 **source folder**: where you edit. It may be broken half the time.
|
||||
- the **stable copy** in `~/.local/lib/sisi/`: what the tools actually run, so a running
|
||||
session is protected while sisi itself is being changed.
|
||||
|
||||
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.
|
||||
The stable copy is a set of releases, `~/.local/lib/sisi/releases/<UTC timestamp>/`, each
|
||||
holding only the product files. A link called `current` points at the active one. Once a
|
||||
`current` release exists, `sisi install` wires the hooks and `~/.local/bin/sisi` to it. A
|
||||
release is built under a hidden name and renamed into place, and `current` is switched
|
||||
atomically, so a running tool never sees a half-written copy: a process that has started
|
||||
keeps running the release it started with. `sisi doctor` shows which copy is live and
|
||||
whether the source folder is ahead of it.
|
||||
|
||||
## Make a release
|
||||
|
||||
From the source folder:
|
||||
Run from the clone:
|
||||
|
||||
sisi release # runs `sisi verify`; refuses if it fails
|
||||
sisi release --deep # also needs the slow checks to pass
|
||||
bin/sisi release # runs the checks; refuses if they fail
|
||||
bin/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.
|
||||
It copies the product files, switches `current`, rebuilds your rulebook with the new code,
|
||||
keeps the newest 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).
|
||||
|
||||
## Roll back
|
||||
|
||||
sisi rollback
|
||||
bin/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.
|
||||
Switches `current` to the release before it and rebuilds the rulebook.
|
||||
|
||||
## Promote a personal addition
|
||||
|
||||
Rules, verifiers and recipes you added live in your personal overlay. To make one part of the product:
|
||||
Rules, verifiers and recipes you added live in your personal overlay. Run from the clone:
|
||||
|
||||
sisi promote <id> # shows what would be written, and every term it scrubbed
|
||||
sisi promote <id> --apply # writes it into the source folder
|
||||
bin/sisi promote <id> # shows what would be written, and every term it scrubbed
|
||||
bin/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.
|
||||
It replaces your home path, user name and email addresses, and any terms listed under
|
||||
`developer.personal_terms` in your personal `config.json`, with placeholders. If a personal
|
||||
term still appears afterwards, it stops and names the lines. A rule goes into the base
|
||||
rulebook; a verifier or recipe into the library. It never commits. Review the change,
|
||||
commit it, make a release, then remove your overlay copy so the two do not drift apart.
|
||||
+4
-4
@@ -64,7 +64,7 @@ what "done" means, verifying, or being sent back by the gate.
|
||||
- a recipe lesson naming a recipe that does not exist is kept as a draft recipe note;
|
||||
- a rule, oracle or brief lesson becomes an active learned note with trigger words taken from its text;
|
||||
- a tool lesson (a change to sisi itself) goes on the backlog (`sisi backlog`, most seen first).
|
||||
In developer mode, a session started inside the sisi source folder is told the top item.
|
||||
A session started inside the sisi source folder is told the top item.
|
||||
3. **It is shown at the moment it matters**, not only at session start. Session start prints up to
|
||||
eight active lessons, strongest first. `sisi done for`, `sisi done ID`, `sisi verifiers for` and
|
||||
`sisi contract init` print a two-part block, because the asking agent is a far better matcher than
|
||||
@@ -109,7 +109,7 @@ what "done" means, verifying, or being sent back by the gate.
|
||||
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 hard budgets in
|
||||
lines and characters (`sisi canon cost` prints them), and must not grow without shortening. A strength-3 lesson needs a check the gate can run; a folded lesson
|
||||
lines and characters (`sisi doctor` prints them), and must not grow without shortening. 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.
|
||||
@@ -183,7 +183,7 @@ explaining at least three lessons and at least six incidents (two constants in t
|
||||
or update its statement in the rulebook as one strategic behaviour, traced like any folded
|
||||
lesson. These three pressures are what keep patterns few: reuse is listed before invention is
|
||||
allowed, exact duplicates merge themselves, and anything left over is merged or promoted each
|
||||
round. The brief also lists core items waiting for the product; on a developer install it says
|
||||
round. The brief also lists core items waiting for the product; run from the clone it says
|
||||
to run `sisi promote` after folding, otherwise to export. A file containing only the required
|
||||
set-short/set-scope/set-pattern entries is acceptable when nothing else is ready to fold — a
|
||||
cleanup-only round, startable at once with `sisi cycle --now`. Reading lessons during a round cannot stale it: automatic retirement (a
|
||||
@@ -234,7 +234,7 @@ when present: folded lessons no longer count toward the learned-notes limit, whi
|
||||
`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 both budgets (lines and
|
||||
characters, printed by `sisi canon cost`) and no longer in characters than before
|
||||
characters, printed by `sisi doctor`) 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, short lines and topics, rules, notes, enforced checks), not
|
||||
|
||||
@@ -28,7 +28,7 @@ Under `SISI_HOME` (tests) the personal folder is `$SISI_HOME/.local/share/sisi`
|
||||
an older learn-quarantine.jsonl is migrated into learn.jsonl on first read)
|
||||
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`)
|
||||
generated/core.md the effective rulebook (not in git; rebuilt by install and update)
|
||||
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)
|
||||
|
||||
@@ -50,13 +50,13 @@ Ids: rules are `## 1. Title {#rule-id}` in `canon/core.md`; verifiers and recipe
|
||||
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 its line and character budgets: 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.
|
||||
by shortening or replacing another. `sisi doctor` 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
|
||||
`sisi update` (also run by install) 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.
|
||||
+1
-1
@@ -26,7 +26,7 @@ A shared rulebook and enforced definitions of done for every AI coding CLI.
|
||||
scrubs a personal overlay item into the source folder and
|
||||
drops the personal copy once the product contains it (dry
|
||||
run unless --apply); lesson:N promotes a core lesson on a
|
||||
developer install; --export writes a contribution file
|
||||
from the clone; --export writes a contribution file
|
||||
(universal text only; nothing is sent anywhere)
|
||||
sisi update fast-forward the product clone, then back up, migrate and rebuild personal data
|
||||
sisi export [PATH] | import PATH one tar.gz of personal data, results and session records; restore it
|
||||
|
||||
Reference in new issue
Block a user