Item 5: sisi help grouped under four headings in 47 lines; long text per command. done 5 / next 6 (learn receipt)

This commit is contained in:
swaits committed 2026-11-23 12:29:17 -07:00
1 parent 6787ef0ae9
commit 4061733430
5 files changed
+192 -105

No files matched your search

+18 -103
View File
@@ -1,107 +1,6 @@
"""Command dispatch. Heavy modules are imported lazily so hooks (tick, gate) stay fast."""
import json, os, sys
HELP = """sisi is still improving
A shared rulebook and enforced definitions of done for every AI coding CLI.
sisi contract init [--goal TEXT] start a work unit: create .sisi/contract.json here (refuses while one is open)
sisi contract check validate the contract (vacuous checks are refused)
sisi contract waive [--check ID] "<reason>"
record a deviation: a waived check does not pass; the unit closes as a deviation and the report must say so
sisi contract trust | untrust allow / stop allowing this project's contract to run commands
sisi unit close [--abandon "<reason>"]
archive the unit to .sisi/units/<id>.json with its scorecard; --abandon records why it stopped
sisi unit pause "<what it waits for>"
record a wait; the turn may end with no demands
sisi unit show [ID] | list print the open unit or an archived record; list this project's units
sisi verify [--json] run the selected fast checks (five statuses; nothing unrun passes); exit 0 ok, 1 failure, 2 no contract, 3 untrusted
sisi verify --deep [--background] run the deep (long) checks; --background detaches and returns at once
sisi verify --all | --state run every check in both tiers; print only the deep-check state (with --json)
sisi gate [--tool NAME] end-of-turn hook (reads hook JSON on stdin; NAME selects the tool's hook shape)
sisi tick [--tool NAME] session-start hook
sisi prompt [--tool NAME] prompt-submission hook: prints the matching recipe and lessons for the human's request as added context (silent when nothing strictly matches); `sisi prompt "<request>"` tries it by hand
sisi rule [N|ID] the effective rules and how each is enforced; with N or ID: one rule in full (reasons, history, lessons behind it, how it is enforced)
sisi watch [--before|--after] before/after shell-tool hook: measures whether the command changed the project
sisi install [--dry-run] | uninstall | doctor
wire sisi into the tools (by reference), undo, inspect; --dry-run only prints what would change
sisi release [--deep] run the source's checks, then make the stable copy the tools run (see docs/developing.md)
sisi rollback switch the stable copy back to the previous release
sisi promote [ID|L-NNNN] [--apply] | --export [PATH]
no ID: list items not yet in the product (learnings that change
sisi itself, or earned organization scope); an ID scrubs a
personal overlay item into the source folder and drops the
personal copy once the product contains it (dry run unless
--apply); L-NNNN promotes the rule or recipe a learning was
folded into, 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
sisi overlay list|diff|add-rule|replace-rule|disable-rule|enable-rule|add-verifier|...|revert COMMIT
learned changes to rules, verifiers and recipes; each one a commit in your personal repo
sisi retro print the unit's record and what stands out in it
sisi retro --finding F --cause C --impact value|correctness|time|cost|attention --disposition promote|record|drop [--same-as ID | --new] [--target ID]
record one finding; promote also needs --change, --mechanism,
--expect and --validate; record needs --limits; drop needs --why-not;
a match in scope is printed and attached as a recurrence (--new records
a learning of its own); --target names the rule or recipe it concerns
sisi retro --adopt ID a parent adopts a subagent's candidate learning, by id
sisi lessons [--json] | show ID the learning records and their statuses
sisi cycle [due|apply FILE|check FILE|revert [ID]|help]
turn proposed learnings into mechanisms (no scheduler:
due-ness is a counter); apply validates and replays before
promoting; help prints the cycle file format
sisi approve [ID --yes|--no] list, in full, the consequential changes waiting for the owner; decide one
(in a terminal: an agent's --yes without one is refused)
sisi learn [--scope user|project] TEXT
record an owner statement; it takes effect at once and
`sisi oracle` prints it. Scope for other learnings is
earned by evidence, never claimed
sisi learn --withdraw ID --reason WHY
take a statement recorded by mistake out of delivery (kept in history)
sisi risk [--json] risk floor for the working-tree change, with reasons and
what that profile requires
sisi handover [--all] | done ID --where PATH [--quote FRAGMENT]
project-scope learnings waiting to be filed in this project's own docs or
work list; done confirms one is filed (the named file must contain
its key text) and removes it from the list
sisi oracle print what the human wants: the standing principles from
`sisi learn`, live at once (project-scoped ones only in their project)
sisi status [--json] [--learning] recent units with their scorecards, then trends by project, risk profile, model and policy version (median and p95; no single score)
sisi verifiers [WORDS] [--lang L] [--kind K] [--rung N] [--section S] [--installed] [--json]
list ways to know work is correct, by section
sisi verifiers show ID [--trace] one entry in full, and whether its tool is installed here; --trace also prints where each folded lesson lives in it
sisi verifiers for "<claim>" best-matching verifiers for a claim or piece of work
sisi verifiers doctor | lint which tools are installed; validate the library
sisi done [ID] [--trace] recipes: which checks make a kind of work done; --trace also prints where each folded lesson lives in the recipe
sisi done for "<work>" best-matching recipe
sisi workers [--refresh] the agent tools and models found here, what is usable now and why not, allowance and price where known, delegations waiting for a judgement, and the judged record as three tables
sisi workers fact W --price N|--score N --source S record a price (per million tokens) or benchmark standing (0-100), with its source and date
sisi workers avoid|prefer PATTERN --why TEXT your own routing constraints, honoured by `sisi route`
sisi workers down W --reason limit|auth|missing|error [--until DATE] | up W mark a worker unavailable / available again
sisi workers import FILE merge another ledger file into the delegation ledger (row counts printed; safe to repeat)
sisi route --kind K --difficulty N [--review-of W] [--explain]
the most affordable usable worker for this kind and difficulty, and the mechanism to start it with (host subagents, host cross-provider delegation, or sisi delegate); --explain says why
sisi delegate brief | check FILE | guide the delegation-contract template (eight parts); which parts a brief lacks; the orchestration playbook
sisi delegate --kind K --difficulty N --brief FILE [--worker W] [--review-of W] [--cwd DIR]
run one brief on the chosen worker unattended; prints only its final report, the transcript path, and the judge command; a brief without outcome, acceptance or files it may change is refused
sisi delegate judge ID --outcome accepted|rejected --check none|diffstat|tests|read|review [--minutes N]
record your judgement of a delegation run, so the next choice learns from it; judge work run any other way with --worker W --type K --difficulty N instead of ID
sisi delegate amend ID | recent [-n N] [--project P] mark a judged delegation that later proved wrong; list recent judgements to find an id
sisi eval list|add|run|compare|shadow|judge|status|import
the evaluation harness: benchmark cases from real work, isolated
replay, policy comparison and independent judging (see docs/evaluation.md);
`sisi eval` alone prints status; run without --tasks replays check cases only
sisi version | --version print the product version (the VERSION file in the product folder)
sisi help this text
Three places: the product (this clone, never written at run time), your personal data
(~/.local/share/sisi, its own git repository), and scratch (~/.local/state/sisi).
Environment: SISI_HOME (stands in for the home directory), SISI_DATA (personal data folder),
SISI_STATE (scratch dir), SISI_LIB (where stable releases live, default ~/.local/lib/sisi), SISI_TOOL (name recorded with results), SISI_VERIFIERS and SISI_DONE
(library directories, default verifiers/ and done/ in the product).
"""
def _pop_opt(args, name):
"""Remove `name VALUE` from args, return value or None."""
@@ -285,12 +184,29 @@ def cmd_personal(cmd, args):
return 64
def cmd_help(args):
"""`sisi help` (four groups, one line per command) or `sisi help COMMAND` (that command in full)."""
from . import helptext
if not args:
print(helptext.short(), end="")
return 0
text = helptext.long(args[0])
if text is None:
print("sisi: no command %r (try `sisi help`)" % args[0], file=sys.stderr)
return 64
print(text, end="" if text.endswith("\n") else "\n")
return 0
def main(argv):
args = list(argv)
t = _pop_opt(args, "--tool")
if t:
os.environ["SISI_TOOL"] = t
cmd = args.pop(0) if args else "help"
if args[:1] in (["--help"], ["-h"]) and cmd not in ("help", "-h", "--help"):
args = [cmd]
cmd = "help"
if cmd == "gate":
if t and t != "claude-code":
from . import hookio
@@ -332,8 +248,7 @@ def main(argv):
return 1
return 0
if cmd in ("help", "-h", "--help"):
print(HELP, end="")
return 0
return cmd_help(args)
if cmd == "contract":
return cmd_contract(args)
if cmd == "verify":