diff --git a/README.md b/README.md index 95156f3..994cb37 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,8 @@ its limits are. | `sisi learn --level core\|user\|project "…" [--means "…"]` | The person's own words become a rule at once, tagged `[owner]` only when they appear in the person's recent messages in this session. `--means` adds, in the same undoable step, one line saying how the agent will apply it | | `sisi rules move "" core\|user\|project\|canon [--project PATH]` | Move one rule line, verbatim, to another level, and print the command that moves it back: `sisi rules revert` does not undo a move (core is a queue for the product, in force as a user rule until it is added to canon/core.md, then `canon` takes it out of the queue); a level is always named, `project` needs a git repo, and organize also audits placement every `audit_after` (12) retros | | `sisi rules` / `sisi rules organize [--record FILE]` / `sisi rules revert` | See the learned rules; have a worker organize them (using known problems, prior attempts, and past drop reasons; an optional `## drops` section can record a reason and matching problem number for any dropped or merged rule, with `none given` recorded when omitted); undo the last rule change made with `learn`, a retro or `organize` (including any drop reasons recorded by that `organize`), in the user list or a project's `.sisi/rules.md` (not the one-time move of old rules; after `sisi rules move`, or an `organize` that moved lines between levels, it changes nothing and prints the command(s) that move them back, which that command also printed; a second `revert` re-applies what the first undid; it declines, changing nothing, when the project file changed since or its folder moved or is gone) | -| `sisi models` / `sisi models research [--record FILE]` | The workers table (the shared baseline table ships with sisi in `canon/models.md`), and each worker that is out with when it is back on the wheel; have a worker rebuild it | +| `sisi plan brief` / `sisi plan --record FILE` / `sisi plan` / `sisi plan --done\|--fail ID "…"` | The dependency graph of a piece of work, recorded before any delegation: `\| node \| class \| needs \| branch \| files \| check \| why \|`, one join every node reaches; refused on a cycle, a missing need, a shared branch, or overlapping files between nodes that can run at once. Prints the waves to dispatch together. `sisi pick --node ID` gives the worker and a header for the brief; the hook denies a lead's delegation outside the plan, out of order, unpicked, or without its own worktree, and the end of a turn sends the lead back while ready nodes wait. `sisi judge` closes or reopens the node. A `sisi chore:` brief (models research, plan brief) needs no plan. `"enforce": false` turns denials into reminders | +| `sisi models` / `sisi models research [--record FILE]` | The workers table: at most one row per provider (the plan or account a call draws on) per class, the one whose published allowance goes furthest, with its source and quota windows (`5h: N req; week: N req`); the wheel picks a plan less the more of its windows sisi's own delegations have used (never below 5%); research is redone every 3 days by a hard worker. (the shared baseline table ships with sisi in `canon/models.md`), and each worker that is out with when it is back on the wheel; have a worker rebuild it | | `sisi judge WORKER good\|bad\|out "…" [--minutes N] [--newest]` | How a delegation went (`out` with the provider's own message when it hit a limit: off the wheel for 6 hours, then tried again); the minutes are measured from the pick's delegation (or `--minutes N`) and make the wheel favour faster workers. With several of one worker's jobs open, the oldest is judged first, `--newest` the newest | | `sisi judge WORKER extend MINUTES "" [--newest]` | Give a late job more time instead of judging it: the job that is past its limit (past twice it first, else past once, else the oldest) gets MINUTES more from now, and its late fault clears | | `sisi direct "…"` | Allow more direct tool calls this turn, with the reason | diff --git a/SPEC.md b/SPEC.md index 624451c..ca34ffd 100644 --- a/SPEC.md +++ b/SPEC.md @@ -519,6 +519,8 @@ Typical routing patterns include: The routing policy MUST be empirical and revisable. Cost alone is not enough: a cheaper model that creates substantial rework may be more expensive in total. +The main agent is usually the most expensive model, so its own cost to specify a task counts: near-free models take exactly specified work and keep being tried on it; judgement goes to the strongest. The models table keeps one most-efficient model per provider and class, and the wheel spreads load by each plan's quota windows so no plan runs dry mid-work. + ## 7.3 Model and execution cost The organization SHOULD account for all material costs, including input tokens, output tokens, cached input, model-specific pricing, tool calls, external services, infrastructure, retries, and abandoned work. @@ -608,6 +610,8 @@ The main agent selects the solution approach, defines acceptance and verificatio Planning SHOULD be sufficient to avoid foreseeable rework but not so elaborate that planning dominates a small task. +sisi records the plan as a dependency graph (`sisi plan`): nodes with class, needs, branch, files and check, and one join. Nodes that can run at once have disjoint files and their own worktrees. The PreToolUse hook denies a lead's delegation outside the plan, out of order, to a worker the wheel did not give, or without its own worktree (in the deny shape Claude Code, Codex and Qwen Code share); it never blocks a worker and lets the call through on any internal error. The end-of-turn gate sends the lead back while ready nodes are not dispatched. + ## 9.4 Execution and orchestration The organization implements the plan, dynamically routes work, monitors progress and resource use, and adapts when evidence changes. Agents SHOULD report discoveries that materially affect scope, risk, architecture, or estimates promptly. diff --git a/canon/core.md b/canon/core.md index b302158..6904cf8 100644 --- a/canon/core.md +++ b/canon/core.md @@ -67,28 +67,33 @@ buy speed with a weaker check. ## 5. Delegate everything (lead only) -You own the outcome; workers do the work. Delegate reading, searching, building, testing, research and -first reviews, and keep your own context for intent, design, judgement and the final call. Do something -yourself only when briefing it would cost more than doing it. `sisi models` lists the workers you have. -Decide the class of the task (routine, ordinary, hard), counting rework as cost, then `sisi pick CLASS` -spins the wheel over the workers of that class and gives you one: use it. A class holds models of like -strength from different makers; the wheel never mixes classes. A review always goes to a different maker -than the author: `sisi pick CLASS --review-of WORKER`. Start the worker with the host's own delegation -tool; do not shell out to a worker's command line. Run independent work in parallel. Brief a worker as a -peer who starts cold: the outcome, what is known and ruled out, what done looks like, the files it may -change, what it may create, and a time limit (`sisi pick CLASS --limit MINUTES [--branch NAME]`). At the -limit it stops and reports as it stands: what is proven, what failed, what did not run. Extending is the -lead's call, made once, with a reason (`sisi judge WORKER extend MINUTES ""`). Decide the -central mechanism in the brief, set against the person's standing rules on its subject, and say what a -failed or gamed job does to each number it optimizes. For anything the person will look at, the brief -states the look (type, colours, spacing, layout at each width), chosen with the person from previews. -For a reported fault, the report's exact inputs are an acceptance test. For a replacement, list each -behaviour of the old thing as keep, change or drop, with a check for every keep. Always use the newest -version of a model within its maker and class. Its report is evidence for you to judge, not a fact to -pass on; record how it went with `sisi judge`. When a worker fails for a limit, a login or a connection, -judge it `out` with the provider's message (sisi retries it by itself) and give the same brief to the -next one at once: do not ask the person and do not report it. Rebuild the models table in the background -when session start says it is old. +You own the outcome; workers do the work. You are almost always the dearest model, so delegate reading, +searching, measuring, building, testing, research and first reviews, including the fact-finding a brief +needs, and keep your own context for intent, design, judgement and the final call. Choose each piece's +class (routine, ordinary, hard) by total cost: your cost to specify it, the worker's cost, and the expected +redo. Near-free routine models take anything specified exactly (files, change, a check that decides) and +keep being tried on such work; judgement and design go to hard, because a cheap job redone is waste. Plan +before any handoff: `sisi plan brief` goes to a hard worker, and `sisi plan --record FILE` keeps the +dependency graph: nodes with class, needs, branch, files and check, and one join that brings them back. +Nodes that can run together get their own worktrees and disjoint files. For each ready node `sisi pick +--node ID` spins the wheel over that class and gives a worker and a header for the brief; dispatch every +ready node in one message. sisi refuses a handoff outside the plan, out of order or to a worker it did not +give you. The wheel keeps one most-efficient model per provider and class and spreads load so no plan's +quota runs dry. A review always goes to a different maker than the author (`--review-of WORKER`). Start +workers with the host's own delegation tool, never a worker's command line. Brief a worker as a peer who +starts cold: the outcome, what is known and ruled out, what done looks like, the files it may change, what +it may create, and a time limit (`--limit MINUTES`). At the limit it stops and reports as it stands: what +is proven, what failed, what did not run. Extending is the lead's call, made once, with a reason (`sisi +judge WORKER extend MINUTES ""`). Decide the central mechanism in the brief, set against the +person's standing rules on its subject, and say what a failed or gamed job does to each number it +optimizes. For anything the person will look at, the brief states the look (type, colours, spacing, layout +at each width), chosen with the person from previews. For a reported fault, the report's exact inputs are +an acceptance test. For a replacement, list each behaviour of the old thing as keep, change or drop, with a +check for every keep. Its report is evidence for you to judge, not a fact to pass on; record how it went +with `sisi judge`, which also closes or reopens its node. When a worker fails for a limit, a login or a +connection, judge it `out` with the provider's message (sisi retries it by itself) and give the same brief +to the next one at once: do not ask the person and do not report it. Rebuild the models table in the +background when session start says it is old. ## 6. Report plainly