Every script, and what it does

Find the script for your task, then open its linked reference. The recorded inventory had 39 scripts on 2026-08-31 and moved off the landing page on 2026-08-16.

Paths are relative to the checkout. This site also serves them directly, including /scripts/coord/claim.ps1.

If you are deciding whether to install, start with the FAQ.

Installed controls run automatically. Other rows describe commands you run yourself, scheduled work, or shared helpers.


You can also read the source on GitHub.

For manual downloads, also fetch ccx.config.json and the seven shared modules listed under Internals and installers.

Without those dependencies, the PowerShell scripts throw at the start of their bodies. The three Python hooks exit 1 on import, while the worktree gate exits 0 and enforces nothing.

Start here

Script Does Doc
bin/ccx-doctor.ps1 Prove – by receipt and by attack – that each control is installed, wired, and refuses what it can be made to refuse. It never infers, and a skip is never a pass (exit 2) Limits and requirements

To run sessions

Script Does Doc
scripts/worktree/new.ps1 Create an isolated worktree on its own branch, off the fetched remote tip, serialised against concurrent adds Worktrees
scripts/worktree/spawn.ps1 new.ps1 plus an editor window (-Editor, else CCX_EDITOR, else EDITOR, else code) Worktrees
scripts/coord/presence.ps1 Who is live right now, across every surface. Scoped to one repo by default; -Fleet covers every repo the registry knows. Read-only Coordination
scripts/coord/overlap.ps1 What everyone else is changing – files and stated work. -File <path>, -Json; cached, so the gate’s common case is a cache read Coordination
scripts/coord/claim.ps1 Take, release or list an atomic claim on a piece of work, so a session finds out before the work rather than at merge. Advisory for free-text keys, enforced at commit-msg for numbered ones. Claims do not expire and releasing is manual, on purpose Coordination
scripts/coord/alloc.ps1 Allocate the next number in a shared sequence atomically, so two sessions can never be handed the same one; -ShowFloor inspects without spending one. seq_check.py is the other half – neither is sufficient alone Sequence allocation
scripts/coord/mail.ps1 Send, list or inspect the file-drop queue that reaches a peer in another Claude account or editor extension. -Send -To <worktree path> or all, -List, -Status. Queued is not delivered; the recipient’s drain does that Session mail
scripts/coord/seat.ps1 Write this session’s episode record – seat, goal, handoff – so the next session is not guessing. -Declare also writes the role-card marker and refuses an unrostered seat; -Record never invents a goal Role cards
scripts/coord/fleet.ps1 Read the records seat.ps1 wrote and print the fleet, receipt first. A stop condition fires whenever the roster may be incomplete. -Json for a board, -Chip for one replacement briefing. Read-only Below
scripts/coord/inbox-prune.ps1 Delete the korus-inbox plugin’s spent files in ~/.korus-inbox: ended, or not written for 24 hours. A dry run that only lists unless -Apply is passed. It reads no subfolder, follows no link, and refuses a folder of any other name Plugins
bin/ccx-steer.ps1 Queue a steering note from a second terminal while a session is mid-task Steering

The fleet roster JSON is a contract

fleet.ps1 -Json prints one object. A board or another tool reads these fields, so they keep their names and types. Extra fields may be added.

Field Type Means
receipt.renderedAtUtc string When it was read, as yyyy-MM-ddTHH:mm:ssZ
receipt.liveSessionsInRepo integer Live sessions whose working directory is in one of this clone’s worktrees
receipt.liveSessionsWithoutRecord integer Of those, how many no open seat record covers. A record covers a session by its id, or by its worktree when it names no session
receipt.stopConditions array of strings Each reason the roster may be incomplete. Always an array, possibly empty
rows[].Seat string or null The declared seat. Null means none was declared
rows[].Box string The worktree’s record directory, <slug>-<hash>
rows[].Branch string The branch the record names
rows[].State string One of RUNNING, POSSIBLY RUNNING, INTERRUPTED, ORPHANED-STALE, SUPERSEDED, CLOSED, UNKNOWN-NO-FENCE
rows[].AgeHours number or null Hours since the record was last written

The receipt also counts what was examined, and receipt.notCarried names the inputs the engine repository reads that korus has no writer for.

The exit code is 2 when the fence had nothing to examine: no config root, or no readable session record in one. Rows then read UNKNOWN-NO-FENCE, except CLOSED and SUPERSEDED rows. It is also 2 outside a git repository, and when -Chip names a row that does not exist. Otherwise it is 0.

The records are read from <git-common-dir>/ccx-coord/seats/, the directory seat.ps1 writes. -SeatsRoot and -ConfigRoot point the reader somewhere else, for a test or a control. tests/test_the_fleet_roster_states_what_it_examined.py pins the contract.

The fleet wiki

One memory every seat on every account can search. The spec has the design. These scripts write, guard, query, compile, render, import and lint. write.ps1 -FromJson takes a batch of events, which is how the import writes.

cycle.ps1 runs import, compile and lint on a schedule, with no model. register-cycle-task.ps1 schedules it on Windows.

Run them by path from a korus checkout, and pass each store by flag: the default state root does not resolve in the engine repository. The wiki schema names the stores for a write and a query.

Script Does Doc
scripts/wiki/write.ps1 The only way to add an event. Checks the fields, runs the leak scan, then drops one file in the shared inbox. No network, and no git call when -StateRoot is given Fleet wiki spec
scripts/wiki/query.ps1 Searches the inbox, and the record repository’s log with -RecordRepo. Prints no note below the match floor. Exits 0, saying so, on an unreachable store. Warns on stdout when an unreadable file may hide a retirement. Logs queries locally Fleet wiki spec
scripts/wiki/_event.ps1 The event schema, the id and clock, the paths, the reader and the scorer. Dot-sourced by write.ps1, query.ps1, compile.ps1, import.ps1 and lint.ps1, never run on its own Fleet wiki spec
scripts/wiki/_guard.ps1 The one filter every read passes through. Hides superseded and retired events; -History returns them labelled historical Fleet wiki spec
scripts/wiki/compile.ps1 Folds the inbox into the record log, rebuilds pages and index, and force-pushes wiki/compile with one pull request, never merging. Clears landed inbox files. Holds back events the record’s scanner flags or that carry an email. -RebuildOnly uses the log Fleet wiki spec
scripts/wiki/_render.ps1 Renders the pages and the index from a set of events, and lists keys held by two events where neither supersedes the other. Dot-sourced by compile.ps1, never run on its own Fleet wiki spec
scripts/wiki/import.ps1 Folds the per-account memory stores into the inbox; cycle.ps1 runs it weekly. Reads only the directories named by -Store, records every merge as an event, and writes through write.ps1 -FromJson. An unchanged store adds nothing; -WhatIf writes nothing Fleet wiki spec
scripts/wiki/lint.ps1 Report only; changes no event. Finds conflicts, dead evidence, stale events, orphan pages and lessons two seats wrote. Counts the evidence it could not check, so zero dead is not read as clean Fleet wiki spec
scripts/wiki/cycle.ps1 One scheduled run, no model. Moves a dedicated korus checkout and a record reader to origin/main, then imports on its day, compiles and lints. Refuses local changes, a branch checkout and a live lock. Logs a JSON line per run Fleet wiki schema
scripts/wiki/register-cycle-task.ps1 Registers, shows or removes the Windows scheduled task that runs cycle.ps1 daily, as you, at run level Limited and normal priority. Every path is a parameter. -WhatIf prints exactly what it would register. -Status, -Uninstall, -Json Fleet wiki schema

To clean up and recover

Script Does Doc
scripts/worktree/remove.ps1 Remove one worktree, referencing its tip before anything is removed, and writing a keep-ref when -DeleteBranch is used or a detached tip is on no ref. Refuses a worktree that contains another registered worktree Pruning
scripts/worktree/prune-merged.ps1 The reaper: prune = merged and clean and unoccupied. Dry-run by default, -Apply to act. Carries a second, non-cwd signal and prints its blind spots Pruning
scripts/worktree/rescue.ps1 Move uncommitted work out of the shared primary into a fresh worktree – the companion to the gate that stops you writing there Worktrees
scripts/worktree/restore-primary.ps1 Re-attach the primary to its home branch after a session left it detached or on the wrong branch. Refuses on a dirty tree unless -Force, which carries the changes onto the home branch rather than discarding them Worktrees
scripts/worktree/sessions.ps1 Find sessions for this repo across every login, including ones a relocation made invisible; -Rehome puts a transcript back Worktrees

Controls that run without you

Once installed, these controls run through client events or git hooks.

Script Event Does Doc
scripts/hooks/worktree_gate.ps1 PreToolUse Denies writes inside a governed primary, dispatch from it, the git verbs that swap or discard its tree, and those that hijack or remove another session’s worktree. Fails open: loud on a load failure, silent on an empty allowlist Hooks
scripts/hooks/collision_gate.ps1 PreToolUse Refuses an edit to a file a live peer worktree has uncommitted changes in; your own worktree is skipped. Fails open and says so, but only once per reason per 30 minutes Coordination
scripts/hooks/seat-declare.ps1 UserPromptSubmit A prompt that is EXACTLY a roster label declares that seat: writes the marker and loads the card in one turn. Anything less exact does nothing. Reads no ref. Always exits 0 Role cards
scripts/hooks/announce-session.ps1 UserPromptSubmit Tells peers you exist and what you intend, on the first prompt at which a messageable peer exists. Always exits 0; delivery needs the desktop client Coordination
scripts/worktree/session-context.ps1 SessionStart Banner: your project’s working defaults plus a live coordination block. Its stdout is the chat’s starting context, so it never fails loudly Hooks
scripts/worktree/worktree-selfheal.ps1 SessionStart Repairs a primary whose HEAD drifted, when the tree is clean – the most privileged control here, whose only safety property is that it refuses a dirty tree Worktrees
scripts/hooks/claim_check.py commit-msg Refuses a code-touching commit whose subject claims an item this worktree does not hold. Fail-closed, but the installed hook is a shim that exits 0 when no python is on PATH Coordination
scripts/hooks/push_guard.py pre-push Refuses a direct push, or a deletion, of a protected ref. An explicitly empty protectedRefs list disables it on stderr. Same shim: no python on PATH and it exits 0 PRs and merges
scripts/hooks/seq_check.py pre-commit Refuses a colliding, unallocated, or unindexed sequence number; --ci re-runs the collision rules against a freshly fetched trunk. No installer wires it Sequence allocation
scripts/hooks/block-blanket-git-stage.ps1 PreToolUse Opt-in. Denies git add -A/--all/-u/. and git commit -a/-am/--all. Fails open Hooks
scripts/hooks/steer-inject.ps1 PreToolUse Opt-in per worktree. Delivers a queued steering note at the next tool-call boundary rather than at the end of the turn Steering
scripts/hooks/role-card-inject.ps1 SessionStart The korus-card plugin, or hand-wired. Injects this worktree’s role card, resolved from .claude/seat.local.txt then $env:KORUS_SEAT. Never guesses from a branch or directory name – it stays silent instead Role cards
scripts/hooks/mail-drain.ps1 SessionStart, Stop Hand-wired, one script on two events. Renders this worktree’s session mail at SessionStart and leaves it in the inbox; at Stop it consumes only what it displayed Session mail
scripts/hooks/precompact-reprime.ps1 SessionStart The korus-card plugin, or hand-wired. Speaks only after a compaction. Reads back what a compaction drops: the seat declaration on disk, and the allocations, claims and unpushed work this worktree holds. An unfiled allocation burns Hooks
scripts/hooks/block-api-burn.ps1 PreToolUse Hand-wired. Denies gh run watch, any gh --watch, and hand-rolled gh poll loops. Every seat spends one shared 5000/hr budget, and the seat that pays is not the seat that spent Hooks

Scheduled jobs

watch-ci-red.ps1 is retired, so do not register it with a scheduler. No installer schedules it, and no client or git event triggers it.

The fleet wiki’s cycle.ps1 is a scheduled job that stays live. register-cycle-task.ps1 registers it on Windows, and both rows are under The fleet wiki.

Script Does Doc
scripts/cron/watch-ci-red.ps1 Retired 2026-10-10, by a seat decision under owner delegation 2026-10-08, not an owner ruling. Do not schedule it. It started one session per labelled red to attribute it, and that seat is retired. -DryRun, -Json Watching for a red

Gates you have to run yourself

No installer wires these checks. This repository runs them in .github/workflows/gates.yml; add them to your own continuous integration workflow too.

Script Does Doc
scripts/security/scan_forbidden.py The leak gate: refuse identifying content before a private repo goes public. --path DIR, --show-context. With no token source it scans shapes only and still exits 0; --require-tokens refuses instead Leak gate
scripts/quality/check-ascii.ps1 The ASCII gate: names every non-ASCII character it finds, and -Fix rewrites the safe substitutions. The doctor reports it OFF (opt-in), because nothing installs it House style
scripts/quality/frozen_citations.py Which frozen .old.md archives cite a heading. Run it before you rename one: those links are hash-pinned, so they cannot be repaired. CI runs the test behind it, never this script House style

Instruments for a run

These instruments report detected failures. Before running the scripts/validation/ checks, read what broken looks like for their failure criteria and the run’s stopping point.

Script Does Doc
scripts/board/refresh.ps1 Rebuilds the board: collect, series, build, in order, stopping at the first failure so a half-rebuilt board is never published. -OutDir writes elsewhere, -SkipCollect re-renders without calling GitHub. Does not publish – that needs a session The Lander Board
scripts/board/collect.py Reads the required contexts, open pull requests with their checks, the merge queue, create/merge/close timestamps and the engine’s open nightly-failure issues into data.json. Refuses to write when a read fails, except the issue read, which it marks failed. Needs gh The Lander Board
scripts/board/copy-to-dashboard.ps1 Copies the board.html a refresh built to the owner’s lander.html, on the owner’s PC only. Names the folder through the engine’s render_html.py extracted from origin/main, and keeps the old file on every failure. -ExpectedHost makes any other machine throw The Lander Board
scripts/board/series.py Derives the hourly merge and open-count series, the idle runs and the per-repository rates from data.json into series.json The Lander Board
scripts/board/build.py Renders board.html from series.json and template.html. Writes beside the scripts, or into LANDER_BOARD_OUT The Lander Board
scripts/board/central.py US Central time with daylight saving, imported by series.py and build.py. Codes the US rule rather than using zoneinfo, which needs tzdata the stock Windows Python lacks The Lander Board
scripts/board/seatstate.py Reads a watched seat’s transcript and returns WORKING, IDLE, BLOCKED-ON-A-QUESTION or QUESTION-LOST. Output cannot tell them apart; the transcript can. QUESTION-LOST: the newest question ended unanswered. An Owner rejection is not lost. UNKNOWN: no turns found The Lander Board
scripts/validation/run-checks.ps1 Proves every instrument against a planted broken corpus and a planted clean one, then runs the same checks against this machine. Exits 3 without measuring anything when a control misbehaves What broken looks like
scripts/validation/check-message-delivery.ps1 Messages written against messages rendered. Fires when a message sat past the settle window with no receipt naming it Session mail
scripts/validation/check-message-expiry.ps1 Receipts against deadlines. Fires when a message passed the ttl its sender set, unshown Session mail
scripts/validation/check-claim-holders.ps1 Claim holders per item. Fires when two keys naming one item are held by two live worktrees, or one claim’s worktree holds two live sessions Coordination
scripts/validation/check-allocation-collisions.ps1 Every ref, grouped by sequence number. Fires when one number maps to two paths its index row does not declare as companions Sequence allocation
scripts/validation/check-session-reaping.ps1 Liveness against last write. Fires when a live record’s worktree has seen no commit and no file write for a day Pruning
scripts/quality/expiry_audit.py Does the artifact a standing rule’s expiry clause points at still exist? Reports DANGLING, UNCHECKABLE or LIVE per clause, and never decides a rule expired. Exits 0 unless --strict House style
scripts/quality/review_tag.py Reads the code-review skill’s level tag from its fork’s transcript. Needs --target with the round’s nonce; answers for one fork or refuses. Exits 0 on a tag, 11 when not attributable; each other code names a miss or a refusal Builder playbook

These instruments report results without blocking commits or pushes. CANNOT_TELL from a validation check, and UNCHECKABLE from the expiry audit, mean nothing was examined. Neither means nothing was wrong.

Internals and installers

Quickstart gives the four-installer order. Install explains the flags below.

Script Does Doc
scripts/coord/_common.ps1 Config discovery, the state root, trunk resolution, path folding and git plumbing. Dot-sourced by nearly every PowerShell script here, never run on its own Concepts
scripts/hooks/_ccxconfig.py The Python counterpart, imported by all three git hooks. Copy a hook without it and that hook exits 1 on every commit Hooks
scripts/hooks/_command.ps1 The one command splitter, dot-sourced by the worktree gate and the blanket-stage gate Hooks
scripts/hooks/_gittarget.ps1 Which repository a git command actually acts on. Dot-sourced by the worktree gate, and pulls in _common.ps1 itself Hooks
scripts/hooks/_hookinput.ps1 Reads the hook input and finds the session’s own directory in its cwd. Under the desktop app a worktree session’s hooks start in the primary checkout. Dot-sourced by the announce, collision, mail and steering hooks and the session banner Hooks
scripts/coord/_mail.ps1 Worktree root, mail root, hashed box key and delivery bounds for the mail lane. Dot-sourced by mail.ps1, seat.ps1 and the drain, never run on its own Session mail
scripts/validation/_receipt.ps1 The receipt shape and the one verdict rule every instrument reads: CLEAN, BROKEN, or CANNOT_TELL when nothing was examined. Dot-sourced by all five checks What broken looks like
scripts/validation/_mailbox.ps1 The schema-tolerant mail-lane reader the two message checks share. It counts a file it cannot parse rather than dropping it, so a broken lane never reads as an empty one What broken looks like
scripts/site/publish_sources.py Copies everything git ls-files tracks into the built site, which is why the paths on this page resolve without a clone House style
scripts/site/publish_revisions.py Validates archive hashes, publishes exact .old.md sources, and checks revision links and search exclusion after the Jekyll build House style
scripts/site/plot_token_meter.py Rebuilds the token-meter chart from the published measurement table Token accounting
scripts/site/build_redirect.py Builds the forwarding site for the old GitHub Pages address, a stub per old URL. It cannot help the reader the move was made for House style
scripts/coord/session-registry.ps1 The liveness fence: reads the client’s session registry and decides whether a session is alive. Liveness may only VETO, never PERMIT – DEAD/STALE/absent is the absence of a veto, not a permission Concepts
scripts/coord/occupancy.ps1 The one cwd-to-worktree matcher, returning a receipt alongside its rows (roots examined, records examined, records that could not be placed) and setting Available only when there was something to examine Concepts
scripts/coord/lock.ps1 The short-lived cross-session mutex, dot-sourced rather than run: . lock.ps1 then Enter-CcxLock / Exit-CcxLock. No TTLs anywhere: locks retry and never steal, and on timeout fail loudly and name the holder Concepts
scripts/coord/install-coordination.ps1 Wires the banner, collision gate and announce at user scope as shims that re-resolve at run time; writes exactly one settings file per run (-SettingsPath) Install
scripts/coord/install-git-hooks.ps1 Installs commit-msg + pre-push into one clone’s shared .git/hooks (-RepoRoot), refuses to overwrite a foreign hook, and never writes pre-commit. Both are /bin/sh shims that exit 0 when no python is found Install
scripts/worktree/install-gate.ps1 Installs the worktree gate as a copy outside every working tree, into every config root it finds, plus the allowlist that is its kill switch (-Repo, -ConfigDir) Install
scripts/worktree/install-selfheal.ps1 Wires the SessionStart backstop into ONE config root per run; -ConfigDir is mandatory, and it governs whatever the gate’s allowlist already names Install