pub const PROTOCOL: &str = "# The seat protocol\n\nOne seat, five stores, five questions. Ask the store that owns the question.\n`ljos` is the one command in front of them; `ljos-mcp` serves the same verbs\nover the Model Context Protocol (MCP). Every verb below has a tool of the same\nname with the prefix `ljos_`.\n\n| question | store | verbs |\n|---|---|---|\n| what is the work, what blocks it, who agrees | tracker (vissue) | `recall`, `vote`, `consensus`, `deed`; `vissue create`, `vissue note`, `vissue update` |\n| what does this seat know, standing | pack (packset) | `search`, `island`, `remember`, `prefer`, `forget`, `due`, `graded` |\n| what did the work produce | deed store (deedar) | `evidence`, `current`; `deedar create` |\n| which work is claimable right now | claim graph (claimdag) | `claim`, `release`, `complete` |\n| how do the voters weigh each other | pack, trust rows | `trust`, `learn`, `calibrate` |\n| who votes with a view of its own | pack, persona atoms | `persona`, `vote --as` |\n\nA failure is a store not answering. It is never an empty answer. When a verb\nfails, run `doctor` before drawing any conclusion.\n\n## Before the work: a sitting\n\nOne verb runs the whole opening in order and stops at the first store that\ndoes not answer:\n\n ljos sitting ISSUE --assignee NAME\n\nIt prints six sections, and each one is a step you would otherwise run by\nhand. Each answers something the next one needs.\n\n1. `ljos doctor`. A `no` on `tracker`, `deed store` or `pack` is the answer;\n `packset ensure` starts a pack writer. Do not proceed on a `no`.\n2. `ljos cards`. What the human froze. Read, never write.\n3. `ljos due`. Read every claim listed, then `ljos graded ID` for each one,\n `--lapsed` when you had to look it up. The review clock moves only when\n you grade.\n4. `ljos search TOPIC`, then `ljos island TASK` with the task in your own\n words. The island is the cluster of memories this task touches, the hits\n are only its seeds. Every row carries its age; read them as a timeline.\n `ljos search TOPIC --as-of TIME` asks what the seat knew then.\n5. `ljos recall ISSUE`. The plan, the inputs\' deeds, and what the issue has\n cited so far. `ljos timeline ISSUE` when order matters: the logbook,\n the cited deeds and the activated memories as one dated list, oldest\n first, each line with its age and the gap since the one before.\n6. `ljos claim ISSUE --assignee NAME`. One live claim per name. `busy` means\n you still hold another node: `ljos complete` it, or `ljos release` it.\n\nNo issue yet? `vissue q -p PROJECT \"TITLE\"` mints one and prints its id.\nEvery piece of work has an issue before it has a claim.\n\n## During the work\n\n- Every artefact the work produces is a deed, then a citation:\n `deedar create file --name NAME --path PATH --agent NAME` prints an\n accession; `ljos deed ISSUE --add ACCESSION` cites it on the issue.\n Citation is not a merge, and the product is never pasted into the ticket.\n- Every lesson that will still be true next sitting is one `ljos remember`\n of two short sentences at most. A standing choice between two ways is one\n `ljos prefer`. Never a transcript, never a summary of the session. A\n correction from the person (\"you should have\", \"do you not remember\")\n is a preference the pack does not hold: write it with `ljos prefer`\n before the work it corrects, not after. A\n lesson that rewrites an earlier one closes the earlier one\'s window; the\n verb says `revises N earlier memories` when it did. `ljos consolidate`\n reports the pairs the rule would close across what is held, and\n `--apply` closes them; run it after a handover is imported.\n `ljos conflicts` lists the likeliest contradictions by distance rather\n than by words, when the `landscape` habitat is installed.\n- Every decision with more than one defensible answer is a ballot:\n `ljos vote ISSUE --for OPTION` once per identity (`VISSUE_AGENT`), then\n `ljos consensus ISSUE`. A tally is a count; the consensus is the settle\n under the trust rows. On a hard question add a forecast beside the\n ballot, `ljos predict ISSUE --expect OPTION`; with two or more forecasts\n the settle also names the surprisingly popular answer, the option whose\n actual share most exceeds its forecast, and shows each voter\'s standing.\n When the world says which option was right, `ljos finish ISSUE\n --outcome OPTION` (or `ljos learn`) writes every voter\'s record of\n outcomes as its weight, so the next settle weighs a voter by what it\n got right.\n- When the work has shown that a kind of command must never run, or must\n be asked about first, write the law: `ljos rule \'PATTERN\' --verdict\n deny|ask --why \"...\"`. The hook stops or asks at the point of action and\n `ljos policy` says the same; the rule is memory and travels in handovers.\n- When the work wants readers with views of their own, such as a reviewer\n for a broad audience beside a domain expert, write each once:\n `ljos persona NAME --anchor A --view \"...\" --about DOMAIN...`. Then\n `ljos vote ISSUE --for OPTION --as NAME` casts as it. The anchor in\n `[0, 1]` is how far it moves off its ballot in the settle; 0 never moves.\n A trust row scoped with `--about DOMAIN` applies when the issue\'s title\n carries that word; `learn` writes its rows scoped to what the issue\'s\n island is about, so being wrong on one topic costs nothing elsewhere.\n A panel is one subagent per persona, each started from\n `ljos brief NAME ISSUE` (the view, what the seat knows on its domains,\n the working set), each casting one ballot as itself, then\n `ljos consensus`; over MCP the `run_a_panel` prompt orders it, and\n without MCP `ljos panel ISSUE --out DIR` writes one brief per persona\n as a file to start each subagent from. A panel\n member\'s own lesson goes in with `ljos remember --as NAME \"...\"` and\n comes back to it first in its next brief; the seat still reads it. The kind of work sets the dynamics: tag\n the issue `broad` when the panel is a broad audience, and the settle runs\n bounded confidence, so clusters are allowed and reported instead of being\n averaged into one position.\n- Progress goes on the issue, dated: `vissue note ISSUE \"...\"`.\n\n## After the work\n\nOne verb closes the sitting:\n\n ljos finish ISSUE --status done --lesson \"...\" [--outcome OPTION]\n\nIt remembers the lesson, fires the island, completes the session node, and\nlearns from the outcome when one is named. Without `--lesson` it says so;\na sitting that taught nothing worth two sentences is rare. By hand, the\nsame four steps are:\n\n1. `ljos island TASK --fire` when the island served: the strongest memories\n fire together and their links gain weight.\n2. `ljos complete ISSUE --status done` (`failed`, `cancelled`). Completing\n the session node does not close the ticket: `vissue update ISSUE -s DONE`\n does, when the work is accepted.\n3. `ljos learn ISSUE --outcome OPTION` when the world says which option was\n right. Every voter it refuted shrinks in every other voter\'s row, and a\n persona it refuted holds its next ballot less firmly.\n4. `ljos handover --out DIR --issue ISSUE [--to user@host:path]` when\n another seat takes over; the receiver runs `ljos receive DIR`, then\n `--import`.\n\n## When nobody names an outcome\n\nMost issues close without anyone saying which option was right, and then\n`learn` never runs and every voter keeps the same weight. `ljos calibrate\n--project PROJECT` reads every issue of the project with two or more\nballots and estimates each voter\'s accuracy from how often it agrees with\nthe answer the other voters make likely (Dawid and Skene), then writes\nthose accuracies back as trust rows. Run it once per project after a few\nissues have been voted on, and again when many more have. A consensus\nunder equal weights is a count; under calibrated rows it is not.\n\n## Refusals worth knowing\n\n- `claim: assignee busy HEX`: you hold that node. `ljos release HEX\n --assignee NAME` hands it back, `ljos complete HEX` finishes it.\n- `already held by NAME; the sitting resumes`: not a refusal. A second\n `sitting` on the issue you hold renews the lease and goes on. Held by\n another seat, the claim names that actor and the two verbs that free it.\n- `complete: status not terminal`: the statuses are `done`, `failed`,\n `cancelled`. To stop without finishing, `release`.\n- A claim on an issue whose earlier sitting finished reopens its session\n node and takes it: a new sitting on old work, with the ledger kept.\n- `not a deed accession`: `--why` on `forget` and `trust` takes accessions\n from `deedar`, never free text.\n- `the pack writer did not answer`: the pack is down, not empty.\n `packset ensure`.\n- `ljos due` prints `0 due; nothing scheduled`: the seat has remembered\n nothing, and the review loop has nothing to run on. Remember something.\n `0 due; N scheduled, next at T` is a clock that is running.\n- `ljos policy ARGV` prints the line a command would run under argv law,\n then what the pack knows that bears on it. It is not a check.\n- `ljos hook` is the memory hook: a runner or a policy layer pipes the\n action about to happen (its hook JSON, or the plain argv) and gets back\n the memories that action activates, what two of the pack\'s scorers\n agreed on, preferences first, then lessons\n oldest to newest, each with its age (`[lesson, 3 weeks ago]`), so a\n later lesson reads as a revision of an earlier one. When the session\n ends, the memories it injected fire together, so what served one sitting\n is wired for the next. `ljos onboard`\n installs it on the runner\'s tool-call and prompt events, so the seat\'s\n memory reaches the agent at the point of action without being asked.\n\n## Identity and environment\n\nNothing here needs a variable set. The pack is found on `127.0.0.1:8761`\nand the seat\'s memory is one workspace, `seat`, whatever directory you\nstand in (`PACKSET_WORKSPACE` names another). The deed store and claim\ngraph live in the user\'s state directories, the tracker at the root\n`vissue identity` prints, and the host key at `~/.config/deedar/host.key`\nwhen it exists. `LJOS_SEAT` is the name this runner claims and votes under\nwhen a verb names none; a runner\'s registration sets it to the runner\'s\nname (`{name}` in the runners file), so two runners on one host share the\none pack and tracker and hold separate claims. Export the same\n`LJOS_SEAT` in the runner\'s shell (a runner\'s settings usually carry an\n`env` table) so its command-line ballots and claims match its tools\'.\n`VISSUE_AGENT` is the tracker\'s own name for the same thing; `--as` names\na persona over both.\n";Expand description
The sitting protocol: which store answers which question, the order of
verbs before, during and after the work, and the refusals worth knowing.
ljos protocol prints it, ljos onboard installs it as a skill, and the
server serves it at ljos://protocol. Harness agnostic on purpose.