Clara Docs
All docs

Decisions

How Clara is built234 min readEdit on GitHub

Every place where the brief (docs/SPEC.md) was silent, unclear, or contradicted by reality, and what was chosen instead. Newest entries at the bottom. Format: what, why, what was rejected.

Departures from the brief

These are the entries that change something the brief states. Everything else below is a choice the brief left open.

# Brief says Clara does
D-001, D-135 First free name in the order given: clara-project-management; commands clara and clara-pm clara-ipm, by the owner's instruction during the build; commands clara and clara-ipm
D-136 Licence: MIT Apache-2.0, by the owner's instruction during the build
D-003 Runtime dependencies are installed Runtime libraries are bundled; the package installs with zero dependencies
D-004 CI runs 3 OS x 3 Node on every push Full matrix once the repo is public; reduced matrix while it is private
D-005 Permission mode default Still the config value, but shown as "Manual"; headless runs deny by default, so the mode and the approval bridge are always passed explicitly
D-012 "An author never approves its own work in any mode" Binding for agents; a person may approve their own work, recorded as self-approved
D-028 Watch a CI run after every push CI runs on pull requests and when started by hand at the end of a milestone, by the owner's instruction, to save runner minutes
D-158 clara start runs an agent headless and reports the result (D8) At a terminal it opens a Claude Code chat for the ticket; --headless and clara work keep the run nobody types in
D-159 The web UI starts no program The local page may open a terminal for clara start with a checked ticket id, model and effort, by the owner's instruction

D-001. Package name is clara, by the owner's decision

What. <package> is clara. It installs two commands, clara and clara-pm. The name is read from package.json in exactly one place; the plugin's MCP config, the workflow templates and every command in the docs are generated from it. Why. The brief's order (B2.5) resolved to clara-project-management, because clara is taken on npm. During the build the owner wrote: "we will still call in npm as clara". The owner's instruction wins over the brief. What is true today (checked 2026-11-16 with npm view clara). The name clara is held by another publisher: "Clara.io API wrapper", version 0.4.11, repository Exocortex/node-clara, and it also installs a clara command. Until that name is transferred, npx clara runs their package, not this one. Nothing was published. Consequence. Getting the name is the first human step in docs/LAUNCH-CHECKLIST.md, and the README must not be made public before it is done. The fallbacks clara-project-management, clara-pm and @sherwinvishesh/clara were all free on the same date; switching is one line in package.json followed by npm run docs. Rejected. Keeping clara-project-management against the owner's instruction.

D-002. Sources live at the repo root, no src/

What. library/, cli/, mcp/, server/, web/ sit at the root exactly as in C3. Relative imports carry .js extensions. Output goes to dist/. Why. C3 is a layout contract. .js extensions make the emitted .d.ts files resolvable by consumers on any moduleResolution. Rejected. .ts extensions with rewriteRelativeImportExtensions (newer, less proven for declaration output). A src/ folder (contradicts C3).

D-003. Runtime libraries are bundled; the published package has zero dependencies

What. Zod, the YAML parser, Hono, the MCP SDK and the colour helper are bundled into dist/ by esbuild. package.json has no dependencies. Licences of bundled code are written to dist/THIRD-PARTY-LICENSES.txt at build time. Why. Demo 1 must start in about ten seconds from npx with nothing installed; resolving and downloading a dependency tree is most of that time. It also removes install-time supply-chain surface (D15) and makes the "no install scripts, no native modules" rule true by construction. Rejected. Ordinary dependencies: slower first run, and the MCP SDK pulls a large tree. The list of libraries used at runtime is still the short list in C1.

D-004. CI matrix depends on repository visibility

What. ci.yml asks the GitHub API whether the repository is private and computes its matrix from the answer. Public: macOS, Linux and Windows across Node 22, 24 and 26, plus Bun on Linux (the brief's matrix). Private: Linux across 22, 24 and 26, plus macOS and Windows on Node 24, plus Bun. Why. The repository is private today. Standard runners are free for public repositories; for private ones GitHub bills per minute (Linux $0.006, Windows $0.010, macOS $0.062 on 2026-11-16, see VERIFIED.md), so a macOS minute costs about ten Linux minutes. The full matrix on every push of this build would eat the owner's included allowance, and B5 forbids spending money. When the repository goes public the full matrix runs with no edit. Rejected. Always running the full matrix (burns the allowance). Dropping macOS and Windows while private (loses the cross-platform proof).

D-005. Claude Code's permission mode is always passed explicitly

What. The Claude Code adapter never relies on a default. It always passes --permission-mode, and uses the value default for "ask a person". Why. The brief calls the mode default. That is still the config value, but Claude Code 2.1.326 shows it as "Manual" and claude --help lists manual (an alias since 2.1.200) instead of default. Since 2.1.302 a claude -p run with no mode set denies every call that would need approval unless an allow rule, hook or --permission-prompt-tool answers it. So "ask a person" only works headless when Clara also passes its approval bridge as --permission-prompt-tool. See VERIFIED.md, Part 1.

D-006. No argument-parser or prompt dependency

What. Arguments are read by Clara's own tokenizer in cli/args.ts, driven by each operation's input schema. Prompts use node:readline. Why. C1 allows "at most one" of each; zero is cheaper for cold start (budget: 100 ms for --version) and the registry already knows every flag. Changed in M2. The first plan was node:util.parseArgs. It knows two kinds of option, text and switch, and in strict mode it refuses a value that starts with a dash: --points -1 fails with ERR_PARSE_ARGS_INVALID_OPTION_VALUE. The tokenizer knows each flag's kind from the schema (text, number, integer, switch, list, JSON), so it reads -1 as the value, gives each switch a --no- form, takes none to clear a field, and answers an unknown flag with the nearest real one. A query may leave tickets out with a leading minus, as docs/QUERY.md describes (clara list -status:done). For list, board and view save, a word shaped like a left-out term (a minus followed by a field and an operator, a parenthesis or a double quote) is part of the query unless its letter is one of the command's short flags; a bare -word is still a flag, and an unknown one says to put the query after -- (CLA-32). Rejected. commander, cac, @clack/prompts. Keeping parseArgs and asking people to write --points=-1 (a rule nobody guesses, for the one tool whose users include agents that cannot ask).

D-007. YAML is parsed with yaml, written by Clara's own serialiser

What. Front matter is read with the yaml package (YAML 1.2 core schema). It is written by a small deterministic serialiser in library/format, which falls back to yaml's stringifier only for unknown nested values. A fast path parses the exact subset Clara writes and defers to yaml for anything else; a differential property test holds the two equal. Why. The on-disk format is a contract checked by golden files, so its bytes must not depend on a library version. The fast path is what makes 10,000 tickets load inside the C2 budget. Rejected. js-yaml (YAML 1.1 turns unquoted timestamps into dates). Hand-parsing everything (people write arbitrary YAML).

D-008. Comments and the timeline live in the activity log, not in the ticket file

What. A comment is an event (kind: "commented"). A ticket's timeline is the log filtered by ticket. The ticket file holds fields, description, acceptance criteria and the handoff note. Why. The log is append-only and merges by union, so two people commenting on the same ticket on different branches never conflict. Comment threads in the ticket file would.

D-009. Every event on a ticket bumps its updated field

What. Any operation that emits an event for a ticket also sets updated. A stale holder is therefore "agent-held and updated older than stale_after_minutes", with no log scan. Why. Keeps is:stale, updated<7d and rule 9 cheap and consistent, and makes "files changed" equal to "events emitted", which the engine asserts.

D-010. Undo appends a compensating event

What. Undo restores the files an operation changed and appends one undone event naming the events it cancels. Readers that compute state or metrics use effectiveEvents(), which drops cancelled events. The timeline shows them struck through. Why. C4.5 says every state change appends exactly one event, and the log is append-only and shared. Truncating it would break both. Rejected. Deleting log lines.

D-011. Ticket numbers come from the highest number ever seen

What. The next id is one more than the largest number among files in tickets/, files in archive/, and created events in the log. Why. Ids must never be reused, including after an undone create. A counter in config.json would conflict on every branch that adds a ticket.

D-012. A person may approve their own work; an agent never may

What. In every review mode an agent that authored a ticket cannot approve it. A person who authored a ticket can, and the event records self: true. Why. Rule 1 says people may make any move, and the first user is a solo builder who would otherwise be unable to finish their own ticket. The property test in E1 ("no sequence of agent operations ever produces done without an allowed approval") is about agents and holds. Rejected. Refusing self-approval for people (dead end for a team of one).

D-013. Check results are recorded as verified events

What. clara verify appends a verified event carrying the commit and each check's name, result and duration. Output tails stay in .clara/.local. complete passes rule 6 when the newest verified event for the ticket passed and names the branch's current commit. Why. The result must travel with the repo so hosted mode, the Actions runtime and reviewers on other machines all see the same "verified" stamp.

D-014. Automation acts as system

What. A third actor kind, system, is used for derived changes: an epic closing when its children close, approval in gates mode, doctor fixes, routines. It is neither a person nor an agent. Why. Crediting these to whoever triggered them would make it look as if an agent approved its own work.

D-015. Epics: only "done" and "reopened" are derived

What. An epic moves to done when all its tickets are done and back to in_progress when one reopens. Other epic statuses are set by people. The switch is automations.epic_auto_done (default on). Why. That is exactly rule 10. Deriving every status would overwrite moves people make.

D-016. Storage commits can append, and can be conditional per file

What. A change is a write, a delete, or an append. A write may carry the tag the file had when it was read; the commit fails with a conflict if the file changed since. The disk adapter also writes a small journal before applying a multi-file commit and rolls it forward after a crash. Why. Append keeps the monthly log cheap. The tag catches the case the version counter cannot: a person saving a ticket in their editor at the moment an agent claims it. The journal is what makes "one atomic commit" true on disk.

D-017. Bun is verified in CI only

What. Local evidence covers Node. In CI, on Linux, Bun runs the built CLI through scripts/bun-smoke.mjs: a short list of real commands whose output and exit codes are checked. It does not run the Vitest suite; that runs under Node. Why. Bun is not installed and B5 forbids global installs.

D-018. The public API exposes no third-party types

What. The types Clara exports (Ticket, Sprint, Config, Event and so on) are hand-written TypeScript interfaces in files that import nothing. The zod schemas that validate them live in separate files and are checked at compile time to describe exactly the same shape. A test reads the emitted .d.ts files reachable from the entry point and fails if any of them imports a package. Why. D-003 bundles every runtime library, so the published package has no dependencies. If the public types were z.infer<...>, the declaration files would import zod and break for anyone who does not happen to have it installed. Hand-written interfaces are also the honest semver contract: a zod upgrade cannot silently change them. Rejected. Shipping zod as a dependency (one more thing to install and audit, and its types become part of Clara's API). Bundling declarations with a third tool (another moving part).

D-019. The server is a web-standard request handler

What. createServer() returns { fetch(request: Request): Promise<Response> }. The local command wraps it in Node's HTTP server; Vercel and a host app call it directly. Why. This is the embedding contract for Genesis (C4.10): any framework can mount a fetch handler under a base path without sharing Clara's router types. It also makes every endpoint testable in-process with no socket. Rejected. Exporting a Hono app (ties hosts to Clara's Hono version and leaks its types).

D-020. Terminal colour is forty lines of Clara's own code

What. cli/colour.ts writes ANSI codes itself and honours NO_COLOR, FORCE_COLOR and whether output is a terminal. Why. The usual small library is CommonJS, which costs a wrapper in an ESM bundle and time on every start. The CLI's cold-start budget is 100 ms.

D-021. yaml is bundled from its browser build

What. The bundler resolves yaml to yaml/browser/index.js. Why. That build is plain ES modules with no Node built-ins. The default Node entry is CommonJS and touches process and Buffer, which would break the rule that portable modules run in a browser and would add a CommonJS wrapper to every command that parses a file.

D-022. MCP uses the split v2 SDK

What. The server is built on @modelcontextprotocol/server; conformance tests use @modelcontextprotocol/client. Both are development dependencies and the server is bundled. Why. On 2026-11-16 @modelcontextprotocol/sdk is the legacy line. The brief said to use the current official SDK and to check which one that is.

D-023. TypeScript 7

What. The compiler is TypeScript 7.0.2, the current stable release. Why. It is the native compiler and type-checks this project in well under a second. If a tool in the chain turns out not to support it, the fallback is 6.0.3, the last 6.x.

D-024. The web build configures JSX directly

What. Vite compiles JSX for Preact through its built-in transformer options. @preact/preset-vite is not used. Why. The preset pulls in Babel as a peer. Clara needs neither its prefresh integration nor its devtools bridge to ship, and fewer build dependencies means fewer supply-chain surfaces.

D-025. CLI tests run in-process, with a small set of real spawns

What. The CLI is a function, run(argv, io), that returns an exit code. Most tests call it directly with captured output. A smaller set spawns the built dist/cli.js as real processes: exit codes, the claim race, cold start and the packaged tarball. Why. In-process tests are fast and count toward coverage. Real spawns prove the binary, the bundle and the cross-process lock. Both are needed; neither alone is enough.

D-026. Playwright keeps its browsers inside the project

What. PLAYWRIGHT_BROWSERS_PATH points at a git-ignored folder in the repo. Why. B5 says to edit nothing outside this folder. The default location is a cache under the user's home directory.

D-027. CodeQL and dependency review run only on a public repository

What. Both workflows check visibility first and skip their work while the repository is private. Why. Code scanning uploads and the dependency graph need GitHub Advanced Security on private repositories; without it the jobs fail. The brief requires any workflow whose setting is absent to skip cleanly. Both start working the moment the repository is made public.

D-028. CI runs on pull requests and by hand, not on every push

What. ci.yml and codeql.yml have no push trigger. CI runs on every pull request, and on main when someone starts it: gh workflow run ci.yml --ref main. During the build it is started at the end of each milestone, after npm run ci has passed locally. Why. The owner's instruction during the build: "pause the ci/cd as we have limited resources ... when done with feature, then run the cicd, dont waste cicd for all the pushes". The brief (B6) says to watch a CI run after each push; the owner's instruction wins. main is still kept green: the same gates run locally before every push, and the hosted run at the end of a milestone proves the other systems. Consequence. A push to main that breaks only Windows or only Bun is not caught until the next hosted run. docs/LAUNCH-CHECKLIST.md says how to turn push runs back on once the repository is public and standard runners are free. Rejected. [skip ci] in every commit message (noise in the history, easy to forget). Keeping the trigger and skipping every job (the runs still pile up in the Actions tab).

D-029. Disk storage commits through a lock file and a journal

What. diskStorage(dir) keeps its own files in .clara/.local/storage/, which no storage path can reach. A commit takes lock (created exclusively), checks expectedVersion and every ifTag, writes journal.json with the full change list, applies it, writes version and removes the journal. Writes go to a temporary file and are renamed into place. An append records the file's size beforehand and truncates back to it before writing, so applying the journal twice adds the text once. Whoever takes the lock next finishes a journal left by a process that died. A lock is taken over when its process is gone on this host, or when it is older than staleLockMs (30 s), because process ids are reused after a restart. A lock.steal marker makes sure two processes never both remove the same lock. Why. The brief asks for a claim race between real processes in which exactly one wins (M1), and for a commit that is whole or absent. Git is not involved at this layer; the folder is the board. Consequences, accepted. (1) A single commit that holds the lock longer than 30 s, on a very slow disk, can be taken over while it runs; a normal commit takes milliseconds, and the second writer still sees a consistent board because the journal is replayed first. (2) A STORAGE_ERROR after the journal is written means the commit may still complete when the next process takes the lock. Callers re-read, never retry blindly; the operations engine only retries on CONFLICT, and always from a fresh read. (3) The lock is not fair. A process can reach LOCKED after 10 s under continuous writes from others. (4) The tag of a file is its size, its modification and change times in nanoseconds, and its inode, so an outside edit that keeps the size within one clock tick is not seen as a change. (The change time was added with D-042.) Rejected. proper-lockfile and similar packages (a runtime dependency, and none handles the journal). A lock directory (mkdir) instead of an exclusive file (the same guarantee with no room for an owner record). Refreshing the lock while a commit runs (commits are synchronous once the lock is held, so nothing could refresh it).

D-030. Doctor repairs by adding events, never by editing old ones

What. doctor.fix leaves every recorded event as it is. It settles a problem by adding events: renumbered when it moves a ticket to a new number, and repaired when it records what the files say. The data each carries is listed in docs/FORMAT.md. The one file it rewrites is a log file with conflict markers in it, and then it keeps every line from both sides. Why. The log is history that other clones share. Rewriting old events would make the next merge conflict again, and would hide what happened from anyone reading it later. C4 rule 5 asks that replay of the log equal the files; adding a later event keeps that true without touching the past. Rejected. Changing the ticket id inside old events (rewrites shared history). Deleting the events of a lost ticket (the number would then look free and be used a third time).

D-031. Of two tickets with one number, the one made first keeps it

What. When two branches both made GEN-7, the ticket created first (by time, then by event id) keeps GEN-7, and the other gets the next number nobody has used. A ticket taken from a known side of a conflicted file has its references moved to that side's new numbers. Any other ticket that points at a moved number gets a warning, because doctor cannot know which branch it meant. Two edits of the same ticket are merged by taking the newer side's fields, then the log's status, holder, sprint and estimate; what the older side had and the result does not is listed as dropped in the repaired event. Why. The first-made ticket has had its number longest, so it is the one most likely to be in commit messages and branch names already. Doctor runs unattended, from agents and CI, so it cannot stop and ask. Limits, accepted. Without the merge base, a field changed only on the older side cannot be told apart from one left as it was; it is listed as dropped, and git history holds both versions. Rejected. Asking a person each time (doctor has to work without one). Suffixed numbers such as GEN-7b (they break the id format every tool reads).

D-032. Conflict markers in a ticket's description count, except in a code block

What. A ticket file with <<<<<<<, ======= and >>>>>>> lines is a conflict, wherever they are, unless they sit inside a fenced code block. Why. Git leaves the markers in the description as readily as in the front matter, and a description that still has them is not finished. A ticket about merges may quote markers, and a code block is where it would.

D-033. An operation's events sort after the log it read

What. An event id can be made after a given id. A transaction that read the log makes its events after the newest one there. Each event keeps its own timestamp; only its place in the order moves. Why. Machines' clocks disagree. When another machine's clock ran ahead, its events sort after anything made here, even ones made later. Replay follows that order, so a doctor repair or an undo could be overruled by events that happened before it. Found by a test that merged a branch whose clock was an hour ahead. Consequence. An event's id can carry a later time than its ts. Readers order by id and show ts. Rejected. Moving ts forward too (it would misstate when the change was made). Refusing events stamped in the future (whose clock is right is not this machine's to judge).

D-034. A transaction sees the files an operation writes as they are

What. When an operation writes a ticket file directly, as undo does, the transaction reads that file back for the rest of the operation, and the derived changes (epics following their tickets, approvals by gates) look at it too. Why. Undo put files back without the transaction knowing, so an undo that finished an epic's last ticket left the epic open. Found by the property that doctor finds nothing after any run of operations.

D-035. The disk watcher also checks the version file every second

What. While a system watcher runs, the disk storage also looks at the version file's modification time once a second, and reports a change the watcher missed. Why. A watcher can miss a change. On macOS a commit made in the moment a watcher is starting is never reported. One lstat a second per open board costs nothing that matters.

D-036. The format as built differs from D1 in these ways, and FORMAT.md describes what is built

What. docs/FORMAT.md describes the files the code reads and writes, and a test holds it to the code: every event kind and every key must be named there. Where the build differs from the brief's D1:

  • There is no idea.md, and no docs/, playbooks/, templates/, prompts/ or attachments/ folder yet. They arrive with the features that use them (planning, agents, attachments), each with its migration step if it changes a file that exists.
  • .cache/ is ignored by git but nothing writes it yet. .local/ holds the disk storage's lock and journal and the undo records.
  • The config adds automations and routines. Settings for features not built yet (conductor, routing, git, notify, routines) are checked and kept, and nothing reads them.
  • Ticket numbers come from conditional commits that retry (five times, then CONFLICT), not from a lock held while choosing (D-029).
  • The log has four kinds D1 does not list: renumbered, repaired, migrated and undone. Kinds for features not built yet are known, so a newer Clara's log reads cleanly, and nothing writes them.
  • Ranks are base-36 strings that sort as text (D1 leaves the format open).
  • A ticket whose key is another project's is left off the board and reported, rather than loaded. Why. The format is the product's contract with every tool and person that reads the files. A page that describes the brief instead of the code would mislead exactly the people who rely on it. Rejected. Writing the empty folders now so the tree matches D1 (empty folders do not survive git, and folders with nothing in them promise features that do not exist).

D-037. Timing budgets hold on macOS and Linux; on Windows, clara list on 1,000 tickets is reported until measured there

What. npm run budgets fails when a budget is broken, on every system. One measurement is the exception: clara list on a board of 1,000 tickets is printed on Windows with its limit, but does not fail the run there. Why. That measurement is mostly the operating system opening a thousand files. Windows sends every open through the virus scanner, many times slower than macOS or Linux, and no Windows machine has run it yet, so any limit set now would be a guess. The hosted CI runs Windows; its first run gives the number, and this decision is then replaced by a Windows limit set from it. Rejected. Scaling every limit by how fast the machine starts Node (start-up time says little about file opens). Leaving it enforced on Windows (a red CI run for a number nobody has seen). Replaced by D-071, once the hosted CI had measured it.

D-038. How clara list on 1,000 tickets fits in 200 ms

What. A new process listing a board of 1,000 tickets took about 230 ms when first measured. Five changes brought it under 200 ms on the reference machine (docs/BENCHMARKS.md):

  • Only Zod's English messages are bundled. Zod exports all of its translations, and esbuild cannot drop a namespace export, so they were 374 KB of the 900 KB every command loads. A build plugin gives that namespace English only; nothing in Clara reads it.
  • A timestamp already written the one way Clara writes it is kept as it is, instead of going through Date.parse and back.
  • Disk storage reads a file to the size it has just checked, instead of letting readFileSync check it again, and remembers which folders it found to be real for the rest of the current turn of the event loop, instead of looking at the same two folders for every ticket.
  • The CLI asks git for the user's name while the board loads, instead of before.
  • Text width counts printable ASCII by its length. Rejected. Node's compile cache (module.enableCompileCache), which saves about 20 ms, because it writes to a cache folder on the user's machine on every first run, and Clara writes nothing outside the repository and CLARA_HOME. Reading files in parallel with asynchronous calls, measured slower in a fresh process (37 ms against 27 ms for 1,000 files). Opening files with O_NOFOLLOW to skip one look per file, which Windows does not have, so the code would split by system for a few milliseconds. Replaced in part by D-123, which uses Node's compile cache with the cache kept under CLARA_HOME.

D-039. A date or time that does not exist is an error

What. A timestamp or date with a day its month does not have (2026-02-30, 2026-02-29), an hour of 24, a minute or second of 60, or an offset past +23:59 is refused when a file is read, as 2026-13-01 already was. Before, Date.parse read 2026-02-30 as March 2 and 24:00 as the next day. A year from 0000 to 0099 is accepted in a date, as it already was in a timestamp. Why. A date that does not exist is a mistake, usually a hand edit. Reading it as another day without a word hides the mistake and moves the ticket's history. clara doctor reports the file, and the person who wrote it can say which day was meant.

D-040. What the board holds is shown on a terminal, never obeyed

What. Everything the CLI prints for people passes through one filter before it is written. Clara's own colour codes, line feeds and tabs pass, and so does the same code written in a file (bold, dim, six colours and their resets cannot move the cursor or hide text, and telling them apart from Clara's own would mean filtering field by field); every other control character is shown in caret notation, as cat -v shows it (ESC as ^[, a carriage return as ^M, C1 controls as <U+009B>). JSON output escapes DEL and the C1 controls as \u escapes, which JSON.stringify leaves raw; the value is unchanged. The commands clara trust and clara verify ask about are printed whole, never cut to the terminal's width, one line of a command per line, with every control character shown, colour codes included, and the marks that reorder text right to left. Why. Titles, descriptions, comments and commands come from files anyone who can push to the repository wrote, and from agents. Printed raw, an escape sequence can clear the screen, rewrite lines already printed, set the window title or write to the clipboard, and a carriage return prints over the start of its own line. The trust prompt is the one place a person decides whether something from the repository runs (D8): before this, a long command was cut to fit the terminal, so npm test && curl … | sh could show as npm test && cu…, and an escape code could make the end of a command invisible. Rejected. Refusing control characters when files are read (a description is free text, other tools write these files, and a board must open whatever is in it). Filtering each field where it is printed (one missed field is a hole; one filter at the point of writing has none). Showing the trust prompt's commands as JSON strings (correct, but people read shell commands better as written).

D-041. The CLI reference is generated, and the docs gate keeps it current

What. docs/CLI.md is written by npm run docs from the command table, the operations' input schemas and the error codes: the same sources as clara help, through cli/reference.ts. The docs gate runs node scripts/docs.mjs --check and fails when the committed file differs. The script loads the TypeScript sources with tsx, which is already a dev dependency. An error code is added to ERROR_CODES with the code that raises it, never before, and a test checks that every listed code is raised somewhere. Why. The brief asks for a CLI reference generated from the registry, and a hand-written one drifts on the first new flag. Generating from the sources help uses means the reference and clara help cannot disagree. Unit tests hold the generator to every command, flag, alias, example and error code, and check that every link resolves to a heading. Rejected. A clara help --markdown command (it would ship the generator in the bundle every user downloads, for a file only this repository needs). Generating from the built bundle (it exports no help functions, and exporting them would widen the published API). Leaving reserved codes in the table with a note (a reader of the reference cannot tell a reserved code from a real one at a glance; the tests can).

D-042. The CLI remembers the parsed board between commands

What. Each command used to read and parse every file of the board, so clara list on 1,000 tickets sat at its 200 ms limit and went over it on a clean checkout (200.9 ms). Now the CLI keeps what it parsed in one file per board under CLARA_HOME/cache/ (folder mode 700, file mode 600), named by a hash of the board's real path. A file is reused only while its disk tag is the one it was parsed at: size, modification time and change time to the nanosecond, and inode, the four that Git's index trusts. The change time is new in the tag (D-029's consequence (4) is updated): a program can set a file's modification time back, but not its change time. The cache is stamped with a digest of the library's sources and the lockfile, made at build time, so a cache written by one version of Clara is never read by another; run from the sources there is no digest, and each process counts as its own build. A file whose change time is within 5 s of the command's start, by the machine's clock, is not kept: on a file system with a coarse clock, a second edit of the same size in the same tick would keep the tag (Git calls such a file "racily clean"). The cache is written only when it would spare the next command some reading, through a temporary file renamed into place. A cache that cannot be read, is cut short, or was written by another build or for another path is treated as empty; one that cannot be written is left alone. Deleting it is always safe. The steady-state clara list is 141 ms and is the enforced budget; the first command on a board, which parses everything and writes the cache, is 200 to 225 ms and is reported but not enforced (docs/BENCHMARKS.md). Why. Parsing a thousand files with schema checks is most of what a command does past Node's start-up, and almost none of those files changed since the last command. Keeping the parsed board is the fix that scales with the board, where the alternatives each shave milliseconds. The cache is per person and outside the repository, so nothing a clone, a pull or a pull request brings can stand in for what the board's files say: every file is still looked at on every command, and a changed tag means the file is read again. The data in it is trusted to be Clara's own (it is restored without the schema checks, which is what makes it fast), so it lives where only this person can write. Consequences, accepted. (1) The first command after a board is cloned, or after Clara is updated, pays about 20 ms more than before to write the cache. The budget's wording is "clara list on 1,000 tickets", and the number a person sees on the second and every later command is the one enforced; the first-run number is printed beside it so nobody mistakes which is which. (2) A board whose files all changed in the last 5 s (just cloned, just checked out) is read in full until they settle. (3) A board that is deleted leaves its cache file behind, a few hundred KB for a thousand tickets, until CLARA_HOME/cache is cleared. (4) The cache holds a copy of the board's text in the user's home folder, readable by that user only. Rejected. Node's compile cache (12 ms here, rejected again for the reason in D-038). A cache inside .clara (a clone or a pull request could ship a cache that disagrees with the files, and .clara is the repository's, not the person's). Trimming syscalls instead: opening files with O_NOFOLLOW to drop the second look per file, or reading tags lazily, about 12 ms each and both split by operating system. Raising the limit (the brief sets it; a budget moved when it is hit is not a budget). Checking the cache's records against the schemas when it is read (it costs most of what the cache saves, and guards only against a person editing their own cache file). Replaced in part by D-123: Node's compile cache is used, under CLARA_HOME/cache/node, and the cache file is named by an FNV-1a hash.

D-043. Clara's remaining work lives on Clara's own board, reviewed by gates until launch

What. From M2 on, the work left to do is tickets in this repository's .clara: an epic per milestone, the current milestone's work split into tickets in todo, later milestones as epics in the backlog until they start. The build agent works them as agent:claude: claim, commit, clara verify, clara complete. review.mode is gates, so a ticket in review is approved once lint, typecheck and the tests pass on the commit it names. clara init and every ticket were made as agent:claude. The two settings an agent may not change (review.mode and people) were set under the owner's git identity, by the build agent, on the owner's written instruction in the brief; the log shows those two events under the owner's name, and this entry is the record of who actually typed them. The checks run under a CLARA_HOME in the OS temporary folder, never the owner's real one, and trust was granted there. Why. The brief asks for it, and it is the honest test of the product: every rough edge an agent meets working a Clara board, this one meets first. Gates review lets one unattended agent finish a ticket without waiting for a person who is not there, and only after the same checks CI runs have passed. For the maintainers. Switch review.mode to human after launch (clara config review.mode human). Gates review exists for a board with no person watching; once there are people, a person should approve what agents finish. Rejected. Letting the agent set review.mode itself (Clara refuses it, rightly: an agent that could lower its own review bar would need no review). Keeping the remaining work in a Markdown list in PROGRESS (it would prove nothing about Clara). Putting every later milestone's tickets on the board now (they would be guesses; each is split when its milestone starts, with what the one before taught).

D-044. A key in event data means one thing in every kind

What. Before this, from and to could be statuses (moved), setting values (config_changed) or format versions (migrated). points was a ticket's estimate on ticket events and a sum on sprint events. tickets, events and files were lists in some kinds and counts in others. reason was a person's words on blocked and the name of a mechanism (epic) on moved. done was a list of ticket ids on sprint_closed and a list of criteria numbers on checkpointed. Now each key has one meaning, listed in docs/FORMAT.md under "What each key means". The renamed keys are: via (what made Clara change a ticket, gates or epic), ticked and unticked (criteria on checkpointed), total_points (a sum on sprint events), setting, old_value and new_value (config_changed), from_version and to_version (migrated), files as the list of paths written (migrated), old_id (renumbered), event_count (a repaired log), and tickets as the list of ids re-ranked (repaired ranks). Why. Replay, the timeline of a ticket and doctor read keys without looking at the kind first, and so will every tool built on the log: the brain in M6, GitHub sync in M7 and anyone's script. A key that is a status in one kind and a version number in another is a bug waiting for its first reader. Doing it before 0.1.0 means no released board has the old shapes. Lines this board's own log already has keep working, because every key replay and concerns read kept its meaning; a test replays one history written both ways and gets the same board. Rejected. A schema per kind with a version on each line (the right tool when a format has outside readers to keep, which it does not yet; it would add a check to every line read for a problem that renaming removes). Leaving the old names and documenting the exceptions (the exceptions are what readers get wrong). Rewriting the old lines in this repository's log (the log is append-only and the history it records is true).

D-045. clara verify and trust were brought forward from M5 to M2

What. The brief lists verify with the agent commands, built with the conductor in M5 (D8, D9). M2 builds it: clara verify <id> runs the board's checks in the checkout at its current commit and records the result as a verified event (D-013). clara trust and the trust prompt came with it, because checks are commands from the repository's config. The operation that records a result, verify.record, is on no door: no command, MCP tool or web route can record a result without the checks running. The conductor in M5 will run checks through the same runChecks. Why. M2's proof is Clara's own board worked by agent:claude with review.mode set to gates (D-043), and D3's rule 6 says complete needs passing results for the commit when the project has checks. Without verify in M2, that board could not have finished a ticket. Rejected. Results recorded by hand (an agent could report checks it never ran). Waiting for M5 (M2's work would have been reviewed by nothing).

D-046. Trust is kept per repository under CLARA_HOME, tied to the exact commands

What. The commands that need trust are the board's checks and its conductor.setup commands. The answer is kept in CLARA_HOME/trust.json (default ~/.clara-pm), one record per repository, keyed by the real path of its main checkout, with a SHA-256 digest of every command's kind, name and text in a fixed order. When any of them changes, by a pull or by hand, the digest no longer matches and Clara asks again, saying they changed. clara verify asks in the terminal; with no terminal, or with --json, it refuses with NOT_TRUSTED and the hint names clara trust. clara trust shows the commands whole (D-040) and whether they are trusted; --yes trusts them without the prompt, --revoke forgets. The file is written to a temporary file and renamed, mode 600 in a folder of mode 700. A file that cannot be read counts as nothing trusted. Why. The brief says it: shown and asked in the terminal, stored under CLARA_HOME, never granted by the web UI. A record inside the repository would let a repository trust itself. One digest over the whole list means a new command cannot ride on trust given to the old ones. The real path means a link to the repository is the same repository. What it does not do. An agent that can run commands can run clara trust --yes too. Trust protects a person from a repository's commands running unseen; what an agent may run is the job of D8's permission modes. Rejected. Trust per command (a person reads the list, so the answer is about the list). A key from the remote URL (two clones of one remote can be on commits with different commands). --yes only on a terminal (a person who has read clara trust may script the rest; --yes is that person's answer, typed).

D-047. clara verify refuses a checkout with uncommitted changes

What. Before running anything, verify asks git for tracked files with changes, staged or not, outside .clara. If there are any, it refuses with UNCOMMITTED_CHANGES, names up to five, and runs nothing. Untracked files do not count, and neither does the board, which the work itself changes. A checkout with no commit is refused with GIT_ERROR. Why. The result is recorded against a commit, and complete and gates review treat it as a fact about that commit. Checks run on changed files test code that no commit holds; the pass would be attached to a commit that might fail them. Rejected. Running the checks in a clean copy (a second checkout and install for every run; the conductor gets that with its worktrees in M5). Stashing the changes for the run (Clara never changes a person's working files). Recording the run with a "dirty" mark (a pass that complete would then have to refuse anyway). Counting untracked files (build output and scratch files a project forgot to ignore would block every run).

D-048. clara complete hands in the commit the checkout is on

What. When --commit is not given, the CLI passes the commit of the checkout it runs in, the one clara verify checks (D-055). The operation itself has no default: code calling ticket.complete names the commit, or is refused with COMPLETE_UNVERIFIED when the board has checks. The commit must be the one the ticket's latest verified event ran on, and that run must have passed every check the board has now. Why. The flow is commit, verify, complete, in one checkout. Typing a hash in that flow only adds a chance to paste the wrong one. The library cannot default it, because it does not know which checkout its caller means: an agent over MCP may work in a worktree the server does not run in. Rejected. Defaulting to the last verified commit (it would always match, so work committed after the checks ran would go to review under the old pass). Requiring --commit (see the flow).

D-049. clara on its own is the home screen

What. In a board, bare clara shows the project and its active sprint, what needs you (blocked tickets, tickets in review, mentions), what is in progress, and up to five ready tickets, then a count of files that cannot be read, if any, and the hint clara help. Outside a board it says there is none; on a terminal it offers to set one up (Enter means yes), and without one it names clara init. In a git worktree whose main checkout has no board, it names the main checkout instead of offering, since init refuses there (D-055). --json prints the same as data: the board's key and name, the active sprint or null, what needs you, what is in progress, the ready tickets shown and how many are ready, and the files that cannot be read. Outside a board it prints {"board": null}. Help is clara help or --help. Why. The command a person types with nothing in mind should answer "what now", which is what they came for. A wall of help on every bare run teaches nothing after the first time. Rejected. Help on a bare run (the git and npm habit, but those tools have no state to show). The full board (clara board shows it; the home screen picks what needs a decision).

D-050. clara open without a terminal prints the path

What. On a terminal, clara open <id> starts $VISUAL, else $EDITOR, else vi (notepad on Windows) on the ticket's file. With no terminal, as in a script, an agent or a pipe, or with --json, it starts nothing and prints the file's path ({"path": …, "opened": false} in JSON), with exit code 0. Why. An editor needs a terminal. Started without one, it either fails or waits for input nobody can give, which leaves an agent hanging. The path is what a program asking to open a file needs. Rejected. Refusing without a terminal (the path answers the question, so an error would only make the caller ask again). Opening the system's default app (it would start a window on a machine that may have no display).

D-051. A write that changes nothing says "Nothing to do"

What. When a command that writes finds the ticket already as asked (moving it to the status it has, assigning the person who holds it), the operation writes no file and no event, and the CLI prints Nothing to do: <ticket> is already that way. with exit code 0. --json prints the ticket as usual. Why. Agents retry. A retry of a command that worked must not fail, and must not add a second event that says the same thing happened twice. Saying so in words keeps a person from thinking a change was made. Rejected. An error for a no-op (a retried command would fail after it had worked). Printing the usual success line (it would claim a change that did not happen).

D-052. clara search matches every word on its own

What. clara search sign links finds tickets whose id, title or description contains each word, anywhere and in any case. It is clara list with one text: term per word, joined by "and". --archived searches the archive too. Why. People search with the words they remember, not the phrase as written: "sign links" should find "Send sign-in links". Rejected. Matching the whole phrase (misses on word order and hyphens; clara list 'text:"…"' does that for anyone who wants it). Fuzzy matching with a score (results nobody can predict, and nothing to rank them by yet).

D-053. Near-miss suggestions, and nothing runs by prefix

What. An unknown command, subcommand, flag, flag value, setting, completion shell, saved view, release (in clara release show) or ticket id gets Did you mean …? naming the closest real one; for a ticket id the candidates are the tickets that lookup would accept, archived ones included where it takes them (CLA-34), and an id with another board's key names the same number on this board. In a query, an unknown field or value gets the same choice as a fix at its column: Replace "a" with "assignee". The closest is the smallest edit distance, at most a third of the typed length and never less than one. A name that starts with what was typed counts as half an edit, and so does a name that what was typed starts with, but only when that name has three letters or more, so lsit suggests list, not the alias ls, while a still finds assignee. A command runs only by its exact name or alias, never by a prefix or a guess. Why. A suggestion costs one retype; a guess that runs the wrong command can change the board. Two-letter aliases begin many misspellings of the names they stand for. Rejected. Running a unique prefix (clara comp for complete): a later command that shares the prefix would change what old scripts do, without a word.

D-054. Who is acting: --as, then CLARA_ACTOR, then git, then the login name

What. The actor is --as when given, else CLARA_ACTOR, else the repository's git user.name, else the machine's login name. The last two are made into a board name: lower case, spaces to hyphens, accents dropped, other characters removed, at most 40 characters. An empty --as or CLARA_ACTOR counts as not given. A value that is given must be a valid actor and may not be system; an invalid one is an error, never a reason to fall back. When nothing gives a name, the error says the three ways to give one. Why. The conductor names the agent it starts with CLARA_ACTOR, so the agent's commands act as it without passing --as on each. --as comes first so one command can act as someone else. The git name is the one a person has already given their tools, and the login name lets a fresh machine work. An empty value means a script's variable was not set, which is not a request to act as nobody. Not authentication. Anyone who can run clara can pass any name, as anyone who can commit can set any git name. The log records who Clara was told was acting; the repository's history records who pushed. Rules such as "an agent may not approve" (D-012) hold for honest callers and for the agents the conductor runs, not against a person set on lying. Rejected. Asking for a name on first run (it blocks scripts and agents). A Clara-only setting for the name (one more place to keep in step with git). Falling back past an invalid value (a typo would act as someone else).

D-055. Inside a worktree, the board is the main checkout's and the checks run in the worktree

What. Inside a linked git worktree, Clara reads and writes the main checkout's .clara, as D13 asks, not the worktree's copy. clara verify runs the checks in the worktree it was started in, at that worktree's commit, and clara complete hands in that commit (D-048). Trust is keyed by the main checkout, so one answer covers its worktrees. clara init in a worktree refuses with NO_BOARD, names the main checkout and writes nothing, and bare clara there says the same instead of offering a set-up (CLA-33). Made from the worktree, the board would land in the main checkout, on whatever branch that has, while the worktree read "Created". Why. Agents working in parallel worktrees must see each other's claims; a board per worktree would be one board per branch, merged only when the branches are. The code handed in is the worktree's, so that is where its checks run. Rejected. The worktree's own .clara (two agents could hold one ticket, each on its branch). Running checks in the main checkout (it is on another commit).

D-056. How the CLI writes its output

What. Data goes to stdout; errors and warnings go to stderr. A failure is error: <message>, or refused: <message> when a rule of the board said no, and on the next line a hint that names a command to run. The exit code says what kind of failure it was: 1 for something missing or broken, 2 for a malformed command, 3 for a rule of the board saying no (the table is in docs/CLI.md). --json prints one JSON value on stdout and nothing else, and a failure as {"error": {…}} on stderr with a stable code. -q prints only what was asked for: the id after add, no hints or warnings. Hints are dim, one line, and name a real command (a test holds every hint to the command table, CLA-11). Colour is on for a terminal; NO_COLOR turns it off and wins over FORCE_COLOR, and --color or --no-color wins over both. Times are shown in UTC and say so. Text from the board passes the terminal filter (D-040). Why. Scripts and agents read stdout and exit codes, and people read the hints. One stream for data means an error never lands in a pipe's data. Separate exit codes let an agent tell "I typed it wrong" (fix the command) from "the board said no" (choose other work) without reading the message. Rejected. Exit code 1 for every failure (the agent must then read the message). Hints on stdout (they would land in the data of every pipe).

D-057. clara init without a terminal takes what it finds

What. On a terminal, clara init asks for the project name (the folder's), the ticket prefix (made from the folder's name), and whether to keep the checks it found: the lint, typecheck, check and test scripts of package.json (run with the package manager its lockfile names, and never npm's placeholder test), cargo test, go vet and go test, ruff and pytest named in pyproject.toml, and a Makefile's lint and test when nothing else is found. With --yes, with --json, or with no terminal, it takes those without asking; --name and --key set them. The person running it is added to people; an agent is not. The checks it writes still need trust on each machine before they run (D-046). Why. Agents and scripts set boards up too, and a prompt with no terminal would wait for ever. What init finds is what a person accepts almost every time, and everything it writes can be changed with clara config. Rejected. Refusing to run without --yes when there is no terminal (a second try for no gain: init refuses when a board exists, so it cannot overwrite one). Trusting the checks it found (the board is committed for everyone, and trust belongs to each machine).

D-058. A length limit counts characters, and Zod and the JSON Schemas agree on it

What. Every length limit on a field Clara stores (a title's 200, a name's 40) counts Unicode code points, not UTF-16 units, so an emoji is one character. The finding: Zod 4's min and max already count code points (checked on 4.6.7: three emoji pass max(3), and e with a combining accent fails max(1)), as JSON Schema's maxLength does. The patterns agree too: each one that accepts characters beyond ASCII (names, labels, single-line text, links) carries the u flag, and the rest (ids, keys, ranks, slugs, event kinds) accept ASCII only, where the flag changes nothing. A property test feeds text with characters outside the Basic Multilingual Plane, at each limit and either side of it, to both the Zod schema and the published JSON Schema, and holds their answers equal (CLA-4). The query language's 2,000-character guard is the exception: it counts UTF-16 units, as its error positions do, because it limits work, not what is stored. Why. A title that fits for Clara and fails in an editor's schema check, or the other way round, is a bug a person cannot see. Counting what a person sees as one character (near enough) is the only rule they can predict. Rejected. Counting grapheme clusters (they depend on the Unicode version of the reader, so two tools could disagree about the same file). Counting UTF-16 units (an emoji title would hit its limit at half the length).

D-059. What a check prints is kept only when it fails, and with secrets hidden

What. clara verify records each check's result in the activity log, which is committed and pushed. A passing check's output is not kept (tail is empty). A failing check keeps the last 4,000 characters, and before they are kept two nets hide what they can as [hidden]: the values, 8 characters or longer, of environment variables whose names say they are secret (a part such as TOKEN, SECRET, PASSWORD, KEY, AUTH, PAT or DSN, or TOKEN, SECRET, PASSWORD, APIKEY or CREDENTIAL anywhere in the name), and the shapes of well-known tokens (GitHub, npm, sk- keys, Stripe, AWS key ids, Slack, Google API keys, JWTs, private key blocks, Bearer credentials, and a password in a URL). The runner hides both before it cuts the tail, so a cut cannot split a secret; verify.record hides the shapes again, whoever calls it. Checks still get the whole environment: a test suite needs PATH, and often the tokens it tests with. Found by M2's fresh-eyes review. Why. D15: secrets never enter the repo or a log. A test that fails often prints its environment or its config, and a token in the activity log is in git history for good. A passing check's output says nothing the tick does not. Rejected. Keeping all output (it is the leak). Keeping no output (a person reading a failure on the board, or an agent resuming after one, needs it). Running checks with a cleaned environment (it breaks the test suites that need their tokens, and the output nets catch what they print). Keeping output in .local instead (the board and the conductor read the log; two places for one result drift).

D-060. A flag between the words of a text is refused, not taken

What. Where a command's last argument is free text (<text>, <title>, <reason>, <summary>, <answer>), a flag with words of that text on both sides of it is refused with exit 2: clara comment 12 Run it with -q to see says -q is inside the words of <text> and asks for quotes or for the flag after the text. The rule covers the command's own flags and the global ones (--as, -C, --json, -q, --color, --help), which the parser takes out first but whose places it keeps. A flag before the text, after it, or after -- is a flag as before, and quoted text is one word whatever it holds. A query is not text: clara list status:todo --json type:bug still reads --json as a flag. Found by M2's fresh-eyes review (CLA-38). Why. Unquoted, clara comment 12 Signed off by --as agent:bot posted "Signed off by" as agent:bot, and -C <folder> inside a comment wrote to another board. The person may have meant the flag or the word; either guess is wrong half the time, and a wrong guess acts as someone else, writes somewhere else, or drops words without a sign. Refusing costs one retype and is never wrong. Rejected. Taking the flag silently (the bug). Reading everything after the first word of the text as text (a flag after the text, clara comment 12 Looks good --as agent:bot, is the common way to type it, and would become part of the comment). Refusing only the global flags (--question inside a block reason has the same problem).

D-061. A setting Clara does not know is kept, never written by clara config, and named by doctor

What. config.set refuses a dotted name that is not a setting of this version (revew.mode, review.mod, stale_after_minute, checks.first), with exit 2 and the setting most likely meant ("Did you mean review.mode?"), and refuses a JSON value that brings an unknown key in (clara config review '{"mod":"agent"}'). --unset still removes any key. The known names come from the config schema itself, walked through its objects, lists and named-key records, so a setting added to the schema is known without a second list. clara doctor warns once for each unknown key in config.json, with the setting meant, and offers no fix. Keys Clara does not know still survive every rewrite (FORMAT.md). Found by M2's fresh-eyes review (CLA-39). Why. The sections of config.json are loose so a newer Clara's settings outlive an older Clara's rewrite. That made a typo a silent no-op: clara config revew.mode gates said "Set revew.mode to gates.", the board kept reviewing by hand, and doctor said all was well. A setting that does nothing must say so where it is written and where it is checked. Rejected. Strict sections (a newer Clara's settings would be dropped or would break an older one, the problem looseness solves). Letting config.set change an unknown key already in the file (a typo written by hand would stay settable; a newer Clara's setting is better changed by the Clara that knows its values). An error from doctor (a newer Clara's setting is not a fault). Removing unknown keys in doctor --fix (it cannot tell a typo from a newer setting).

D-062. An archived ticket counts as a finished dependency only if it was done

What. A ticket that depends on an archived one waits for it unless the archived ticket is done, the same rule as for a live one: archiving is not finishing. When clara archive moves an unfinished ticket, its warning names the live, unfinished tickets that depend on it, in number order, and gives the way on: WEB-1 was todo, not done, so WEB-2 still waits for it. To go on without it, run clara unlink WEB-2 depends_on WEB-1. (with several, <id> in place of the one id). clara show lists the archived ticket under what the dependent waits for. The archive's description, the CLI reference and the code comment on Board.archived said an archived ticket "still counts as a finished dependency"; they now say what the code does. Found by M2's fresh-eyes review (CLA-40). Why. Work that was dropped, not done, is the common reason to archive an unfinished ticket, and a dependent of dropped work has a question a person must answer: drop it too, do it another way, or go on without it. Letting it through silently would hand an agent work whose groundwork does not exist. Keeping it waiting is safe, but out of sight on the board it is a mystery; naming it at the moment of archiving puts the decision with the person who made the first one. Rejected. Counting every archived ticket as finished (what the docs said; it starts work whose prerequisite never happened). Removing the dependency links when archiving (it destroys a record the person may want after restore, and archive must be undoable). Refusing to archive a ticket that others wait for (it makes a person unlink by hand first, for what is usually the right call).

D-063. Text that starts with a dash is refused with the command that keeps it

What. A word that starts with a dash and names no flag of the command is still refused (exit 2), but the refusal now says what to type instead. A word with a space before any =, such as "--help is broken", can name no flag, so the message says it is text read as a flag rather than calling it an unknown flag. Where the word would have been part of the command's text (<title>, <text>, <reason> and the like, at or after the text's place), the hint gives the command line as typed with -- before that word, quoted for a POSIX shell: clara add -- "--help is broken", clara comment 1 -- "--dry-run does nothing". A mistyped flag keeps its "Did you mean" and gains the -- way as the second choice. Before the text's place, in a command with no text, and in a query (whose words are not text), there is no -- tip, since -- there would make the word an id or a query term. Past 100 characters the hint describes the change instead of spelling the command. The CLI reference says that every word after -- is text. Found by M2's fresh-eyes review (CLA-41). Why. A ticket titled after a flag (--help is broken, -x flag missing) is ordinary in a tool for developers, and the old error, "Unknown flag --help is broken", named a flag nobody typed and did not say the one thing that works. An example built from the words as they were typed can be copied and run. Rejected. Taking a spaced word as text without asking (a flag typed with a space by mistake would become a title; refusing costs one retype). Treating every unknown flag as text (a mistyped --prio would become part of a title). Quoting for Windows cmd too (its rules differ by program; the double-quoted form is shown whenever it is safe, and it works there for ordinary text).

D-064. The CLI says a bad value in its own words: the flag, and the command's help

What. When a command's own operation refuses its input, the CLI names what the person typed: --due: must be a date such as 2026-12-01. instead of ticket.create: due: must be a date such as 2026-12-01., with `clara add --help` says what each takes. instead of the general pointer to clara help. A positional is named as the help names it (<title>), a list's value by its place counted from one (--labels, value 3). Only fields the person typed are renamed, and only for the command's own operation; anything else (a field the command filled in, another operation a custom command called, a refusal without issues) is passed on as it was. The error's details keep the operation's names (operation, issues[].path), so --json readers get the same machine-readable shape as before. clara config key now says the key stays as it is and that clara config lists what can change. Found by M2's fresh-eyes review (CLA-42). Why. The person typed --due; they never saw ticket.create or due. An error is read once, at the moment something went wrong, and should need no translation. The command's help is the page that says what --due takes. Rejected. Changing the operation's message for every door (MCP and the web send fields by their names, so the field is the right word there). Renaming every issue whose name matches a flag (a field the command filled in itself would be blamed on a flag the person never typed). Dropping the operation's names from details (scripts may read them).

D-065. A renumbered ticket's log keeps the creation it was made with

What. When clara doctor renumbers one of two tickets that two branches made under one number, its renumbered event already names the created event it replaces (data.event). clara log <id> (op activity.list) now reads that: the creation belongs to the ticket's new number, not to the number it was made with, and a ticket renumbered again is followed to its last number. The log shows the move as renumbered from GEN-2. Before, clara log 2 showed both creations and clara log 3 only the renumber. The events themselves are unchanged; only where the log files them. Found by M2's fresh-eyes review (CLA-43). Why. A ticket's history should start with its own creation, under its own title. The link was already recorded at repair time, so following it costs a pass over the log, not a new event kind or a rewrite of history. Rejected. Rewriting the old created event to carry the new id (the log is append-only; a rewrite would change shared history on every clone). Moving every event on the shared number between the creation and the repair (the log auto-merges, so which branch did each one cannot be known; they stay with the ticket that kept the number, and the operation's description says so). A new moved_history event per old event (noise, for a fact the renumber already records).

D-066. Number flags take plain digits

What. A number flag (--points, --limit, --done and the rest) takes digits, perhaps with a minus and a decimal part: 5, 0.5, -2, 007. JavaScript's other forms, which Number() used to let through, are refused with exit 2: 0x10, 0b11, 1e1, +5, .5, 5., 1_000. When such a form is a number that would fit, the hint names it in plain digits (Write it in plain digits, as 16.). Spaces around the digits are dropped, as they are around a list's items, and -0 is read as 0. The query language already took only plain digits. Found by M2's fresh-eyes review (CLA-44). Why. --points 0x10 setting 16 points without a word is a surprise, and surprises in estimates spread through velocity and burndown. Nobody writes story points in hex, so a hex value is a typo or a test of the tool, and either way saying so is better than guessing. Rejected. Refusing padded numbers too (" 5 " has one meaning, and list items are already trimmed). Accepting exponents for large numbers (no field of Clara's needs them). Changing clara config set, whose value is JSON, where 1e1 is a JSON number.

D-067. Installs run no scripts, tool versions are chosen, and a person starts every release

What. Every npm ci in the workflows passes --ignore-scripts. Two development tools have install scripts: esbuild checks its binary, and fsevents builds on macOS. Neither is needed, because esbuild's platform package carries the binary. Bun in CI is pinned to an exact version (1.4.4), not latest; Node is named by its major line. .github/workflows/release.yml publishes to npm with --provenance. It starts only by workflow_dispatch, refuses unless the version typed matches package.json, runs every gate first, does a dry run unless told otherwise, and runs in an npm environment that can require a second person. It authenticates with npm's trusted publishing (OIDC, id-token: write, the only write permission besides CodeQL's). An NPM_TOKEN environment secret is read only if present, for the first version, and is written to a temporary .npmrc as ${NPM_TOKEN}, never expanded into a file. test/security/supply-chain.test.ts holds every workflow to these rules: actions pinned by commit hash, read-only defaults, an allowlist of write permissions, no ${{ }} inside scripts, no kept checkout token, pull_request_target only where nothing is checked out or run, and no floating tool versions. The test was mutation-checked: 13 weakenings of the workflows and the manifest, and four floating Bun versions, each caught. Why. D15 asks for no install scripts, a committed lockfile, pinned actions with least privilege, and provenance. An install script in a development tool runs with the CI token in reach, so the safest number of them is zero. A version named latest changes the build without a commit saying so. Publishing is irreversible (B5), so a person starts it and confirms the version. Rejected. release-please on every push to main, as the brief's E-section describes. It needs contents: write and pull-requests: write on every push, and the brief puts its human steps in the launch kit. It comes with M11, behind a repository variable as the brief says, and will reuse this workflow's publish job. Publishing with a long-lived token stored as a repository secret (trusted publishing makes it unnecessary after the first version). Pinning Node to a patch version (its patch releases are security fixes, and the matrix tests three majors).

D-068. Only a person can trust a board's commands

What. clara trust --yes refuses an agent with PERSON_ONLY (exit 3). The agent may be named by --as agent:<name> or by CLARA_ACTOR. An agent at a terminal is shown the commands but is not asked whether to trust them, and neither clara verify nor clara complete asks on an agent's behalf. Their refusal tells the agent to ask a person. An agent can still read the commands with clara trust and take trust away with clara trust --revoke. Found while writing docs/SECURITY-MODEL.md (CLA-35): before this, clara trust --yes --as agent:claude granted trust. Why. D8 makes trust a person's decision, taken in the terminal. An agent may have read a ticket written to get a cloned repository's commands run. If it can grant trust, it can be told to run anything the repository names. The guard costs nothing for an honest agent: trust is asked for once per repository, and a person is there to give it. Rejected. Refusing clara trust for agents altogether (reading the commands is how an agent explains to its person what needs trusting). Refusing --revoke (taking trust away is always safe). Trusting the actor name less than the terminal, by asking anyway at a terminal (an agent driving a pseudo-terminal can type y).

D-069. A list says when it leaves out a ticket it cannot read, and open opens it

What. Every operation that lists or counts tickets warns when a ticket file cannot be read: ticket.list (so list, board, search and standup), ticket.next, activity.inbox, sprint.list, sprint.show, sprint.start, sprint.close, release.list and release.ship. The warning reads 1 ticket file cannot be read, so it is left out. \clara doctor` says how to fix it. and counts the archive's files only where archived tickets are read. A command prints each warning once, however many operations it runs (clara standupruns five), and--quietdrops it. The home screen keeps its own last line,N files cannot be read, instead of the warning. clara openon a ticket that cannot be read opens its file anyway, or prints the path without a terminal, with a warning saying why it cannot be read.showand every write still refuse it withPARSE_ERROR. The YAML parser's reason now ends with a full stop instead of the colon that introduced a code frame Clara leaves out. Found by M2's fresh-eyes review, finding #5 (CLA-45). **Why.** A list that quietly skips a ticket tells the person the ticket is gone. That is worse than an error: nobody runs clara doctorfor a problem they cannot see, and an agent asking for the next ticket would never learn one is stuck. Opening the file is how a person fixes it, so refusing to open it sent them looking for the path by hand. **Rejected.** Showing a placeholder row for the broken ticket (its status, priority and rank are unknown, so any column it landed in would be a guess). Failing the whole list (one bad file, perhaps from a merge, would stop everyone's board). A warning in each operation's JSON output (warnings already go to stderr for every door; the home screen's JSON still carriesproblems`).

D-070. A check is over when its command ends, whatever it left running

What. clara verify waits for a check's output until the command ends, then up to one more second for the last of it. If something the check started is still running and holding the output open, such as a server put in the background, the runner stops waiting, adds The check ended, but something it started is still running and holding its output open. to the result, and the check passes or fails by its own exit code. A check past its timeout_s is stopped with everything it started: its process group gets SIGTERM, then SIGKILL after five seconds; on Windows, which has no process groups, taskkill /t /f ends the tree. Found when hosted CI ran on Windows (CLA-46). Why. Node's close event waits for every holder of a pipe. On Windows, ending the shell left the program it started holding the output, so a timed-out check kept clara verify waiting for good. The same wait caught a check that exits cleanly but leaves a program behind, on every system. A run that never returns is worse than any answer it could give. Rejected. Failing a check that leaves something running (its exit code is what it reports, and the note says what happened). Killing what it left behind (a program in a session of its own is out of reach anyway, and stopping something the person may have meant to start is not Clara's call). Waiting until the timeout (ten minutes by default for a check that finished long before).

D-071. On Windows, clara list on 1,000 tickets is held to 400 ms

What. The budget is enforced on every system. Its limit is 200 ms on macOS and Linux, as the brief sets it, and 400 ms on Windows. The Windows limit comes from the first hosted run that measured it: run 44199352044 at e8dc257, windows-latest with Node 24, best of 15 runs, 303.8 ms. The same run measured 124.2 ms on Ubuntu and 151.6 ms on macOS. The budget run now also prints how long git config user.name takes on the machine, next to Node's own start-up, because clara list asks git who is running it. This replaces D-037 (CLA-13). Why. On that runner, Node takes 46 ms to start against 19 ms on Ubuntu, and reading the board data for 10,000 tickets in one process takes 211 ms against 51 ms: everything that opens a file or starts a process is two to four times slower there. Holding Windows to 200 ms would fail every run for a cost of the system rather than of Clara. Reporting it without a limit would let a real slowdown pass unseen. The headroom, about 30%, covers the variation between hosted machines while still catching a change that makes the command markedly slower. Rejected. Keeping it reported only (a regression would go unseen). Holding Windows to 200 ms (red on every run until Windows itself is faster). A limit of 600 ms or more (a doubling would pass). Reading git's config files directly instead of starting git, to save that start-up (git's own rules for which file wins, include and includeIf among them, are what decides the name; a copy of them that is wrong even once puts work under the wrong person).

D-072. Context packs come with the agents' door; relevance by labels and files waits for the brain

What. ticket.context, idea.get and project.standup are operations now, in M3, because the MCP tools clara_context, clara_project and clara_standup need them. A context pack holds the ticket, its criteria, handoff note, open review notes and answered questions, what each dependency delivered (its summary, commit and pull request), the epic, the opening of idea.md, recent comments and the checks. It is built from explicit links, the epic and the activity log, within a budget in characters, and says what it left out. Two of D10's relevance signals are not built: related tickets found by shared labels, and by overlap in the files they touched. Both come with M6, and docs/STATUS.md lists them under the brain. Why. An agent that claims a ticket over MCP needs its context in the same call, or it reads the board ticket by ticket. The explicit links are what a person wrote down, so they are never wrong. Label and file overlap rank guesses, and need the file history M6 collects for playbooks; building them now would mean building that history twice. Rejected. Leaving clara_context out of M3 (the agents' door would open onto a ticket with no context). A context pack measured in tokens (that needs a tokenizer per model; characters are honest and the budget says so). Ranking by text similarity (D10 rules out embeddings).

D-073. Sixteen MCP tools now, three later, and nothing else over MCP

What. The MCP server offers 16 of the 19 tools D5 names: clara_project, clara_next, clara_list, clara_get, clara_context, clara_create, clara_update, clara_claim, clara_release, clara_checkpoint, clara_block, clara_comment, clara_complete, clara_review, clara_sprint and clara_standup. clara_plan_propose and clara_knowledge_propose come with planning and the knowledge base (M6), clara_permission with dispatched runs (M5); none is advertised before its operation exists. Each tool runs operations from the registry: clara_project runs project.show and idea.get, clara_review runs ticket.approve or ticket.request_changes by its verdict. The mcp door is now on exactly the 18 operations a tool runs; nine operations lost it (ticket.move, link, unlink and rank, sprint.list, release.list, activity.list, activity.inbox, doctor.check). A test holds the door list and the tools to each other. Why. D5 caps the set at twenty because every tool costs an agent context on every turn. A door on an operation no tool runs is a promise nothing keeps, and the registry is what the docs are generated from. Moving a ticket by hand, linking and ranking are planning acts a person or the command line does; the tools cover an agent's loop of find, claim, read, checkpoint, ask, comment and hand in. Rejected. One tool per operation (40 tools, past the cap). Advertising the three later tools with a "not built" refusal (B5: no fake features). A generic clara_run tool taking an operation name (an agent could not see what each does, and annotations could not say which ones only read).

D-074. Over MCP, Clara acts only for agents

What. Every MCP call acts as agent:<name>. The name comes, in order, from clara mcp --as agent:<name> or CLARA_ACTOR when it names an agent, then the call's actor argument, then the agent behind the client's name (claude-code is agent:claude; a client Clara does not know becomes its name as a slug), then agent:mcp. A person named in CLARA_ACTOR is ignored with a note on standard error, since the same variable may be set for the person's own shell; a person named by --as is refused, since it was asked for by name. An actor argument is always read as an agent: ada means agent:ada. When the server was started for one agent, an actor naming another is refused. The HTTP server (M8) will take the agent from a header the same way. Why. D5 says an MCP caller can never act as a person, and the review rules depend on it: an agent may not approve its own work, and only a person approves in human mode. The client's name is the one fact an agent cannot easily get wrong, so it is the fallback; the environment wins because the conductor (M5) sets it for the runs it starts. Rejected. Refusing every call when CLARA_ACTOR names a person (it would break an agent started from a shell where the person set it for themselves). Trusting the client name over the environment (two agents of the same kind would be one actor). Requiring an actor on every call (agents forget, and a missing name would stop the work).

D-075. MCP answers are text for an agent to read, and a refusal is a tool error

What. A tool answers in compact text, not JSON: one line per ticket in a list (GEN-12 [in_progress] p1 story 3pt @agent:claude S2 - Add email sign-in (needs GEN-9)), full Markdown for one ticket, with what the board says fenced as information, not instructions. Lists stop at 100 tickets and say how many more there are. Warnings follow the answer as Warning: ... lines. A rule's refusal is a result with isError whose text starts with its code (CLAIM_DEPENDENCY: ...) and carries the hint, with every clara <command> it names turned into the tool that does the same (clara claim 12 becomes clara_claim on 12); commands with no tool, like clara verify, stay as they are, for the agent to run in the repository. Read-only tools are annotated readOnlyHint, none is destructive, none reaches outside the board. Inputs are checked by the operation's own schema; the schema the client sees adds the optional actor. Why. D5 asks for compact output; agents read text well, and a JSON object for a ten-ticket list costs about four times the tokens. A protocol error would hide the hint from the model, since many clients show it only to the person. A hint telling an agent to run a command it cannot run over MCP sends it to the shell as whoever the shell is. Rejected. Structured output alongside the text (every client shown it to the model would pay for both). Returning JSON with a text summary (the summary is the useful part). Stripping commands from hints (the agent would lose the next step).

D-076. The bundle leaves out ajv

What. The MCP SDK checks JSON Schema with ajv (about 220 KB with its formats) only when a server asks the client for input by elicitation, or turns a JSON Schema into a validator. Clara does neither: its inputs are zod schemas. The build swaps the SDK's _shims module for mcp/shims.ts, whose validator refuses with Clara checks no JSON Schema over MCP: it never asks the client for input., and fails if ajv appears in the bundle. The clara mcp chunk is about 269 KB instead of 490 KB, and is loaded only when clara mcp runs, so start-up for every other command is unchanged. Tests run the SDK's own shim, so they would notice if the SDK began to need the validator for something Clara uses. Why. The tarball budget is 3 MB and every kilobyte is downloaded by every npx start of the MCP server. A validator that refuses is honest about what Clara does; one that passes everything would be a silent hole if a later version started asking clients for input. Rejected. Shipping ajv (twice the chunk for code that never runs). A validator that accepts everything (see above). Patching the SDK in node_modules (lost on every install, and invisible in review).

D-077. A tool's input is never looser than the operations it feeds

What. The conformance suite (test/conformance/mcp.ts) holds every tool's advertised input to the operations it runs. Each field it passes on must be one the operation takes, with the same type, format and pattern, an enum no wider, floors no lower and ceilings no higher. Each field an operation needs must be offered, and required when the tool feeds one operation. Inputs accept no unnamed fields. actor is offered, optional, and taken by no operation. Fields a tool reads itself, such as clara_review's verdict, are listed in its own and passed on to no operation. A tool that runs two operations keeps the stricter limit of the two, so clara_review's note stops at ticket.approve's 4000 characters. The suite runs the official client against clara mcp as a child process and against the HTTP handler. It checks every message the server sends against the protocol's schema for its request, and expects nothing on stderr. Why. A client builds its form, and a model its arguments, from the advertised schema. A field the tool accepts but the operation refuses is a refusal the agent cannot foresee. The clara_review schema had drifted this way, with no length limits, before the check found it. Rejected. Hand-written schemas kept in step by review (they had already drifted once). Testing only the SDK's own validation (it checks shape, not agreement with Clara's operations). Running the suite only in-process (the child process is what an agent starts, and it is the only path that shows stray output on stdout or stderr).

D-078. The plugin is generated from what the MCP server is made from

What. Everything in plugin/ but the hook's script is written by npm run docs from mcp/channels.ts: the main skill (skills/clara/SKILL.md, which is the clara://guide resource with a short section on what to do without the tools), its two reference files (tools.md, the tool sections of docs/MCP.md; queries.md, a copy of docs/QUERY.md), the four skills a person starts (plan, standup and review are the MCP prompts of the same names with $ARGUMENTS where the person's words go; next is its own), plugin.json, .mcp.json, hooks/hooks.json, and the marketplace at .claude-plugin/marketplace.json. The version, author, licence and package name come from package.json. The docs gate fails when a committed copy differs, and when plugin/skills/ holds a file nothing generates. A test checks that the agreement in the MCP instructions, the guide, the skill and the AGENTS.md block is the one text, and that every clara_* name and clara:// address in the plugin exists. Why. D6 says the agreement is a single text. Four hand-kept copies would drift, as the tool schemas once did (D-077). A skill that names a tool the server lacks sends the agent to call something that is not there. Rejected. Hand-written skills checked by a test (the test would only say they drifted, not fix them). A paths field on the main skill (it only narrows when the skill loads automatically, and a repository's .clara folder is not a file the agent edits). Letting the agent start the four person skills on its own (disable-model-invocation: true: a standup or a plan is something a person asks for, and four more descriptions would cost context on every turn).

D-079. The session-start hook runs nothing outside a Clara project

What. The plugin's SessionStart hook (on startup, resume, clear and compact) runs node ${CLAUDE_PLUGIN_ROOT}/hooks/session-start.mjs npx -y clara (with --prefix ${CLAUDE_PLUGIN_ROOT} before clara since D-086). The script is plain JavaScript with no dependencies. It looks for a board the way findBoard does, a test holding the two to the same answers in ten layouts, and where there is none it exits at once, printing nothing and starting nothing. Where there is one it runs npx -y clara resume --quiet --as agent:claude in the session's folder (from the cwd Claude Code sends on standard input) and prints its output, which Claude Code adds to the session. Clara gets 17 seconds; Claude Code waits 20. (D-173: it also sets CLARA_ACTOR for the session's shell.) The script always exits 0; a failure is one line on standard error, which Claude Code keeps for its debug log. On Windows npx is a .cmd file and is started through the shell, with only the script's own fixed words on the command line. Why. A plugin is installed for a person, not for a project, so the hook fires in every repository they open. Starting npx there would cost a second or more, and a download on a cold cache, for a note that cannot exist. The note itself must never break or slow a session, and the brief asks for it only when there is work in progress, which is what --quiet gives. Rejected. Running npx -y clara resume straight from hooks.json (the cost above in every project). A shell one-liner that tests for .clara (misses folders below the root and worktrees, and differs between sh and PowerShell). Pinning the version in npx -y clara@<version> (the brief names the command, and the plugin and the package are released together; a pin would make a plugin update fetch a second copy of Clara).

D-080. clara setup edits only what is Clara's, and stops before a file it cannot read for sure

What. clara setup <agent> writes three things for the agent named: Clara's MCP server in its settings, Clara's skill where it reads skills, and Clara's block (the board and the working agreement) in its instructions file. A JSON settings file gets one entry, set field by field so fields a person added (env, a narrowed tools) stay, with comments, trailing commas, indentation and line endings kept (cli/config-edit.ts, a small JSONC reader that knows where each value starts and ends). A Markdown or TOML file gets the lines between Clara's two markers. Every file is planned first; one that is not valid JSON, has a broken block, has a TOML table of the same name outside the block, or lies through a link outside the repository stops the run with UNSAFE_EDIT before any file is written, and the hint gives the steps to do it by hand. Writes are a temporary file renamed over the old one. --dry-run prints the plan. A second run changes no byte and no file time. Why. These files belong to the person and to the agent's own tools. The brief asks for a block "that can be updated later without touching the rest of the file"; the same care has to hold for settings, which people comment and order by hand. Half a setup (the server but not the agreement) is worse than none, so planning comes first. Rejected. Parsing with JSON.parse and writing back with JSON.stringify (loses comments, trailing commas and the person's order and spacing). A JSONC or TOML library (none is a dependency, and a reader that keeps byte positions is under 200 lines with its own tests). Overwriting a broken block or a same-named table with Clara's (could delete what a person wrote). Writing the files one by one as they are checked (a refusal half way leaves a half setup).

D-081. Claude Code's .mcp.json names no agent; the server names it from its client

What. In a repository, clara setup claude writes .mcp.json with npx -y clara mcp and no --as. Every other agent's settings name it (--as agent:codex, and so on), as the plugin's own .mcp.json does. The server already takes the agent from the MCP client's name when nothing else names it (claude-code is agent:claude); Claude Code 2.1.327 was seen sending claude-code (docs/EVIDENCE/M3.md). Why. Copilot CLI reads a repository's .mcp.json too, and prefers it to .github/mcp.json when both start a server of the same name. With --as agent:claude written there, Copilot would act as Claude on the board. Rejected. --as agent:claude in .mcp.json (the problem above). A different server name per agent in .mcp.json (two Clara servers in Copilot's list, one of them wrong).

D-082. One copy of Clara's skill, in .agents/skills/, for every agent but Claude Code

What. Codex, Cursor, Gemini CLI, Antigravity, OpenCode and Copilot CLI get Clara's skill in .agents/skills/clara/ (in the home folder with --global, except Antigravity's ~/.gemini/config/skills/). Claude Code gets it in .claude/skills/clara/. The skill is the plugin's main skill, word for word, with a note saying clara setup rewrites the folder. Setup rewrites the folder only when its SKILL.md carries that note or the plugin's, or when nothing is there yet; a clara skill a person wrote stops the setup, which then writes nothing and says how to move it. Claude Code's user settings are not written: clara setup claude --global prints the two commands that do it (the plugin, or claude mcp add --scope user), because Clara has not confirmed that file's format and Claude Code has a command for it. Why. Each of those six reads .agents/skills/ (docs/VERIFIED.md), so one folder serves a team that uses several agents, and a second setup for another agent finds it already there. Claude Code reads only .claude/skills/. Rejected. Each agent's own folder (.cursor/skills/, .gemini/skills/, .opencode/skills/, .github/skills/: up to six copies of the same skill in one repository). Writing ~/.claude.json (an unconfirmed format the brief says not to guess at).

D-083. Over MCP, the name set outside the model wins, and a connection keeps its name

What. A call over MCP acts as the first of: the agent --as or CLARA_ACTOR names; the agent the client is (claude-code is Claude, codex-mcp-client is Codex); the name the connection's first call gave; then the actor argument, or the client's own name. When one of the first three is set, an actor argument naming another agent is refused, with the reason and what to do instead. Why. The actor argument is written by the model, and ticket text can ask the model for anything. When it outranked the client, one Claude Code session could claim and complete a ticket as claude and then approve it as codex, which breaks "an author never approves its own work" (D2). Names set by the person who configured the agent, or by the client program, are outside the model's reach. Rejected. Ignoring the argument silently (the model is told its call acted as someone it did not ask for, and cannot see why). Dropping the argument (clients that send no name, and a person testing with a raw client, need it; it is still the last word when nothing else names the agent).

D-084. An agent rewrites only the description of a ticket it holds

What. ticket.update with a body, from an agent, needs the agent to hold the ticket (in progress or blocked, assigned to it) and refuses one in review. The acceptance criteria must stay as they are (PERSON_ONLY: a person changes them, and the agent ticks them with a checkpoint), and so must the handoff note (a checkpoint writes it). The other fields stay open to any agent, each change logged by name. clara_update and clara_checkpoint are annotated destructiveHint, and the reference says what each writes over. Why. The body holds what a reviewer judges the work against. An agent that could rewrite any body could weaken the criteria of its own work, or erase another agent's handoff, and the tool said it deleted nothing. Rejected. Refusing every body edit from an agent (an agent that learns something while it works should be able to say so in the description). A diff of the whole body (sections a person adds beside the criteria are the description's, and an agent may edit those).

D-085. The context pack shows a board's checks as the config's, fenced

What. The "Checks" section of a context pack tells the agent to run clara verify <id>, which runs only what a person trusted on this machine and records the result, and shows each check's command fenced, as information from config.json. Why. The commands come from the repository, which a branch can change. Shown outside the fence under "Run them yourself", a command reached the agent as Clara's own instruction, and an agent with a shell would run what trust (D8) exists to hold back. Rejected. Leaving the commands out (an agent without clara verify, or one asked why a check fails, needs to know what it runs). Showing only trusted commands (the pack is built by the library, which has no trust file; and an untrusted command is exactly the one an agent should be told about and not run).

D-086. npx looks Clara up from a folder of its own, outside a repository's settings

What. The plugin's server and hook run npx -y --prefix ${CLAUDE_PLUGIN_ROOT} clara, and the settings clara setup --global writes run npx -y --prefix <home folder> clara. The settings clara setup writes into a repository keep npx -y clara. Why. npx runs the clara the project around its folder installs, from the registry that project's .npmrc names: with the plain command, any repository opened in Claude Code or under a user-wide setting could plant the program that runs as Clara. With --prefix, npm takes the project, its node_modules and its .npmrc from that folder instead (npm 11, checked offline in test/security/launcher.test.ts). A repository's own settings already decide what runs in it, so the plain command there loses nothing and runs the version the repository installs. Rejected. A pinned version, npx -y clara@0.1.0 (a planted package can carry any version, and every update would need new settings). Installing Clara globally (the brief's commands use npx, and a global install is the user's choice to make). A path to a temporary folder (not the same on every machine, and cleared).

D-087. The board's libraries, all built in, none installed with Clara

What. The web app is Preact 11 with @preact/signals 2, built by Vite 8, whose own transformer compiles the JSX (no @preact/preset-vite). Markdown is rendered by marked 18 and sanitised by DOMPurify 3, in a chunk loaded only when a page shows Markdown. The local server is Hono 4 on @hono/node-server 2. Browser tests use Playwright 1.65 with @axe-core/playwright 4.14. Every one is a dev dependency at an exact version: esbuild bundles the server into dist/, Vite builds the app into dist/web/, and the package keeps no runtime dependencies (D-012). Why. C1 names Preact, signals, Vite, Hono and its Node adapter, and Playwright with axe. For Markdown it asks for a renderer and a sanitiser: marked is small, fast and renders GitHub's task lists, and DOMPurify is the sanitiser browsers' own security teams test against. The preset would bring Babel into the build for nothing Vite cannot already do. Rejected. markdown-it and micromark with its GitHub extensions (each larger for the same output). sanitize-html (built for Node, several times the size in a browser). A sanitiser written here (the one piece of the app where a home-made answer is a security hole). Hono as a runtime dependency (C1 lists it, but bundling it gives the same code with nothing for npm to resolve, and keeps the install at one package).

D-088. The local server: a key in a header, live updates as patches, no MCP of its own

What. clara serve listens on 127.0.0.1, port 25272 (CLARA on a phone's keypad) or the next free of the ten after it, and acts as the person who started it. Beyond D15's checks it makes a fresh 256-bit key on each start. The link it prints carries the key after # (/#key=<key>); the page keeps it in its own storage and sends it as X-Clara-Key with every API call, which needs it. --open hands the system's browser the path of a file only this user can read, which sends it on to the link, and deletes the file after a minute or when the server stops. The API is one route, POST /api/ops/<name>, for each operation with the REST door, answering { ok, value, version, changed, warnings } or { ok: false, error: { code, message, hint } }. Live updates are Server-Sent Events from GET /api/events: the whole board (board.get) on connect, then a patch of the cards and parts that changed, with the events since, when storage says the board moved. The page applies a patch with the same code that made it (library/model/patch.ts). The page routes by the URL's hash, and the app takes its base path from where it is mounted. server/ is exported as clara/server for an app that embeds Clara (C4.9), which passes its own caller and leaves out the local checks. Why. D15's checks stop other websites, but any program or user on the machine can reach 127.0.0.1 and send any header; a key that only the person's terminal printed closes that. A fragment is never sent to a server or written to its logs, and a page's storage and a header its own script adds belong to its origin, port included. The file keeps the key out of the browser's arguments, which other users can list; Jupyter opens its notebooks the same way. The first version kept the key in an HttpOnly cookie set by a /k/<key> link; a review of M4's server found that browsers send a cookie for 127.0.0.1 to every port on it, so any other local server the person runs would receive the key, and that --open put the key itself in the browser's arguments. One route per operation keeps the HTTP door generated from the registry, as the CLI and MCP doors are. Patches keep a ten-thousand-card board live without resending it, and naming the version a patch applies to lets a page that missed one start again rather than drift. Hash routing needs no fallback route on the server and works under any base path, which the embedding host and GitHub Pages (direct mode) both need. Rejected. No key (the Host and Origin checks mean nothing to curl run by another user). A cookie, even one named for the port (sent to every port on 127.0.0.1; __Host- cookies need HTTPS). Serving on a name of its own such as clara.localhost so that the cookie stays apart (browsers do not all resolve *.localhost, and the Host check would have to trust a name). The key in the path or query of every request (written to history and logs). A single-use token in the link --open hands the browser, traded for the key (built, then replaced the same day: another user who lists processes at that moment could trade it first). Storage is readable by any script on the page, which is why the page runs only its own (D15's content security policy) and sanitises all Markdown. A WebSocket (two-way traffic the page does not need, and a second protocol to secure). Polling locally (the hosted app polls, D13, but here the server already sees every change on disk). An /mcp endpoint on the local server (D5 serves MCP over stdio locally and over HTTP only when hosted, and an HTTP endpoint acting for an agent would sit beside a page acting for a person). A route per resource (GET /tickets/:id) written by hand (a second API to keep in step with the registry).

D-089. One order for the whole board

What. rank puts every live ticket in one order. ticket.rank with before or after places a ticket just before or after another of any status, and position places it at the top or bottom of its own column. When two neighbours leave no room, every live ticket is spaced out again in the same order, and only the files whose rank changed are written. A board column, a sprint in the backlog and a list sorted by rank each show their part of the order. Why. The backlog shows a sprint's tickets in one list whatever their status, so a drop there names a neighbour that may be in another column. Placing within the neighbour's column, as ticket.rank first did, could land the ticket on the far side of a ticket shown between them. Spacing out one column with ranks taken from the middle of the space also scrambled where that column sat against the others. ticket.create and doctor.fix already ranked against the whole board; now all three agree. The board loses nothing: just before a card on the board is still just before it in its column. Rejected. A second rank field for the backlog (two orders to keep and to explain, and ticket.next would have to pick one). Ranking each sprint separately (a ticket moving between sprints would need a new rank every time). Ordering the backlog by status, then rank (a sprint is planned as one list, not by column).

D-090. A sprint's burndown is the board replayed, a day at a time

What. sprint.burndown replays the board's event log to the end of each day of the sprint, in UTC: from its start date, or the day it was started if that is earlier, to today while it runs, or to the moment just before it closed. A planned sprint has no days yet, and a sprint longer than 366 days shows its latest 366. For each day it counts the tickets and points in the sprint and those of them done. An undone change counts as never made. Because a closed sprint is measured just before it closed, the tickets the close moved back to the backlog still count in its last day. An archived ticket that was done still counts as done; one archived unfinished has left the sprint. Why. Every change is already an event with a time, so the chart costs no stored snapshot and is the same on every machine: a person's laptop, CI and the hosted app compute it from the same files. Measuring before the close keeps the chart honest about what was planned and not finished, which is the point of a burndown. UTC keeps two people in different time zones looking at the same days. Rejected. A snapshot written each night (needs something running every night, which Clara does not have). Counting from the tickets' current state (a ticket moved out of the sprint would vanish from every past day). Local days (two people would see different charts of the same sprint).

D-091. The backlog: unfinished work by sprint, drawn as it scrolls, edited in place

What. The backlog lists the tickets not done, epics left out, in the board's one order (D-089), in a group per active or planned sprint, any closed sprint still holding unfinished work, and "No sprint". A ticket is dragged, or picked up with Space and carried with the arrows, to another place or another sprint: a drop sends ticket.update with the new sprint, then ticket.rank before the ticket below it (or after the one above). A group's foot adds a ticket by title: todo in a sprint, backlog outside one. Tickets chosen with their boxes (x, or shift for a range) are moved, assigned, given a priority or planned together, with one undo. Only the lines on screen are drawn, placed absolutely at heights the stylesheet sets. Why. D7 asks for a ranked list grouped by sprint, drag to reorder and move between sprints, quick add and bulk edit, and for long lists to be virtualised. Work planned for a sprint is work to do, so it starts in todo; work in no sprint is not yet planned. Finished work and epics are not things to plan; the group's head still counts what is done. The bulk edit reuses the pickers a single ticket uses, so the same keys and the same names work for one ticket or twenty. Rejected. Native selects in the bulk bar (Windows commits a change on each arrow key, so browsing the list would edit twenty tickets at each step). A library to virtualise the list (C1 allows none; the layout is fifty lines of arithmetic, tested alone). Showing done tickets folded at the foot of each sprint (the sprint view shows a sprint's finished work; the backlog is what is left).

D-092. The sprint view: one sprint at a time, two hand-drawn charts, a dialog only to close

What. #/sprint shows the active sprint, or else the next planned, or else the last closed; #/sprint/S2 shows that one, and a switcher lists them all, active first, planned soonest first, closed latest first. The name, goal and dates are edited where they are shown (sprint.update); the commitment, what is in the sprint, what is done and, once closed, what was not finished are counts with points beside them. Starting a sprint is one click with an undo; closing one opens a dialog that asks where unfinished work goes (the backlog, or a planned sprint), and the page then stays on the closed sprint to show its report. The burndown (left, against a dashed ideal line from the commitment to nothing on the planned last day) and the burnup (done, against a dashed line of what is in scope) come from sprint.burndown (D-090), drawn as SVG by hand. Both share one scale, count points when the sprint has any and tickets otherwise (a switch offers the other), run their x axis on to the planned end, and step their y axis by 1, 2 or 5 times a power of ten, the smallest that fits in five steps. One blue, --clara-chart, draws the work; the reference lines are dashed in --clara-text-3. A readout above each chart names the day under the pointer or the keyboard (arrows, Home, End) with each line's value; it is the legend when nothing is picked. A table of the same numbers sits under "Show the numbers". The backlog links each sprint to its page, and adding a sprint there offers to open it. Why. D7 asks for the goal, dates, commitment, burndown and burnup, start and close. A team looks at one sprint at a time, and the default is the one they are in. Starting is undone as easily as it is done, so it needs no dialog (DESIGN.md keeps dialogs for what cannot be undone, or needs a choice first); closing asks a question, so it has one. Staying on the closed sprint shows what the close did. Scope beside done shows work added mid-sprint, which a burndown alone hides as a flat line. A shared scale stops the eye comparing two charts that measure differently. Running the axis to the planned end shows half a sprint as half a sprint. Values are written in text colours and the line alone is blue, so the charts keep AA contrast in both themes and use no colour that means something else (warm for "needs you", red, green and the agents' hues). The table and the summary in each chart's accessible name give a screen reader the same numbers as the drawing. Rejected. A chart library (C1 allows none; the arithmetic is two hundred lines, tested alone). One chart with both lines (left and done move in opposite directions and read as noise together). Two colours for the two lines of a chart (a dashed quiet line is told apart without colour, in print and for every kind of colour blindness). A dialog to start a sprint. Moving on to the next sprint after a close (the report would be one click away instead of on screen). Calling the unfinished count "returned to the backlog" (a close may carry it into another sprint, and the result records only which tickets).

D-093. The idea: a draft kept with the text it started from, and a save that cannot land over someone else's

What. #/idea puts idea.md in a Markdown editor beside its preview, side by side on a wide screen and one at a time behind a Write/Preview switch on a narrow one. What is typed lives in the page's drafts with the text it started from, so going to another view and back loses nothing, and while nothing is typed the editor follows the idea live. A save sends that starting text as base; idea.update refuses it (STALE_EDIT) when the idea has changed since. The page sees the same thing as it happens: when the board's idea moves away from the draft's base, it says "Not saved: changed elsewhere" and offers "Load theirs", with a toast that brings the draft back, or "Save mine", which saves over the newer text knowingly. ⌘ S or Ctrl S saves from anywhere on the view, ⌘ Enter from the text, and leaving the page with words unsaved asks first. Agents read the idea; only people write it. Why. The idea is written by people and read by every agent's context pack, so losing a paragraph or saving one person's words over another's unseen are the two failures worth designing against. A base sent with the save makes the check the library's, the same for the CLI, the page and anything embedding Clara; showing it as soon as it happens lets a person decide before they have typed more. Restoring a draft with its old base keeps the question open instead of turning it into a silent overwrite. Rejected. Saving as you type (every pause would write a commit-worthy file, and two people would overwrite each other a word at a time). Merging the two texts (a merged idea nobody wrote is worse than asking). A dialog for the conflict (nothing is lost either way, and an inline notice keeps the text in view). The proposed plan as a tree beside the editor: that is planning, M6.

D-094. Settings: each field saved on its own, list settings sent whole from the latest board, nothing that trusts a command

What. #/settings edits the name, people, review mode and reviewer, checks, work-in-progress limits, the stale time and automations.epic_auto_done, each through config.set when the field is left (Enter or blur; Escape puts it back). A list setting (people, checks) is sent whole, worked out from the settings as the board has them at that moment, not as the page drew them. A refused value stays in an add field to be put right and reverts in an edit field, with the board's own words in a toast. Removals and switches undo from their toast. The key is shown and not editable. Agent profiles are listed read-only (they are files). Each agent clara setup knows has its command and a copy button; those not tried against the real CLI say so. The checks section says, and the page does, that nothing here can trust a command: clara trust in a terminal is the only way (D8), and changing a check here makes the terminal ask again. Routing, notifications, the conductor and routines are not offered until their milestones, because nothing acts on them yet. config.set is a person's operation; the page is read-only for an agent, though the local server only ever acts for the person who started it. Why. Saving per field matches the ticket page and needs no form-wide Save that could lose an edit made elsewhere. Building the list from the latest board stops a stale page from putting back a person someone else removed a moment ago. Showing a setting nothing reads would be a fake feature (B5). The setup command is the step a team most often needs from this page, and copying it is the whole job. Rejected. One form with a Save button (one stale page overwrites every setting). Sending a diff of the list (config.set sets a key; a patch language for lists would be a second API). Changing the key (every id, branch and link carries it; it is a migration, not a setting). A "trust" button (D8: the web UI can never grant trust). Editing agent profiles here (they hold model and adapter choices best reviewed as files in a pull request).

D-095. On a phone, a small control keeps its size and gains an invisible reach; a field grows instead

What. Under (pointer: coarse), each small control (buttons, the dialog and toast close buttons, the counter, the backlog's fold, open and pick controls) carries a ::before of max(100%, var(--clara-touch)), 40 pixels, centred on it, so a thumb landing near it lands on it. Controls whose reaches would cover each other are spaced apart there (the header, the sprint bar, settings rows, the column head). A field cannot carry a ::before, so on a phone it is 40 tall, and its text is 16 pixels (--clara-text-touch), below which a phone zooms the page when the field takes the focus; the ticket's button props take the same size so the list reads as one. The phone journey checks every control on every view by sampling taps across a 40 by 40 square around its centre with elementFromPoint, so a reach a neighbour covers fails as surely as a small box does. Why. DESIGN.md asks for 40 by 40 targets "with the extra as padding, not as visual size": the desktop's density stays, and the phone still gets WCAG 2.5.8 and more. Measuring what a tap would hit, rather than each box, is the only check that sees both the invisible reach and a neighbour stealing it. Rejected. Making every control 40 pixels on a phone (doubles the height of every row and list). Checking bounding boxes (passes a control whose reach is covered, fails one drawn small with a reach). maximum-scale=1 in the viewport to stop the zoom (stops people zooming on purpose too, an accessibility failure).

D-096. Reduced motion is the last rule in the stylesheet, and both a unit test and a journey hold it there

What. The prefers-reduced-motion: reduce block ends app.css. A unit test fails if any rule after it sets an animation or a transition, and a journey opens the panel, a dialog and a toast with reduced motion asked for and finds no animation running but the outline that fades round a card that changed column, which does not move. Why. The block used to sit in the middle of the file, and the panel's later animation won on source order, so the panel slid in for people who had asked it not to, against DESIGN.md. axe found it, by reading the panel's text mid-fade. Order in a stylesheet is easy to break again without seeing it, so it is tested. Rejected. !important in the block (it works until the next rule that needs !important, and hides the order the cascade is relying on). A class set by script (a second source of truth for a media query the browser already answers).

D-097. The browser journeys: a real board from the CLI, a real server per test, Chromium, and baselines per system

What. npm run e2e (scripts/e2e.mjs) runs Playwright in Chromium against the real dist/cli.js and dist/web. A board is seeded once per worker through the CLI, as people and agents (an agent working, one blocked, work in review, a sprint, a backlog), copied for each test, and served by its own clara serve on a free port, with its own CLARA_HOME and an empty git config. Changes are read back from disk with the CLI. The journeys cover SPEC E1: adding, dragging, a CLI change seen live, a blocker answered, a sprint closed and the next started, review (approve, request changes, reject), the palette, a morning by keyboard alone, a visible focus, a phone, axe on every view and every dialog in both themes, hostile ticket text and the content security policy, and screenshots compared in both themes. A failure runs once more with a trace. Screenshot baselines are per system (test/e2e/screenshots/<system>/), with dates hidden through each element's own style before the shot, since a style sheet put on the page is refused by its policy. A comparison allows a per-pixel threshold of 0.02 and 10 pixels, both measured: run to run on one machine nothing above 0.02 differs, while a changed sentence is 154 pixels. On a system with no baselines yet the runner writes them instead of comparing and says so; CI uploads them as an artifact to be looked at and committed. CI runs the journeys in a job of their own on Ubuntu; the matrix runs every other gate. Why. A journey that talks to a mock server proves the mock. Fonts are drawn differently on each system, so one set of baselines would fail everywhere but where it was made; and a baseline first written on a runner is still only trusted once a person has looked at it and committed it. One browser on one system in CI keeps runner minutes down (D-028), while npm run ci runs the journeys on the machine in front of the person. Chromium itself rather than its headless shell: the shell draws no frames on macOS 26, so nothing that waits on a frame ends. Rejected. Running the journeys on every row of the matrix (nine browser installs per run for the same pages). Masking dates with Playwright's coloured boxes (they hide the layout around them too). Freezing the page's clock (the board's own timestamps come from the CLI's real clock, so the page would think everything happened in the future). Skipping the comparison on systems without baselines (it would never start). Playwright's default threshold of 0.2 with 1% or 100 pixels of slack (it passed a sentence reworded and the board's column fills gone, both seen in screenshot review).

D-098. Undo names the change it takes back, by the id of the change's first event

What. Every answer from POST /api/ops/<name> carries events, the ids of the events the change recorded, in order. activity.undo takes an optional change, the first of those ids, and takes back that change and no other: it looks up the undo record kept under that id, refuses when it is not the caller's or is gone (undone already, or past the last 50), and refuses as before when a file it would put back has changed since. Without change it takes back the caller's newest change, as it always did. clara undo --change <id> is the same from a terminal; clara log --json shows the ids. The page's Undo on a change's notice sends the change it names; a bulk change sends each of its steps' changes, newest first; and a bulk change refused part way still offers Undo for the steps already done. Why. The fresh-eyes review moved a ticket, commented on another within five seconds, and pressed Undo on the move's notice: the comment was undone and the ticket stayed moved, because undo meant "my newest change", and the page, the CLI and an agent of the same person all make changes. A notice's Undo has to mean the change it names. The undo record was already keyed by the change's first event id, so naming the change needs no new state anywhere. Rejected. Sending a bare undo once per step (the bug). Refusing unless the named change is the newest (a person undoing an older move would be told to undo a later comment first, which is not what they asked). A token per notice kept by the server (state the server would have to keep and expire, for what the event id already says). Undoing someone else's change by name (undo has always been of your own changes, kept on your machine; another person's change is answered with a change of your own, which the log shows).

D-099. An agent adapter builds a command and reads lines; Claude Code runs with its settings, MCP servers and permissions all set by Clara

What. An adapter (library/conductor/adapter.ts) does three things for one agent CLI: detect (installed, version, signed in), start and resume, which return a plain description of a process (command, arguments, folder, environment, standard input, and files to write into the run's own scratch folder under CLARA_HOME), and parser, which turns each line the agent prints into the normalised events of D8 (session, text, tool with a one-line summary, permission_request, permission_denied, usage, result, error). An adapter starts nothing; the conductor is the one place that starts agents. Claude Code is run as claude -p --output-format stream-json --verbose with:

  • --permission-mode from the profile: guarded is acceptEdits, auto is auto, open is bypassPermissions (which the conductor refuses unless the project enabled it), and a reviewer's read-only run is dontAsk;
  • --setting-sources user, so the repository's .claude/settings.json and settings.local.json, whose hooks are commands from the repo, are not loaded;
  • --strict-mcp-config --mcp-config <scratch>/mcp.json, so the repository's .mcp.json starts nothing, and the agent gets Clara's server (clara mcp with CLARA_ACTOR, CLARA_RUN and CLARA_TICKET);
  • --settings <scratch>/settings.json holding the profile's permission rules. A guarded run may read, use each declared check and setup command (and each part of a chained one, as Claude Code checks a && b part by part; a part with *, brackets, backticks or $( is left to the bridge, since a rule cannot state it exactly), run read-only git, git add, git commit, and Clara's tools. A read-only run may read, run read-only git, and use Clara's tools that only read, plus clara_review. Every profile denies pushing, gh pr create and gh pr merge, and the git commands that throw work away or rewrite it (reset --hard, clean, checkout -f, branch -D, rebase, worktree, filter-branch, update-ref);
  • --permission-prompt-tool mcp__clara__clara_permission when the run has the approval bridge (never in a read-only run);
  • --append-system-prompt-file with the working agreement, and the prompt on standard input;
  • --session-id with a UUID Clara chooses, or --resume with it, and --max-turns and --max-budget-usd (never below one cent).

detect runs claude --version and claude auth status --json and reads only loggedIn. The parser reads system/init, assistant and result lines and nothing else: text only from the main conversation (a subagent's tool calls count, its words do not), each refused call once (from the result's permission_denials, described by the call the stream showed), tokens summed across cache reads and writes, and the result's subtype as why it stopped. It says when Clara's server did not connect inside the agent. Summaries are masked before they are cut to 120 characters, so a cut cannot split a secret into pieces too small to recognise. Why. D8 asks for exactly these flags (stream output, an explicit permission mode, allowed and disallowed tools, a temporary MCP config, the agreement in the system prompt, a session id Clara chooses, turn and spend limits) and for nothing from a repo's config to run without trust. Claude Code's -p mode skips its own folder-trust dialog, so without --setting-sources user a cloned repository's hooks would run on the first dispatch. A settings file states each rule as one JSON string; --allowedTools is documented as "comma or space-separated", and a check command holds both. Returning a process description rather than starting one keeps every adapter testable from what it returns, and keeps stopping, limits and secret masking in one place. Rejected. --allowedTools and --disallowedTools (they split on the characters commands contain). --restricted (it also ignores the person's user settings, where people keep a provider, a proxy or a model, and it is new; the deny rules already cover what must never happen). --bare (it does not use a claude.ai sign-in). Letting the agent's user settings be ignored entirely (they are the person's own choices on their own machine; DECISIONS and the security model say plainly that a tool allowed there is allowed in a guarded run too, while Clara's deny rules win over any allow). Masking only in the conductor (a summary cut first can split a token so its shape no longer matches).

Not yet confirmed against the real CLI, and to be checked in the one real run (CLA-65): the input and answer of the --permission-prompt-tool (taken to be {tool_name, input, tool_use_id} in, and the text of {"behavior":"allow","updatedInput":{...}} or {"behavior":"deny","message":"..."} back); that --settings permission rules apply in -p mode alongside --setting-sources user; and whether a resumed session's tokens and turns, like its total_cost_usd, count the whole session. Until then the parser says spend is cumulative (cumulative: true) and the conductor takes the previous total away.

D-100. A run's record, events and raw log are local state, not a file format

What. Each run keeps three files in .clara/.local/runs/: <id>.json, the record (library/model/run.ts: the ticket, agent, branch, worktree, session, state, outcome and reason, each attempt with its gates and spend, the totals and the limits); <id>.events.jsonl, its normalised events; and <id>.log, the agent's raw output with secrets masked. The local store gained append, so logs grow a line at a time under the store's lock. The record is checked with a strict schema and has v: 1; a record that fails is reported and left alone. No JSON Schema is published for it. The board itself gets only run_started and run_finished events. Why. Runs are per machine and per person: a teammate's runs are not yours to see in your checkout, and the board's history must not grow by every line an agent prints. What a team shares (who worked on what, how long, at what cost, how it ended) is in the two events. A published schema would make the record a format other tools rely on, before the runs view has shown what it needs to hold. Rejected. Writing runs into .clara/ and committing them (noisy history, merge conflicts on every parallel run, and agent output in the repository). A JSON Schema in clara/schemas/ (a promise made too early; v lets the record change). set of the whole log on every line (rewrites a growing file for each line).

D-101. The open profile is enabled by a trust answer on this machine, never by the repository

What. D8's "enabled per project" for open means a person on this machine said yes for this repository, in a terminal, and the answer is kept with the other trust answers under CLARA_HOME. The repository's config cannot turn it on, and the web UI cannot either. Agent requests carry openConsent, set only from that answer, and an adapter refuses to build an open run without it, behind the conductor's own check. Why. open runs Claude Code with bypassPermissions: nothing is asked. If a flag in .clara/config.yml enabled it, cloning a repository and dispatching a ticket would run a stranger's choice with every prompt skipped, against D15 ("nothing from a repo's config runs without trust"). An automated security review of the adapter raised it. Rejected. A config key conductor.allow_open (the repository would grant itself the most dangerous profile). Mapping open to auto (D8 defines them as different choices; a person who wants no prompts in a sandbox they built should get it, once they have said so on their machine).

D-102. One worktree per ticket under CLARA_HOME, kept across its runs; crashed runs are closed, never killed

What. A ticket's runs work in CLARA_HOME/worktrees/<repo>-<digest>/<id>, where <repo> is the checkout's folder name and <digest> the first ten hex digits of the SHA-256 of its real path, on the branch clara/<id>-<slug> (clara/<id> when the title gives no slug). The branch starts from conductor.base_branch, the local one or else origin/<base>, tracks nothing, and is kept when the ticket's title changes. The worktree and its branch stay from one run to the next, so answering a question or asking for changes carries on where the last run stopped; they go when the work is rejected or merged. The board's setup commands run once, when the worktree is made, and only when a person on this machine has trusted them: otherwise nothing is made at all. When a setup command fails, the worktree is removed again, with its branch if this run made it, so the next run starts clean. A folder in the way that is not one of the repository's worktrees is refused, never deleted. Runs whose conductor is gone (running or checking on this host, with a dead conductor_pid) are closed as crashed the next time runs start, with a reason for a person; their agent is not signalled. Everything a run stores (events and the raw log) is masked first, the raw log a whole line at a time, with a private key hidden from its first line to its last, and the log stops at 20 MB. Why. Parallel agents must never share files or touch the person's checkout (D8). A path under CLARA_HOME keeps worktrees out of the repository, where tools would index them and git status would show them, and the digest keeps two clones with the same name apart. Keeping the worktree saves running setup again (an npm ci can take minutes) and keeps an agent's uncommitted work through a question. A process id from before a crash or reboot may now belong to anything, so killing it could hurt an unrelated program; naming it lets a person look. Masking whole lines means a token split across two chunks of output is still found. Rejected. Worktrees inside the repository (.clara/.local/worktrees, seen by editors, indexers and watchers). A new worktree for each run (setup every time, and a question loses the work in progress). Deleting a stray folder at the worktree's path (it may be a person's). Killing the recorded agent process on reconcile (process ids are reused). Masking each chunk as it arrives (a secret cut in two by the pipe escapes both halves).

D-103. Dispatch: how an agent is chosen, what a run does, and how it ends

What. clara start <id> dispatches one ticket (library/conductor/dispatch.ts); clara work (CLA-60) calls the same code for many.

Choosing the agent. In order: the --agent given on the command line; the ticket's assignee when it is an agent (a ticket assigned to a person is refused with CLAIM_HELD); the router command when one is set; the first rule in routing whose when query matches the ticket (a rule without when matches every ticket); otherwise NO_ROUTE, with the two ways to fix it. The model is the one given with --model, else the router's answer or the matching rule's model, else the agent profile's, else the agent's own default. An agent named after an adapter (agent:claude) needs no profile file: it gets the defaults (guarded, local, the agent's own model). Profiles may name Claude Code's adapter claude-code, as FORMAT's example does, or claude.

The router. router.command in config.json is a shell command, run in the main checkout for at most 30 seconds, given the ticket, the agent names and the routing rules as JSON on standard input, and expected to print {"agent": "<name>", "model": "<model>" | null}, or {"agent": null} to leave the choice to the rules. It comes from the repository, so it is one of the commands clara trust shows (kind router), and a board without one has the same trust digest as before.

A run. Once the agent is chosen and the ticket could be claimed by it, a run starts: its record (D-100) and a run_started event on the board. The worktree is opened (D-102), the ticket is claimed as agent:<name> when it is in todo, and the agent is started with two texts: the instructions (the working agreement, the rules of a dispatched run, and the body of the agent's profile) and the prompt (the ticket's context pack with all board text fenced, the checks, the branch). The agent is told to commit on its branch and stop when the work is done, not to push, and not to call clara_complete: the conductor hands the work in. Every call of the agent gets what is left of the run's turns (conductor.max_turns) and spend (conductor.max_budget_usd); the run's minutes (conductor.max_minutes) cover every attempt, and when they run out the agent gets SIGINT, then SIGTERM, then SIGKILL, by process group.

Gates. When the agent exits with the ticket still in progress and held by it, the worktree must be clean (otherwise the agent is resumed and told to commit) and ahead of the base (otherwise the run fails: it did nothing). The board's checks run in the worktree on that commit; the results go into the attempt and onto the board (verify.record, as the agent). If they pass, the ticket is completed as the agent, with the commit, the branch and the agent's last words as its summary: the outcome is review. If they fail, the same session is resumed with what failed, fenced, until conductor.max_attempts attempts have been made; then the ticket is blocked with the reason, and the outcome is blocked.

How a run ends. Every run ends with one run_finished event: run, agent, outcome, duration_s, cost_usd, attempts, and reason when there is one, masked. If the agent blocked the ticket, the run ends blocked; answering moves the ticket back to in progress, and the next dispatch resumes the session of its last run with the answer as its prompt (the attempt's why is answer; after a request for changes it is changes). A run never waits for a person, so the waiting state is gone. When the agent crashes, ends without committing, or reaches a limit, the ticket is blocked with the reason so it shows in "needs you", and answering resumes it. When the agent completed the ticket itself on a board without checks, the outcome is review without gates. The agent's work on the board (claim, verified, complete, a block on its behalf) is done as agent:<name>, because it holds the ticket; run_started and run_finished are written by whoever dispatched. A run whose conductor died is closed as crashed the next time one starts, with its run_finished.

Scratch. An adapter's files (the MCP config, the settings, the instructions) go in a folder per session, CLARA_HOME/scratch/<repo>-<digest>/<session>, written before each call and removed after, so a resumed call finds what an agent keeps beside them. A ticket can have one live run on a machine at a time (RUN_ACTIVE).

A lost session. A resumed call that ends without a word (no event, no session id) and was not stopped means the agent no longer has the session: its files were cleaned up, or the last run was on another machine. The same attempt then starts a new session with the whole context pack and what the attempt was for (the answer, the review note, or what failed), so the work carries on instead of failing.

The command. clara start <id> [--agent] [--model] asks a person to trust the board's commands in the terminal, as clara verify does, prints the run as it goes (the route, each tool call, each check), stops it on Ctrl-C (the agent is interrupted first), and exits 0 only when the ticket reached review. An agent cannot start a run (PERSON_ONLY): its own limits and the person who chose to spend would be stepped around. The agent reaches the board through the same clara that started it, run as clara mcp.

Why. D8 lists the steps; this fixes the choices the steps leave open. The claim is checked before anything is made, so a ticket another agent holds costs nothing, and made after the worktree, so a failing setup command leaves the ticket in todo for another try. Completing in the conductor is the only way a board with checks can work: an agent cannot record checks itself (verify.record has no door), so its own clara_complete would be refused. Ending the run on a block keeps one rule for the board (one run_started, one run_finished, a duration that is the agent's working time and not a weekend spent waiting for an answer), and resuming the session keeps what the agent knew. Blocking the ticket on every failure puts it where a person looks, with the reason, and gives them one action to continue.

Rejected. Claiming first and releasing on a setup failure (a claimed and a released event for nothing). Letting the agent complete with a board-wide exception for dispatched runs (the conductor would trust the agent's word that it ran the checks). A run that waits for answers in a waiting state (a run lasting days, and a second state machine beside the ticket's). Leaving a failed ticket in progress (nobody is told; the stale-claim rule would find it hours later). Using the repository's routing to run a script without trust (D15).

D-104. The work loop: what it starts, in what order, and when it stops

What. clara work (library/conductor/work.ts, cli/work.ts) runs dispatch (D-103) for many tickets at once.

What it starts. First the tickets an agent holds that can carry on: in progress, assigned to agent:<name>, whose newest run here ended other than stopped and was that agent's, such as a ticket whose question was answered. Then the ready tickets: in todo, not an epic, unassigned or assigned to an agent, with every dependency done. Each group is in the order clara next gives. A ticket with a run going is never started twice, and a ticket can hold only one live run per machine (RUN_ACTIVE, D-103).

How many. At most conductor.max_parallel runs at once, or --max, and each agent no more than its profile's max_parallel. When a run ends the loop reads the board again at once, so what the run unblocked starts next; the waves --dry-run prints are the dependency layers of the same plan. A run that ended while the board was being read is caught by a counter, so its unblocked tickets are never missed.

What it skips. A ticket no agent takes (NO_ROUTE, an unknown adapter, a router that fails) is skipped once, with the reason and the hint, and set aside until its updated changes; so is a ticket whose run here just ended, so a blocked ticket waits for its answer instead of running again. An agent that could not be started (AGENT_UNAVAILABLE) is not tried again by this loop. Trust is checked again before each reading: if the board's commands changed since the person trusted them, the loop stops every run and ends with NOT_TRUSTED.

The daily ceiling. conductor.daily_budget_usd caps what agents spend on this machine over a rolling 24 hours. A run going reserves its whole spend limit and, once ended, counts only what it spent, so runs started at once can never pass the ceiling together; a run is never given more than the ceiling leaves. When less than a cent is left, new runs wait: the loop says so once, with when room frees up, and carries on the runs going. A ceiling of 0 starts nothing. Within one loop, runs start one after another, each once the last has saved its record, so each is measured with the others counted; dispatch refuses a run with DAILY_LIMIT when the ceiling is reached, which the loop takes as a reason to wait. Two separate clara processes starting runs in the same instant can each be measured before the other's record is saved; the ceiling can then be passed by at most one run's limit.

When it ends. Without --watch, once nothing is going and nothing can start. With --watch, it looks again every five seconds until stopped. --once starts only the tickets found on its first reading, then ends when their runs do. Ctrl-C stops every run, each interrupted first; a crash left behind is closed before the first reading. The command exits 0 when every run reached review and nothing waited for the ceiling, 1 otherwise.

Stopping one run. clara stop <run|ticket> writes a stop request into the run's folder in .clara/.local; the process running the run looks for one twice a second and stops it as Ctrl-C would, as the person who asked. When that process is gone, the run is closed as crashed instead. clara runs lists the runs here and the day's spend; clara logs <run|ticket> [-f] shows a run's events, or its raw output with secrets masked.

Why. D8 asks for a loop that starts what each run unblocks, with a daily ceiling and a stop from another terminal. Reading the board again after each run, rather than planning once, lets a ticket added or answered meanwhile start, and keeps the plan honest when a run blocks. Reserving each live run's limit is the only way to keep parallel runs under a ceiling without stopping one midway. A stop request in a file needs no daemon and no port: the run's own process already polls.

Rejected. Planning the waves once and running them in order (a blocked ticket would stall a wave that does not need it). Counting only what live runs have spent so far (three runs started at once could each spend the whole ceiling). Stopping a run by sending its process a signal from clara stop (a process id read from a file may be another process by then; the conductor knows its own children). A calendar day for the ceiling (a burst at midnight could spend twice the ceiling in an hour).

D-105. Review, and landing approved work

What. clara review <id> shows what a ticket handed in, from the ticket.review operation: the summary, commit, branch and pull request of the last completed event; the checks recorded for that commit, with the tail of a failing one; the acceptance criteria; the files the branch changes against conductor.base_branch, measured from where they parted; and what reviewers said since. It changes nothing.

Approving lands the work (library/conductor/land.ts), as conductor.on_approve says:

  • pr pushes the branch to origin under its own name, never forced, and opens a pull request into the base branch with GitHub's gh, its body made from the ticket: the summary, the criteria, the checks and the description, folded. Every piece of ticket text in it is defused, so a mention notifies no one and a closing keyword closes no issue. The pull request's address is recorded on the ticket. A pull request gh finds already open for the branch is taken as the one.
  • merge merges the branch into the base branch in this checkout, always with a merge commit, then removes the run's worktree and deletes the branch, when it is the one Clara made for the run. A branch a person named is kept.
  • none lands nothing.

Everything that would stop the landing is checked before the approval is recorded, and refused with LAND_BLOCKED and the fix: no origin, no gh, a checkout on another branch or with uncommitted changes, a branch that conflicts with the base. A failure after that (the push refused, gh refused) leaves the approval in place and fails with LAND_FAILED, whose hint is to approve again. Approving a done ticket lands what it still has to land, which is also how work approved in the web gets landed. Only a person's approval lands anything; an agent's is recorded and lands nothing. Approving does not wait for or read the pull request's checks.

Rejecting discards the run. clara reject returns the ticket to todo with no one on it and, after a yes in the terminal or --yes, removes the run's worktree and deletes the branch Clara made for it. Without a terminal and without --yes it refuses with CONFIRM_NEEDED and changes nothing. --keep keeps both. A run still going on the ticket refuses both approving and rejecting (RUN_ACTIVE).

Why. D9 asks approval to open a pull request with a body made from the ticket, or merge locally when the base checkout is clean, and asks rejection to discard the branch after confirmation. Checking first keeps a refusal from leaving a ticket approved with nothing landed, which a person would then have to notice. Landing after the approval, and not before, means a push or a pull request is only ever made for approved work; a failure part way leaves the approval, which is true, and an action that finishes it. Ticket text is written by agents and strangers (D15), and a pull request body is where GitHub acts on what it reads, so it is defused like every other place that text goes. Landing is a person's act because pushing is: every agent profile refuses git push and gh pr create (D8), and an agent's approval in agent review mode must not get around that.

Rejected. Opening the pull request from the agent's run (D8 refuses push to agents, and the pull request would be the agent's, not the reviewer's). Landing before approving (a pushed branch and an open pull request for work that was then not approved). Squash merges (the run's commits are its record of what it did; a team that wants a squash chooses it on the pull request). Deleting a branch a person named (it may be shared). Waiting for the pull request's checks before calling it landed (the hosted mode shows them; M8).

D-106. A reviewer agent's second opinion

What. With review.reviewer set and review.mode agent or human, every run that hands a ticket in is followed, in the same dispatch, by a review run of that agent (library/conductor/review.ts). It is a run of its own in the run store, with purpose: "review", a session of its own, and its own run_started (marked purpose: "review") and run_finished.

It reads and changes nothing. The run is read-only whatever the reviewer's profile says: Claude Code's dontAsk mode, with rules that allow reading files, the git commands that only read, Clara's reading tools and clara_review, and refuse everything else without asking. It runs in the ticket's worktree, which must be at the commit handed in, and is never given the board's commands or the approval bridge.

What it is given. Its instructions are the working agreement, the review's rules and its profile. The prompt is the ticket's title, criteria and description and the author's summary, each fenced as data with a note that requests inside them are not instructions; the checks recorded for the commit; and the files the branch changes, with the git diff to read them.

What it may do. In agent mode it gives one verdict with clara_review: an approval makes the ticket done (and lands nothing: a person's clara approve lands it, D-105), and a request for changes sends it back to in_progress with the note. In human mode it may only send the work back; otherwise it ends with its opinion, which Clara adds to the ticket as the reviewer's comment, and a person approves. The run's outcome says which: approved, changes, commented; or failed, limit, stopped or crashed when it gave no verdict, and the ticket then waits in review for a person.

When it is not started. In gates mode, when no reviewer is named, when the reviewer is the author, when its profile names an adapter Clara does not have, when the ticket is not waiting for review, when the worktree is not at the commit handed in, when the daily ceiling has less than a cent left, and once it has sent the ticket back conductor.max_attempts times. Each reason but the first two is reported (review_skipped), and a person reviews the ticket.

Carrying on. A ticket sent back is held by its author. The next clara start resumes the author's session with the note, as a person's request for changes does, and clara work carries it on in the same loop, which a ticket that ends any other way waits out until it changes. The review takes its spend from the same daily ceiling, capped at what is left, and runs inside its work run's slot in clara work: the reviewer's own max_parallel is not counted. clara start and clara work exit by whether the work was handed in, whatever the review said; their output and JSON include the review.

Why. D9 asks for a second opinion through clara_review by a different agent in a read-only run, and rule 2 forbids an author approving its own work in any mode. Running the review straight after the hand-in, in the same command, means a person who runs clara work comes back to tickets already reviewed. A separate run record keeps the reviewer's spend, log and outcome apart from the author's, and a separate session keeps it from inheriting what the author was told. Approval landing nothing keeps pushes a person's act (D-105). The cap on send-backs stops two agents passing a ticket between them until the ceiling is spent.

Rejected. Reviewing inside the author's session (it would mark its own work). Letting the reviewer push fixes (a reviewer that edits is a second author, and its edits would need a review). Starting the reviewer from clara review (the person is already there to review). A queue of reviews run later by clara work (a ticket would wait with no one on it, and clara start would need a loop it does not have). Counting the reviewer's max_parallel across runs (the slot of the run it follows already bounds how many go at once; a rate limit of the agent's own is the adapter's to report).

D-107. The approval bridge

What. In a guarded run, a tool the run's rules neither allow nor refuse is put to a person, and the agent waits for the answer (D8).

The agent's side. Clara starts Claude Code with --permission-prompt-tool mcp__clara__clara_permission, and starts the run's MCP server with CLARA_RUN set to the run's id. Only a server with a run offers clara_permission; it is not one of the 16 tools, and is listed apart in docs/MCP.md. The CLI calls it with tool_name, input and tool_use_id; the run comes from the server, never from the model, so a model that names another run is ignored. The tool runs run.ask, an operation only an agent calls and only over MCP. It refuses a run that is not going on this machine and an agent that is not the run's (NO_RUN, NOT_HOLDER). A read-only run asks for nothing and is denied at once, and so is a fourth question while three wait. Otherwise the question is stored and the operation waits, looking for an answer each second, up to ten minutes. It answers in the JSON Claude Code reads: {"behavior":"allow","updatedInput":...}, with the input given back only when it is under 40,000 characters, or {"behavior":"deny","message":...} with who denied it, what they said, and what to do instead. A refusal, too, is a denial with its code, never a tool error the CLI would not understand.

Where it lives. A question is local state, like the run: .clara/.local/asks/<run>/<id>.json, with the tool, what the agent wants done (masked for secrets, then cut to 4,000 characters), when it asked, and the answer once there is one. The first answer is kept and any later one refused, under the store's lock, so a person and the timeout cannot both win. The board does not change; the log records the work, not each permission.

The person's side. clara start and clara work print each question as it comes and each answer, from a watch on the run's questions in the conductor. clara runs lists what is waiting, under "Waiting for you". clara allow <id> [note] and clara deny <id> [note] answer the oldest question of the run on that ticket, or the one --ask names, through run.answer, which only a person may call, from the CLI, the REST door or the library. The agent runs clara with CLARA_ACTOR naming it, so its own clara allow is refused, and under guarded that command is itself one the bridge would put to a person.

When no one answers. After ten minutes the question is denied by system. When the agent stops, the conductor denies whatever is left before it reports the run's outcome; when the run ends while the server still waits, the server denies it. A failure while closing them never changes the run's outcome.

Why. D8 asks for exactly this: anything else "goes to the approval bridge and appears in "needs you" with Approve and Deny, or is denied if the agent has no bridge". The permission prompt tool is Claude Code's documented way to ask an outside program, and an MCP tool call can wait: Claude Code gives a stdio server's tool call 30 minutes of quiet and 28 hours in all (docs/VERIFIED.md). Keeping the question beside the run on the machine running it means the answer is quick, needs no network, and leaves nothing in the repository that a teammate would pull. Ten minutes is long enough to come back to a terminal, and short enough that an unattended clara work moves on rather than holding a wave. Three questions waiting is as many as a person reads at once; past that the agent is told to work another way.

Rejected. A prompt in the terminal running clara start (Ctrl-C must still stop the run, clara work runs several at once, and a prompt cannot be tested without a terminal of its own; any terminal can answer instead). A setting for the wait (one more thing to explain; it can come when someone needs it). Storing questions with the run's record (each question would rewrite the run, and two answers would race over it). Putting them on the board (a permission is about this machine, not the work, and would reach teammates as noise). Letting the model name its run (it could ask in another agent's run). Answering by agents (an agent that may allow its own tools has no guard). Giving the input back always (Claude Code warns against it for inputs of 40 KB or more).

D-108. Custom agents

What. The custom adapter starts any agent with a command line, from a template in its profile: command: aider --yes-always --message {prompt} (D8).

The template. Clara splits it into words as a shell would (spaces part words, '…' and "…" quote, \ escapes) and starts the first word with the rest as its arguments, without a shell. Four placeholders are filled inside their words: {prompt} (the run's rules, the agent's profile and the ticket, as one text), {prompt_file} (a file in the run's scratch folder holding that text, removed when the agent ends), {ticket} and {model}. With no model, a word that is only {model} is left out, with the option before it. With neither prompt placeholder, the text goes to stdin. An unknown placeholder, an unclosed quote or a template that starts with a placeholder is refused before the ticket is claimed (INVALID_INPUT).

Trust. The command is one of the board's commands: clara trust lists it as agent <name> after the checks, setup commands and router, and a changed command asks again. Only profiles with adapter: custom are listed, since no other adapter runs a profile's command.

Reading it. It prints text, not events. Each line, with terminal escapes and control characters removed and secrets masked, is a text event in the run's log and on the terminal. Its exit is its result: 0 means it ended well and the conductor goes on to the gates; anything else is a failure whose reason holds the exit code, the end of its stderr and its last lines. Its rules say so: it has no Clara tools, so it is told to commit, exit 0 when done, and print one question or reason and exit nonzero when not. Clara then blocks the ticket with those lines.

What it cannot do. It cannot resume, so each attempt starts it again with the whole ticket and what the attempt is for, the failed checks or the files left uncommitted. It reports no spend, so only the time limit bounds a run. Clara cannot hold it to a permission profile, so it is never started as a reviewer, and a reviewer named on a custom profile is skipped with the reason. A new capability, permissions, says which adapters Clara can hold to a profile.

Why. D8 asks for "custom: any command template from config, such as aider --message {prompt}, so every agent is welcome." Starting it without a shell is what makes a template safe to fill with text a stranger wrote: a placeholder can only ever become one argument. Trusting it like a check follows SPEC's rule that commands from the repository's config never run without a person's yes. An exit code and the last lines are the one protocol every command-line agent already has, and asking for a question as the last line before a nonzero exit gives a custom agent a way to block that needs no tools. Saying plainly that its permissions are its own keeps the docs honest about where enforcement lives.

Rejected. Running the template through sh -c (the ticket text would need shell quoting that is easy to get wrong, and the shell differs on Windows). Giving it Clara's MCP server (most command-line agents take no MCP config on the command line, and a flag for it would differ per agent; a template can pass one itself when its agent takes it). Parsing its output for a summary (no format is shared; the person reads the log, and the hand-in says what Clara checked). Letting a custom agent review (it could change the work it was asked to judge).

D-109. What clara agents shows

What. clara agents lists the adapters with what each one's probe found (installed, version, signed in), then every agent the board names: a profile in .clara/agents, a routing rule, a ticket's assignee, or review.reviewer. Each agent has its adapter, its permission profile, and either ready or the first thing that would stop clara start from starting it: a profile that names an adapter Clara lacks, a name with no profile that is not an adapter's, the open profile, a custom command that does not parse, a program that is not on this machine, or an agent that is not signed in. --json gives the whole report.

What it runs. Each adapter's own probe, once, whatever the number of agents on it: for Claude Code, claude --version and claude auth status --json, of which only loggedIn is read. A custom agent's command is a board's command, so it is never run to find out: Clara looks for its first word on PATH. The account an agent is signed in with is never shown or kept.

Before a run. clara start and clara work run the same probe before they make a worktree, claim the ticket or record a run, and refuse with AGENT_UNAVAILABLE when the program is not here or not signed in. Claude Code's auth status counts an API key in the environment, and Bedrock, as signed in, so loggedIn: false means the run could only fail; a real run here showed it (docs/EVIDENCE/M5.md). clara work then sets that agent aside for the rest of the loop instead of failing each of its tickets in turn. A program that vanishes between the probe and the start still ends in a failed run that gives the ticket back.

The experimental label. An adapter never run end to end against its real CLI says so wherever it is shown: in clara agents, and on the first lines of every run clara start and clara work print. Claude Code's adapter carries the label until the one real run M5 allows passes through it (docs/EVIDENCE/M5.md).

Permissions. An agent on an adapter that Clara cannot hold to a profile (the custom adapter, D-108) shows its own in place of its profile, with a line saying what that means.

Why. D8 lists agents among the commands, and a person setting up a board needs to know, before the first clara work, which of the agents it names can start here and why not. Naming agents from wherever the board names them catches the common mistakes: a routing rule naming an agent with no profile, or a ticket assigned to one. Running only the adapters' fixed probes keeps the command safe to run in a repository nobody on this machine has trusted. B5 asks that every place that shows an untested adapter say so.

Rejected. Starting each agent with a tiny prompt to prove it works (it costs money and runs a board's commands). Showing the signed-in account (it is personal, and the board may be shared on screen). Listing only profiles (agents named after an adapter need none, and a routing rule can name one that has none). Exiting nonzero when an agent cannot start (it is a report; clara start refuses with the reason).

D-110. A ticket waits until the work it depends on is merged

What. Under conductor.on_approve: merge, clara work does not start a ticket while a ticket it depends on is done but its branch still has commits that the base branch lacks. It says so once (APP-2 waits: APP-1 is approved, and not merged into main yet.) and starts the ticket on a later pass, once the merge is in. Under pr and none nothing waits: a pull request may be squashed, so its branch is never "in" the base branch by ancestry, and with none landing is the person's own business.

Why. Approving records the ticket done and then merges its branch (D-105), in that order so that a refused merge leaves the approval standing. Between the two, or for as long as a refused merge waits for a person, a clara work --watch loop saw a dependency done and started the next ticket in a worktree cut from a base branch without the work it builds on. The agent then rebuilt or worked around missing code, and its own merge conflicted. Checking the branch against the base is a fact git can answer exactly, and it costs one rev-list per dependency.

Rejected. Landing before approving (a merge that lands and an approval that then fails leaves work in the base branch that the board calls in review). Holding a lock across approve and land (a second process, a person's git merge and the hosted app would all need to know about it). Starting the ticket from the dependency's branch instead (it chains unapproved history into a branch that may later land without it).

D-111. Demo 1: the real conductor, a scripted agent, a made-up project

What. clara demo makes a made-up project's repository in a temporary folder and works it with Clara's own work loop. The project is Ledger, a small Node library for money in integer cents, with a command line, shipped in templates/demo/ with its tests, a script (demo.json) and the files each agent writes. Its lead, Mira Okafor, commits the project, then plans a board of eight tickets on top. Three agents (atlas, juniper, sage) run on the demo adapter, whose program, dist/demo-agent.js, plays one script per ticket: it reads, writes the template's files into its worktree, ticks criteria through a real clara mcp, commits and hands in, and the board's checks are each run's gate, as for any agent. One agent blocks with a question; one fails its checks on the first try and passes on the second. The demo plays the lead: after a pause it answers the question, approves each ticket in review and merges it. When every scripted ticket is merged, the board's checks run on main.

Where it runs. Everything is under one clara-demo-* folder in the OS temporary directory: the repository, and a CLARA_HOME of its own for trust, worktrees and runs. The person's CLARA_HOME is never touched, and their git settings do not reach in: the repository's own config switches off commit signing, points hooks at an empty folder, and names the lead as the committer. The folder is removed at the end, on Ctrl-C, and on a failure, unless --keep asks to look around it.

Trust. The demo trusts the checks of the board it has just made from Clara's own template, in its own home. It is the one place trust is given without a person's yes, and a test pins that (test/security/commands.test.ts).

In a browser. By default the board opens through the same server as clara serve, acting as the lead, with a banner on every screen that says it is a simulation, and the terminal says so on its first line. A person on the page may answer or approve before the scripted lead does. Approving on the page does not land work yet (the web's landing is M5's review room), so the demo merges a ticket approved there; an answer or approval the page made first is taken as made. With --headless there is no browser and a time limit of three minutes, for CI and the packaged install (scripts/pack-smoke-extra.mjs), and --json reports what merged and whether the checks pass.

Not yet. A6's "the dependency graph lights up as work lands" needs the graph view, which is M6's. What a person does on the page beyond answering and approving (requesting changes, rejecting, moving a ticket) takes the demo off its script: the scripted agent says it has no more steps and changes nothing, so the demo may not reach its end, and the board stays open.

Why. A6 asks for a demo that "uses the real dispatch code with a scripted agent in a temporary repo", needs no keys and no agent, and is clearly labelled a simulation. Driving the real work() loop, the real worktrees, the real MCP server and the real merge means the demo cannot show anything Clara does not do, and it doubles as an end-to-end test of the conductor in CI. A project whose tests really pass, and really fail on LED-5's first try (test/integration/demo-template.test.ts), keeps the demo honest and reads like a real project (B5). Its own home and folder keep a first try from leaving anything in the person's machine.

Rejected. A recorded stream of events played into the page, or a fake board (it would drift from what Clara does, and A6 asks for the real dispatch code). Calling a real model with a small budget (it needs keys, costs money, and does something different each time). Running in the person's repository or with their CLARA_HOME (a demo must leave nothing behind). Asking the person to trust the demo's checks (the demo would stop at a prompt about commands Clara wrote itself; trusting them in its own temporary home grants nothing anywhere else).

D-112. Six more agents, experimental, and the files they load by themselves

What. Clara ships adapters for Codex, Gemini CLI, Antigravity CLI, Cursor CLI, OpenCode and Copilot CLI beside Claude Code and custom. None of their CLIs is installed here, so each is written from its documentation (docs/VERIFIED.md, part 2) and labelled "experimental, not tested against the real CLI" in clara agents, clara start and clara work. Every one follows the same rules:

  • Its own controls hold the profile. Clara passes each agent the strongest controls it documents, for this run only, and writes nothing into the repository or the person's home: Codex's sandbox with --add-dir for the run branch's commit folders; Gemini's approval mode and an admin-tier policy file (--admin-policy); Antigravity's mode; Cursor's sandbox; OpenCode's rules as inline config (OPENCODE_CONFIG_CONTENT); Copilot's --allow-tool and --deny-tool. Where an agent takes deny rules (Gemini, OpenCode, Copilot), pushing and rewriting history are refused in every profile, open included. Where it has no reviewer of its own, auto is held as guarded; Codex and Copilot use theirs. open is built only with this machine's consent, and the conductor does not start it yet.
  • The files it loads by itself are trusted first. Each adapter lists the files of a repository its agent reads on its own that can start programs or let it do more (projectFiles): .codex/, .gemini/, .agents/mcp_config.json, .cursor/, opencode.json and .opencode/, Copilot's MCP files and skill folders. clara trust shows them with the board's commands, whole, a link with where it points; a run of that agent starts only once a person trusted what they hold, in the main checkout and again in the run's worktree before each attempt, so an agent that writes such a file to allow itself more gets no next attempt. Claude Code needs none: Clara passes --setting-sources user and --strict-mcp-config, so it loads neither.
  • What is not documented is not assumed. An agent that takes Clara's tools only from a file Clara would have to write into the repository (Gemini, Antigravity, Cursor) runs without them and ends with its question or summary as its last message, which the conductor reads (runEnding). One whose headless resume is not documented (Gemini, Cursor) is started again with the whole ticket. Copilot's words are read as plain text, since its JSON lines are not documented. Cursor runs as cursor-agent, its documented alias, because a program named agent on a person's path is not always Cursor's.
  • Limits bind where the agent takes them. Only Claude Code takes a turn and a spend limit; for every other agent only the run's time limit binds. Codex, Gemini, Antigravity and OpenCode report tokens, and of those only OpenCode reports spend; Cursor and Copilot report neither. The docs say this rather than implying a limit holds.

Why. D8 asks for these adapters and for honesty that "enforcement depends on each agent's own controls", and B5 asks for the label. Writing each from its documentation, with its parser fed the documented event shapes and its command checked flag by flag, makes the first real run a check of the documentation rather than of Clara. Trusting the agent's own files closes the gap D15 leaves open otherwise: a repository's .cursor/cli.json or opencode.json can allow commands or start servers before any rule of Clara's is read, the same way a check can, so it gets the same treatment as a check.

Rejected. Writing each agent's config into the worktree (the agent could commit it, and it would leave Clara's rules in the person's repository). Pointing HOME at a folder of Clara's (it signs the agent out). Leaving the experimental adapters off until each runs for real (D8 asks for them, and an unlabelled gap is worse than a labelled adapter). Passing --approve-mcps, --trust-folder or --skip-trust to get past a question (each starts the repository's own servers without a person seeing them). Trusting a folder by name without its contents (a pull changes the contents).

D-113. The real Claude Code run is a person's step, prepared as one script

What. The one capped run of the real Claude Code that M5 asks for is scripts/claude-smoke.mjs, which a person starts (docs/LAUNCH-CHECKLIST.md, step 5). It makes a throwaway repository with a board under the OS temporary folder, gives Claude Code one small ticket through clara start, sends the work back once with clara request-changes and starts it again, so the second run must continue the first one's session. Each run is capped at 12 turns, $0.40 and 10 minutes in one attempt, with a daily ceiling of $1. Without --yes it says what it would do and spends nothing; when Claude Code is not installed or not signed in it stops before the first run. It writes a report for docs/EVIDENCE/M5.md: the version, each run's outcome, checks, turns, tokens and spend as Clara recorded them, whether the session continued, the commits, and clara logs for each run. The test runs the same script against the fake agent in Claude Code's place (test/integration/claude-smoke.test.ts). The Claude Code adapter keeps its experimental label until the report is in.

Why. Claude Code is installed here and signed in only with the owner's account, under the owner's ~/.claude. A run on it would write that account's history and project state, which the brief says not to touch, and a Claude Code given a folder of its own (CLAUDE_CONFIG_DIR) is not signed in (docs/EVIDENCE/M3.md), which is where the build's runs stopped. A script makes the person's step one command, the caps are in code a test reads, and the questions D-099 left open (whether --settings rules apply with --setting-sources user, how a resumed session reports its spend) are answered by what the report shows.

Rejected. Running it on the owner's sign-in anyway (the brief's rule on ~/.claude is the narrower one, and it is explicit). Copying the owner's credentials into a folder of the build's (the same thing, done quietly). Dropping the label without a run (B5). A larger smoke test with a refused command and an answered question: each adds turns and a wait, and the fake agent already proves Clara's side of both.

D-114. On Windows an agent's .cmd script is started through cmd.exe, escaped word by word

What. Every agent and every probe of one is started by library/conductor/launch.ts. On Linux and macOS nothing changes: the program is started by name, with no shell. On Windows the program is first found on PATH as cmd.exe finds it: a name without an extension is tried only with each of PATHEXT's, in each folder in turn, and the folder the command runs in is never searched. A .exe found that way is started by its full path. A .cmd or .bat, which is what npm installs for Codex, Gemini, Copilot and an npm-installed Claude Code, is started as cmd.exe /d /s /c "<script> <words>", with the script's path caret-escaped once and each word quoted for the program, then caret-escaped twice: once for cmd.exe's reading of the line and once for the script's own reading of %*. A word with a line break cannot be escaped for cmd.exe at all, so it is refused before anything starts, with the hint to use {prompt_file} in a custom command. Clara's own adapters send the prompt on stdin, so none of them passes such a word. The probe that asks an agent for its version and sign-in starts it the same way, not through a shell, so an agent that is not installed reads as not installed on Windows too. A property test proves that any word comes through both readings as itself with nothing for cmd.exe to act on, and on Windows a test passes awkward words (%PATH%, !, &, ^, quotes, trailing backslashes) through a real .cmd script.

Why. Node does not start a .cmd file without a shell (CVE-2024-27980), and a name started without one finds only .com and .exe files. So on Windows Clara found these agents installed and then failed to start them with ENOENT, and the probe's shell turned a missing agent into an exit code of 1. A shell for the whole line would put ticket text and config words where cmd.exe interprets them. Escaping each word for both readings is the method cross-spawn uses; written here it is about a hundred lines, and adding it as a package would break the rule of no runtime dependencies. Never searching the current folder matters because a run's folder is a worktree the agent writes in: a codex.cmd put there would otherwise be started in place of the real one.

Rejected. Adding cross-spawn (a runtime dependency, and it resolves the name in the current folder too). shell: true (it splices the words into a line unescaped, and Node 24 deprecates it with arguments). Calling these agents not startable on Windows (they are the usual way to install three of the seven). Finding the agent's real JavaScript file behind npm's script and starting node on it (the script's layout is npm's to change, and it would not cover a .bat of a person's own).

D-115. The browser reads runs and changes through operations, and its approval lands the work

What. The runs view and the review room read what they show through three operations, so the CLI, the REST door and the SDK get the same answers. run.list (CLI, REST, SDK) gives the runs on this machine newest first, how many there are and how many are going, the day's spend against conductor.daily_budget_usd, and the questions runs still going wait on; clara runs now prints from it. run.get (REST, SDK) gives one run's record and its events from an index on, 500 at a time, with next, so a page can follow a run that is still going by asking from where it stopped. ticket.changes (REST, SDK) gives the files a ticket's branch changes since it left the base branch, with lines added and removed, and the unified diff cut at 400,000 characters at a line's end; the branch is the one the ticket was handed in on, or else its own. Runs are read from the session's local folder and changes from a new Session.repo, a reader of the git checkout the board lives in; the CLI gives both, and a session without them, as the hosted app's will be, refuses with NO_RUN or the new NO_CHANGES and says where to look instead. The diff is read with --no-ext-diff and --no-textconv, and the branch is checked as a branch name first.

Approving in the browser lands the work as clara approve does. The steps moved from the CLI into library/conductor/approve.ts: everything that would stop the landing, a run still going on the ticket among them, is found before the approval is recorded; once recorded, the approval stands if landing then fails part way, and approving again lands what is left. clara serve hands the server a landingApprover for its checkout, which ticket.approve through REST uses in place of the plain operation for a person; an agent's approval goes to the operation alone. An app given no approver only approves.

Why. D7 asks for a runs view and a review room, and the architecture rule says each action is defined once in library/ops and reached through every door it declares; reading run files or git from the server or the page would be a second definition. Paging the log by index rather than streaming it keeps the server free of a watcher per run and the operation a plain read. Approving in the room and landing elsewhere would make the browser's approve a different action from the terminal's under the same name, and a person who approves in the room expects the work to land as their config says. Sharing the steps keeps the refusal-before-change rule in one place.

Rejected. Pushing run events over the live connection (runs live outside the board's files, which the live connection watches; a poll of run.get while a run is open costs one small read a second). Rendering the diff as Markdown or HTML (it is the most hostile text Clara shows: the page shows it as text). Showing a pull request's diff from GitHub (M7, and it needs a token the local app does not hold). An approve.land operation of its own (two names for one action a person thinks of as one).

D-116. The runs view and the review room, and answering an agent from the page

What. Two views join the page (D7), on g u and g r. Runs lists every run on this machine, newest first, with its ticket, how it ended or that it is going, its time and spend, and the day's spend against the ceiling; a run opens beside the list with its log, each line timed from the run's start. While any run is going the list is asked again every 2 seconds and an open log every second, from where it stopped (run.get's next); with nothing going nothing is asked. Review is a queue of the work in review, the one changed longest ago first, ties in id order by number, and a room for each: the summary, the criteria with what met them, the checks recorded on the commit handed in, the diff, and the three actions, approve, request changes and reject, in that order, the same component as the ticket panel's. A diff over 300 lines is folded behind a button; lines are tinted for added and removed with the success and danger tints, and nothing is highlighted by language. Where runs or changes cannot be read here (a session without them refuses with NO_RUN or NO_CHANGES), the view says so and where to look instead; the note under the actions saying how approving lands the work shows only where it will. "Needs you" gains the questions agents wait on, each with what the agent wants to run as text, and Allow and Deny; work waiting for review gains a link into its room. Stopping a run stays in the terminal (clara stop), as only the person who started it holds it. (D-174 adds Stop to the page.)

A link carrying a new key (#key=) pasted into a tab that has the page open already reloads it, so the page talks with the server that printed the link.

The browser journeys run a real agent run: clara start with the real Claude Code adapter and conductor, and E1's fake agent first on the PATH as claude, asking leave for a command; the test allows it from the page, reads the log, opens the room and approves, and git shows the merge. The seed board's PAY-8 now hands in a real branch, and the board merges approved work on the machine, so approving it from "needs you" is checked to merge. On macOS the journeys put the real git first on the PATH: /usr/bin/git there asks xcrun where git is on every call, which inside a Playwright worker costs about 150 ms a call against 6 ms, enough to make a merge outlast a five-second wait and the keyboard journey miss a list still loading (CLA-66).

Why. D7 names both views and what they hold; D8 asks for the bridge's questions in "needs you". The buttons say Allow and Deny, not the brief's Approve and Deny, because the commands are clara allow and clara deny, and Approve already means approving work on the same page. Polling only while something moves keeps an idle page silent; runs live outside the board's files, which the live connection watches (D-115). Every text a run or a branch brings, the log, the summary, the diff and what an agent asks to run, is shown as text and never as Markdown or HTML, as it is the most hostile text Clara shows. Warm stays for what waits on a person now: an ask, a blocker, work in review, never a run that is merely going. The oldest work in review first, so none waits forgotten. Reject last and apart, away from approving.

The Linux screenshot baselines were removed with this change, since the nav and "needs you" changed in all of them. As D-097 has it, a system with no baselines writes them on its first run and CI uploads them as e2e-baselines; they are looked at and committed after the milestone's CI run. Writing a missing baseline on every run instead would let a deleted one pass unseen.

Rejected. Stopping a run from the page (it would let the page end a process a person started elsewhere; clara stop asks the run to stop, and it is the person's). Syntax highlighting in the diff (a grammar per language in the first load, for colour a reviewer can do without). Showing the log as Markdown (an agent writes it; see above). A countdown on each ask (the limit is ten minutes, said once; the page would redraw every second for it). Approve and Deny as the brief words it (above).

D-117. Setting up the conductor: setup from the lockfile, routing checked when saved, and both in the settings view

What. clara init proposes conductor.setup from the lockfiles it finds: npm ci, pnpm install --frozen-lockfile, yarn install --immutable (or --frozen-lockfile for Yarn 1, told apart by .yarnrc.yml), bun install --frozen-lockfile, cargo fetch --locked, go mod download, uv sync --frozen and poetry install --no-interaction. A project with no lockfile gets no install proposed, and neither does Python kept with plain pip. At a terminal it asks "Use these setup commands?" after the checks; --yes takes them; --json includes them. Files are read, never run, and the commands run only after clara trust, which shows them beside the checks.

config.set refuses a routing rule whose when does not parse, with INVALID_QUERY naming the rule, and only when the change is to routing, so a board with a bad rule from a hand edit can still change its other settings. clara work still refuses such a rule when it routes, as before.

The settings view gains two sections. Agent runs: the base branch; what approving does (a pull request, a merge on this machine, or nothing), as three choices that say what each does; the six limits on a run, with the bounds the board checks; and the setup commands, edited in place, removed and added. Routing: the rules in the order they are tried, each moved up or removed, and a form to add one (a query, an agent offered from the profiles and adapters, a model). A refused rule keeps its text in the form to fix. The router command, when there is one, is shown and never offered for editing. Beside the setup commands the page says that it cannot trust a command: a command changed here is one clara trust asks about before it runs.

Why. SPEC D4 has init propose "checks and setup commands from the project's scripts", and a worktree with no install fails its checks for a reason that has nothing to do with the agent's work. Only installs that refuse to change the lockfile are proposed, so a run starts from what the project pinned, and nothing is proposed where an install would choose versions or reach outside the worktree. Checking a routing query when it is saved puts the error in front of the person who wrote it, not an hour later in a clara work that stops. SPEC D7's settings list "agents, checks, routing"; the conductor's limits and what approving does are what a lead changes most. The router command and trust stay out of the page because D8 says the web UI can never grant trust, and a command offered for editing in a page served from the repository is a command a stranger's pull request could have written.

Rejected. Proposing npm install where there is no lockfile (it chooses versions, and writes a lockfile into the agent's branch). Running a detection script of the project's to find its setup (it would run repository code before trust). Refusing a bad routing rule on every config.set (it would lock a board out of every setting until the rule is fixed by hand). Editing the router command in the page (above). Dragging rules to reorder them (a move-up button does the same with a keyboard and a phone, and needs no library).

D-118. Insights from the log: flow, a seeded forecast, agent scorecards and the board at a past moment

What. Four read operations, each arithmetic over the shared event log, with no model call and nothing kept anywhere else (D11).

insights.flow (clara stats) reads a window of days, 28 by default and at most 366. It reports tickets and points done, and done per week. Cycle time runs from first entering in progress to done. Lead time runs from creation to done. It also reports the time each finished ticket spent in review and blocked, each as the 50th, 85th and 95th percentile in days, and the work in progress now. It gives the velocity of the last closed sprints, and the board's cumulative flow by day. A percentile is the nearest rank, so it is always a value that happened. A ticket done, reopened and done again counts once, at its last done.

insights.forecast (clara forecast) asks when the work left will be done. The work is a sprint (--sprint), the open tickets a query matches (an epic is the query epic:GEN-4), or both. With neither given, it is the active sprint, else every open ticket outside the backlog. Epics themselves are not counted as work. Each of 10,000 trials draws past days at random from the last 28 (--history-days) and adds up the tickets done on them until the work left is covered. The 50th, 80th and 95th percentile finishing days are the answer: "80% likely by Thu 26 Nov". The random source is mulberry32 with seed 1 unless --seed is given, so the same log, seed and day always give the same dates. A sprint that is not closed and has an end date also gets the share of trials that finished by it: "finishing by Fri 27 Nov: 85% likely". With nothing left, or nothing done in the window, the operation says why it cannot forecast instead of guessing.

insights.scorecard (clara scorecard) reads hand-ins. A hand-in is an agent's completed event, judged by the next approved, changes_requested or rejected on that ticket. Rows are per agent and model. A hand-in's model is the one named by the run_started of the run it was made in, else by the agent's last run on the ticket, else none (work done in the agent's own session). A row has:

  • hand-ins and tickets finished (hand-ins approved);
  • the first-pass rate: the share of first hand-ins approved when first judged;
  • average hours from the agent's claim, or its first run, to the hand-in that was approved;
  • every run of that agent and model and their spend, read from run_finished;
  • average spend per finished ticket, counting every run of the cycle that finished it, a run that blocked included;
  • spend per point.

--since 2w (a duration, as clara standup takes) limits the rows to recent hand-ins and runs. --export writes the hand-ins as JSON Lines, one per line: ticket, agent, model, attempt, verdict, who judged it and when, hours, runs, spend and points. These are the outcome-labelled rows D11 asks for, which a model router can learn from. Only an agent's work is scored; a person's is not.

board.at (clara board --at <date or time>) replays the log up to a moment and returns every ticket that existed then: its status, title, assignee, sprint and points. Archived tickets are left out. A date alone means the end of that day, in UTC; a time must carry its zone. A moment before the log begins gives an empty board and a warning, not an error. The CLI prints one column per status, with no query: the past board is the whole board. All four operations are open to people and agents through the CLI, REST and the SDK, but not as MCP tools: an agent at work needs its ticket, not the team's statistics, and the brief keeps the tool list at twenty or fewer. Replay now carries the title from created and from updated when it changed, so the board shows a ticket as it was named then. The operation also returns the log's first and last moments, which is the range a scrubber can move over.

Why. D11 says all of this is arithmetic over the event log, and the log is the one record every clone shares. Run files are local (D-113), but run_started and run_finished are in the log, so a scorecard read on any machine agrees. Nearest-rank percentiles never invent a duration, and they fit a team whose window holds a dozen tickets. A forecast that moves each time it is asked is noise; with a fixed seed it changes only when the work changes. Counting tickets rather than points keeps unestimated work in the forecast, and Clara's work is mostly sized by agents and people who split work small. A cycle's spend counts the run that blocked as well as the one that handed in, because the blocked run was part of what finishing cost. First-pass rate is judged on first hand-ins only, so an agent that fixes review comments is not counted twice. The export is hand-ins rather than tickets, because a router chooses an agent and model per attempt.

Rejected. Averages for cycle and lead time (one ticket left open for a month moves them more than everything else). Forecasting from points (unestimated tickets would vanish from it) and from a straight-line velocity (it gives one date with no idea of how sure it is). An unseeded forecast (the proof asks that forecasts be stable under a fixed seed). Reading run records from .clara/.local for the scorecard (another machine would score the same agent differently). Counting a person's own work in the scorecard (D11 scores agents and models; a person is not routed). A separate snapshot store for replay (the log is the snapshot store; C4.5).

D-119. Playbooks and decisions: drafts an agent proposes, notes a person accepts, matched to work by what the board states

What. A note is a Markdown file: a playbook in .clara/playbooks/<name>.md, how to do something in this project, or a decision in .clara/docs/decisions/<name>.md, a choice made and why. Front matter gives its title, status (draft or accepted), and what it is about: tickets, labels and files, where a file is a path, a folder ending in /, or a pattern with * and **. It also records who proposed it, who accepted it and when. A file with no front matter is a note a person wrote by hand, accepted as it stands and titled by its first heading. Five operations:

  • knowledge.propose writes a draft. It is open to people and agents at every door, and over MCP it is the clara_knowledge_propose tool, the seventeenth. A name is made from the title, numbered when taken, and a name given that is taken is refused.
  • knowledge.accept and knowledge.reject are a person's. Accepting twice changes nothing. Rejecting removes a draft, with the reason in the log, and refuses an accepted note: that is edited or deleted as a file.
  • knowledge.list and knowledge.get read. They are for people and agents, but not over MCP.

The log records knowledge_proposed, knowledge_accepted and knowledge_rejected.

A context pack carries the accepted notes that bear on its ticket, scored by what ties them to it:

  • naming the ticket, 8;
  • its epic or parent, 5;
  • a dependency, 3;
  • each shared label, 2, at most three;
  • a path covering a file the work touched, 2.

Ties go to decisions, then the newest accepted, then the name. At most five notes reach a pack, each cut at 2,000 characters, and each says why it is there. More than five are counted in omitted. "The files the work touched" are new too: a hand-in (completed) now records the files its branch changed against conductor.base_branch, at most 300, read from the checkout when there is one. A pack lists them for each finished dependency, at most 40. .clara/docs/conventions.md, when it exists, joins every pack, cut at 1,500 characters.

In the CLI the five are clara docs list|show|propose|accept|reject, in a new Planning group, placed before Sprints and releases because planning comes before scheduling. They are named like the view family, a noun and a verb, because clara accept alone would read as accepting a ticket.

Why. D10 asks for this: short notes, proposed by agents, drafts until a person accepts them, and relevance from "explicit links, labels, epics and file overlap. No embeddings and no model call." Weights in a fixed order make the choice explainable: "names GEN-12" is a reason a person can check, and the same board always gives the same pack. An agent writes a playbook after finding out the hard way how something works. It is the only knowledge operation the agent needs during its work, so it is the only one on MCP, keeping the tool list at twenty or fewer (D5). A person accepts, because a note joins every future agent's context, and ticket text is hostile (D15). Recording the touched files on the hand-in, rather than reading git when the pack is built, gives every clone and the hosted app the same answer. The log is shared and the checkout is not. Rejecting removes the file because a draft nobody wants is noise in a folder people read, and git history keeps its text.

Rejected. Embeddings or a model call to choose notes (D10 forbids both). Letting agents accept notes (a stranger's ticket text could then write itself into every future context). Reading the touched files from git at pack time (the hosted app has no checkout, and two clones would build different packs). One folder for both kinds (the spec's layout puts decisions under docs/ with specs and retros). A status: rejected kept in the folder (the log already says what was rejected and why). Top-level clara accept (it collides with reviewing a ticket).

D-120. Plans: proposed by a read-only agent, kept on the machine, applied as one change the log can take back

What. A plan is a JSON file in .clara/.local/plans/<id>.json (docs/FORMAT.md). It holds a summary, epics, and stories, each with a title, type, description, acceptance criteria, points, priority, labels, epic, what it waits for and a suggested sprint. It also holds the suggested sprints, changes to tickets already on the board, tickets the idea no longer needs (each with a reason), risks and open questions. Epics and stories carry refs of the plan's own (E1, S1), which can never be taken for a ticket id, so they can name each other before any of them exists. A story's epic and depends_on take either a ref or the id of a ticket on the board.

Six operations:

  • plan.propose checks the plan against the board. A plan with problems is refused with every problem as a sentence that says what to change (PLAN_PROBLEMS), and nothing is saved. Unknown tickets, epics that are not epics, items left out that others need, circles of dependencies, sprints the plan does not suggest, and changes that change nothing are all problems. People and agents can propose, through MCP, REST and the SDK. Over MCP it is clara_plan_propose, the eighteenth tool.
  • plan.show and plan.list read, for people and agents, but not over MCP. A plan is named by any start of its id; with none, the newest in review is meant.
  • plan.edit, plan.discard and plan.apply are a person's.
    • plan.edit changes the fields one kind of item has, or leaves the item out with skip. The edit is saved even when it leaves problems, and the problems come back with it, because a plan in review is the person's to finish.
    • plan.apply checks again. Then it creates the sprints that hold kept stories (none with sprints: false), the epics, the stories in an order where each comes after the plan stories it waits for, the changes (a new description becomes the ticket's opening, criteria and labels are added), and archives the obsolete tickets. New tickets go to todo, or backlog when asked. plan_applied is the last event, naming everything. It is one storage commit, so one undo takes all of it back.

The plan file is written after the board's commit, and the log decides a plan's standing. A plan whose every plan_applied was undone reads as in review again, and can be applied again. A plan with a plan_applied that stands reads as applied, whatever its file says, so it is not applied, edited or discarded again; the event names the tickets each ref became, so clara plan show can say so when the file missed the commit.

clara plan runs the planner (library/conductor/planner.ts):

  • It starts one agent in the repository's main checkout, read-only whatever its profile says. The agent gets the idea and the tickets fenced as data, the accepted notes, and a guide to the plan's shape.
  • The agent is the one named with --agent, else the agent of the board's catch-all routing rule, else claude. An adapter that cannot be held to read-only is refused.
  • Its MCP server starts with CLARA_PLAN_RUN and offers only the tools that read, and clara_plan_propose. A read-only request now names the Clara tools that change something which the run is for (claraWrites), so Claude Code's allow list holds exactly the tools that read and that one. The reviewer gets clara_review the same way, which replaces a special case in the Claude adapter.
  • The run has a record in .local/plan-runs/<id>.json and holds live/plan, so one goes at a time on a machine. It counts toward conductor.daily_budget_usd, stops at the conductor's limits, and is closed as crashed by reconciling when its process is gone.
  • An agent that proposes twice has proposed its last plan; the earlier ones from that run are discarded.
  • --update asks the agent to compare the idea with the board: what to add, what to change, and what is obsolete.

At the terminal:

  • The editable tree of D10 is clara plan show, which prints the plan as a tree with every problem, together with clara plan edit <ref>.
  • clara plan is both a command and a group: plan show|edit|apply|discard|list.
  • plan.propose is not at the CLI door: at the terminal a person asks an agent for a plan, and a person with a plan in mind writes tickets.
  • clara idea prints the idea, and --from <file> (or - for standard input) saves a file as the idea.

The plan skill and the plan prompt now propose through clara_plan_propose instead of creating tickets. The fake planner suggests only sprints it fills, and plan.apply creates only the sprints that hold kept stories.

Why. D10 asks for exactly this: a read-only run, a structured plan saved locally and reviewed as an editable tree, applied in one commit, a living plan through --update, and the plan skill through clara_plan_propose. D1 puts "plans in review" in .local: a draft is one person's until applied, and its tickets travel then. Refs exist because a plan is a graph of things not yet created. Every problem in one refusal lets an agent fix its plan in one round instead of one problem at a time. The log decides standing because undo restores the board's files, not .local, and the log is the one record that knows the plan was taken back. Holding the planner to read-only at the server, not only through the agent's own controls, is defence in depth: the idea and ticket text are hostile (D15), and a planner that could create tickets would let them fill the board. A plan run spends the owner's money like any run, so it counts toward the same ceiling. A sprint with no stories is noise on the board.

Rejected.

  • Committing plans to .clara/plans/: every clone would get every draft, and D1 puts them in .local.
  • A git commit made by the CLI: Clara never commits in the main checkout. "One commit" is one storage commit and one undo step, as for every operation.
  • Letting the planner call clara_create: D10 has a person review before anything reaches the board.
  • A full-screen tree editor in the terminal: it needs a runtime dependency or a hand-rolled TUI, is hard to test, and cannot be scripted. show and edit are both scriptable.
  • Rewriting the plan file on undo: undo writes only the board's files, and a second record of standing would drift.
  • A model call inside Clara to plan: Clara holds no AI, so an agent plans.

D-121. The plan beside the idea: an outline to edit, read again while it shows

What. The idea view's right side shows the preview or the plan, chosen with a switch and kept in the address as ?side=plan; on a phone the switch has three choices: write, preview and plan. The plan shows as an outline:

  • The plan's own epics first, each with its stories, then the board's epics the stories name, then the stories in no epic. A story under an epic that is nowhere hangs from what it names, so the problem the plan reports about it has a place.
  • Each item has a box that keeps it or leaves it out (skip), and an Edit button that opens a form with exactly the fields plan.edit takes for that kind of item. The form sends only what changed, and an emptied number or epic clears it.
  • The changes to tickets on the board, the tickets no longer needed, the suggested sprints with how many kept stories each holds, the risks and the open questions follow. What stops the plan from being applied is listed above it, and Apply is disabled until it is gone.
  • Applying asks where the new tickets go and whether to make the sprints; its notice has an Undo, and after an undo the plan waits for review again, as the log says. Once applied, each item links to the ticket it became. Discarding asks first.
  • Only people see the boxes, Edit, Apply and Discard. An agent's page says that agents propose plans.

The pane is a chunk of its own, fetched the first time it shows (or when the pointer or focus reaches its switch). Plans live in .clara/.local/plans, so no board event says one arrived: while the pane shows, the page asks for the plans every three seconds when the tab is visible, when the window comes back into focus, and on every board change, and draws again only when the answer differs.

Why. D7 asks for the plan "as an editable tree" beside the idea, and D10 for an editable tree reviewed "in the terminal or the plan view". A box per item is the quickest way to cut a plan down, which is most of reviewing one; a form per item keeps every field reachable by keyboard with the controls the rest of the page uses, and the same form serves stories, epics, changes and obsolete marks. The address keeps the side, so a link opens the plan. The first load has a budget of 100 KB (C2) and the plan is used in a few sittings per project, so it should not weigh on every load. Polling a cheap local read is the simplest way to see a file that only this machine writes; watching .local would mean a second watcher in the server for one view.

Rejected.

  • Editing each field in place in the tree: dozens of inputs per plan, a tab order through all of them, and the plan's problems are about several fields at once.
  • Dragging stories between epics: not keyboard operable on its own, and the Epic field already moves a story.
  • Server-sent events for plan files: a watcher on .local for one view, when a three-second read costs a few hundred bytes.
  • A plan view of its own in the navigation: D7 puts the plan beside the idea, where the text it was made from can be read and changed.

D-122. The insights page: one window for every part, bars and columns, a forecast in dates

What. The insights view (g then n) reads insights.flow, insights.forecast and insights.scorecard and draws nothing the library did not compute. One switch at the top chooses the window, 14, 28 or 90 days, kept in the address as ?days= (28, clara stats's own, leaves it bare; a window the page does not offer falls back to 28). The same window sets the flow's days, the history the forecast takes its pace from, and how far back the agents' table counts. The page reads again when the window or the board's version changes, so it follows the CLI and agents live. Top to bottom:

  • Figures: done and a week's average, the median cycle, lead, review and blocked times, each with how long 85% took and of how many tickets, and the work in progress now.
  • Flow: two charts side by side, stacked on a phone.
    • Done each week is a bar a week in --clara-chart. It counts points once any finished ticket had them, with a switch to tickets. A week the window cuts at either end is drawn lighter and says which days count.
    • Tickets by state stacks four steps of one blue (--clara-flow-todo to --clara-flow-done, darker toward done on the light canvas and lighter toward done on the dark one), the work done at the bottom, a column a day, or a column a week (at each week's end) once the window holds more than 35 days. The backlog is left out.
    • Both have a readout above that names what the pointer or the arrow keys picked, a 2px gap between bars and segments, and their numbers in a table under "Show the numbers".
  • Velocity: the sprints closed most recently.
  • Forecast: the dates by which 50, 80 and 95% of the seeded futures finished, the chance of finishing by the sprint's end, and where the numbers came from (tickets, days, trials, seed). With no pace it says why and what would give it one.
  • Agents: a table per agent and model, scrolled sideways on a phone. Spend is a dash for work done in an agent's own session.

The view is a lazy chunk of 5.4 KB gzipped.

Why. D7 asks for "velocity, cycle time, flow, forecast and agent scorecards", and D11 makes all of it arithmetic over the log. That arithmetic already lives in library/insights, tested, so the page only shapes it, and facts.ts and chart.ts keep that shaping testable without a browser. One window for the whole page means every number on it answers the same question; three fixed windows are the ones a team compares and fit in a link. Columns rather than a stacked area, because the log gives one count per day: an area would draw changes between days that never happened, and a column per day is read and picked one at a time. One hue in steps, because the bands are an order (to do, in progress, in review, done), not identities, and colour carries meaning and nothing else. Done sits at the bottom so the band read most has a flat baseline. A forecast reads as dates a person can plan around; a histogram of outcomes asks the reader to do the reading. A lighter, labelled partial week stops the first and last bars from reading as a slowdown.

Rejected.

  • A stacked area for the cumulative flow: it implies continuous change between daily counts, and its bands cannot be picked one day at a time.
  • A date-range picker: any two dates make links nobody else reads the same way, and a forecast over a few days of history says little.
  • Throughput and cycle time on one chart with two axes: two scales on one plot is the classic misreading, so the times are figures and the throughput is its own chart.
  • A colour per agent in the table: the table names each agent, and the agents' colours mark identity on the board, where many share one surface.
  • A histogram of the forecast's futures: the three dates carry what a lead acts on, and the trials and seed say where they came from.

D-123. clara list keeps under its limit on a slow runner

What. The hosted CI's run 44528475733 at 4411f95 measured clara list on 1,000 tickets at 217.4 ms on Ubuntu with Node 22 and 210.1 ms with Node 26, over the 200 ms limit. Node itself took about 23 ms to start on those runners, against 15 to 19 ms on earlier runs, so the runner was slower and the CLI had grown. Five changes, measured against the build of 4411f95 on the same machine, alternating, best of 15: 110 to 118 ms before, 93 to 105 after; medians 142 to 147 ms before, 128 to 132 after. The budget script now gives 112 to 115 ms, and 165 ms for the first command on a board, which was 200 to 225 ms (docs/BENCHMARKS.md).

  • Node's compile cache, kept under CLARA_HOME. module.enableCompileCache keeps the code V8 compiled of Clara in CLARA_HOME/cache/node, beside the boards the CLI remembers (D-042), so a command does not compile the library again: about 12 ms. It is turned on only once CLARA_HOME/cache exists, so a person who never read a board gets no CLARA_HOME made for them, and never for clara demo, which leaves the person's CLARA_HOME as it found it. The rule is one tested function, compiledCodeFolder. Bun has no such cache, and NODE_DISABLE_COMPILE_CACHE=1 turns it off as it does for any Node program.
  • Node's crypto module only when a write needs it. Loading it cost every command about 3 ms. Disk storage asks for it on first use, and the cache file is named by the 128-bit FNV-1a hash of the board's real path instead of SHA-256. The file says which board it holds and is ignored for any other (D-042), so two paths with one name would only cost each other their cache.
  • The rarer commands load their code when run: shell completion, what init detects, trust, verify, stats, forecast, scorecard and board --at.
  • The tree walk joins each name to its folder by hand and writes a file's tag as one string, instead of a thousand calls to path.join and four array steps a file.
  • Writing the cache back reads a change time only for a file the cache does not already hold at that tag. A held file had settled when it was kept. Before, every command turned the change time of every file from base 36 back into a number, only to find nothing to write. Why. The brief sets the limit, and a budget moved when it is hit is not a budget. Hosted runners vary by more than half from one run to the next, so being under the limit on a good runner is not enough; the margin has to come from the CLI. D-038 and D-042 rejected Node's compile cache because it writes to the OS temporary folder, and Clara writes nothing outside the repository and CLARA_HOME. Kept under CLARA_HOME/cache, it keeps that rule, and it is the largest single saving left. Consequences, accepted. (1) CLARA_HOME/cache/node holds about 1 MB of compiled code for each version of Clara and Node, which Node does not prune. Like the board cache, deleting it is always safe. (2) Node writes it with the person's default permissions inside CLARA_HOME/cache, which the CLI makes with mode 700, so only this person can write what V8 loads from it; V8 checks each entry against the source it was compiled from. (3) A board cache written before this change is under its old name, and stays until CLARA_HOME/cache is cleared, as D-042's consequence (3) says of a deleted board. Rejected.
  • Building each operation's schemas the first time it is used. Making 74 operations' zod schemas at load is now the largest cost left, about 15 ms, but every operation and every door that reads a schema would change. It is the next step if the limit is threatened again.
  • A registry of only the operations the CLI command needs (C4.1 keeps one registry, which is what makes every door the same).
  • Reading git's config files instead of starting git for the user's name. Includes, conditional includes, and the system and XDG files would make a second copy of git's rules, to save 3 ms that already overlap reading the board.
  • Zod's jitless setting (no change measured).
  • Scaling the limit by how fast the runner starts Node, rejected in D-037 for the same reasons.

D-124. The graph: columns by what each ticket waits for, words for every line, one forecast date

What. The graph view (g then g) draws one sprint's or epic's tickets, chosen with a button beside its name and kept in the address (?sprint=S3, ?epic=CLA-4); without one it is the sprint the board is on, else the first epic with work. The layout is written by hand in web/views/graph/layout.ts, a Sugiyama layout cut down to what a sprint needs:

  • Columns. A ticket sits one column right of the furthest thing it waits for, so a column holds work that could go at the same time.
  • Passes. An edge that skips columns runs through a slot of its own in each column it crosses, so a line never passes under a ticket.
  • Order. Each column is sorted by the mean place of its neighbours, a few sweeps each way, and kept only when it crosses fewer lines; the board's rank breaks ties, so the drawing holds still while nothing changes.
  • Outside work. A ticket the work waits for that is not in it is drawn dashed, at the top of the first column, and says "Outside this sprint".
  • Loops a hand edit left are named above the graph and left out of the drawing, as clara doctor reports them.

Each ticket is a link that opens it over the graph, and says its state and what it waits for in words ("Waiting for PAY-4"), with what its lines draw as its description ("Waits for PAY-3. PAY-7 waits for it."). The arrow keys follow the lines: left to what a ticket waits for, right to what waits for it, up and down through a column, Home and End to the first and last. The drawing scrolls in its own frame, so a wide graph never scrolls the page.

During clara work it is the flight deck. A ticket a run is going on wears the agent's hue, as a card does, with a pulsing dot and "claude, 4 min, $0.32", from the runs the page already polls. The line above adds up the tickets and points done, the day four in five simulated futures had finished by from insights.forecast (with the chance of the sprint's end, for a sprint that has one), and the agents going with what they have spent. The view is a lazy chunk.

Why. D7 asks for "a simple layered layout written by hand" that lights up during clara work "with progress, spend and a forecast". Columns by longest path make the drawing answer the question a lead asks of it, what can go now and what comes after, and they are cheap and stable: a sprint has tens of tickets, so the whole layout runs on every change without a worker. Rank breaking ties means a ticket only moves when its dependencies do. A graph is the view most likely to fail people who cannot see it, so every line is also a sentence and a key, rather than an image with an alt text that cannot hold its structure. The forecast is the library's, seeded, so the graph and the insights view never disagree. One date on the line, because a line above a drawing is glanced at; the insights view keeps all three.

Rejected.

  • A graph library (dagre, ELK, d3-dag). Each is larger than the whole view's chunk, and the spec asks for a layout written by hand.
  • A force-directed layout. It moves on every change and does not show order, which is the one thing the graph is for.
  • Edges drawn straight across columns. They pass under tickets once a sprint has more than a handful, and a reader cannot tell which ticket a line ends at.
  • The whole board as one graph. Hundreds of tickets make a drawing nobody reads, and a sprint or an epic is the unit work is planned in.
  • Dragging tickets to add a dependency. A drag cannot be done by keyboard as easily as clara link or the ticket's own fields, and it would make a drawing's place mean something it does not.
  • Coloured lines by state. Colour carries meaning and nothing else: lines are neutral, and only a blocked ticket is warm, because a person is needed.

D-125. The pages in .clara/docs are read as people write them

What. knowledge.pages lists the Markdown pages people keep in .clara/docs beside the decisions: the conventions first, then specs, retros and the like by name, each going by its first # heading as a note written by hand does. knowledge.page reads one. They are clara docs pages and clara docs page <name> in the terminal, and over REST and the SDK; not over MCP. A page is a top-level <name>.md: decisions/ holds notes, and a file that is not Markdown is no page. Nothing in Clara writes a page. A reader that prints a page's title drops the heading the text opens with, so a title is never shown twice.

Why. D1 puts "decisions, specs, retros, conventions" in .clara/docs, and D7's docs view shows "decisions, playbooks and specs". Until now Clara read only the conventions, and only into context packs. A spec is long, written by people in their own editor and changed in review with the code it describes; read as it stands, the repository stays its one source. Agents do not need a tool for it: the conventions are in every context pack, and a spec is a file in the checkout an agent already works in, while D5 holds the MCP tools to twenty.

Rejected.

  • Drafts and acceptance for pages, as for notes. They fit a short note an agent learned and a person vouches for, not a document people edit together over weeks.
  • Matching pages to work for context packs. Nothing on a page says which work it bears on, where a note's front matter does; a spec that matters to a ticket is named in its description or in a decision.
  • An editor for pages in the browser. It would copy, worse, the editor and the review people already use for the text beside their code.

D-126. The docs view lists drafts first and says who each note reaches

What. The web gains a docs view (#/docs, g d), loaded the first time it is shown. A list in four groups (drafts, the longest waiting first; accepted playbooks; accepted decisions; the pages in .clara/docs, the conventions first) beside the doc chosen, which is kept in the address as ?doc=<kind>/<name>. A draft has Accept and Reject for a person, each with Undo; rejecting asks first and takes an optional reason, which goes in the activity log. Each note says in words which work it reaches, following what library/context/notes.ts matches: the tickets it names and the work under or waiting for them, its labels, its paths. The view reads through knowledge.list, knowledge.get, knowledge.pages and knowledge.page, and writes through knowledge.accept and knowledge.reject; it has no operation of its own. The router now leaves a / in a query as it is, so the address reads #/docs?doc=page/conventions.

Why. SPEC D7 asks for docs "with drafts proposed by agents waiting for acceptance", and a draft that nobody sees is never accepted, so drafts open the list. A draft is not warm and not in what needs you: nothing stops while it waits (SPEC D10, needs you is blockers, reviews, approvals and mentions). Saying who a note reaches is what lets a person judge it: a decision that names no ticket, label or path reaches no agent, and the view says so rather than let it look useful. The doc in the address makes a draft linkable from a chat or a pull request.

Rejected.

  • Editing notes and pages in the browser. Git and the editor people use already do it with history and review; the view says which file to edit.
  • Showing drafts in what needs you, or warm. It would make every agent's suggestion an interruption, and the counter would stop meaning "something is waiting on you".
  • A docs view that reads the files itself. It goes through the same operations the CLI and MCP use, so the rules (drafts reach no agent, an accepted note cannot be rejected) hold once.

D-127. The replay scrubber steps from one change to the next

What. The activity view gains Replay: a scrubber that shows the board at any moment the feed holds, rebuilt from the log by board.at, the operation clara board --at uses. Its stops are the moments the feed's events were written, oldest first, so each step is one change; events written in the same second are one stop, as the log keeps time to the second and the board is only ever seen after all of them. The moment is kept in the address (#/activity?at=2026-11-12T15:04:09Z, or a day, which means its end in UTC, as the CLI reads it), so a past board can be linked. Under the scrubber are the changes made at that moment; on the board, the tickets they touched say "Changed". Keys: the range input's own (arrows, Home, End), an Earlier and a Later button, and Play, which steps on every 800 ms and can be paused. Opening it puts the keyboard on the scrubber; Back to now returns it to the Replay button. The feed's filters narrow the stops to one person's or one ticket's changes. The scrubber is loaded the first time it is used. The router now leaves a : in a query as it is, so the address reads as it was written.

Why. SPEC D7 asks for "a scrubber that replays the board to any past moment", and D11 for replay "in the UI scrubber and with clara board --at", with no model calls. Stops at changes, not at even steps of time, are what make a scrubber worth moving: a week of a project is a few busy hours and long quiet nights, and a time-linear slider spends most of its length showing nothing happen. One operation for both doors means the CLI and the page cannot disagree about the past, and M6's proof, that the replay equals the history, is tested in the browser against what clara list said after each change.

Rejected.

  • A stop for every event. Events in one second cannot be told apart by the log, so the board between them would be a guess.
  • A slider over time. It moves through empty hours, and a step of the keyboard would skip or repeat changes.
  • A time link on every line of the feed. A hundred extra stops for the Tab key, for what the scrubber already does.
  • Keeping the feed under the replay. The changes at the moment are listed with the scrubber; the whole feed beside a past board reads as if both were the present.

D-128. The demo plans its release as a sprint, so its graph lights up

What. The demo's script names a sprint (board.sprint: a name, a goal and how many days it runs). prepareDemo plans it from today, puts every open ticket but the backlog's in it as it creates them, and starts it once they are all there, as a lead would with clara sprint. In a browser, the graph and sprint views open on that sprint, so the dependency graph shows the release: tickets waiting on others, agents' runs lit while they work, and what waited becoming ready as each ticket is merged. A browser journey runs clara demo itself, with a stand-in for the system's browser, and watches the graph until LED-3 lands and the tickets waiting on it are free; then it stops the demo with Ctrl-C and finds its folder gone.

Why. A6 promises a demo where "the dependency graph lights up as work lands". The graph shows the active sprint by default, and an epic or a sprint otherwise; the demo had neither, so its graph said to plan a sprint. A sprint is what a team starting a release would make, so it is the honest way to fill the view, and it gives the sprint view its chart and the insights view a commitment to measure. The dates are today's, so the sprint is never shown as late or in the future, whenever the demo runs.

Rejected.

  • Defaulting the graph to every open ticket when no sprint is active. On a real board that is hundreds of tickets, and the graph's empty state already says what to do.
  • An epic over the demo's tickets. The graph can show one, but a person would have to pick it, and nothing about the demo's project is an epic: it is one release.
  • A faster pace for the journey through a setting only tests know. The demo is tested as it ships; the journey waits for the first merge, about half a minute, not for the whole run.

D-129. Sync reads git and writes only what is new

What. clara sync pulls (fast-forward only, when the branch tracks a remote one), then runs sync.apply. That operation asks git, through the session's repo reader, for every branch here (local and fetched), the commits on any of them whose message names a ticket, and those on the base branch, origin/<base> first and then <base>. A commit message links the ids it holds as the board writes them (APP-12), and a branch name the ids it holds in any case (app-12-login). A commit on the base branch whose message puts close, fix or resolve, in any of their forms GitHub reads, right before an id moves that ticket to done. It is credited to the committer of the commit on the base branch's first-parent line that brought it in: the merge, or the commit itself when it was made or fast-forwarded there. When GitHub's website made that commit (noreply@github.com), the author is credited, since GitHub commits for whoever pressed the button. The name becomes a board name as clara init makes one from git config user.name; a name that cannot be one is credited to system. Each ticket gets one synced event recording what was new (commits, branches, closing commits seen on the base branch), and earlier synced events are what "new" is measured against. Then sync commits .clara, and only that path, with a message that lists what it recorded, and pushes with --push. Its git commands carry CLARA_SYNCING=1.

Six guards keep the board from lying:

  • A commit or branch older than its ticket, by more than an hour for a slow clock, is about whatever had the id before, such as a tracker the team used before Clara.
  • A commit whose subject starts clara: is the board's own, and names tickets to say what happened to them, not to link work.
  • A closing commit is recorded in landed the first time sync sees it on the base branch, whatever the ticket's status, so a ticket a person reopens stays open.
  • A revert closes nothing, though git's message for it quotes the closing words of the commit it undoes: a subject Revert "…", or a body saying This reverts commit <sha>. Undoing work never finishes a ticket, and a ticket reopened because its work was reverted stays open.
  • An epic is never closed by a merge: it follows its tickets (rule 10).
  • When git cannot say how a closing commit reached the base branch, nothing is closed.

Why. D12 says the board "should not be able to lie, because it is derived from the repo". Recording git's facts as events keeps the board a plain folder that any reader replays, and measuring against them makes sync safe to run from a hook after every commit, from an Action on every push, and by hand, on any number of machines whose logs git merges as a union. Messages link only the uppercase form because a key like UTF would otherwise link every utf-8 in a message; branch names are lowercase by habit, and a branch has no prose in it. Finding the landing by halving the first-parent line costs a few merge-base --is-ancestor calls per closing commit, where --ancestry-path --first-parent cannot see a merge through its second parent. Squash merges made on GitHub credit the pull request's author, who is GitHub's author of the squashed commit; that is who did the work, but not always who merged it, and the hosted app's merge (M8) knows the difference.

Rejected.

  • Asking GitHub's API who merged. Sync runs offline, in hooks and in Actions alike, and a board must not need a token to follow its own repository.
  • Writing the links into the ticket's file. Ticket files are what people edit and merge; commits on every branch would make them conflict on every sync. The log merges as a union.
  • Closing on any commit that names a ticket. A commit that mentions work is not the work being finished; GitHub's closing words are the convention teams already write.
  • Reading git log --all. It includes stashes and notes, which are nobody's work.
  • Rebuilding the links from scratch on each sync without events. Then a reopened ticket would be closed again by the commit that closed it the first time.

D-130. Hooks record what git did and leave committing to sync

What. clara hooks install writes two POSIX sh hooks, post-commit and post-merge, into the folder git rev-parse --git-path hooks names, which every worktree of the repository shares. Each runs clara sync --no-pull --no-commit --quiet: it links the new commit and its branch to their tickets and closes what a merge brought onto the base branch, and changes nothing but .clara. It never pulls, commits or pushes. It finds the project's own Clara in node_modules/.bin first, as the lockfile pins it, but only when git tracks nothing in node_modules: a clara that came in a commit is someone's script, and a pull would run it. Then one on the PATH, and otherwise nothing. It does nothing while sync itself commits or pulls (CLARA_SYNCING), inside an agent's run (CLARA_RUN: the conductor answers for what a run does to the board), while git replays commits (a rebase or git am keeps rebase-* in the git folder, a cherry-pick or revert of several keeps sequencer), or where there is no board. Git runs post-commit for each commit it replays, and a change to .clara left by one could stop the next step; the commits a rebase replays are not yet where they will stay either. The board follows them at the next commit, merge or clara sync. A person who pulls with --rebase over changes the hooks left waits for git to ask them to commit or stash; clara sync, which carries the board across a pull, or git config rebase.autoStash true, saves that step. Its exit never stops git; when sync fails it prints one line that says to run clara sync, so a broken board is not hidden. A line in each hook marks it as Clara's; install writes only hooks that are missing or marked, refuses before writing anything when any one is another tool's, and refuses outright when core.hooksPath hands hooks to another tool, saying the line to add there. clara hooks remove takes away only marked hooks. Both are for a person.

clara sync's pull now carries the board's waiting changes across it. Hooks and every command leave changes in .clara uncommitted, and git pull --ff-only refuses whenever a pulled commit touches a file with changes, which the month's activity log nearly always is. So when nothing outside .clara has changes, sync pulls with --autostash; .clara/.gitattributes merges the activity log by union, so both sides' lines stay. Git exits 0 even when reapplying the stash conflicts, so sync asks git for conflicted files after the pull and, if there are any, fails with their names and the steps to settle them; git keeps the stash. When a person has their own uncommitted work, sync never stashes it: the plain fast-forward runs and says what git said.

Why. D12 asks for hooks that run sync "quietly after commits and merges". A hook that committed would make a commit the person did not make after each of theirs, double the history, and race with their next command. Recording only keeps the person's history theirs and makes clara sync the one place that commits. The guards follow from what runs the hooks: sync's own commit would set them off again, and an agent's run already writes its own record.

Rejected.

  • Committing the board in the hook. It doubles the commits, and a commit the person did not ask for lands on their branch.
  • A pre-commit hook that stages .clara into the person's commit. It mixes board changes into unrelated commits and runs before the commit it should read exists.
  • post-checkout and post-rewrite hooks. A checkout changes no history, and a rebase's new commits are linked by the next sync that sees them.
  • Chaining or overwriting a hook another tool wrote. Clara cannot know what that hook expects, and a person who uses husky or lefthook adds one line where they manage hooks.
  • Running sync in the background from the hook. The person's next command would race with it on the same files.
  • Stashing a person's own uncommitted work across the pull. Sync changes the board, not their work.

D-131. The badge is drawn by Clara, from the board, with no service

What. clara badge [sprint] prints a flat SVG badge, 20 pixels high: the active sprint's name and its points done of all its points ("Sign-in week | 3 of 5 points"), or its tickets when none has points, or "tickets | 2 open" when no sprint is running. Blue means a sprint is running, green that all its work is done, grey neither; white text passes AA on each. --out <file> writes it to a file inside the repository and nowhere else. The drawing is a pure function in library/export/badge.ts, so the static board (D-132) and the Action draw the same badge. Text is measured with Verdana's widths and each text is held to its measured length with textLength, so a viewer without Verdana still fits it in its box. A sprint's name is cut to forty characters, stripped of control characters and the marks that reorder text, and escaped. The SVG has role="img", an aria-label and a <title> that say what it shows.

Why. D12 asks for "an SVG such as "sprint 3: 12 of 20 points"". A README badge is the board's one view that strangers see, so it must be right with no server: it is a file a workflow commits or publishes with the static board. A sprint name is written by anyone with commit access, and an SVG is markup, so its text is treated as hostile like any ticket's.

Rejected.

  • Pointing at a badge service with the numbers in the URL. It sends the board to a third party and breaks Clara's promise of no network calls but the ones the user configured.
  • Measuring text with a font library. It would be the first runtime dependency for one badge.
  • Printing to a redirect only. PowerShell 5 writes a redirect as UTF-16, which browsers refuse as SVG; --out writes UTF-8 on every platform.
  • An MCP tool for it. Agents have no README to put it in, and the tool count stays under twenty.

D-132. The static board is the web app reading a snapshot written into its page

What. clara export --static --out site copies the built web app into a folder of the repository and writes a snapshot of the board into its index.html, as a <script type="application/json" id="clara-snapshot"> element. The page finds the element and reads the board from it instead of from a server: the same views (board, backlog, sprint, graph, activity, docs, insights), the same filters, ticket panels, timelines and replay of the past, and nothing that changes the board. The snapshot holds three kinds of answer:

  • the board as board.get gives it, and the whole activity log, undone events and all;
  • what only the operations can answer (each ticket's text and commits, flow, forecasts, scorecards, burndowns, the docs), asked once each, now, through the same operations the server runs, and kept by the operation's name and input (library/export/snapshot.ts);
  • what the page works out itself, with the same library code the operations call: a filter (library/query/tickets.ts), the activity feed and a ticket's timeline (library/log/effective.ts), and the board at a past moment (library/log/replay.ts). These moved out of the operations for this, and the operations call them.

The store has a read-only mode: every change is refused before it reaches a client, the clock is pinned to when the snapshot was taken, and each view leaves out its buttons, editors and "add" rows, and words its empty states for a reader. A banner says when the board was exported and from which commit, and the sidebar shows "Snapshot" where it shows "Live". The review, runs, idea, settings and needs views are not offered: they are about acting on the board, or about this machine. The snapshot's client is a lazy chunk the served board never loads.

The export session leaves out .clara/.local, so runs, plans and undo history never reach a public page; the snapshot holds only what the repository holds. The commit is recorded only when .clara has no uncommitted changes, so a page never vouches for a commit that is not what it shows. The page carries its own content security policy in a meta element, the server's with connect-src 'none'. Every < in the snapshot is written as \u003c, so no ticket's text can close the element. --out must be a folder inside the repository after following links, and not the repository itself, .git, .clara or the build; a folder that holds other files is refused, and one Clara exported before has its page and scripts replaced and keeps the rest, such as a CNAME.

Why. D12: "clara export --static writes a self-contained read-only site with a snapshot of the board. Every open-source project using Clara gets a public roadmap for free." Reusing the web app means the public board is the board people already use, held to the same tests, budgets and accessibility checks, and not a second renderer that drifts. Working out filters and replay in the page keeps the snapshot to one copy of each ticket and the log, rather than an answer for every query a reader might type. A unit test asks the page and the operations the same questions about the same history and requires the same answers; the exported page is compared with one kept in test/fixtures/export/.

Rejected.

  • A separate static renderer of HTML pages. Two views of one board would disagree, and the filters, timelines and replay would have to be written twice or left out.
  • The snapshot as a separate board.json fetched by the page. It needs connect-src 'self' and a second request that a host can serve stale or not at all; written into the page, the board and the page it is drawn in are always the same export. The site still needs a web server, as browsers do not run module scripts from a page opened as a file.
  • Exporting every answer for every query. The questions a reader can type have no end.
  • Writing outside the repository, or into a folder of unknown files. Clara writes nowhere but the repository and CLARA_HOME (D-038), and replacing a folder it did not write would lose work.
  • A JavaScript hash in the policy instead of a data element. The snapshot is data, not script, and a policy that allows one inline script is one more thing to get wrong.

D-133. The GitHub Action is Clara's own command line, run by a composite action

What. action/action.yml is a composite action with one input that matters, mode: validate, sync, work, publish or digest. It sets up Node, then runs clara github action <mode> from npm at the version the workflow names, or from the checkout itself when version is workspace, as Clara's own repository does. Inputs reach the script only as environment variables, never written into it, so no input or event text can become shell. Each mode is code in cli/github/, run in the same process as any other command, through the same operations; the Action adds nothing the command line cannot do and holds no state.

  • validate, on pull requests: runs the doctor on the pull request's checkout, finds the tickets it closes in its title and its commits with the merge rules' own reading (D-129), and keeps one comment on the pull request up to date with both, written to the job's summary too. It fails the check only when the doctor finds an error. Ticket titles and doctor text are escaped as Markdown and stripped of mentions, so a ticket cannot notify anyone or inject markup into the comment. A pull request from a fork gets a token that cannot comment, so it gets the summary alone.
  • sync, on pushes to the base branch: clara sync --push as github-actions[bot]. It does nothing on another branch, or when the newest commit is the board's own, so its own push never starts another round. A push refused because the branch moved drops only the commit this run made, which is derived and can be made again, and syncs again on the new tip, three times at most. The workflow's concurrency group keeps two syncs from racing.
  • work, on a schedule or by hand: trusts the board's commands, since the workflow runs only what is merged into the base branch, and runs clara work --once --runtime actions. Agents whose profile says runtime: actions run here; clara work on a machine leaves their tickets to the workflow and says so, and the workflow leaves every other ticket to the machines. Each ticket handed in has its branch pushed and a pull request opened whose title says (closes APP-12), so merging it marks the ticket done by the merge rules, credited to the person who merged. The board's changes are committed and pushed after a rebase. The GitHub token is kept from the agents: the workflow checks out without keeping credentials, Clara passes the token to git and gh only for its own push and pull request, and it is not in the environment agents are started with. The agent's own key comes from a repository secret, and a workflow without it skips cleanly.
  • publish: clara export --static (D-132) and clara badge into _site, which the workflow deploys to GitHub Pages with GitHub's own Pages actions.
  • digest, on a schedule: the standup, or the sprint's summary, posted to the webhook in the CLARA_WEBHOOK_URL secret, shaped for Slack, Discord or any service that takes { "text" }. Without the secret it says so and succeeds. Only https addresses are posted to, the address is never printed, and ticket text is escaped for the service it goes to.

clara github setup writes the workflows a person picks into .github/workflows/, from templates in templates/workflows/: validate and sync by default. Each pins every action to a commit, gives every job a timeout and only the permissions it needs, and sets a concurrency group. It never replaces a workflow that differs from its template without --force.

Why. D12 asks for an Action with these five modes, the runtime from D8, and guards against commit loops and concurrent runs. Running the command line keeps one implementation: what the Action does on GitHub is what a person can run and test on their machine, and the tests run each mode against real temporary repositories with a bare remote, a local server standing in for GitHub's API and the webhook, the fake agent and a fake gh. A composite action needs no build of its own and no image, and runs on every kind of runner.

Rejected.

  • A JavaScript action bundled with ncc. A second build of Clara, committed, that would drift from the published one; the composite action runs the published package itself.
  • Parsing commits and pull requests in YAML and shell. Untestable, and a classic way to let a title run as a command.
  • A personal access token in the templates. The workflow's own token is enough for every mode; the one cost, that a pull request opened with it starts no workflows, is written down with how to use a GitHub App's token instead.
  • Letting the agent hold the GitHub token. D15 says agents never push; a token in their environment would let them.
  • Posting digests to any http address. A webhook address is a secret, and it should not travel in clear text.

D-134. The workflows clara github setup writes run Clara from npm, at its own version

What. Each workflow clara github setup writes runs npx --yes <package>@<version> github action <mode>, the version being the Clara that wrote it, after GitHub's own checkout and setup-node actions, pinned to commits. The composite action in action/ runs the same command; it is for Clara's own repository, which runs the checkout itself with version: workspace, and for anyone who prefers uses:. Left empty, its version is the one in the package.json beside it, so pinning the action to a commit pins Clara too. The work workflow looks for an agent's key before anything else and passes when there is none; it installs only the command lines of the agents whose key the repository has. publish runs after each sync, since the board's commit is pushed with the workflow's token, which starts no workflow by itself. GitHub matches workflow_run by a workflow's name, and a pull request, a fork's among them, can bring a workflow named Clara sync; so publish builds after a sync only when that sync passed and ran on a push or by hand.

Why. E2 asks that every action be pinned to a commit. When a person runs setup, the commit of Clara's action that matches their version is not something their Clara can know, while the npm version is exactly itself; the board on GitHub is then kept by the very code that keeps it on their machine. Running setup again from a newer Clara is how the workflows are upgraded, and the change shows in a diff.

Rejected.

  • uses: sherwinvishesh/clara/action@v1 in the templates. A tag can be moved, so it is not a pin.
  • Writing the latest version (clara@latest). A new release would change what runs on GitHub with no commit in the repository saying so.
  • Installing every vendor's agent in work. Slower, and it would put command lines the board does not use into a job that holds a write token.

D-135. The npm package is clara-ipm; the command stays clara

What. The package is published as clara-ipm, for Clara intelligent project management. It installs two commands, clara and clara-ipm, both the same program. The repository, the product, the .clara folder, the MCP server's name, the plugin's name and CLARA_HOME (~/.clara-pm) keep their names. Everything that starts Clara through npx (the plugin, clara setup, clara github setup, the composite action, hints) takes the name from package.json, so the rename is that one field plus regenerated docs and test fixtures. Why. The owner chose it during M7. clara belongs to another publisher (D-001), so npx clara would run their package; clara-ipm was free on 2026-11-24. npx runs the command named like the package, so clara-ipm must be one of the commands; it takes the place of the brief's clara-pm, which existed for the same reason, a second name when another tool owns clara. Rejected. Three commands (clara, clara-pm, clara-ipm): one fallback name is enough. Renaming CLARA_HOME to ~/.clara-ipm: the brief names ~/.clara-pm, and the folder is not the package. Supersedes the name in D-001.

D-136. Clara is licensed under Apache-2.0

What. LICENSE is the Apache License 2.0, verbatim, and a NOTICE names the copyright holder and where the bundled packages' licences are. package.json, and from it the plugin's manifest, say Apache-2.0. NOTICE ships in the package. Why. The owner's change from the brief's MIT (C1), during M7. Apache-2.0 is as permissive for users and adds an explicit patent grant. Nothing had been published under MIT. Rejected. Dual licensing under MIT and Apache-2.0: the owner asked for Apache-2.0.

D-137. The Action's work mode runs its agents in a job with no token, and pushes from another

What. The workflow clara github setup work writes has two jobs. work (contents: read) runs clara github action work --out "$RUNNER_TEMP/clara-work", with no GITHUB_TOKEN: Clara refuses one there, in any of the variables git or gh read, and refuses an --out inside the repository. It works the tickets, commits the board on the commit it began from, and leaves that commit and each ticket handed in (id, branch, commit) as a git bundle and a manifest (cli/github/handoff.ts), uploaded as an artifact for a day; its land output says whether there is anything. land (needs: work, contents: write, pull-requests: write) runs no agent: work --land <folder> (cli/github/land.ts) checks the folder (see the security model's Tokens), pushes each branch, opens its pull request and pushes the board. When someone pushed first, the board's commit is rebased on their work, up to three times; when it clashes, it goes to clara/board-<commit> and the run fails with an annotation saying to merge it. The composite action takes a land input and unsets the token for the agents' step. syncAndPush loses its keep mode, which only work used. Why. The fresh-eyes review of M7 found that the one-job design kept a token able to write the repository in the processes that started the agents, where any process on the runner can read it (/proc/<pid>/environ): a ticket that talked an agent into reading it could push anything to the base branch. Taking it out of the agents' own environment was not enough. It also found that a refused push with a clashing pull lost the run's board changes on a runner thrown away after. Two jobs are two machines, and only the one that runs no agent ever holds the token. Rejected. A token with fewer rights in the same job: anything that can push branches and open pull requests is worth stealing. Pushing from the agents' job with contents: read and a separate token minted later: same machine, same problem. Rebuilding the board in the land job by running Clara's operations again: the runs' records only exist where they ran. Trusting the artifact: it was written on the machine the agents ran on.

What. server/hosted.ts puts the local app (createApp) behind GitHub sign-in. /api/auth/login sends the person to GitHub with the repo scope and a random state held in a sealed cookie for ten minutes; /api/auth/callback checks the state, exchanges the code, asks GitHub who the token belongs to, and reads the board with it before letting anyone in. The token and login go into an AES-GCM cookie (key from CLARA_SECRET, the cookie's name as additional data, eight hours, HttpOnly, SameSite=Lax, Secure and __Host- over HTTPS). Each request opens a GitHub storage with that token; a write must come from the board's own Origin. CLARA_PUBLIC_READ lets anyone read through token-less calls, as guest, and change nothing. /api/session gains account (repo, signedIn), which the page uses for a sign-in screen and a banner. /api/mcp builds a stateless MCP server per request from a bearer token, after asking GitHub whose it is (remembered for five minutes by fingerprint). A missing token, an expired session and a public reader's write answer NOT_SIGNED_IN (401); a GitHub refusal answers NO_ACCESS (403); GitHub's limit answers RATE_LIMITED (429). Why. D13 asks for exactly this: the signed-in person's own token does every read and write, nothing is stored server-side, the session is an encrypted, signed, http-only cookie, and MCP takes a fine-grained token checked on every request, structured so MCP's own OAuth can come later (the route turns a token into a session; another source of tokens can do the same). Checking the board at sign-in tells a person who cannot reach it so, instead of a board that fails on every call. Rejected. A server-side session store: D13 says nothing is stored. A GitHub App with user-to-server tokens limited to one repository: narrower than the repo scope, but it needs installing on the repository and a second set of settings; an OAuth app is what D13 names, and the risk of the wide scope is written down in the security model. A signed but unencrypted cookie: the token would be readable by anyone who saw it. MCP sessions kept between requests: a host that starts a function per request cannot keep them.

D-139. The hosted board runs on Vercel from one function, and vercel.json is generated

What. server/hosted-entry.ts builds to dist/hosted.js and exports hostedHandler(env), a Web fetch handler made from the environment the first time a request comes. api/index.mjs hands it every method; vercel.json rewrites /api/(.*) to that one function (maxDuration 60), serves dist/web as static files, and sets on every path the same security headers the server sends, because npm run docs writes it from server/vercel.ts, which reads them from server/http.ts. Settings that are missing or wrong answer 500 with a page naming them, never their values. Because Vercel cuts a response off at maxDuration, the hosted live stream ends itself after 50 seconds with an again event, and the page opens another at once without showing it as offline. Why. One function keeps one place for the routes, the same Hono app the tests drive. Generating vercel.json means the static files cannot be served with weaker headers than the API. A deploy that forgot a setting should say which in the browser, not crash with a stack trace or show a secret. Rejected. A function per route: cold starts multiply and the routing moves into Vercel's configuration. Long polling instead of Server-Sent Events on the hosted board: the page already follows SSE, and ending the stream on time costs one reconnect a minute. Edge functions: the MCP server and the GitHub adapter are written for Node, and the board's work is GitHub calls, which do not gain from running at the edge.

D-140. Direct mode is not built in this version

What. D13's direct mode (the web app talking to GitHub from the browser with a pasted token, servable from GitHub Pages) is left out of M8. docs/HOSTED.md and docs/STATUS.md say so. Why. The page would have to carry the library: the operations engine, the registry, the format and the GitHub adapter, with zod and yaml. Bundled for the browser, with only zod's English messages, that is 165 KB gzipped (zod about 45, yaml about 28, the operations about 30). C2 allows a lazily loaded chunk 60 KB, and the budget is not raised. Splitting it into several chunks does not help, as one write needs all of them, and loading it in a worker would only hide the same bytes from the check. What would make it fit: the browser's schemas on zod/mini, and a frontmatter reader and writer that does not need the whole yaml package, each proven against the format's round-trip tests; that is a change to the library's foundations, not to the hosted app. Rejected. Raising the lazy-chunk budget for this one chunk: C2's budgets are not raised. Shipping direct mode as a page with its own entry, outside the measured app: the same bytes, unmeasured. A direct mode that only reads: the brief's direct mode is the whole app, and a read-only board is what CLARA_PUBLIC_READ already gives.

D-141. A workspace is a folder that says it is one, reached by a committed .clara.json

What. Workspace mode (D13, 2) lives in library/node/workspace.ts: workspace.json ({ "v": 1, "name" }) marks a workspace, each subfolder named by a valid key holding config.json is a project, and a repository's .clara.json ({ "workspace", "project" }) points at one. findBoard reads the link before .clara at each level, and a worktree reads its main checkout's; a broken link becomes the place's problem, thrown by any command that needs the board. clara init --workspace <folder> makes the workspace only in a new or empty folder (a .git alone allowed), and joins a project that already exists by writing the link alone. boardCheckout gives sync and export the git repository the board's files are in, the workspace's own for a workspace. clara workspace and GET /api/home (cli/workspace.ts) read every project through board.get and activity.inbox as the person asking; the web app's Home view is listed only when the session names a workspace. Why. The brief's design, made safe: a repository's file decides where Clara reads and writes, so it may lead only into a folder that already declares itself a workspace, and only by a key, never by a path (D15). Refusing a broken link instead of falling back keeps a team from splitting its board without noticing. Each project keeps the .clara format exactly, so every operation, the doctor and the GitHub adapter work on it unchanged. The module is under library/node/ and not library/storage/ as the brief's tree sketches, because it reads the disk directly and the portable library must compile without Node (C4.3). Rejected. A list of projects inside workspace.json: a second record of what the folders already say, which two clones would edit at once. Following any path in .clara.json: a cloned repository could aim Clara's writes anywhere the user can write. Making the workspace in a folder that already holds files: Clara would scatter boards among someone's own. Ticket ids across projects in one log: each project keeps its own log and key, and the home reads them side by side.

D-142. A ticket made from something else says where it came from, in origin

What. A ticket has an optional origin: a source and an id, routine:<name>/<date> for a routine's occurrence and <source>:<id> for an imported item (jira:SHOP-2), printable ASCII only, at most 300 characters. Routines and importers read it on live and archived tickets before making one, and make nothing that is already there. Why. Routines run from several places (clara work, the Action's schedule, clara routine run) and imports are run again as an export grows; both must be safe to repeat. A field on the ticket travels with it through git, merges and archiving, so two machines that each make an occurrence see each other's ticket once their commits meet, with nothing extra to keep in step. Rejected. A separate index of what was made: a second record that two clones would edit at once and that archiving would have to keep. Matching on titles: people rename tickets, and two routines may share a title. Free text in origin: it is compared by value, so its form is fixed.

D-143. A routine has one occurrence at a time, made by whoever looks first

What. routines in config.json name a schedule (daily, weekly:<day>, monthly:<1-28>). A routine's occurrence is the latest day its schedule names on or before today (UTC); routine.run makes that occurrence's ticket, in todo, if no ticket has its origin. clara work runs it before it looks for work, the Action's routines mode on a cron schedule, committing to the base branch only, and a person with clara routine run. Settings shows each routine, what it is due and its ticket. Two places that run routines before either sees the other's ticket each make one, and git keeps both, since each ticket is a file of its own; clara doctor names the later copy and doctor --fix archives it while nobody has started it. Why. "Every Monday, audit the dependencies" means one audit ticket a week, whoever is around to make it. Taking only the latest occurrence means a board left alone for a month gets one ticket, not four of the same chore. Day 28 at most keeps every month's occurrence on the day named. Rejected. A schedule language such as cron: four forms cover what the brief asks, and each one's meaning fits in a sentence. Making every missed occurrence: a backlog of the same chore. A routine made only by the Action: a board without GitHub would have none.

D-144. Automations are switches for what Clara does unasked

What. automations holds three switches, all on by default: epic_auto_done (an epic moves to done when its last story does), flag_stale (the doctor flags, and doctor --fix releases, agent claims idle past stale_after_minutes) and sprint_digest (closing a sprint writes its report into the sprint's file). Off, Clara leaves those things to people; the is:stale filter and the close's recorded result stay. Why. Each is right for most boards and wrong for some: agents that run for hours, sprints whose files are written by hand. A switch says which, in the file the team already reviews. Rejected. Automations as user-written rules (when X, do Y): a second language to learn, test and trust, for three behaviours that already exist.

What. board.import reads Jira CSV, Linear CSV, GitHub issues JSON, Trello JSON, Beads JSONL, Backlog.md folders and Vibe Kanban exports (library/import/) into one shape, then, with apply, makes a ticket per item it has not made before, keeping its status (done ones completed now), and maps parents and dependencies onto the new ids, leaving out any that would make a loop, with a warning. Without apply it writes nothing and says what it would make. clara import <source> <path> reads a file or a folder, never through a symbolic link. It is for people only, and has no MCP tool. clara init offers a Beads or Backlog.md board it finds in the repository at a terminal, imports it only on a yes, and otherwise names the command. Why. An export is someone else's data in someone else's shape: seeing what Clara makes of it before anything is written is the only safe default. Keeping statuses keeps the board true to where the work is; holding imported work to WIP limits would refuse the import of a team's real board. Linking after making lets an item depend on one later in the file. Rejected. Writing by default with an undo: an import of hundreds of tickets is one undo away from a mess. Importing comments and history: each tool's are different, and a ticket's log begins when Clara makes it. Calling the other tools' APIs: an export file needs no token and no network.

D-146. Ticket templates are partial tickets; project templates are data in the code

What. A ticket template is templates/<name>.md with a ticket's shared keys (type, priority, points, labels, epic, release) and a body; keys only one ticket can have are refused, and names are slugs. clara add --template, ticket.create's template and the web app's new-ticket dialog use them, and clara templates lists them. Project templates (clara init --template web, library, cli or hackathon) are TypeScript data that write ordinary files. Why. Storage reads a template the same way on disk, in memory and on GitHub. Fetching nothing keeps init offline, and nothing a template holds touches the checks (D8). Rejected. A template field in config.json; fetching templates from a URL; a new MCP tool.

D-147. Webhooks are trusted like checks

What. notify names webhooks (JSON, Slack, Discord or Telegram) and the events each is sent. Nothing is sent until clara trust --yes, any change to a webhook asks again, and the trust record keeps only the host and a sha256 digest of the address. clara notify test sends one message to each. The CLI, clara serve and clara mcp send after each change they commit. Browser notifications are a switch in Settings, kept in that browser's storage, and asked of the browser only when a person turns them on. Why. A webhook sends ticket text to an address the repository chose, so it carries the same risk as running the repository's commands (D8). A browser's notifications belong to the person using it, not to the board. Rejected. Sending without trust; storing or showing the full address, which often holds the token; browser notifications as a board setting.

D-148. Split, estimate and ask are plan runs with a purpose

What. A plan-run record has a purpose (plan, split, estimate or ask) and the tickets it covers. clara split proposes stories with a new parent field, and clara estimate proposes points, each with its reasons, both reviewed with plan show, plan edit and plan apply. clara ask runs an agent whose MCP server offers only the tools that read; it ends answered, and any plan it proposes is thrown away. clara do creates a ticket and starts it. Why. One way to review and apply, and one set of guards, limits and records, instead of three new paths. Rejected. A new plan kind or MCP tool (the limit is 20); applying sizes directly without review.

D-149. Live views read run records every second, and "queued" means ready to start

What. clara board --watch and clara top draw over the whole terminal and draw again when the board changes or the window is resized; q or Ctrl-C puts the terminal back. Off a terminal each change prints a whole frame, or a JSON line with --json. top also reads the run records in .clara/.local every second, which the board's watcher leaves out, and its "queued" are the tickets clara work would start next. Agent text is shown through the terminal filter, never obeyed. Why. Run records change many times a second while a run goes, and are this machine's own, so a short read beats watching a folder the watcher ignores on purpose. Drawing is a pure function of what was read and the window, so tests hold each frame to exact lines. Rejected. A curses dependency; a queue of its own for top, which would disagree with what clara work does.

D-150. Attachments are checked images, sent as base64 in JSON and shown from blob: addresses

What. An image pasted or dropped into a ticket, or attached with clara attach, is saved under attachments/<TICKET-ID>/ and linked from the ticket's text. Only PNG, JPEG, GIF and WebP are kept, told by their first bytes, never by name or a claimed type, at most 3 MiB each; SVG is refused. GET /api/attachments/<id>/<name> serves one with the type its bytes were checked to be, nosniff and inline; the web app fetches it with its key and shows it from a blob: address. Why. Every door already speaks JSON, so base64 in it needs no second upload path. An SVG is XML that can carry script. The board's key goes in a header, which an image cannot send, so the page fetches the bytes and shows them from a blob: address, which its image policy allows. Rejected. Multipart uploads; any type the client names; SVG; images kept outside the repository.

D-151. Scanned comments become backlog tickets keyed by their words

What. clara scan [paths] reads the files git tracks for comments that begin TODO or FIXME (a TODO becomes a task, a FIXME a bug) and, with --apply, makes a backlog ticket for each one not made before. Each ticket's origin is scan:<path>#<hash of the comment's words>, with .2, .3 for the same words again in one file; live and archived tickets both count. Why. Moving lines does not duplicate a ticket, and archiving a ticket says no to that comment for good. The backlog keeps the ready queue and work-in-progress limits clear of a flood of found work. Rejected. Keying by line number, which moving code would duplicate; putting found work in todo; a parser per language.

D-152. Releases are release-please pull requests, published only when a variable says so

What. On each push to main, release.yml runs release-please, which keeps a release pull request open. Merging it tags the version and creates the GitHub release; the publish job then runs every gate, publishes with provenance through trusted publishing and moves the v<major> tag. canary.yml publishes a next build from each push to main. The repository variable CLARA_PUBLISH gates all of it: unset, nothing runs; false, the pull request is kept current with no tag, release or publish; true, merging releases and canaries publish. 0.1.0 is published by hand through the workflow's manual path, after a person renames ## Unreleased and creates v0.1.0 and v0. Why. E2 asks for release-please on pushes to main. Merging the release pull request is a person's decision, so nothing is released without one. An unset variable keeps a repository that is not ready free of red runs and of an unwanted first pull request. The first npm publish needs a token, because trusted publishing can be set up only once the package exists. Rejected. Gating only the publish step, which would run release-please before the repository is ready; bootstrap-sha or release-as, more to get wrong than marking 0.1.0 by hand; dropping the manual path, which rehearsals and the first version need.

D-153. The website is static HTML with no script

What. site/ holds the landing page. When pages.yml runs, scripts/site.mjs renders docs/**/*.md with marked into _site/docs/, and the Action's publish mode writes Clara's own board into _site/board/; the three are deployed together. Every page carries a content security policy of default-src 'none', allowing only the site's own styles, images and media, and raw HTML in a doc shows as text. npm run demo:record drives clara demo in a browser and records docs/media/demo.mp4, which npm run demo:film cuts into the trailer and the GIF (D-177). Why. E3 asks for a landing page deployed with the docs and the live demo board. Static pages have nothing to load, track or run, and the docs stay the Markdown in the repository. Rejected. A docs framework: more dependencies and a build that runs their scripts. Serving the .md files as they are: unreadable as pages.

D-154. The landing page lives in website/, and the docs share its styles

What. The landing page moved from site/ to website/: website/index.html and its assets/ (the stylesheet and the mark). scripts/site.mjs copies assets/ to the root of the built site, and every rendered doc links assets/site.css and uses the landing page's header, so the site reads as one. The page shows a drawn board in the colours of docs/DESIGN.md, the demo, the five steps of the loop with the board's own screenshots, how the five doors share one library and the files in .clara/, what Clara does and does not do on a machine, the supported agents, the library, the comparison from docs/VERIFIED.md, and the honest state from docs/STATUS.md. The rules of D-153 stand: no script, no font or picture from elsewhere, and the same policy. Why. The owner asked for the website in /website, written like the pages of their other projects. One stylesheet for the landing page and the docs keeps a single set of values, and a folder for assets leaves room for more without changing the build again. This departs from the site/ named in SPEC's layout; only the folder's name changes. Rejected. Keeping site/ and adding website/ beside it: two landing pages to keep in step. A drawn board as a picture: the HTML one follows the reader's light or dark setting and stays sharp. A script for the menu on small screens: <details> opens it with none.

D-155. The package ships the docs that Clara's own text names

What. The npm package carries ten files from docs/: CLI.md, MCP.md, and every other doc that help, a hint, a refusal, an MCP tool's description or the skill names by path (FORMAT.md, HOSTED.md, NOTIFICATIONS.md, QUERY.md, REST.md, SECURITY-MODEL.md, SPEC.md, STATUS.md). A test reads those texts, leaving out code comments, and fails if one names a doc that package.json does not list. The packed tarball goes from 0.89 MB to 0.98 MB. Why. An agent working in another repository reads Clara from node_modules. The package shipped no docs, so clara help mcp pointed at a docs/MCP.md that was not there; an agent building a project with Clara reported it. A link to the repository instead would lead nowhere while it is private, and would describe the newest Clara rather than the installed one. Rejected. Shipping all of docs/ (7.4 MB, mostly screenshots and records of how Clara was built). Rewriting every pointer to name the repository (see above). Removing the pointers (the text would lose its reference).

D-156. An agent may open the board in the person's browser, without its key

What. clara serve --open run by an agent starts the board for the person at this machine, named by git's user name or the login, whatever --as or CLARA_ACTOR says. The link with the key goes to the browser through --open's file (D-088's rules for it stand), and the agent's output, plain, --quiet or --json, carries the address alone, which opens nothing. If no browser opens, the server closes again and the command exits 1, since nobody holds the link. Without --open, an agent is still refused with PERSON_ONLY, and the hint names --open. Why. The owner, driving a build from an agent's session, asked for the agent to put the board in front of them rather than describe it in the terminal. The refusal kept the key, and with it every person-only action, out of the agent's hands. That holds as long as the key never reaches the agent's output, which this keeps. Rejected. Letting an agent start it as before, link printed (the agent could approve, answer and change settings as the person through the page's API). Serving the page as the agent (the board is for the person to answer, approve and plan in; as an agent it could do none of that). A person-only page with a separate read-only key for the agent (a second kind of key to secure, for nothing the commands do not already give it).

D-157. Agents do everything a person does on the board, except approve

What. Every operation that was for people alone now takes agents too: settings, the idea, answering a blocked ticket, rejecting work in review, sprints and releases, plans, archive and restore, views, routines, import, scan, doctor's fixes, undo, accepting knowledge and answering a run's question. From the command line an agent may also start agents (clara start, do, work, plan, split, estimate, ask), and install hooks and GitHub workflows. An agent assigns a ticket to anyone, and rewrites the body of a ticket nobody holds, acceptance criteria included. What stays a person's is approval: moving work from review to done, review in the settings, checks while the checks approve (review.mode: gates), and a ticket's body, branch and pull request once handed in. Trust stays a person's in every mode (D-068): a trusted command runs outside the agent's own permissions, so an agent that could grant trust could run anything a ticket told it to. An agent Clara started for a run (CLARA_RUN or CLARA_PLAN_RUN in its environment) cannot start more runs, change settings, answer any run's question or accept knowledge, so a run never widens its own reach; nor may any agent answer what its own run asked, or a run on a ticket it holds. The MCP tools are unchanged: an agent reaches the rest through clara on the command line. Why. The owner wants to tell an agent "use Clara" and watch: the agent writes the idea, makes and plans the tickets, sets the board up and does the work, and the person approves. The refusals made the agent hand the person a list of commands to paste, which the owner found the opposite of easy. Approval is the one decision they keep. Rejected. An opt-in per machine (one more step before Clara is easy to start with). Letting agents trust the board's commands (D-068's reason still holds, and the security tests keep it). Letting agents change checks in gates mode (an agent could make its own work pass and approve itself). New MCP tools for every operation (a long tool list costs every session context; the command line already reaches them all).

D-158. Clara is the board for many Claude Code chats: clara start opens one for a ticket

What. clara start <ticket> at a terminal opens Claude Code as a chat the person can type in, in the ticket's worktree and on its branch (--here stays in the checkout), with the ticket claimed for agent:claude, the ticket's context pack as the first prompt, and rules that end with a pushed branch, a pull request and a hand-in. --model and --effort choose the model and how hard it thinks; a ticket's own model and effort fields, set when it is planned or refined, are the defaults. Starting a ticket that already has a chat resumes it. --headless, a start with no terminal, and clara work keep the run that nobody types in (D8). Each chat is a session, kept in .clara/.local/sessions/ on this machine: its ticket, model, effort, worktree, branch, when it started, when Clara last heard from it and when it ended. Clara's MCP server records each call against the session, and makes a session for a chat Clara did not start, so the chat that plans the project shows too. A chat is not a run Clara started: a person sits in it, so it has what D-157 gives any agent, and what D-157 keeps for the person. Why. The owner works in several Claude Code chats at once: one that plans, and one for each ticket, often on a smaller model. The first two versions were built around a run nobody types in, so a ticket on the board had no way to become a chat, and the board did not show which chat was doing what. The owner's own script (a worktree for each ticket, then claude --model --effort with a prompt) is the pattern this follows. Rejected. Keeping the headless run as what start does and adding a second command (the common case would have the longer name). Sharing one checkout between chats (two chats would change the same files). A background service that watches chats (one more thing to install and keep running; the MCP server already hears every call).

D-159. The board may open a terminal for one fixed command

What. On macOS the page of clara serve has a Start button on a ticket. It asks the local server to open a new Terminal or iTerm window in the project, running clara start <ticket> --model <model> --effort <effort>. The ticket's id must match the id pattern and name a ticket on this board, the model must be one of the short names or match claude- followed by letters, digits, dots and hyphens, and the effort must be one of the five levels; anything else is refused before a program is started. Nothing else from the request or from any file reaches the command. The page also shows the same command with a Copy button, which is all it offers on other systems and on a board that is not clara serve's. The hosted app, the board with no server and the published board start nothing, as before. The page still cannot grant trust, and a chat is stopped in its own terminal. Why. The owner asked for a button that puts the start command in a terminal, with copying it as the other way. Until now clara serve started no program but the browser, so that a page could never run anything. One command, built from three checked values and no text a ticket carries, keeps that guarantee in substance: the worst a hostile page with the key can do is open chats on tickets that exist. Rejected. A general "run this command" route (it would hand the page a shell). Passing the prompt from the page (ticket text would reach a command line). Starting the chat in the background with no window (the person could not see or type in it).

D-160. A refined ticket keeps what the person first wrote

What. Refining is an edit: ticket.update with refine: true (clara edit --refine, and clara_update for a chat) rewrites a ticket's title, description and acceptance criteria, and may set its type, points, model and effort. An agent that rewrites the title or description of a raw ticket refines it whether or not it says so. The first refinement that changes the wording puts the title and text as they were into a section of the same file, ## Original, with who refined it and when, the old body quoted so its headings and checklist stay text; refined in the frontmatter holds the time, and the log gets a refined event instead of updated. Later refinements leave ## Original alone, and no edit through Clara, by a person or an agent, changes or removes it. A ticket is raw while it has no refined, no acceptance criteria, is not an epic and is not done; clara_project and clara_next tell an agent how many raw tickets wait, and the query is:raw lists them. Why. The owner wants a ticket made by hand to be improved when Claude next sees it, with the first wording kept beside the improved one. In the file, the original travels with the ticket through git, the hosted app and the published board, and needs no second store. Rejected. Keeping the original only in the log (the page with no server reads no log). A second file for each ticket (two files to keep in step). Refining without being asked on every read (a read would write). A separate ticket.refine operation and clara_refine tool, as first written here: the MCP server offers at most twenty tools (D5) and already offers twenty, and a refinement changes the same fields an edit does.

D-161. A change records what was there before, and why

What. An updated or refined event carries from, the old value of each of title, type, priority, points, sprint, epic, release, due, model and effort that changed, and to, the new one, with null for none; a sprint_updated event does the same for the sprint's name, goal, start and end. These events and moved carry why too, when one was given. ticket.update, ticket.move, sprint.update, clara edit --why, clara move --why and clara_update take the reason, at most 500 characters. The skill tells an agent to record the reason the person gave, and to ask for one before moving a ticket between sprints, changing its points or priority, or cancelling it, when none was given. The timeline and Activity read "sprint: Sprint 1 to Sprint 2, because …". Old events without these fields read as before. Why. The owner tells a chat "move this to that sprint", and wants the board to hold what changed and the reason. Events said which fields changed and not their values, so the history could not answer "what was it before". Rejected. Requiring a reason for every change (most edits need none, and a required field gets filled with noise). Storing the whole old ticket in each event (the log would grow by the ticket's size on every edit).

D-162. A merged pull request approves the ticket

What. While clara serve runs, about once a minute, and each time clara sync pulls, Clara asks gh pr view for the state of the pull request of each ticket in progress or in review, with fixed arguments and a reference that is a number or an https://github.com/ address; anything else is never passed to gh. What it says is kept in .clara/.local/prs.json, which pr.list and clara prs read. A merged pull request moves a ticket in review to done through ticket.merged, an operation no door offers, with an approved event from system that says via: pr, the address and who merged it. The setting review.merged_pr_approves turns this off; it is on by default. Approving a ticket in review whose pull request is open merges it with gh pr merge --squash --match-head-commit <commit>, the commit that was handed in, so nothing pushed after the review is merged with it; a pull request that moved since is refused before the approval is recorded. A ticket approved already is not merged by approving again: its pull request is the person's to merge. The ticket page and the review room show the pull request as a link with its state. A chat Clara started may push its branch and open the pull request, and is denied merging one. With no gh, no remote or no pull request, approving works as before. Why. The owner reviews on GitHub: they open the pull request from the board and merge it, and expect the ticket to be done. Merging is a person's act on GitHub, so it is an approval, by someone other than the agent that wrote the change. Rejected. Treating passing checks as approval (that is review.mode: gates, a different choice). Asking GitHub's API with a stored token (D15 keeps tokens out of Clara; gh holds the person's own sign-in). Marking a ticket done when its pull request is closed without merging.

D-163. Claude Code only for now: the other agents are archived (reversed by D-169)

Reversed. Before the adapters were moved, the owner asked for the other agents to stay and for chats to reach them. Nothing was archived; D-169 says what was done instead.

What. Clara 0.3.0 sets up and starts Claude Code alone. The adapters for Codex, Gemini, Antigravity, Cursor, OpenCode and Copilot, what clara setup wrote for them, and the tests and fixtures that exist only for them move to archive/agents/, kept in git with a note on bringing one back, and left out of the build, the checks and the npm package. A custom adapter from the board's settings and the demo's scripted agent stay. The MCP server still answers any client that speaks the protocol. Why. The owner's instruction: "archive them, like in the future, we can work on it, but now, focus entirely on claude code". Only the Claude Code adapter was ever run against the real program (docs/VERIFIED.md); six more were surface to keep correct for nobody yet. Rejected. Deleting them (the owner wants them back later). Keeping them built and hidden (they would still need every change the conductor gets).

D-164. The page: Home, Agents and Project replace Runs, Idea and Docs

What. A board's first page is Home: what waits for the person (questions, reviews, a plan to accept), which chats are working now, and the sprint. Runs becomes Agents and lists sessions, the live ones first, with headless runs beside them. Idea and Docs become one page, Project: the brief shown as text, with the editor behind a button, then notes, playbooks and decisions. The plan an agent proposes has its own page and a notice on Home, no longer a tab of the idea. The dependency graph is a way of looking at the Board, not a place in the sidebar. A ticket's page opens with its work: the Start block, the chat on it, its branch and its pull request. The colours, type and icons of docs/DESIGN.md stay. Why. The owner found Runs, Idea and Docs empty and without a purpose on a new board, and asked what an idea editor was for. Each was a page about a file Clara keeps; none answered what a person opening the board wants to know, which is what needs them and what is happening. How. The sidebar reads Home, Board, Backlog, Sprint, Agents, Review, Insights, Project, Activity, Settings. An empty address still opens the Board, so a link or a habit from before keeps working; Home is one key away (g h). Old addresses open their new place: #/runs opens Agents on its runs tab, #/idea?side=plan opens the plan, and #/docs is Project's Notes tab. Graph, the brief's editor, Notes and the plan are pages without a sidebar entry of their own; each marks the entry it belongs under. A board served as a static snapshot cannot read the brief, so its sidebar keeps Docs alone where Project would be. Home in the workspace view stays the list of projects. Rejected. Hiding empty pages until they have content (the sidebar would change under the person). Keeping the editor as the first thing on the brief (the brief is written by the chat far more often than by hand). Making Home the empty address (every link and bookmark to a board would change what it opens).

D-165. .clara is the project's second brain

What. Every Markdown file in .clara is a note, outside the log, attachments, templates, saved views and the local folders. Notes link with [[wikilinks]], as Obsidian writes them, and by naming ticket ids; a ticket links to its epic, the tickets it waits for, its sprint, its release, its people and its repositories. Folders say what a note is about: phases/, people/, conversations/, docs/decisions/, playbooks/, repos/, daily/, docs/ and notes/. brain.map, brain.read, brain.search and brain.write are open to people and chats; a chat has them as one MCP tool, clara_brain. A write passes back the version it read, so nobody overwrites a change they did not see. Tickets, sprints and releases change only through their own operations, which keep the log; agent profiles change only by hand; an agent proposes decisions and playbooks as drafts, and leaves the brief and the conventions to people. clara brain init lays down a home note, the status note and a note for each person. A ticket may name the repositories its work is in. The Brain page draws every note as one graph beside a file tree, and opens a note to read, or to edit as Markdown and save. Its Refresh pulls the repository the board is in, fast-forward only, while clara serve runs. Why. The owner wants the folder Clara already keeps to be the project's memory, readable in Obsidian and by every chat, so a new chat starts from what the last one learned instead of from nothing. The files were Markdown already; what was missing was the links between them and a safe way for a chat to write one. Rejected. A database or an index file of the notes (the folder is the source, D1; a second store goes stale). Letting any note be written as free text (a ticket edited by hand skips the log, and a chat that can rewrite the conventions speaks to every other chat). Adding .clara to .gitignore by default (the board is shared through git; a person who wants it private asks for that).

D-166. Every project on this machine, from one clara serve

What. A command that reads a board leaves a mark under CLARA_HOME/projects/, a file that names the board's folder, renewed at most once an hour; clara serve leaves it when it starts. clara projects lists every board marked or cached on this machine whose folder is still there, the one used last first, each with its tickets by status, its active sprint and how many tickets wait for the person. clara projects --open serves the board here, or the one used last, and opens the browser at the list; the project's name in the sidebar goes there too. Open on another project asks the same process to serve that board, on a port and with a key of its own, and the page goes there. The server opens only a board that the marks name exactly; any other folder is refused, and nothing from the page reaches a command or a path. Why. The owner asked for one command that opens a page showing every project they use Clara in. The cache already named each board, but it is not written for a board changed in the last few seconds, so a new project was missing until later. Rejected. A registry file of projects (one more file to keep right; marks are disposable, and deleting them only empties the list until each project's next command). Scanning the disk for .clara folders (slow, and it reads folders the person never pointed Clara at). One server for every board on one port (each board would share one key, and a page for one project could change another).

D-167. The Clara skill on skills.sh, with the steps to install Clara

What. The main skill, its tools reference and its query guide are written a second time to skills/clara/, where npx skills add sherwinvishesh/clara looks first, from the same source as the plugin's copy, and the docs gate fails when either is stale. The skill now says how to plan (the brief first, a plan with a model and effort for each story that the person says yes to, a refined ticket, the reason for a change, a chat per ticket started with clara start, the pull request as the review), what each folder of the second brain holds and who writes it, and how to set up: install clara-ipm only with the person's yes or run it through npx, and add the MCP server with claude mcp add or the plugin. Only the main skill goes there; the four a person starts belong to the plugin, which gives them the /clara: prefix. Why. The owner asked for the skill to be on skills.sh and to tell people to install clara-ipm. A skill installed alone has no MCP server with it, so it must say how to get one rather than leave a chat editing .clara by hand. Rejected. A skill written by hand for skills.sh (a second text of the working agreement drifts from the first). Installing the package without asking (it changes the person's machine).

D-168. How the work went, measured in hours

What. insights.work (clara retro, and a section of Insights on the board and in a static export) reads from the log how the work done in a window went: how many tickets done were sent back and how often; how long they spent in to do, in progress, blocked and in review; how long each size of estimate took from the first move to in progress until done; for the last closed sprints, the points they started with, the points at close, the points done and the tickets handed back; and, for each model and effort the chats on tickets ran on, the chats started, the tickets they finished, the share approved the first time and how long the chats were open. A ticket counts for the model and effort of its last chat. Times are the 50th, 85th and 95th percentile in hours. A chat reports time, not money. Why. The owner wanted insights worth opening. Work done in chats moves in hours, and a report in days showed most of it as nothing. Which model and effort finishes work first time is the question a planner choosing them for the next story needs answered. Rejected. A cost per chat (Claude Code does not report an interactive chat's cost, and a guess would be a fake number). Charts for every table (a few rows of percentiles read faster as numbers, and a screen reader reads a table as it is). Counting a ticket for every model that touched it (one ticket would count twice and inflate both rows).

D-169. A chat on Codex, Gemini CLI, Cursor, Copilot or Antigravity

What. clara start ID --agent codex (or gemini, cursor, copilot, antigravity) opens a chat on that agent at a terminal, as one opens on Claude Code (D-158): in the ticket's worktree, holding the ticket as agent:<name>, with the chat's rules and the ticket fenced as the first message. The board's Work block chooses the agent too, and session.open takes it. Each agent gets only flags its own documentation gives for an interactive session with a first prompt. Codex gets the rules as developer instructions, Clara's MCP server through -c mcp_servers.clara.*, --sandbox workspace-write with --ask-for-approval on-request, and --add-dir for git's shared folders, so a worktree can commit. Copilot gets Clara's MCP server through --additional-mcp-config, and a session id Clara chooses with --session-id, so clara start carries a Copilot chat on as it does a Claude Code one. Gemini CLI (--approval-mode default), Cursor and Antigravity take no MCP server for one session, so their rules name the clara commands, which act as the agent through CLARA_ACTOR. A model is the agent's own name for it, checked against a plain pattern; an effort is passed only to agents that take one (Claude Code and Copilot, low to max; Codex, low to xhigh). The ticket's model and effort name Claude models, so they are the defaults for Claude Code alone. The chat is recorded with its agent, the Agents page and the ticket name it, and Insights counts its tickets under the agent and model. OpenCode, a custom adapter and the demo agent stay headless. The adapters for headless runs stay as they were. Why. The owner's instruction: "please extend the support to other agents, like codex, antigravity and more". People use more than one agent, and a ticket's context and rules are the same whichever one works it. Limits. Codex, Gemini CLI, Cursor and Antigravity do not let Clara choose a session's id, so clara start cannot carry their chats on and opens a new one each time. None has Claude Code's hooks, so the board shows such a chat as open, never as working or waiting. Only Claude Code's settings refuse merging, force-pushing and pushing to the base branch; the other agents are told the same rules and keep their own approval prompts. No chat has yet been run against a real agent on this machine: Claude Code's flags are confirmed from its own help and documentation, the others' from their documentation (docs/VERIFIED.md), and every chat is tested with a stand-in program that records its arguments. Rejected. Archiving the other agents (D-163, reversed). OpenCode as a chat (its documentation gives no way to start an interactive session with a first prompt). Passing the ticket's Claude model to another agent (it would refuse it, or worse, take it as some other model). Writing an MCP server into each agent's own settings files (a chat must not change the person's configuration for every other session).

D-170. The brain is a wiki over the project

What. The brain (D-165) holds more than the files in .clara. Each person, agent and label the board names is a page before anyone writes one (people/, agents/, tags/); a page written at the same path wins, and writing one is how a person fills it in. A ticket links to its assignee and its labels. Any note's front matter fields tickets, related, epic, sprint, release, supersedes and sources are links. The repository's documents (brain.sources, by default README.md, CHANGELOG.md and docs/**/*.md) are read as notes under @repo/, with their Markdown links followed from where each sits. A path any note names that is a file of the repository is a note under @code/. brain.init writes index.md and log.md; brain.index rewrites the index between its markers and adds to the log; brain.lint lists what a wiki left to itself loses. Both are on every door, and clara_brain takes lint and index as actions, so the number of MCP tools is unchanged. Why. The owner's instruction, after the brain of Clara's own board showed tickets and nothing else: "I want it to be connecting like this", pointing at an Obsidian vault, "make sure to research more on llm wiki". Karpathy's LLM wiki keeps three layers: sources read and never edited, a wiki the model keeps, and the rules that say how. A project already has the sources, in its documents and code, and the board already knows its people, agents and labels; leaving them out left the graph empty. Limits. The brain reads documents, not code: a file under @code/ is a name and a place in the graph. It reads at most 2000 documents of at most 256 KB each and walks at most 40000 entries, and says how many it skipped. It never follows a symbolic link, never reads outside the repository, and never writes a source. A board kept outside its repository reads no sources. Lint finds; it changes nothing. Rejected. Reading every Markdown file in the repository (the dependencies and builds would bury the project's own). Reading code as notes (large, and a chat reads code with its own tools). Writing sources into .clara (two copies drift). Putting the repository's documents under repo/ and the code under code/ (a board may have folders of those names; @ cannot start a note's name).

D-171. The brain remembers by itself

What. A chat's first message carries the brain: ticket.context adds the ## Now part of docs/status.md and up to five notes that link to the ticket, its epic or its dependencies, then those the vault's own search finds for its title and labels, inside the pack's budget and named when cut. Handing a ticket in writes conversations/<date>-<ID>-<slug>.md in the same commit: the summary, files, checks, the questions asked and their answers, the review notes, linked to the ticket, its epic and the people; a later hand-in adds a round, and log.md gets a line. Starting a sprint writes its planning note in meetings/, closing it a retro note with the numbers and room for what people say, plan.apply a note in phases/ for each sprint it made, and clara standup --save the day's note in daily/. brain.capture (clara meeting, clara_brain action capture) files a meeting, a chat or a day a person tells about. brain.init lays down a note in each folder and one per repository the tickets name, and opens to MCP. A chat carried on with clara start is told what people did on its ticket while it was closed. brain.remember: false turns the notes off. The land job takes the hand-in's conversation note and log line as records, and nothing else of the brain. Why. The owner's words: "we are the second brain, all teh info, we store". Until now memory hung on a chat obeying the skill's prose, and a chat started from the board read nothing the brain held. Rejected. A model call to summarise a chat (Clara runs no model of its own; the hand-in already holds the agent's summary). Choosing notes for the pack by embedding (a dependency and a model; the links and words already say what bears on a ticket).

D-172. Start in terminal on Linux and Windows

What. The board's Start in terminal opens the first of x-terminal-emulator, gnome-terminal, konsole and xterm on Linux, running a fixed shell script with the folder and each word of clara start as arguments of their own, and a console on Windows through cmd /c start, refusing any folder or word with a character cmd reads. macOS keeps Terminal. Elsewhere, or when no terminal is found, the board says to run the command, which it shows. Why. The ticket page's button worked on macOS only. Rejected. Windows Terminal (wt takes its own ; separator inside arguments, a second language to escape). Building a shell line from the words (one quote in a folder name would run what follows).

D-173. A planning chat runs the board

What. clara_schedule moves a ticket, applies a plan, and makes, starts and closes sprints; ticket.move, plan.apply, sprint.create, sprint.start and sprint.close open to MCP. An agent applies a plan only with said, the words in which the person said to, which the plan_applied event keeps. The agent's limits on moves stand: never into review or to done. clara_knowledge_propose becomes clara_brain action propose, so the tools stay twenty. A plan run's server still offers only reading and clara_plan_propose. Why. The skill and the Plan page said a person could say yes in the chat and the plan would apply, but no tool could; a chat ran clara commands instead, which logged its changes as the person. Also. The plugin's session-start hook appends export CLARA_ACTOR=agent:claude to the file Claude Code names in CLAUDE_ENV_FILE, once, where there is a board and no actor is set, so a clara command the chat still runs is recorded as agent:claude. Rejected. A tool per change (the twenty-tool cap). Status on clara_update (one tool running two operations with different fields would stop conformance checking the ticket's fields against the operation). Letting a plan run apply its own plan (nobody would have said yes).

D-174. Stop a run from the page, and GitHub's checks by name

What. run.stop, for a person over REST and the SDK, asks the conductor of a run going on this machine to stop it, writing the same request clara stop writes, with who asked. The run's page shows Stop this run where the page can change the board, and the command where it cannot. It refuses a run that ended, one on another machine, and one whose process is gone, which clara stop closes as crashed. The review room links to the chat open on the ticket and to the run going on it, and lists GitHub's checks on the pull request by name, failed first, from what gh last said: at most 30, each name one line of plain text of at most 100 characters. NO_CHANGES answers 404 over HTTP, as the other refusals that something is not here do. Why. The owner asked for a review room that shows what GitHub says and lets a person stop a run without a terminal. D-116 left stopping to the terminal so the page could not end a process a person started elsewhere; the page is served from this machine only, with the key, and the conductor still ends its own child, as for clara stop. Rejected. Ending the process from the server by its id (a process id read from a file may be another process by then, as D-104 says). Asking GitHub from the page (the page never calls GitHub; the server's gh already keeps the answer).

D-175. First steps on a new board

What. Home lists five first steps on a new board: write the brief, plan with Claude, add a ticket, start a chat on a ticket, and review what comes back. Each has a button to the place it is done, and each ticks from the board, however it was done: the brief from the idea, the plan from any plan or epic, the ticket from any ticket, the chat from any chat, run or ticket past to do, and the review from a ticket done. The list goes once a ticket is done, and a person can hide it, which this browser remembers for the project. clara init's Next starts with clara serve --open. Why. A new board showed empty parts and no way in; what to do first was in the README, not on the page. Rejected. Steps ticked by hand (a step done in a terminal would stay open). Keeping the hidden state in the board (one person hiding it would hide it for the team).

D-176. Tokens, not money

What. When a turn of a Claude Code chat ends, clara chat-hook reads the transcript Claude Code names on its Stop hook, if it is the chat's own (an absolute path named for the chat's session id, a regular file under 256 MB), and keeps on the chat record the tokens each model used: input, output, cache read and cache write, the last line of each message counted once. It also adds up the time the chat waited for the person. chat_ended carries both. A headless run's run_finished carries the input and output tokens its adapter reported. insights.work gives the tokens each ticket done used (median, 85th and 95th percentile), each week's by model, and a row for each agent and model joining chats and runs; and the time the work done waited for a person: in review, blocked, and in chats waiting. The Insights page draws the weeks as stacked columns in five validated series colours, a sixth model and on folded into Other, with the numbers a click away; the ticket's chat line and the log say the tokens a chat used. Why. The owner asked for what a team running agents asks first: what the work used, and how long it waited on people. D-168 refused a cost per chat because nothing reported one; tokens are reported, so they are counted, not guessed. Limits. Only Claude Code chats report tokens; a chat on another agent does not. A subagent kept in a transcript of its own is not read, so a chat's count can be short, never over. Rejected. A dollar figure (prices change and differ by plan; a figure from a price table would be the guess D-168 refused). Reading the transcript at the end of the chat only (a chat left open would report nothing). Reading any path the hook is given (the hook's input is not trusted with a file to read beyond the chat's own transcript).

D-177. The landing page opens on the trailer

What. npm run demo:film (scripts/film.mjs) cuts the minute-long tour into a thirty-second trailer: title cards, then a few seconds of each shot with one line saying what it shows, the board shots marked as clara demo, simulated and sped up. It writes docs/media/film.mp4 and film-poster.png, and demo.gif from the same cut, kept under 5 MB. The landing page's first screen is the pitch, the command, and the trailer in a <video> that plays muted and looped with its controls, its caption saying what is simulated and linking the full tour. The drawn board it replaces is gone. Below it, four claims say what Clara does, and the page ends on the command again. Why. The owner asked for a page and a GIF that make someone want to try Clara. The real product moving says more than a drawing of it. GitHub's and npm's image proxy refuses images over 5 MB, so the README's GIF must stay under that size, which a minute-long tour cannot. A video is allowed by the page's policy (media-src 'self') and needs no script. Limits. The board shots are the demo's scripted agents, not a real run, and the trailer says so. With reduced motion asked for, the browser still plays a video set to autoplay; the controls stop it. Rejected. A drawn or animated product shot made in HTML: the page runs no script, and footage of the real board is more convincing. A GIF on the website: several times the size of the video, for a worse picture.