<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>hird — usage guide</title>
<meta name="description" content="How to use hird: a shared work queue and shared assertion memory for AI coding agents across harnesses, backed by one local SQLite database.">
<link rel="stylesheet" href="style.css">
</head>
<body>
<button id="theme" type="button" aria-label="Toggle colour theme">theme</button>
<div class="shell">
<nav class="toc" aria-label="Contents">
<a class="brand" href="#top">hird</a>
<p class="tagline">One work queue and one memory, shared by every agent you run.</p>
<details class="nav-body" open>
<summary>Contents</summary>
<ol>
<li><a href="#install">Install</a></li>
<li><a href="#dispatch">Dispatching work</a></li>
<li class="sub"><a href="#by-hand">By hand, by number</a></li>
<li class="sub"><a href="#work-the-queue">Letting agents pull</a></li>
<li class="sub"><a href="#plan-files">The plan as a file</a></li>
<li class="sub"><a href="#dispatch-hook">The dispatch hook</a></li>
<li class="sub"><a href="#recess">The recess</a></li>
<li><a href="#harnesses">Registering a harness</a></li>
<li class="sub"><a href="#protocol">The protocol</a></li>
<li><a href="#lifecycle">How a task moves</a></li>
<li><a href="#dependencies">Dependencies</a></li>
<li><a href="#scope">File scope and collisions</a></li>
<li><a href="#witness">What actually happened</a></li>
<li class="sub"><a href="#footprint">Modified, or read-only</a></li>
<li class="sub"><a href="#exhibit">The witness keeps what it saw</a></li>
<li><a href="#split">Splitting a task</a></li>
<li><a href="#review">No agent reviews its own work</a></li>
<li><a href="#verdict">The review closes its own loop</a></li>
<li><a href="#ground">The ground a task builds on</a></li>
<li><a href="#memory">Memory</a></li>
<li class="sub"><a href="#recall">Recall</a></li>
<li class="sub"><a href="#footing">Footing: when a fact went stale</a></li>
<li><a href="#cli">Command line</a></li>
<li><a href="#tui">The TUI</a></li>
<li><a href="#events">The board as a log</a></li>
<li><a href="#mcp">MCP tools</a></li>
<li><a href="#config">Configuration</a></li>
<li><a href="#examples">Examples</a></li>
<li><a href="#faq">FAQ</a></li>
</ol>
<div class="away">
<a href="https://github.com/aoprisan/hird">Source on GitHub →</a>
<a href="https://github.com/aoprisan/hird/tree/main/examples">Examples folder →</a>
<a href="https://github.com/aoprisan/hird/blob/main/DESIGN.md">DESIGN.md →</a>
</div>
</details>
</nav>
<main id="top">
<header class="hero">
<div class="badges">
<span class="badge">one binary</span>
<span class="badge">no daemon</span>
<span class="badge">SQLite (WAL)</span>
<span class="badge">MCP over stdio</span>
</div>
<h1>hird</h1>
<p class="lede">
You run Claude Code in one terminal, Codex CLI in another, maybe Copilot in
your editor. They cannot see each other's work, and nothing either of them
learns survives the session. <strong>hird</strong> is one local binary that
gives them a shared queue and a shared memory, in one SQLite file, with a
terminal UI over the top.
</p>
<div class="cta">
<a class="primary" href="#install">Install</a>
<a href="#by-hand">Dispatch a task by hand</a>
<a href="https://github.com/aoprisan/hird">GitHub</a>
</div>
</header>
<pre class="diagram" aria-label="Architecture diagram"><code>┌────────────┐ ┌────────────┐ ┌────────────┐
│ Claude Code│ │ Codex CLI │ │ Copilot │
└─────┬──────┘ └─────┬──────┘ └─────┬──────┘
│ stdio MCP │ stdio MCP │ stdio MCP
┌─────▼──────┐ ┌─────▼──────┐ ┌─────▼──────┐
│ hird mcp │ │ hird mcp │ │ hird mcp │ one process per session
└─────┬──────┘ └─────┬──────┘ └─────┬──────┘
└───────────────┼────────────────┘
┌─────▼──────┐ ┌──────────┐
│ SQLite │◄───────┤ hird tui │
│ (WAL) │◄───────┤ hird CLI │
└────────────┘ └──────────┘</code></pre>
<section id="install">
<h2>Install</h2>
<pre><code>curl -fsSL https://raw.githubusercontent.com/aoprisan/hird/main/scripts/get.sh | sh</code></pre>
<p>
No Rust toolchain: this downloads the
<a href="https://github.com/aoprisan/hird/releases">release</a> binary for
your platform (Linux x86_64/aarch64, macOS Intel/Apple silicon — the
Linux ones are static musl builds that run on any distribution), verifies
it against the release's checksum, and installs it as
<code>~/.local/bin/hird</code>. Append <code>-s -- --install-skill</code>
to the <code>sh</code> to also install the agent skill, and set
<code>HIRD_VERSION=v0.1.0</code> to pin a release instead of taking the
latest.
</p>
<p>
With a Rust toolchain (1.88 or newer),
<code>cargo install hird --locked</code> gets the same binary from
crates.io, and from a checkout
<code>./scripts/install.sh --install-skill</code> builds the release
binary, copies that standalone snapshot to <code>~/.local/bin/hird</code>,
then removes the release build artifacts; re-run it after upgrading the
source.
</p>
<p>
Whichever way it arrived, <code>--install-skill</code> installs the bundled
portable skill for Codex and OpenCode (<code>~/.agents/skills/hird</code>),
Claude Code (<code>~/.claude/skills/hird</code>), GitHub Copilot
(<code>~/.copilot/skills/hird</code>), and the Gemini CLI
(<code>~/.gemini/skills/hird</code>). It is optional, can be run
separately (<code>hird --install-skill</code>), and new agent sessions
should be started after installing it.
</p>
<p>
SQLite is compiled in, so there is nothing else to install and nothing to
configure before first use. The database is created on first write at
<code>${XDG_DATA_HOME:-~/.local/share}/hird/hird.db</code>; ask for the
exact path with <code>hird db-path</code>.
</p>
</section>
<section id="dispatch">
<h2>Dispatching work</h2>
<p>
There are two ways to get work to an agent, and they are not exclusive — the
same queue serves both, at the same time, and you can mix them task by task.
</p>
<div class="cols">
<div class="card">
<h4>By hand, by number</h4>
<p>
You file a task, then tell a specific agent <em>"pick up task 42"</em>. It
calls <code>task_claim</code> on the number you said. You decide who works
what and when.
</p>
</div>
<div class="card">
<h4>Letting agents pull</h4>
<p>
You file a plan, then tell every agent <em>"work the queue"</em>. Each one
calls <code>task_next</code> and is handed the most important task that is
actually workable. Nobody assigns anything.
</p>
</div>
</div>
<div class="note">
<span class="label">Manual dispatch is not going anywhere</span>
<p>
Self-service dispatch was added alongside manual dispatch, not in place of
it. Nothing in hird ever pushes work at an agent: <code>task_next</code> is
a tool an agent chooses to call, so an agent you never tell to work the
queue will sit idle until you name a number. Naming a number still works
exactly as it did — including for tasks that were filed as part of a
dependency graph.
</p>
</div>
<h3 id="by-hand">By hand, by number</h3>
<p>File the task from the shell (or with <kbd>a</kbd> in the TUI):</p>
<pre><code><span class="k">hird</span> add <span class="s">"Port the config loader to serde"</span> \
--body <span class="s">"Keep the env-var precedence. Tests in tests/config.rs must pass."</span>
<span class="c"># → 1</span>
<span class="k">hird</span> ls
<span class="c"># #1 open Port the config loader to serde</span></code></pre>
<p>
<code>hird add</code> prints the task number and nothing else, so it composes:
<code>seq=$(hird add "…")</code>. Then, in any
<a href="#harnesses">registered harness</a>, say:
</p>
<blockquote>pick up task 1</blockquote>
<p>
The agent calls <code>task_claim</code> with <code>seq: 1</code>, gets the full
body back, works it, and calls <code>task_complete</code>. Watch it happen with
<code>hird tui</code>, or read the history afterwards with
<code>hird show 1</code>.
</p>
<p>
A claim is atomic. If you hand the same number to two agents, exactly one wins
and the loser gets a sentence it can repeat to you verbatim:
</p>
<pre><code><span class="w">task 42 is claimed by codex:9f2c until 2026-07-25T14:32:00.000Z</span></code></pre>
<p>
A claim on a task whose dependencies are unfinished is refused for that reason
instead — see <a href="#dependencies">Dependencies</a>. Those are the only two
ways a claim by number fails.
</p>
<h3 id="work-the-queue">Letting agents pull</h3>
<p>
Naming a number works, but it does not scale past one agent. Give the queue a
plan instead, and let the agents take it apart themselves.
</p>
<pre><code><span class="k">hird</span> add <span class="s">"Design the storage schema"</span> --path <span class="s">'src/db.rs'</span>
<span class="k">hird</span> add <span class="s">"Port the repository layer"</span> --path <span class="s">'src/repo/**'</span> --needs 1
<span class="k">hird</span> add <span class="s">"Rewrite the renderer"</span> --path <span class="s">'src/tui/**'</span></code></pre>
<p>
Now open three harnesses and tell each one the same thing:
<strong>"work the queue"</strong>. Each agent calls <code>task_next</code>, and
the queue hands out the most important task that is <em>actually workable</em>
— open, with every dependency finished, and whose files nobody else is inside.
Tasks 1 and 3 go out immediately, in parallel. Task 2 waits, because the schema
is not done yet.
</p>
<pre><code>$ <span class="k">hird</span> graph
wave 1 (workable now)
#1 in_progress Design the storage schema
#3 claimed Rewrite the renderer
wave 2 (after wave 1)
#2 open Port the repository layer waits for #1</code></pre>
<p>
Agents keep calling <code>task_next</code> as they finish, until it comes back
with nothing to do — and it says why it is idle: everything done, everything
blocked, or everything left overlapping live work.
</p>
<h3 id="plan-files">The plan as a file</h3>
<p>
Three <code>hird add</code> calls are fine. A plan worth reviewing before you
point three agents at it is worth writing down, and a plan you will edit is
worth being able to run twice.
</p>
<pre><code><span class="c"># plan.toml</span>
plan = <span class="s">"serde-migration"</span>
[[task]]
name = <span class="s">"schema"</span>
title = <span class="s">"Design the storage schema"</span>
priority = 3
paths = [<span class="s">"src/db.rs"</span>]
[[task]]
name = <span class="s">"repos"</span>
title = <span class="s">"Port the repository layer"</span>
paths = [<span class="s">"src/repo/**"</span>]
needs = [<span class="s">"schema"</span>]</code></pre>
<pre><code><span class="k">hird</span> plan apply plan.toml --dry-run <span class="c"># read it first</span>
<span class="k">hird</span> plan apply plan.toml <span class="c"># file the whole graph in one transaction</span></code></pre>
<p>
Tasks carry names instead of numbers, so the file means the same thing in a
fresh database as in one holding two hundred tasks, and it can live in the
repository beside the code it describes. Each task is remembered under the
name it was filed with, so applying an edited plan files only what the file
has gained — the tasks already in flight keep their claims, their history and
their numbers. Either the whole graph lands or none of it does.
</p>
<p>
What a plan may say is exactly what a task row can hold: a title, a body, a
priority, the files it expects to touch, the tasks it waits for. There are no
conditionals, no loops and no retries, and that is not an omission to be
filled in later — <code>hird</code> hands work out because an agent asked for
it, and a file that could say <em>when</em> to run something would be
describing a scheduler this queue deliberately does not have.
</p>
<p>
<strong><code>--dry-run</code> is the reason the file earns its place.</strong>
It lays the plan out in the waves <code>hird graph</code> will print, and then
tells you the thing the queue could not have told you until the work was
already live:
</p>
<pre><code>$ <span class="k">hird</span> plan apply plan.toml --dry-run
plan "serde-migration" — 5 tasks, 3 waves, at most 3 at once
wave 1 (workable now)
new schema Design the storage schema
files src/db.rs
new renderer Rewrite the renderer
files src/tui/**
new audit Audit the renderer tests
files src/tui/view.rs
…
<span class="w">same files, nothing ordering them — the queue hands these out one at a time,
so the waves above are wider than the work really is
renderer and audit — src/tui/** overlaps src/tui/view.rs
declaring no files: notes
the queue cannot keep another agent out of what these touch, and what
earlier work learned reaches them by title alone</span>
nothing was written; drop --dry-run to file it</code></pre>
<p>
Two globs can be intersected before either file exists, so a pair that
<em>looks</em> parallel and will in fact be handed out one at a time is
knowable while the plan is still a file. Wave 1 above says three; the work
says two and a queue.
</p>
<p>
Filing a plan is a human act, which is why there is no MCP tool for it: the
review is the point, and an agent that could apply its own plan unread would
have removed the only step this feature exists for. An agent that finds its
task is really three jobs has <a href="#split"><code>task_split</code></a>
instead. The annotated format is
<a href="https://github.com/aoprisan/hird/blob/main/examples/plan.toml">examples/plan.toml</a>.
</p>
<h3 id="dispatch-hook">The dispatch hook: the one push in a pull design</h3>
<p>
Everything above is pull, and one seam is left by hand: a task that becomes
workable while every agent is idle sits on the board, correct and silent,
until you notice and go find an agent to point at it. The
<code>dispatch_hook</code> config key closes that seam without a daemon.
Name a command and hird runs it — detached, through <code>sh -c</code> — at
the moment a task becomes claimable, with the announcement in its
environment:
</p>
<pre><code><span class="c"># ${XDG_CONFIG_HOME:-~/.config}/hird/config.toml</span>
dispatch_hook = <span class="s">'herdr agent prompt worker "hird task $HIRD_TASK is ready; work the hird queue."'</span></code></pre>
<div class="table-wrap">
<table>
<thead><tr><th>Variable</th><th>Meaning</th></tr></thead>
<tbody>
<tr><td><code>HIRD_EVENT</code></td><td>Why the task is claimable: <code>filed</code>, <code>unblocked</code>, <code>review_filed</code>, <code>sent_back</code>, <code>reopened</code>, <code>released</code>, <code>answered</code>, <code>lease_expired</code> or <code>resumed</code> — the last one meaning it waited behind a <a href="#recess">recess</a> you have just lifted.</td></tr>
<tr><td><code>HIRD_TASK</code></td><td>The task number.</td></tr>
<tr><td><code>HIRD_TITLE</code></td><td>Its title.</td></tr>
<tr><td><code>HIRD_PROJECT</code></td><td>Its project root.</td></tr>
<tr><td><code>HIRD_RECUSED</code></td><td>Harnesses the queue will refuse this task to, comma-separated; empty for tasks anybody may take. A filed review names whoever did the work under review.</td></tr>
<tr><td><code>HIRD_DB</code></td><td>The database, so the hook's own <code>hird</code> calls read the same board.</td></tr>
</tbody>
</table>
</div>
<p>
hird neither waits for the command nor reads its answer — a broken hook
cannot slow a claim or fail a completion — and the announcement is read back
from the committed board, so a task another agent grabbed in the meantime is
never announced. What the command does is your business: append to a log,
post a notification, or — the case it was built for — summon an idle agent
through a terminal multiplexer that can address one, such as
<a href="https://herdr.dev">herdr</a>. Under herdr, the hook above turns the
whole loop autonomous: a plan is filed and its first wave prompts agents to
pull; a finish frees dependents and prompts for them; a completion files its
<a href="#review">review</a> and prompts a <em>different</em> harness to read
it; a <a href="#verdict">sent-back verdict</a> reopens the work and prompts
for the redo — with you watching the TUI instead of carrying prompts between
terminals.
</p>
<p>
One announcement in that loop is not for just anybody, and the hook is told
so. A hook that always prompts the same agent will, sooner or later, summon
it to a <a href="#review">review</a> of its own work — which the queue then
refuses, and the review sits silent again: the very seam the hook exists to
close, reopened for exactly the tasks where the second pair of eyes matters.
<code>HIRD_RECUSED</code> carries the fact only hird knows — which harness
the claim would turn away — so one line of shell routes the summons. Commas
cannot appear in a harness name, making the membership test safe:
</p>
<pre><code>dispatch_hook = <span class="s">'''
worker=claude; case ",$HIRD_RECUSED," in *,claude-code,*) worker=codex;; esac
herdr agent prompt "$worker" "hird task $HIRD_TASK is ready; work the hird queue."
'''</span></code></pre>
<p>
Because hird only runs when somebody calls it, an announcement happens when
the becoming-claimable is observed — which for every cause except
<code>lease_expired</code> is the same write that causes it. Expiry is
<a href="#lifecycle">enforced lazily by sweeps</a>, and every queue call —
every MCP tool, every CLI verb — sweeps before its real work and announces
what came back to the pool, so a dead agent's task is heard about by the
next call any other agent (or you) makes.
<a href="https://github.com/aoprisan/hird/blob/main/examples/dispatch-hook.sh">examples/dispatch-hook.sh</a>
shows every announcement landing, no multiplexer required.
</p>
<p>
Questions have the same seam on the other side of the table, and the
<code>question_hook</code> key closes it the same way. A task
<a href="#lifecycle">released with a question</a> steps out of dispatch on
purpose — it is waiting for a human, not another agent, so the dispatch hook
stays deliberately quiet — but a human who is not watching the board waits
in the same silence an idle agent did. Name a command and hird runs it,
detached, the moment a question gate opens, with <code>HIRD_TASK</code>,
<code>HIRD_TITLE</code>, <code>HIRD_PROJECT</code>,
<code>HIRD_QUESTION</code>, <code>HIRD_ASKED_BY</code> and
<code>HIRD_DB</code> in its environment (<code>HIRD_EVENT</code> is always
<code>asked</code>, so one script can serve both hooks and branch on the
same vocabulary). Point it at whatever reaches you:
</p>
<pre><code>question_hook = <span class="s">'notify-send "hird task $HIRD_TASK asks" "$HIRD_QUESTION"'</span></code></pre>
<p>
Answering stays a human act — <code>hird answer</code> or the TUI — and the
moment you do, the dispatch hook announces the task back to the agents as
<code>answered</code>. The two hooks together close the loop's last manual
mile in both directions: agents are woken when work appears, and you are
woken when work needs you.
</p>
<p>
Under herdr, the whole pairing also ships packaged as a
<a href="https://github.com/aoprisan/hird/tree/main/herdr-plugin">herdr plugin</a>:
<code>herdr plugin install aoprisan/hird/herdr-plugin</code> wires the hook
for you, keeps the worker roster in a config file instead of a shell
one-liner, falls through to the next worker when an agent is gone, and puts
the <a href="#tui">board</a> in an overlay pane.
</p>
<h3 id="recess">The recess: standing the queue down</h3>
<p>
All of the above makes the queue live all the time: <code>task_next</code>
answers whoever asks, and with a hook wired, a task that becomes claimable
summons a worker within the second. The moment you need the tree to
yourself — a rebase, a merge landing, a plan you have stopped believing
in — there was no way to say so short of killing sessions or unwiring the
hook. Now there is one:
</p>
<pre><code><span class="k">hird</span> recess <span class="s">"rebasing main"</span>
<span class="c"># queue for /home/you/app in recess ("rebasing main")
# nothing new is handed out; work already claimed continues
# hird resume lifts it</span></code></pre>
<p>
A recess stands one project's queue down. Named claims and
<code>task_next</code> alike are refused, carrying your reason, and the
dispatch hook stays quiet — a summons to a stood-down queue would send an
agent straight into a refusal. Work already claimed is untouched: leases
run, check-ins land, completions finish, because a recess stops the
hand-out, not the work. An agent asking for work is told the difference
out loud — <em>in recess, not idle</em> — so it stands by instead of
retrying, and <code>hird ls</code>, <code>hird graph</code>,
<code>hird why</code> and the TUI's status bar all wear the recess while it
stands.
</p>
<pre><code><span class="k">hird</span> resume
<span class="c"># recess lifted for /home/you/app — claims resume</span></code></pre>
<p>
Lifting it announces everything that became claimable while the queue stood
down — each task reaching the dispatch hook as
<code>HIRD_EVENT=resumed</code> — so the backlog summons hands the moment
you are ready for them, and not a moment before. Calling and lifting a
recess are human acts, like <a href="#plan-files">filing a plan</a>, so
there is no MCP tool for either; a recess ends when you say so, never at a
time.
</p>
</section>
<section id="harnesses">
<h2>Registering a harness</h2>
<p>
Each harness runs its own <code>hird mcp</code> process over stdio. The only
thing they need to differ on is <code>HIRD_HARNESS</code>, which is how agents
and the board tell each other apart (<code>claude-code:af31</code>,
<code>codex:9f2c</code>). Leave it unset and the agent shows up as
<code>unknown</code>.
</p>
<p>
<code>hird register</code> writes that for you, into the one file the harness
in question actually reads:
</p>
<pre><code><span class="k">hird</span> register claude-code <span class="c"># ./.mcp.json</span>
<span class="k">hird</span> register codex <span class="c"># ~/.codex/config.toml</span>
<span class="k">hird</span> register copilot <span class="c"># ./.vscode/mcp.json — Copilot in VS Code</span>
<span class="k">hird</span> register copilot-cli <span class="c"># ~/.copilot/mcp-config.json</span>
<span class="k">hird</span> register gemini <span class="c"># ./.gemini/settings.json</span>
<span class="k">hird</span> register opencode <span class="c"># ~/.config/opencode/opencode.json</span></code></pre>
<pre><code><span class="w">registered hird in /home/you/project/.vscode/mcp.json
command /home/you/.cargo/bin/hird mcp
env HIRD_HARNESS=copilot
next: in VS Code: MCP: List Servers → hird → Start Server, then tick hird in
the agent-mode tools picker</span></code></pre>
<p>
The <code>command</code> it writes is the absolute path of the binary doing
the writing, because that is the thing hand-written configs get wrong: a bare
<code>hird</code> resolves against the harness's <code>PATH</code>, and a GUI
editor's is not your shell's.
</p>
<p>
Register as many harnesses as you run — that is the point — and run it again
whenever you move the binary. Registering twice changes nothing and says so.
An entry you have since edited by hand is refused rather than overwritten,
with <code>--force</code> to say you meant it. <code>--print</code> writes
nothing and shows what it would have written, for a config this cannot safely
edit — one with comments in it, or a harness hird has never heard of.
</p>
<p>
A second registration on a scratch database, alongside the real one:
</p>
<pre><code><span class="k">hird</span> register codex --name hird-scratch --db /tmp/scratch/hird.db</code></pre>
<h3>What it writes</h3>
<h4>Claude Code</h4>
<span class="filename">./.mcp.json</span>
<p>
Project-scoped, so it belongs to the checkout rather than to you.
<code>claude mcp add hird -e HIRD_HARNESS=claude-code -- hird mcp</code> is
the user-wide equivalent.
</p>
<h4>Codex CLI</h4>
<span class="filename">~/.codex/config.toml</span>
<pre><code>[mcp_servers.hird]
command = <span class="s">"/home/you/.cargo/bin/hird"</span>
args = [<span class="s">"mcp"</span>]
env = { HIRD_HARNESS = <span class="s">"codex"</span> }</code></pre>
<p>
Appended, with the comments already in the file left alone.
</p>
<h4>Copilot in VS Code</h4>
<span class="filename">.vscode/mcp.json</span>
<pre><code>{
<span class="s">"servers"</span>: {
<span class="s">"hird"</span>: {
<span class="s">"type"</span>: <span class="s">"stdio"</span>,
<span class="s">"command"</span>: <span class="s">"/home/you/.cargo/bin/hird"</span>,
<span class="s">"args"</span>: [<span class="s">"mcp"</span>],
<span class="s">"env"</span>: { <span class="s">"HIRD_HARNESS"</span>: <span class="s">"copilot"</span> }
}
}
}</code></pre>
<p>
Writing this does not start it: <strong>MCP: List Servers</strong> → <code>hird</code> →
<strong>Start Server</strong>, and tick <code>hird</code> in the tools picker
of the agent-mode chat box. VS Code does not launch a newly written server on
its own, and a stopped or unticked server looks exactly like one that was
never registered.
</p>
<h4>Copilot CLI</h4>
<span class="filename">~/.copilot/mcp-config.json</span>
<pre><code>{
<span class="s">"mcpServers"</span>: {
<span class="s">"hird"</span>: {
<span class="s">"type"</span>: <span class="s">"local"</span>,
<span class="s">"command"</span>: <span class="s">"/home/you/.cargo/bin/hird"</span>,
<span class="s">"args"</span>: [<span class="s">"mcp"</span>],
<span class="s">"env"</span>: { <span class="s">"HIRD_HARNESS"</span>: <span class="s">"copilot"</span> },
<span class="s">"tools"</span>: [<span class="s">"*"</span>]
}
}
}</code></pre>
<p>
<code>/mcp add</code> inside a session writes the same file.
</p>
<h4>Gemini CLI</h4>
<span class="filename">.gemini/settings.json</span>
<pre><code>{
<span class="s">"mcpServers"</span>: {
<span class="s">"hird"</span>: {
<span class="s">"command"</span>: <span class="s">"/home/you/.cargo/bin/hird"</span>,
<span class="s">"args"</span>: [<span class="s">"mcp"</span>],
<span class="s">"env"</span>: { <span class="s">"HIRD_HARNESS"</span>: <span class="s">"gemini"</span> }
}
}
}</code></pre>
<p>
Project-scoped, the same scope <code>gemini mcp add</code> defaults to, and
there is no <code>type</code> to get wrong: the Gemini CLI reads a
<code>command</code> as stdio.
<code>gemini mcp add -e HIRD_HARNESS=gemini hird hird mcp</code> writes the
same entry — with the bare <code>hird</code> this command exists to avoid —
and its <code>--scope user</code> writes
<code>~/.gemini/settings.json</code> instead, which every project reads and
the project file merges over. The CLI tolerates comments in
<code>settings.json</code> and no JSON parser does, so a commented file is
left untouched and <code>--print</code> renders the block to merge by hand. Restart the Gemini CLI after registering, and
<code>gemini mcp list</code> confirms the connection.
</p>
<h4>OpenCode</h4>
<span class="filename">${XDG_CONFIG_HOME:-~/.config}/opencode/opencode.json</span>
<pre><code>{
<span class="s">"mcp"</span>: {
<span class="s">"hird"</span>: {
<span class="s">"type"</span>: <span class="s">"local"</span>,
<span class="s">"command"</span>: [<span class="s">"/home/you/.cargo/bin/hird"</span>, <span class="s">"mcp"</span>],
<span class="s">"environment"</span>: { <span class="s">"HIRD_HARNESS"</span>: <span class="s">"opencode"</span> }
}
}
}</code></pre>
<p>
If <code>opencode.jsonc</code> already exists and
<code>opencode.json</code> does not, hird uses the JSONC path. A file
containing comments is left untouched; <code>--print</code> renders the
block to merge by hand. Restart OpenCode after registering, and
<code>opencode mcp list</code> confirms the connection.
</p>
<p>
Any other MCP-capable harness works the same way: run <code>hird mcp</code>
over stdio and set <code>HIRD_HARNESS</code> to something recognisable.
<code>hird register copilot --print</code> is a reasonable starting point for
one hird has no entry for. Whichever way it is registered, the server states
the queue's rules when the harness first asks — claim before working, heartbeat
before the lease runs out, declare your files, write down what you learn — so
agents generally behave without being coached in your prompt.
</p>
<h3 id="protocol">The protocol</h3>
<p>
<code>hird mcp</code> speaks MCP <strong>2026-07-28</strong>, and every
earlier revision back to 2024-11-05. Which one a session uses is the harness’s
choice, not something to configure — hird answers whichever it is asked
for, and says so by name when asked for one it does not have.
</p>
<p>
2026-07-28 removes the <code>initialize</code> handshake: a client opens with
<code>server/discover</code>, or simply with the request it wanted to make,
and carries the protocol version, its own name and its capabilities in
<code>_meta</code> on every one. Nothing hird does depended on that handshake
— it is one process per session over a pipe, which is about as
stateless as a session gets — so a harness on the new lifecycle and one
still handshaking share a queue without noticing each other’s era. The
one visible difference is that a request claiming 2026-07-28 without carrying
what 2026-07-28 requires is refused as a bad request, in a sentence naming
what was missing, rather than served on a guess about who sent it.
</p>
<p>
The revision also means a client now names itself on every call, which hird
uses for exactly one thing: <strong>a harness that never set
<code>HIRD_HARNESS</code> is filed under the name its client gives, instead of
<code>unknown</code></strong>. <code>HIRD_HARNESS</code> still wins wherever
it is set — it is the half of the identity you control, and
<code>hird register</code> writes it — and the name is taken once and
then held for the life of the session, because an actor that changed its name
halfway through would lose track of its own claims.
</p>
<p>
What hird has never used, and does not start using now, are the three
features this revision deprecates: no roots, no sampling, no protocol
logging.
</p>
<h3>When the agent says it has no hird tools</h3>
<p>
A skill, a prompt file or a <code>copilot-instructions.md</code> that talks
about <code>task_claim</code> is not a connection. It tells an agent what to
do with the tools; it cannot hand it any. Registering the server is a
separate step, and it is the one above. If the agent reports no
<code>task_*</code> tools, work down this list.
</p>
<p>
<strong>Is the server registered where that harness reads?</strong> Each
registration above belongs to exactly one harness. Copilot in VS Code does
not read <code>~/.copilot/mcp-config.json</code>, and the Copilot CLI does
not read <code>.vscode/mcp.json</code>. <code>hird register <harness></code>
picks the file for you; run it again and it will say
<code>already registered</code> against the path it went to.
</p>
<p>
<strong>Can the harness spawn <code>hird</code>?</strong>
<code>command: "hird"</code> resolves against the harness's <code>PATH</code>,
not your shell's. A GUI VS Code launched from Finder or a dock has neither
<code>~/.cargo/bin</code> nor anything else your shell profile adds, so the
spawn fails and the server dies before the handshake. This is what
<code>hird register</code> exists to get right; in a config written by hand,
paste the absolute path instead:
</p>
<pre><code><span class="k">which</span> hird <span class="c"># → /Users/you/.cargo/bin/hird</span></code></pre>
<p>
<strong>What did the server say?</strong> Every harness keeps the stdio
server's output. In VS Code it is <strong>MCP: List Servers</strong> →
<code>hird</code> → <strong>Show Output</strong>; in Claude Code,
<code>claude mcp list</code>. A <code>hird</code> that starts prints nothing
and waits, so an empty log is the healthy case and
<code>command not found</code> is the usual one.
</p>
<p>
<strong>Is it the cloud coding agent?</strong> The Copilot coding agent on
github.com runs in an ephemeral container with no access to your machine.
hird is a local queue in a local SQLite file, so there is nothing there for
it to connect to — register hird in an editor or CLI that runs on the same
machine as the database (<code>hird db-path</code>).
</p>
<p>
Confirm the binary works at all before blaming the wiring: <code>hird ls</code>
from a terminal exercises the same database over the same code the server
does.
</p>
</section>
<section id="lifecycle">
<h2>How a task moves</h2>
<pre class="diagram"><code>open ──claim──► claimed ──start──► in_progress ──complete──► done
▲ │ │ └─fail────► failed
│ └── lease expiry ────┘
│ └──── release ───────┘
└──────── reopen (human) ◄── done|failed|cancelled
open ──cancel (human)──► cancelled</code></pre>
<p>
<strong>Claiming is atomic.</strong> It is a single compare-and-set, so if two
agents reach for the same task at the same moment exactly one wins.
</p>
<p>
<strong>Claims are leases, not locks.</strong> A claim lasts 15 minutes by
default and every <code>task_update</code> renews it. If an agent crashes,
gets killed, or simply wanders off, the lease lapses and the task returns to
<code>open</code> on its own — no stuck tasks, no manual cleanup, no
background process. Expiry is enforced lazily by whoever reads the table next,
which is usually the TUI half a second later.
</p>
<p>
<strong>Only the lease holder can drive a task.</strong> Another agent cannot
complete, fail, or update work it does not hold. You, however, can always
<code>cancel</code> or <code>reopen</code> anything from the CLI or the TUI.
</p>
<p>
<strong>An agent that cannot finish hands the task back.</strong>
<code>task_release</code> returns it to <code>open</code> immediately, which is
not the same as <code>failed</code> — a failure is a verdict on the task and
waits for you to reopen it, a release just says this agent stopped.
</p>
<p>
<strong>An agent that needs your answer stops the churn.</strong> A
<code>task_release</code> carrying <code>question</code> returns the task to
<code>open</code> but keeps it out of claims and <code>task_next</code> until
you run <code>hird answer <seq> <answer></code> or press
<kbd>A</kbd> on its card. The answer makes it claimable, announces
<code>HIRD_EVENT=answered</code>, and rides in the next claim beside the
question. Releasing without a question remains an immediate handoff.
</p>
<p>
No agent is summoned to it: a question is the one stall no agent can clear,
so the dispatch hook stays silent rather than waking somebody who would
only hand it around again. On the board, <code>hird ls</code> marks the
row, <code>hird show</code> prints the command that answers it, and the TUI
counts them in its status bar (<code>· 2 awaiting you</code>) — and if
noticing should not have to wait for a glance, the
<a href="#dispatch-hook"><code>question_hook</code></a> config key runs a
command of yours the moment the question is raised, with the question in
its environment.
</p>
</section>
<section id="dependencies">
<h2>Dependencies</h2>
<p>
Dependencies are enforced, not annotated. A task whose dependencies are
unfinished cannot be claimed at all — by number or by
<code>task_next</code> — and the refusal says what to do about it:
</p>
<pre><code><span class="w">task 2 is blocked by task 1 (Design the storage schema, in_progress);
it becomes claimable once every dependency is done</span></code></pre>
<p>
Only <code>done</code> clears a blocker. A failed dependency keeps its
dependents off the ready list, because the work they were waiting for did not
happen.
</p>
<pre><code><span class="c"># at filing time</span>
<span class="k">hird</span> add <span class="s">"Write the release notes"</span> --needs 1,2
<span class="c"># or afterwards</span>
<span class="k">hird</span> dep add 3 --needs 1,2
<span class="k">hird</span> dep rm 3 --needs 2
<span class="c"># see the whole plan as dispatch waves</span>
<span class="k">hird</span> graph</code></pre>
<p>
<code>hird graph</code> prints waves rather than edges, because that is the
shape you actually want: how much of this can run at once, and what the
critical path is.
</p>
</section>
<section id="scope">
<h2>File scope and collisions</h2>
<p>
The queue also knows which files each task expects to touch, so it can see the
one failure mode a status machine cannot: two agents editing the same file
from two harnesses, one of them about to lose their work.
</p>
<p>
Declarations are globs, not files, because nothing has been written yet — and
overlap is decided by asking whether <em>any path at all</em> is described by
both patterns. <code>src/*.rs</code> and <code>src/lib*</code> collide before
<code>src/lib.rs</code> exists.
</p>
<pre><code>$ <span class="k">hird</span> agents
codex:9f2c #4 in_progress Port the config loader 11m left
files src/config.rs, tests/config.rs
claude-code:af31 #7 claimed Rewrite the loader tests 14m left
files tests/**
<span class="w">!! tests/** also claimed by codex:9f2c on #4</span></code></pre>
<p>The agents see it too, the moment they say what they are about to change:</p>
<pre><code>{ <span class="s">"seq"</span>: 7, <span class="s">"paths"</span>: [<span class="s">"tests/**"</span>],
<span class="s">"overlaps"</span>: [<span class="s">"tests/** overlaps tests/config.rs on task 4 (Port the config loader), held by codex:9f2c"</span>],
<span class="s">"advice"</span>: <span class="s">"tell the human about the overlap before editing those files, …"</span> }</code></pre>
<p>
By default <code>task_next</code> simply does not hand out work that would
collide — with several tasks to choose from there is no reason to pick the one
that clashes. A claim <em>by number</em> is still allowed to overlap, and only
reports it, on the theory that you named that task on purpose. Set
<code>path_conflicts = "refuse"</code> to make an overlapping claim fail
outright instead.
</p>
<p>
Scope can be set at filing time with <code>--path</code>, adjusted later with
<code>hird scope</code>, or declared by the agent itself through
<code>task_scope</code> once it knows where it is going.
</p>
</section>
<section id="witness">
<h2>What actually happened</h2>
<p>
Everything above is what an agent <em>said</em>. A task's status is its
holder's claim about itself, its file scope is its holder's prediction, and
its result is a sentence the holder wrote about its own work. That is fine
right up until three agents share one checkout, where the failure that costs
you work is the one nobody reports.
</p>
<p>
Play the collision out to the end. Two agents declare
<code>src/config.rs</code>. Both are told about the overlap. Both decide their
part is small. Both edit. The second write lands on the first, both tasks
complete, the board goes green — and git has nothing to show you, because
nothing was committed and there is only ever one version of the file on disk.
Not one of the three participants is in a position to notice.
</p>
<p>
So <code>hird</code> goes and looks. A claim fingerprints the repository,
every check-in takes another fingerprint and subtracts, and the results say
what moved:
</p>
<pre><code>{ <span class="s">"seq"</span>: 1, <span class="s">"status"</span>: <span class="s">"in_progress"</span>, <span class="s">"note_recorded"</span>: <span class="s">"loader ported"</span>,
<span class="s">"changed"</span>: [<span class="s">"src/config.rs (modified)"</span>, <span class="s">"src/mcp.rs (added)"</span>] }</code></pre>
<p>That list did not come from the agent. It came off the disk.</p>
<h3 id="contention">The overlap that has stopped being hypothetical</h3>
<p>
What the working tree cannot tell you is <em>who</em> — one filesystem, no
keyboards — and <code>hird</code> does not pretend it can. What it has instead
is the other half of the picture, which it was already collecting: a declared
scope is an agent saying it holds a copy of a file and means to write from it.
</p>
<blockquote>
A <strong>contention</strong> is a file two live agents both declared, which
has since moved under both of them, and which the two of them disagree about.
</blockquote>
<p>
All three clauses earn their place. Both declaring is the attribution the
filesystem cannot supply. Having moved is what makes it an event rather than a
forecast — the plain overlap is already on the board. Disagreeing is what
makes it worth interrupting an agent over: two agents who have both been shown
the current file are not in trouble yet, and warning them anyway is how a
warning stops being read.
</p>
<p>When all three hold, both sides hear about it on their next call, by name:</p>
<pre><code>{ <span class="s">"contended"</span>: [<span class="s">"src/config.rs changed under task 2 (Audit the config loader), held by
claude-code:af31 at 14:36 UTC, at or after the version hird last confirmed
for you — re-read it before you write, or your edit will discard theirs"</span>],
<span class="s">"advice"</span>: <span class="s">"a file you declared has changed under another agent that declared
it too — re-read it before your next write, and tell the human"</span> }</code></pre>
<p>
Re-reading the file is the whole fix, and it is the one thing neither agent
would have thought to do.
</p>
<h3 id="drift">Drift</h3>
<p>
An agent that wanders outside what it declared is told so, because everyone
else's collision check is reading the declaration and not the edits:
</p>
<pre><code>{ <span class="s">"undeclared"</span>: [<span class="s">"src/mcp.rs"</span>],
<span class="s">"advice"</span>: <span class="s">"src/mcp.rs moved while you held this task and nobody has declared
it. If the edit was yours, call task_scope so the other agents can
see it; if it was not, another agent is working outside what it
declared"</span> }</code></pre>
<p>
The conditional is deliberate. Alone in a project, a file that moved moved
because of you. With another agent live, <code>hird</code> watched the file
and not the keyboard, and it says so rather than guessing.
</p>
<h3 id="footprint">Did it change anything, or did it only read?</h3>
<p>
The same fingerprints answer a blunter question, and it is the one you ask
first when a task comes back done: did this work touch the code at all?
</p>
<pre><code>$ <span class="k">hird</span> ls
#1 done Port the config loader modified 2 files
#2 done Audit the config loader read-only
#3 in_progress Write the release notes [codex:9f2c] 11m left read-only so far</code></pre>
<p>
An investigation that changed nothing and a refactor that rewrote half the
module are the same green card otherwise, and the difference decides whether
there is anything to review, anything to test, or anything to undo.
</p>
<p>Three answers, and the third one matters as much as the other two:</p>
<ul>
<li>
<code>modified N files</code> — the tree differs from the fingerprint taken
when the task was claimed. Where another agent was live in one of those
files, the line says so, because one checkout has no keyboards.
</li>
<li>
<code>read-only</code> — <code>hird</code> was watching, and nothing moved.
On a task still being worked it reads <code>read-only so far</code>: a
running total, not a verdict.
</li>
<li>
nothing at all — <code>hird</code> was not watching, so it has no opinion.
Saying <em>read-only</em> here would be inventing evidence, and the whole
point of the witness is that it does not.
</li>
</ul>
<p>
Agents are told the same thing in the same words, on every check-in and on the
call that finishes the work:
</p>
<pre><code>{ <span class="s">"seq"</span>: 2, <span class="s">"status"</span>: <span class="s">"done"</span>, <span class="s">"result"</span>: <span class="s">"read it; the precedence is already right"</span>,
<span class="s">"footprint"</span>: <span class="s">"read-only — nothing in the working tree moved while it was held"</span> }</code></pre>
<h3 id="witness-board">On the board</h3>
<pre><code>$ <span class="k">hird</span> agents
codex:9f2c #1 in_progress Port the config loader 11m left
files src/config.rs
moved src/config.rs, src/mcp.rs
<span class="w">!! src/config.rs also claimed by claude-code:af31 on #2</span>
<span class="w">!!! src/config.rs changed under task 2 (Audit the config loader), held by
claude-code:af31 at 14:36 UTC … re-read it before you write</span></code></pre>
<p>
<code>files</code> is what was announced; <code>moved</code> is what happened
— or <code>moved nothing yet</code> where an agent has been in the
code and written none of it — and the gap between the two lines is the point.
<code>hird show</code> carries the same record, headed by the one-line answer:
</p>
<pre><code>$ <span class="k">hird</span> show 1
…
changed modified 2 files, though another agent was live in some of them
src/config.rs (modified)
src/mcp.rs (added)</code></pre>
<p>
That is the evidence behind a finished task's result line, and it was not
written by the agent that wrote it. The TUI's Swarm screen shows both, and
titles the pane with how many agents are standing in a file that is moving
under them; the queue board badges every card with what it did to the tree.
</p>
<h3 id="exhibit">The witness keeps what it saw</h3>
<p>
Detection is half an answer. The witness could tell you
<code>src/config.rs</code> moved under task 1; it could not show you the
change, and when a second agent's write landed on the first's uncommitted
work it could name the loss but not undo it. So every file version the
witness fingerprints is also <strong>kept</strong> — content-addressed,
deduplicated, in the same SQLite file as everything else — and three things
read it back.
</p>
<pre><code>$ <span class="k">hird</span> diff 1
diff --git a/src/config.rs b/src/config.rs
--- a/src/config.rs
+++ b/src/config.rs
@@ -1 +1 @@
-fn load() {}
+fn load() { ported() }</code></pre>
<p>
That is the uncommitted diff of what actually moved under task 1 — while the
work is live, after it is done, and after the tree has moved on to something
else. Git remembers what was committed; the exhibit remembers what happened
between commits, which is where agents live. <code>--path</code> narrows it
to one file.
</p>
<p>
The <a href="#review">review</a> a completion files is the second reader:
its brief now carries the diff of the work under judgement, clipped to a
size a context window can afford and pointing at <code>hird diff</code> for
the rest — so the reviewing agent reads the change itself rather than
reconstructing it from a list of file names.
</p>
<pre><code>$ <span class="k">hird</span> salvage 1 src/config.rs --out recovered.rs
salvaged src/config.rs as the witness last saw it under the task — 24 bytes into recovered.rs</code></pre>
<p>
And <code>salvage</code> is the third: the last version the witness saw of a
file under a task, which is exactly the version another agent's write landed
on in the collision the witness was built to catch. <code>--baseline</code>
asks instead for the version the task started from. The name is the honest
limit — a version that came and went between two observations was never
seen, and hird will say a version is not kept rather than guess at one.
</p>
<p>
The record survives the task changing hands. When a lease expires mid-work,
work is released, or a review sends it back, the next claim archives the
previous holding as a <em>tenure</em> — who held it, how it ended, what
moved — instead of overwriting it, and the successor's claim answer carries
<code>previously</code>: whose uncommitted leavings are in the tree it
starts from, and which files to re-read before building on or over them.
<code>hird show</code> numbers the rounds, and <code>hird diff --tenure
N</code> and <code>hird salvage --tenure N</code> read them back after the
redo has written over everything.
</p>
<p>
Kept versions are pruned once nothing references them and they have aged
out, so the store grows with what actually changed, not with time.
<code>exhibit = false</code> keeps the watching and gives up the keeping.
</p>
<h3 id="witness-cost">It is never in the way</h3>
<p>
Watching needs git, and a project without it is not a degraded project — every
tool answers exactly as it did before, and agents are not told about a field
nothing will ever fill. A sweep that fails costs a report nobody asked for,
never the call that was actually made. <code>.gitignore</code> decides what
counts as noise, so build output is free. And with no task in the project
holding a lease there is nobody to measure, so git is not run at all.
</p>
<p>
Measured on hird's own repository: about 8 ms for a claim and 6 ms
for a check-in, against 0.5 ms for a call that never looks — three git
subprocesses, against a heartbeat measured in minutes.
<code>witness = false</code> turns it off.
</p>
</section>
<section id="split">
<h2>Splitting a task</h2>
<p>
An agent that finds its task is really three jobs does not have to do them in
sequence, or hand the problem back to you:
</p>
<pre><code>task_split { seq: 1, subtasks: [
{ title: <span class="s">"Write the migration"</span>, paths: [<span class="s">"src/db.rs"</span>] },
{ title: <span class="s">"Port the repositories"</span>, paths: [<span class="s">"src/repo/**"</span>] },
] }</code></pre>
<p>
The pieces are filed as real tasks. Task 1 starts waiting for both and goes
back in the pool — blocked, so nobody can claim it early — and the agent that
split it is free to pick up something else. The other harnesses take a piece
each, in parallel, and task 1 becomes workable again the moment they are both
done. Pass <code>sequential: true</code> when the pieces genuinely have to
happen in order.
</p>
</section>
<section id="review">
<h2>No agent reviews its own work</h2>
<p>
Every result line in the queue was written by the agent that did the work. It
is the last word, and nobody else ever looks. With one agent that is not a
choice. With three it is a waste of the only thing that makes running three
worth doing.
</p>
<p>
Every harness can review code already. None of them can tell <em>whose</em>
code it is looking at — a harness cannot see another harness's session, and an
agent handed "review this" has no way to know it wrote the thing an hour ago.
hird can: it is the process all of them talk to, and it wrote down who held
the lease.
</p>
<pre><code><span class="k">hird</span> add <span class="s">"Port the config loader"</span> --review --path src/config.rs</code></pre>
<p>
That is the whole opt-in, and it says nothing about who or when. Codex claims
it, works it, and finishes the way it always does:
</p>
<pre><code>task_complete { seq: 1, result: <span class="s">"ported; env still wins over the file"</span> }
{ <span class="s">"seq"</span>: 1, <span class="s">"status"</span>: <span class="s">"done"</span>, <span class="s">"changed"</span>: [<span class="s">"src/config.rs (modified)"</span>],
<span class="s">"review_filed"</span>: 2,
<span class="s">"advice"</span>: <span class="s">"this work was marked for review, so task 2 is now open for an agent
in another harness — you cannot take it yourself. Tell the human."</span> }</code></pre>
<p>
Task 2 was filed by the completion. It is titled after the work, scoped to the
file the <a href="#witness">witness</a> saw move rather than the one anybody
declared, and its body carries codex's own summary marked as the thing under
review rather than as the brief. Then:
</p>
<pre><code>task_next {} <span class="c"># asked by codex</span>
{ <span class="s">"idle"</span>: <span class="s">"1 task is ready, but every one of them is a review of work this
harness did — they need an agent in another harness. Tell the human;
waiting will not change it"</span>,
<span class="s">"recused"</span>: [{ <span class="s">"seq"</span>: 2, <span class="s">"why"</span>: <span class="s">"not whoever worked task 1 (Port the config
loader): that was codex:43em, so this needs another harness"</span> }] }</code></pre>
<p>
Not "nothing to do". The queue is not idle — it is waiting for a different
tool, and an agent told the queue was empty would send you away from the one
thing that needs you. Claiming it by name is refused too, in the same
transaction as the compare-and-set, so there is no race to win.
</p>
<p>
<strong>The bar is the harness, not the session.</strong> Two Claude Code
windows are one model reading its own homework; a bar you could get around by
opening a tab would be no bar at all.
</p>
<p>
<strong>It is a constraint, not a scheduler.</strong> A recusal says who may
<em>not</em> take a task and never who must. Run one harness and the review
simply sits there unclaimable — which the board says plainly, because that is
a fact about your setup rather than something to paper over.
</p>
<p>You can set the bar by hand, and lift it:</p>
<pre><code><span class="k">hird</span> recuse 7 --from 4 --reason <span class="s">"wrote the thing being checked"</span>
<span class="k">hird</span> recuse 7 --clear</code></pre>
<p>
And a <a href="#plan-files">plan file</a> is where the judgement belongs,
since which work deserves a second pair of eyes is a property of the job:
</p>
<pre><code>[[task]]
name = <span class="s">"renderer"</span>
title = <span class="s">"Rewrite the renderer"</span>
paths = [<span class="s">"src/tui/**"</span>]
review = <span class="s">true</span></code></pre>
<p>
Nothing is filed for work the witness saw no trace of, for work that
<code>failed</code> — there is nothing to check, and whether the attempt is
worth reading is your call — or while an earlier review of the same work is
still open.
</p>
</section>
<section id="verdict">
<h2>The review closes its own loop</h2>
<p>
Getting the work in front of a second harness is half the job. The other half
used to be yours: read the review, decide "the error path drops the lock"
means <em>broken</em>, find the task it reviewed, reopen it, paste the
findings somewhere. Every other hand-off in hird files itself; the one
carrying the judgment was left by hand.
</p>
<p>
So a review ends in a <strong>verdict</strong>, and completing one without it
is refused — the refusal says what the two verdicts are and what each will
do:
</p>
<pre><code>task_complete { <span class="s">"seq"</span>: 2, <span class="s">"result"</span>: <span class="s">"the file path still wins when both are
set; invert the precedence in load()"</span>,
<span class="s">"verdict"</span>: <span class="s">"sent_back"</span> }
{ <span class="s">"seq"</span>: 2, <span class="s">"status"</span>: <span class="s">"done"</span>,
<span class="s">"verdicts"</span>: [<span class="s">"task 1 sent back — open again with your findings appended to
its brief"</span>],
<span class="s">"advice"</span>: <span class="s">"the work you sent back is open again carrying your findings; any
agent — its author included — may pick it up, and completing it
will file a fresh review. Tell the human the verdict."</span> }</code></pre>
<p>
<code>sent_back</code> acts in the same transaction as the completion: the
judged work reopens with the findings appended to its brief, so the next
agent to claim it — its author included — is handed exactly what must change
without knowing to ask. The work still carries its review flag, so finishing
it again files a fresh review, recused the same way, and the loop runs round
after round until a review says <code>upheld</code>. Upholding is a
signature: the card now reads <em>done, and seen to be done</em> by a harness
that provably did not do the work.
</p>
<p>
You keep the last word you always had. A <code>sent_back</code> that lands on
work you already reopened or cancelled goes on the record and moves nothing —
the queue never overrules a human. You just stop being the loop's courier.
</p>
<p>
And because every verdict is delivered on the record — who judged, whose
work, which round — the queue accumulates the one measurement it is uniquely
placed to take:
</p>
<pre><code><span class="k">$ hird</span> record
as worker judged upheld sent back first pass
claude-code 3 3 0 2/2
codex 2 1 1 0/1
as reviewer upheld sent back
claude-code 1 1
codex 3 0</code></pre>
<p>
That is whose work survives a reading by a different model, per harness, off
delivered verdicts and nothing else. It is a report, not a scheduler: nothing
routes work by it — the moment the queue started steering tasks toward
whoever scores well, agents would be graded by a table they can see, and the
table would stop measuring anything. What to do about a harness that ships
rework stays your call, made over a table instead of a hunch.
</p>
</section>
<section id="ground">
<h2>The ground a task builds on</h2>
<p>
A dependency edge means one task needs what another produces — "the API
waits for the schema" is about <em>knowing the schema</em>, not just
outliving it. So the edge is a context channel, not only a gate: claiming a
task hands over each finished dependency's own result, written by whoever
finished it, without the claimant knowing to ask.
</p>
<pre><code>task_claim { <span class="s">"seq"</span>: 2 }
{ <span class="s">"claimed"</span>: 2, ...
<span class="s">"built_on"</span>: [{ <span class="s">"seq"</span>: 1, <span class="s">"title"</span>: <span class="s">"Design the storage schema"</span>,
<span class="s">"result"</span>: <span class="s">"schema in src/db.rs; migrations are an array,
version = index + 1"</span>,
<span class="s">"standing"</span>: <span class="s">"done"</span> }] }</code></pre>
<p>
<code>standing</code> says how far that word can be trusted, the same move
memory's footing makes for facts: <code>done</code>, <code>upheld</code> —
read and signed for by a harness that provably did not write it — or
<code>under review 5, provisional</code>, which means the review has not
delivered its verdict and a <code>sent_back</code> could still reopen that
work.
</p>
<p>
Provisional matters because verdicts made <code>done</code> revocable. A
dependent claimed while its blocker's review is still open is building on an
answer that can be taken back — and when that happens, the queue is the only
participant positioned to notice. Now it does something about it, twice
over: the reopened work's live dependents get a <code>ground_shifted</code>
event on their trails in the same transaction as the verdict, and each
holder hears at its next check-in, ahead of everything else the reply could
say:
</p>
<pre><code>task_update { <span class="s">"seq"</span>: 2, <span class="s">"note"</span>: <span class="s">"wiring the loader in"</span> }
{ ...,
<span class="s">"ground_shifted"</span>: [<span class="s">"task 1 (Design the storage schema), which this task
builds on, was sent back by review 5 and reopened; re-read it — the
findings are in its brief — before building further on its work"</span>] }</code></pre>
<p>
The same sentence catches ground lost any other way — a blocker you reopened
or cancelled, or one that failed since — attributed no further than its
status can back. Nothing interrupts an agent mid-edit: hird tells, at the
next moment it is listening, and lets it decide — the same manners the
witness has.
</p>
<p>
Whether provisional ground should <em>hold</em> dependents back is a policy,
not a rule: <code>under_review = "clears"</code> (the default) makes them
workable at once and tells them what they stand on; <code>"holds"</code>
keeps them unclaimable until the verdict, for work whose later stages cost
more than the wait. Under <code>holds</code> the refusal and the board both
say what the wait actually is — <code>waits for #1 (done, under review
5)</code> — and <code>task_next</code> reports held tasks in their own
bucket, because "finished but for a verdict" points you at a review to
chase, not at work to do. On every board, a <code>done</code> card with an
open review wears <code>under review #5</code> until the verdict lands: the
difference between <em>done</em> and <em>done, so far as anyone has
checked</em>.
</p>
</section>
<section id="memory">
<h2>Memory</h2>
<p>
The queue is for work; memory is for what the work taught you. Agents call
<code>mem_store</code> with one plain-prose fact — where something lives, why a
decision went the way it did, which command actually works — and
<code>mem_search</code> finds it later, from any harness, in any session.
</p>
<p>
Every assertion carries provenance: who asserted it, when, and which task they
were working at the time. Facts are never edited or deleted; a fact that stops
being true is <em>superseded</em> by a new one, and the old version stays
searchable behind <code>--include-superseded</code>.
</p>
<pre><code><span class="k">hird</span> mem add <span class="s">"Integration tests need HIRD_DB set or they touch the real db"</span> --tags testing
<span class="k">hird</span> mem search testing</code></pre>
<p>
Search is SQLite FTS5. If a query is not valid FTS syntax — an agent typing
<code>handle_event(ctx)</code> — it degrades to a term-wise substring match
instead of erroring.
</p>
<h3 id="recall">Recall: the task arrives knowing things</h3>
<p>
<code>mem_search</code> only helps an agent that thinks to search, and an agent
that has just been handed a task does not yet know what it does not know. The
queue does. It knows which files the task expects to touch, and it knows what
earlier agents recorded while working those same files — so a claim comes back
with those facts already attached.
</p>
<pre><code>task_claim { seq: 7, paths: [<span class="s">"src/*.rs"</span>] }
{ <span class="s">"claimed"</span>: 7, <span class="s">"title"</span>: <span class="s">"Audit the loader"</span>,
<span class="s">"recalled"</span>: [
{ <span class="s">"content"</span>: <span class="s">"the loader reads HIRD_DB before the config file"</span>,
<span class="s">"why"</span>: <span class="s">"learned on task 4 (Port the config loader), working src/config.rs"</span>,
<span class="s">"actor"</span>: <span class="s">"codex:9f2c"</span>, <span class="s">"task_seq"</span>: 4 } ],
<span class="s">"reminder"</span>: <span class="s">"read `recalled` first — earlier agents left those notes …"</span> }</code></pre>
<p>
Nobody searched, and the two tasks never mention each other: overlap is decided
by the same exact pattern intersection the collision detector uses, so an
assertion recorded on <code>src/config.rs</code> reaches a task that declared
<code>src/*.rs</code>. Declaring your paths early is what makes this work,
which is the second reason to do it.
</p>
<p>
Territory is not only what was declared, though. The
<a href="#witness">witness</a> knows which files actually moved under a task,
and those count on both sides — which matters because declaring a scope is
exactly the step an agent in a hurry skips. An agent that said nothing and
went ahead and edited <code>src/config.rs</code> still leaves the file behind
it, and what it learned still reaches whoever comes next.
</p>
<p>Three things make a fact relevant, strongest first:</p>
<div class="table-wrap">
<table>
<thead><tr><th>Because</th><th>The <code>why</code> line reads</th></tr></thead>
<tbody>
<tr><td>it was recorded on this task, on an earlier pass</td><td><code>recorded while working this task earlier</code></td></tr>
<tr><td>it was recorded on a task whose files overlap yours</td><td><code>learned on task 4 (…), working src/config.rs</code></td></tr>
<tr><td>it reads like your title</td><td><code>mentions "config", "loader"</code></td></tr>
</tbody>
</table>
</div>
<p>
Every recalled fact says where it came from, because an assertion is a claim
and not gospel: an agent that finds one is wrong should
<code>mem_store</code> the truth, which supersedes it and stops it being
recalled again. Nothing is stored for recall — it is derived at read time from
the assertion trail and the declared scopes, so there is no index to rebuild
and no migration to run.
</p>
<p>
<code>task_get</code> carries the same list without claiming anything, and
<code>hird recall <seq></code> shows a human exactly what their agents are
being told. Five facts ride along by default; set
<code>recall_limit = 0</code> to switch it off entirely.
</p>
<h3 id="footing">Footing: a fact knows what it was learned against</h3>
<p>
A memory that only grows eventually lies to you. Not by filling up with
falsehoods — you would notice those — but by filling up with sentences that
<em>were</em> true. A fact recorded in March about a file that has been
rewritten twice since arrives in July in exactly the same voice as one
recorded this morning, and nothing about reading it tells you which is which.
</p>
<p>
The sentence cannot tell you. The code can. So hird records what an assertion
was read off — the files behind it, and the content hash each one had at the
time — and every later reader is told whether that ground has moved.
</p>
<pre><code>$ <span class="k">hird</span> mem standing
firm the loader reads HIRD_DB before the config file
01J… codex:9f2c 2h ago
src/config.rs
shaky the renderer redraws on every poll
01J… claude-code:af31 3d ago
src/tui/view.rs
src/tui/view.rs has changed since this was recorded — re-read before relying on it
2 anchored: 1 firm, 1 shaky</code></pre>
<p>
Nobody curated that, and nobody told hird that <code>src/tui/view.rs</code>
had changed. The fact remembers which file it came from and what that file
said, and the file no longer says it.
</p>
<p>
The same word rides along everywhere a fact is served — <code>mem_search</code>
results, the memory browser, and the <code>recalled</code> list a claim arrives
with, which is the one that matters most because it lands in an agent's
context unasked:
</p>
<pre><code><span class="s">"recalled"</span>: [
{ <span class="s">"content"</span>: <span class="s">"the renderer redraws on every poll"</span>,
<span class="s">"why"</span>: <span class="s">"learned on task 4 (Fix the renderer), working src/tui/view.rs"</span>,
<span class="s">"standing"</span>: <span class="s">"shaky"</span>,
<span class="s">"caution"</span>: <span class="s">"src/tui/view.rs has changed since this was recorded — re-read before relying on it"</span> } ]</code></pre>
<p>
<strong>It never says a fact is false.</strong> A rename, a formatting pass and
a total rewrite look identical from here. <code>shaky</code> means
<em>unverified</em>, which is a weaker claim and a far more useful one: it is
exactly the set of facts where opening the file pays for itself.
<code>orphaned</code> — every file it was about is gone — is the strongest
thing hird will say, and it still stops short of a verdict.
</p>
<p>
Where the files come from needs nothing from the agent. A fact stored with
<code>task_seq</code> is anchored to the literal paths that task declared plus
everything the <a href="#witness">witness</a> saw it move;
<code>mem_store { paths: […] }</code> names them outright for a fact that
belongs to no task. A fact with neither stays unanchored, and hird says
nothing about it rather than guessing.
</p>
<h4>Saying it again is how you say you checked</h4>
<p>
An agent that re-reads a shaky fact and finds it still true has one way to say
so, and should not need to know any more than that: say the fact again.
</p>
<pre><code>$ <span class="k">hird</span> mem add <span class="s">"the renderer redraws on every poll"</span> --path src/tui/view.rs
01J…
already on record — affirmed, not duplicated and re-anchored</code></pre>
<p>
No second row, no lost provenance. The original is re-anchored to today's code
and you are recorded as another voice for it. That kills duplicate assertions —
the oldest complaint about memory stores — and buys something else on the way
past: hird counts <em>voices</em>, not sentences, so it can say the thing no
single harness is positioned to say.
</p>
<pre><code>also stated by codex:9f2c, independently across 2 harnesses</code></pre>
<p>
Two agents that cannot see each other's sessions arrived at the same fact.
Only the process both of them talk to can know that.
</p>
<h4>Why it stays quiet</h4>
<p>
A task that records a fact and then keeps editing the same file would, left
alone, mark its own fact shaky by its own hand. Finishing a task
<strong>settles</strong> what it learned against the tree it is leaving behind,
so <code>shaky</code> keeps meaning <em>somebody else moved this</em> — which
is the only reading worth a warning, and a warning that fires on everything is
a warning nobody reads.
</p>
<p>
It rides on the same working-tree access as the witness and is off wherever
that is: no git, or <code>memory_footing = false</code>, and memory behaves
exactly as it did before any of this existed — no anchors, no
<code>standing</code> field, and the handshake does not mention it.
</p>
</section>
<section id="cli">
<h2>Command line</h2>
<pre><code>hird add <title> [--body <md>|--body-file <path>] [--priority N] [--project <path>]
[--needs <seq>,…] [--path <glob>]… [--review]
hird ls [--status <status>] [--all-projects]
hird show <seq>
hird why <seq>
hird diff <seq> [--path <file>] [--tenure N]
hird salvage <seq> <path> [--baseline] [--tenure N] [--out <file> [--force]]
hird cancel <seq> [--reason <text>]
hird reopen <seq> [--reason <text>]
hird answer <seq> <answer>
hird recess [reason] [--project <path>]
hird resume [--project <path>]
hird dep add <seq> --needs <seq>,…
hird dep rm <seq> --needs <seq>,…
hird plan apply <file> [--dry-run] [--project <path>]
hird plan lint <file> [--project <path>]
hird graph [--all-projects]
hird scope <seq> [--path <glob>]… [--clear]
hird agents [--all-projects]
hird recuse <seq> --from <seq>,… [--reason <text>] | --clear
hird record [--all-projects]
hird events [--follow] [--json] [--kind <kind>,…] [--task <seq>] [--actor <name>]
[--limit N] [--all-projects]
hird replay <when> [--all-projects]
hird recall <seq> [--limit N]
hird mem add <content> [--tags a,b] [--task <seq>] [--path <file>]…
hird mem search [query] [--limit N] [--all-projects] [--include-superseded]
hird mem standing [--shaky] [--all-projects]
hird mem export [--path <glob>] [--firm]
hird tui
hird mcp
hird db-path</code></pre>
<div class="table-wrap">
<table>
<thead><tr><th>Command</th><th>What it is for</th></tr></thead>
<tbody>
<tr><td><code>add</code></td><td>File a task. Prints the number, which is how you and the agents refer to it.</td></tr>
<tr><td><code>ls</code></td><td>The queue as rows: status, holder, lease countdown, what it waits for, and whether it <a href="#footprint">changed anything</a>.</td></tr>
<tr><td><code>show</code></td><td>One task in full — body, dependencies, scope, history, what was learned on it, and what the working tree says it did.</td></tr>
<tr><td><code>why</code></td><td>Whether a task is claimable right now, verdict first — and if not, every gate in the way: the lease, unfinished dependencies, an unanswered question, recusals, capability requirements, overlap with live work.</td></tr>
<tr><td><code>diff</code></td><td>The uncommitted diff of what moved under a task, from the versions the <a href="#exhibit">witness kept</a> — even after the task is done and the tree has moved on. <code>--tenure N</code> reads an archived round instead, after the task has changed hands.</td></tr>
<tr><td><code>salvage</code></td><td>Recover a version of a file as it stood under a task: the last one the witness saw, or with <code>--baseline</code> the one the task started from. <code>--tenure N</code> reaches an earlier holding's record.</td></tr>
<tr><td><code>cancel</code> / <code>reopen</code></td><td>Human overrides. They work regardless of who holds the task.</td></tr>
<tr><td><code>answer</code></td><td>Resolve the question holding an open task out of dispatch; the answer is handed to its next claimant.</td></tr>
<tr><td><code>recess</code> / <code>resume</code></td><td>Stand this project's queue down and lift it again — <a href="#recess">the recess</a>. While it stands nothing is handed out and the dispatch hook is quiet; work already claimed continues. Resuming announces everything that waited.</td></tr>
<tr><td><code>dep</code></td><td>Add or remove "must wait for" edges after the fact.</td></tr>
<tr><td><code>plan</code></td><td>File a whole graph from a <a href="#plan-files">plan file</a>, in one transaction. <code>--dry-run</code> reads it out — waves, overlaps and all — and writes nothing. <code>lint</code> reads the same file for the trouble it can carry while still filing cleanly: unordered tasks on the same files, tasks the collision radar cannot see, reviews that will never be filed or that nobody present could claim.</td></tr>
<tr><td><code>graph</code></td><td>The plan as dispatch waves: workable now, and what each later wave waits for.</td></tr>
<tr><td><code>scope</code></td><td>Show or set the files a task is expected to touch. Warns about overlaps.</td></tr>
<tr><td><code>agents</code></td><td>Who is working what, what has moved under each of them, and a <code>!!</code> line wherever two agents are in the same files.</td></tr>
<tr><td><code>record</code></td><td>Each harness's track record under <a href="#verdict">review</a>: work upheld, work sent back, first-pass rate, and the verdicts it has handed out.</td></tr>
<tr><td><code>events</code></td><td>The append-only trail read across tasks, oldest first — <a href="#events">the board as a log</a>. <code>--follow</code> keeps reading; <code>--json</code> makes each line one object.</td></tr>
<tr><td><code>replay</code></td><td>The board as it stood at a past moment, folded from the same trail: who held what, which wave was live, what was parked on a question. Takes an instant (<code>2026-08-14T10:00</code>, prefixes fine) or an age (<code>2h</code>, <code>3d</code>).</td></tr>
<tr><td><code>recall</code></td><td>What earlier work already learned about a task, and why it is relevant — the same thing an agent is handed when it claims it.</td></tr>
<tr><td><code>mem</code></td><td>Record and search assertions. <code>export</code> writes the project's current facts as Markdown for a CLAUDE.md or AGENTS.md — footing-aware, so a fact whose ground has been rewritten goes out marked for a re-read.</td></tr>
<tr><td><code>tui</code></td><td>The live board.</td></tr>
<tr><td><code>mcp</code></td><td>Serve MCP on stdio. Harnesses run this, you generally do not.</td></tr>
<tr><td><code>db-path</code></td><td>Print the database path this invocation would use.</td></tr>
</tbody>
</table>
</div>
<p>
<code>--body-file -</code> reads the task body from stdin, and
<code>hird plan apply -</code> reads a whole plan from it, so either can be
piped straight into the queue. <code>ls</code>, <code>show</code>,
<code>agents</code> and <code>events</code> sweep the working tree as they
render, so all four report what has actually moved alongside what was
declared — and say plainly when the answer is <em>nothing</em>. Every CLI action is recorded with
<code>actor = "cli"</code>, so the history pane shows who did what.
</p>
</section>
<section id="tui">
<h2>The TUI</h2>
<pre><code><span class="k">hird</span> tui</code></pre>
<p>
Three screens, <kbd>Tab</kbd> between them (<kbd>Shift-Tab</kbd> goes back).
The board polls every 500 ms, so claims from other harnesses appear as
they happen.
</p>
<p>
The <strong>Swarm</strong> screen is the one to watch while several agents are
running: every live agent, the files it has declared, an overlap line in red
wherever two of them are in the same territory, and — on the right — what is
workable right now and how much is queued behind it.
</p>
<div class="cols">
<div class="card">
<h4>Anywhere</h4>
<div class="table-wrap"><table><tbody>
<tr><td><kbd>Tab</kbd></td><td>next screen (<kbd>Shift-Tab</kbd> for the previous)</td></tr>
<tr><td><kbd>p</kbd></td><td>toggle project filter (current / all)</td></tr>
<tr><td><kbd>/</kbd></td><td>filter or search</td></tr>
<tr><td><kbd>?</kbd></td><td>help</td></tr>
<tr><td><kbd>q</kbd></td><td>quit</td></tr>
</tbody></table></div>
</div>
<div class="card">
<h4>Queue board</h4>
<div class="table-wrap"><table><tbody>
<tr><td><kbd>j</kbd> <kbd>k</kbd></td><td>move down / up</td></tr>
<tr><td><kbd>h</kbd> <kbd>l</kbd></td><td>previous / next column</td></tr>
<tr><td><kbd>g</kbd> <kbd>G</kbd></td><td>first / last card</td></tr>
<tr><td><kbd>Enter</kbd></td><td>open the task and its history</td></tr>
<tr><td><kbd>a</kbd></td><td>add a task (<kbd>Tab</kbd> for the body, <kbd>Enter</kbd> to save)</td></tr>
<tr><td><kbd>A</kbd></td><td>answer the selected task's question</td></tr>
<tr><td><kbd>c</kbd> <kbd>r</kbd></td><td>cancel / reopen the selected task</td></tr>
</tbody></table></div>
</div>
<div class="card">
<h4>Memory browser</h4>
<div class="table-wrap"><table><tbody>
<tr><td><kbd>j</kbd> <kbd>k</kbd></td><td>move down / up</td></tr>
<tr><td><kbd>Enter</kbd></td><td>show the assertion and its provenance</td></tr>
<tr><td><kbd>d</kbd></td><td>supersede it with something truer</td></tr>
<tr><td><kbd>s</kbd></td><td>show or hide superseded assertions</td></tr>
<tr><td><kbd>f</kbd></td><td>only the facts whose files have moved since</td></tr>
</tbody></table></div>
</div>
<div class="card">
<h4>Swarm</h4>
<div class="table-wrap"><table><tbody>
<tr><td><kbd>j</kbd> <kbd>k</kbd></td><td>move between agents</td></tr>
<tr><td><kbd>Enter</kbd></td><td>open the task that agent is holding</td></tr>
</tbody></table></div>
</div>
</div>
<p>
Cards on the queue board carry a yellow <code>waits #1 #3</code> badge when a
task looks open but nobody can actually claim it yet, an
<code>awaits answer</code> badge when its holder needs a human decision, and a magenta
<code>reviews #4</code> badge when a task is somebody's
<a href="#review">review</a> — which decides who can take it, and is exactly
the thing the title cannot tell you. <a href="#verdict">Verdicts</a> mark the
cards they judged: a green <code>upheld</code> on done work a review signed
off, a yellow <code>sent back</code> on work that is open again because one
did not.
</p>
</section>
<section id="events">
<h2>The board as a log</h2>
<p>
The TUI is a screen you sit at. <code>hird events</code> is the same view for
everything that cannot sit at one — a second terminal, a tmux pane, a CI job,
a script, or another agent:
</p>
<pre><code>$ <span class="k">hird</span> events --follow
14:31:52 #1 claimed codex:9f2c Port the config loader
14:32:07 #1 witnessed codex:9f2c saw src/config.rs change
14:33:41 #2 claimed claude-code:af31 Audit the config loader
14:36:09 #1 completed codex:9f2c ported; env still wins over the file</code></pre>
<p>
Nothing new is recorded to serve it. Every mutation in hird already lands one
row in an append-only trail — <code>hird show</code> replays one task's slice
of it as history — and this is the same trail read sideways: across tasks, in
the order things happened. One shot prints the last 30 and stops.
<code>--follow</code> keeps reading at the TUI's cadence, and sweeps expired
leases and the working tree on the way, so an expiry or a
<a href="#witness">witnessed</a> change lands in the feed even while no agent
is calling and nobody has the board open. Stopping the tail costs nothing and
forgets nothing, because the cursor is the trail itself.
</p>
<p>
<code>--kind claimed,completed</code> narrows to the events you are waiting
on, <code>--task 7</code> to one piece of work,
<code>--actor codex:9f2c</code> to one agent's doings, and
<code>--all-projects</code> widens to everything in the database. And because
a feed for machines should not make them parse columns, <code>--json</code>
makes each line one object:
</p>
<pre><code>$ <span class="k">hird</span> events --json --kind ground_shifted,contended --follow
{"cursor":41,"at":"2026-08-11T14:36:09.120Z","project":"/home/you/app","task":2,
"title":"Port the repository layer","actor":"codex:9f2c","kind":"ground_shifted",
"detail":"task 1 (Design the storage schema) sent back by review 5"}</code></pre>
<p>
That line is hird's whole integration surface as an emitter: pipe it into
<code>jq</code>, a log file, a dashboard, or the thing that pages you. The
<a href="#dispatch-hook">dispatch hook</a> answers <em>wake somebody when
work appears</em>; the feed answers everything after that — what the swarm
did, as it does it, in a form both halves of your tooling can read.
</p>
</section>
<section id="mcp">
<h2>MCP tools</h2>
<p>Twelve, and no more.</p>
<div class="table-wrap">
<table>
<thead><tr><th>Tool</th><th>Purpose</th></tr></thead>
<tbody>
<tr><td><code>task_list</code></td><td>What work exists, optionally filtered by status — marking the ones your harness cannot claim.</td></tr>
<tr><td><code>task_get</code></td><td>One task in full: dependencies, file scope, recent history.</td></tr>
<tr><td><code>task_next</code></td><td><strong>Be handed the next workable task, already claimed.</strong></td></tr>
<tr><td><code>task_claim</code></td><td><strong>Take a named task.</strong> Atomic; fails if someone else has it, or if it reviews your own harness's work.</td></tr>
<tr><td><code>task_scope</code></td><td>Say which files you will change; find out who else is in them.</td></tr>
<tr><td><code>task_update</code></td><td>Record progress and renew the lease. Holder only.</td></tr>
<tr><td><code>task_split</code></td><td>Break a task into pieces the other agents can work. Holder only.</td></tr>
<tr><td><code>task_complete</code></td><td>Finish, with a summary — and on a review, a <a href="#verdict">verdict</a>. Holder only.</td></tr>
<tr><td><code>task_fail</code></td><td>Give up, with a reason. Holder only.</td></tr>
<tr><td><code>task_release</code></td><td>Hand the task back unfinished; with <code>question</code>, park it until <code>hird answer</code>. Holder only.</td></tr>
<tr><td><code>mem_store</code></td><td>Record one durable fact — or, said again word for word, confirm one.</td></tr>
<tr><td><code>mem_search</code></td><td>Find facts recorded earlier, by anyone, each marked with whether its code has moved since.</td></tr>
</tbody>
</table>
</div>
<p>
Results are compact JSON. Failures come back as <code>isError</code> text
rather than protocol errors, so a model can relay them to you as-is instead of
reporting that a tool broke. There is deliberately no tool for filing
arbitrary new work: agents split what they hold, and everything else is filed
by you. <a href="#recall">Recall</a> did not need a thirteenth tool either — it
rides along with the claim — and neither did
<a href="#footing">footing</a>, which rides along with every fact hird serves,
or the <a href="#footprint">footprint</a>, which rides along with every
check-in and every finishing call.
The <a href="#verdict">verdict</a> is a parameter on <code>task_complete</code>,
not a thirteenth tool. Something an agent has to know to ask for is something
it will not ask for.
</p>
</section>
<section id="config">
<h2>Configuration</h2>
<p>
The database lives at
<code>${XDG_DATA_HOME:-~/.local/share}/hird/hird.db</code>. Point hird
somewhere else with <code>--db</code> (highest precedence) or
<code>HIRD_DB</code> — pointing it at a throwaway file is how you try things
without touching your real board.
</p>
<p>Optional config at <code>${XDG_CONFIG_HOME:-~/.config}/hird/config.toml</code>:</p>
<pre><code><span class="c"># How long a claim survives without a task_update. Default 15.</span>
lease_ttl_minutes = 15
<span class="c"># Whether list and search span every project by default. Default false.
# Explicit --all-projects / all_projects arguments still win.</span>
all_projects_by_default = false
<span class="c"># What to do when a task declares files another agent is already working:
# "report" record it and tell the agent who else is in there (default)
# "refuse" reject the claim outright, rolling back anything it took</span>
path_conflicts = <span class="s">"report"</span>
<span class="c"># What a finished dependency under an unfinished review does to its dependents:
# "clears" workable at once, told the ground they build on is provisional
# (default)
# "holds" unclaimable until the review delivers its verdict</span>
under_review = <span class="s">"clears"</span>
<span class="c"># Whether task_next passes over tasks whose files overlap live work. Default
# true: when the queue gets to choose, it should not choose a collision.</span>
dispatch_avoids_conflicts = <span class="s">true</span>
<span class="c"># How many recalled assertions a claimed task arrives with. Default 5, and 0
# turns recall off. Keep it small: this lands in an agent's context unasked.</span>
recall_limit = 5
<span class="c"># Whether the queue watches the working tree to see what tasks actually
# change. Needs git, goes quiet by itself where there is none, and costs
# nothing while no task in the project holds a lease. Default true.</span>
witness = true
<span class="c"># Whether an assertion remembers the files it was learned against, so a later
# reader is told when that code has moved. Rides on the same working-tree
# access as `witness` and is off wherever that is. Default true.</span>
memory_footing = true
<span class="c"># Whether the witness keeps the content of the versions it fingerprints, so
# `hird diff` can show what a task changed, reviews carry the diff of the
# work under judgement, and `hird salvage` can recover a version an
# overlapping write discarded. Rides on `witness` and is off wherever that
# is. Default true.</span>
exhibit = true
<span class="c"># A command to run, detached, whenever a task becomes claimable — see
# "The dispatch hook" above. Empty (the default) means no hook.</span>
dispatch_hook = <span class="s">""</span>
<span class="c"># Its twin for the other audience: run, detached, the moment a task raises a
# question and steps out of dispatch to wait on a human. Empty (the default)
# means no hook.</span>
question_hook = <span class="s">""</span></code></pre>
<p>
Unknown keys are an error rather than a shrug, so a typo is reported instead of
silently ignored. Agents are told the configured TTL in the MCP handshake and
asked to check in at half that interval, so raising it here is all that is
needed to give slow tasks more room.
<a href="https://github.com/aoprisan/hird/blob/main/examples/config.toml">The annotated example</a>
lists every key with its default.
</p>
<div class="table-wrap">
<table>
<thead><tr><th>Variable</th><th>Meaning</th></tr></thead>
<tbody>
<tr><td><code>HIRD_HARNESS</code></td><td>This session's harness name. Set it in the MCP registration. Unset, the name the harness’s client gives for itself is used instead.</td></tr>
<tr><td><code>HIRD_PROJECT</code></td><td>Override project detection.</td></tr>
<tr><td><code>HIRD_DB</code></td><td>Override the database path.</td></tr>
</tbody>
</table>
</div>
<h3>Projects</h3>
<p>
Every task and assertion is filed under a project — the canonical path of your
repository root, found by walking up to the nearest <code>.git</code>. Two
harnesses opened in the same checkout share a queue; a different checkout gets
its own. One database holds them all, and <code>--all-projects</code> (or
<kbd>p</kbd> in the TUI) looks across everything.
</p>
</section>
<section id="examples">
<h2>Examples</h2>
<p>
The <a href="https://github.com/aoprisan/hird/tree/main/examples">examples
folder</a> holds runnable versions of everything on this page. Each script
points <code>HIRD_DB</code> at a temporary file, so running one cannot disturb
your real queue.
</p>
<div class="table-wrap">
<table>
<thead><tr><th>File</th><th>What it shows</th></tr></thead>
<tbody>
<tr>
<td><a href="https://github.com/aoprisan/hird/blob/main/examples/manual-dispatch.sh"><code>manual-dispatch.sh</code></a></td>
<td>Filing tasks and handing them out by number — the by-hand workflow, end to end.</td>
</tr>
<tr>
<td><a href="https://github.com/aoprisan/hird/blob/main/examples/swarm-plan.sh"><code>swarm-plan.sh</code></a></td>
<td>A dependency graph with file scopes, then <code>hird graph</code> and simulated concurrent <code>task_next</code> dispatch.</td>
</tr>
<tr>
<td><a href="https://github.com/aoprisan/hird/blob/main/examples/plan-file.sh"><code>plan-file.sh</code></a></td>
<td>The same graph as a <a href="#plan-files">file</a>: read before it is filed, applied in one transaction, then edited and applied again.</td>
</tr>
<tr>
<td><a href="https://github.com/aoprisan/hird/blob/main/examples/plan.toml"><code>plan.toml</code></a></td>
<td>The plan format, annotated, every field at work.</td>
</tr>
<tr>
<td><a href="https://github.com/aoprisan/hird/blob/main/examples/witness.sh"><code>witness.sh</code></a></td>
<td>Two agents, one checkout, one file — the <a href="#witness">witness</a> catching a lost edit while there is still time to act on it, and a third task that finishes <a href="#footprint">read-only</a>. Makes its own throwaway git repository.</td>
</tr>
<tr>
<td><a href="https://github.com/aoprisan/hird/blob/main/examples/exhibit.sh"><code>exhibit.sh</code></a></td>
<td>A finished task's uncommitted diff shown after the tree has moved on, and a written-over version brought back — the <a href="#exhibit">exhibit</a>, end to end. Makes its own throwaway git repository.</td>
</tr>
<tr>
<td><a href="https://github.com/aoprisan/hird/blob/main/examples/question.sh"><code>question.sh</code></a></td>
<td>An agent reaches a decision it must not guess, the task stays out of dispatch until the human answers, and the answer rides in the next claim.</td>
</tr>
<tr>
<td><a href="https://github.com/aoprisan/hird/blob/main/examples/footing.sh"><code>footing.sh</code></a></td>
<td>A fact recorded against a file, that file rewritten, and every later reader told so — plus the way back to <a href="#footing">firm</a>. Makes its own throwaway git repository.</td>
</tr>
<tr>
<td><a href="https://github.com/aoprisan/hird/blob/main/examples/review.sh"><code>review.sh</code></a></td>
<td>Work that files its own <a href="#review">review</a> when it finishes, scoped to what actually moved and barred to the harness that moved it. Makes its own throwaway git repository.</td>
</tr>
<tr>
<td><a href="https://github.com/aoprisan/hird/blob/main/examples/verdict.sh"><code>verdict.sh</code></a></td>
<td>The <a href="#verdict">sent-back loop</a>: a verdict reopens the work carrying the findings, the redo files a fresh review, and <code>hird record</code> keeps score. Makes its own throwaway git repository.</td>
</tr>
<tr>
<td><a href="https://github.com/aoprisan/hird/blob/main/examples/dispatch-hook.sh"><code>dispatch-hook.sh</code></a></td>
<td>The <a href="#dispatch-hook">dispatch hook</a> hearing about every task that becomes claimable — filed, unblocked, review filed, sent back — with a log file standing in for the multiplexer.</td>
</tr>
<tr>
<td><a href="https://github.com/aoprisan/hird/blob/main/examples/events.sh"><code>events.sh</code></a></td>
<td><a href="#events">The board as a log</a>: a follower tails the trail while two harnesses work, then the same record is read after the fact, filtered by kind, and emitted as JSON. Makes its own throwaway git repository.</td>
</tr>
<tr>
<td><a href="https://github.com/aoprisan/hird/blob/main/examples/protocol.sh"><code>protocol.sh</code></a></td>
<td><a href="#protocol">MCP 2026-07-28</a> on the wire: <code>server/discover</code>, a task worked without ever calling <code>initialize</code>, and a harness that never set <code>HIRD_HARNESS</code> named by its own client.</td>
</tr>
<tr>
<td><a href="https://github.com/aoprisan/hird/blob/main/examples/task-body.md"><code>task-body.md</code></a></td>
<td>A task body worth writing, for <code>--body-file</code>.</td>
</tr>
<tr>
<td><a href="https://github.com/aoprisan/hird/blob/main/examples/config.toml"><code>config.toml</code></a></td>
<td>Every configuration key, annotated, at its default.</td>
</tr>
<tr>
<td><a href="https://github.com/aoprisan/hird/tree/main/examples/harness"><code>harness/</code></a></td>
<td>Drop-in MCP registration for Claude Code, Codex CLI and VS Code / Copilot.</td>
</tr>
</tbody>
</table>
</div>
</section>
<section id="faq">
<h2>FAQ</h2>
<h3>Can I still dispatch tasks manually?</h3>
<p>
Yes. <code>hird add</code> then <em>"pick up task 42"</em> is unchanged, and
<code>task_claim</code> is a first-class tool, not a fallback. Automatic
dispatch is something an agent opts into by calling <code>task_next</code>;
if you never ask an agent to work the queue, it never will.
</p>
<h3>Can hird start or prompt agents itself?</h3>
<p>
Not directly — hird has no daemon and does not own any terminal — but it will
tell something that does. Set the <a href="#dispatch-hook">dispatch hook</a>
and hird runs your command whenever a task becomes claimable; point that
command at a terminal multiplexer that can address agents, such as
<a href="https://herdr.dev">herdr</a> (<code>herdr agent prompt …</code>),
and idle agents get summoned to pull work the moment it exists. hird decides
<em>what</em> is workable and <em>who</em> may take it — and hands the hook
that second fact too, as <code>HIRD_RECUSED</code>, so a summons for a
review can be routed away from the harness that wrote the work; the
multiplexer owns <em>where</em> agents run. Neither replaces the other.
Under herdr the pairing is one install:
<code>herdr plugin install aoprisan/hird/herdr-plugin</code> — see
<a href="https://github.com/aoprisan/hird/tree/main/herdr-plugin">herdr-plugin/</a>.
</p>
<h3>Do I have to declare dependencies or file scopes?</h3>
<p>
No. Both are optional. A task with no <code>--needs</code> is workable
immediately, and a task with no <code>--path</code> simply never reports an
overlap — you lose collision detection for that task, not the ability to
dispatch it.
</p>
<h3>What happens if an agent dies mid-task?</h3>
<p>
Its lease lapses after <code>lease_ttl_minutes</code> and the task returns to
<code>open</code> by itself. There is nothing to restart and nothing to clean
up. To take it back sooner, <code>hird reopen</code> it.
</p>
<h3>Can two agents work the same file?</h3>
<p>
Nothing stops them at the filesystem level — hird is a coordinator, not a lock
manager. What it does is make the overlap visible to both agents and to you
the moment it is declared, refuse to <em>choose</em> a colliding task during
automatic dispatch, and, with
<code>path_conflicts = "refuse"</code>, reject the claim outright.
</p>
<p>
And when they do it anyway, it tells them. A declared overlap that the
<a href="#contention">working tree confirms</a> — the file has moved, and the
two of them disagree about what it now says — is reported to both by name,
with the one instruction that saves the work: re-read it before you write.
</p>
<h3>Can I have one agent check another's work?</h3>
<p>
That is what <a href="#review">recusal</a> is for, and hird is the only thing
positioned to enforce it: a harness cannot see another harness's session, so
an agent handed "review this" cannot tell whether it wrote it. hird recorded
who held the lease. Mark work <code>--review</code> and finishing files the
review itself, scoped to what actually moved — and the queue refuses it to the
harness that did the moving, in the same transaction as the claim.
</p>
<h3>Does the memory go stale?</h3>
<p>
It does, and hird is the part that notices. An assertion is stored with its
<a href="#footing">footing</a> — the files it was read off and what they said
at the time — so a fact whose code has since been rewritten arrives marked
<code>shaky</code> instead of arriving indistinguishable from one recorded
this morning. hird never calls it false; a rename and a rewrite look the same
from here. It tells you which facts a re-read would pay for, and
<code>hird mem standing</code> lists them.
</p>
<p>
Nothing has to be curated. Confirming a fact is the ordinary act of stating
it: <code>mem_store</code> the same sentence word for word and the original is
re-anchored to today's code rather than duplicated, with you recorded as
another voice for it.
</p>
<h3>Does hird know which agent changed a file?</h3>
<p>
No, and it says so rather than guessing. One checkout has one filesystem and
no keyboards, so a file that moves while three agents hold leases lands in all
three footprints. That is why <code>changed</code> is always described as what
moved <em>while the task was held</em>, and why the sharp warning needs a
declared scope on both sides — the declaration is the part that says who
intended to write.
</p>
<h3>Is there a server to run?</h3>
<p>
No. Every front end opens the same SQLite file in WAL mode. Start a harness
and it spawns its own short-lived <code>hird mcp</code>; close it and nothing
is left behind but the database.
</p>
<h3>How do I start over?</h3>
<p>
Delete the file that <code>hird db-path</code> prints, or point
<code>HIRD_DB</code> at a new one. Schema migrations run on open, so an
existing database is upgraded in place when you install a newer build.
</p>
</section>
</main>
</div>
<footer class="page">
<span>hird — MIT OR Apache-2.0</span>
<span><a href="https://github.com/aoprisan/hird">github.com/aoprisan/hird</a></span>
</footer>
<script>
(function () {
var root = document.documentElement;
var saved = null;
try { saved = localStorage.getItem("hird-theme"); } catch (e) {}
if (saved) root.setAttribute("data-theme", saved);
document.getElementById("theme").addEventListener("click", function () {
var dark = root.getAttribute("data-theme") === "dark" ||
(!root.getAttribute("data-theme") &&
window.matchMedia("(prefers-color-scheme: dark)").matches);
var next = dark ? "light" : "dark";
root.setAttribute("data-theme", next);
try { localStorage.setItem("hird-theme", next); } catch (e) {}
});
})();
(function () {
var nav = document.querySelector("nav.toc .nav-body");
var narrow = window.matchMedia("(max-width: 62rem)");
if (!nav) return;
if (narrow.matches) nav.removeAttribute("open");
nav.addEventListener("click", function (event) {
if (narrow.matches && event.target.closest("a")) nav.removeAttribute("open");
});
})();
(function () {
var links = Array.prototype.slice.call(
document.querySelectorAll("nav.toc a[href^='#']"));
var byId = {};
links.forEach(function (a) { byId[a.getAttribute("href").slice(1)] = a; });
var targets = Object.keys(byId)
.map(function (id) { return document.getElementById(id); })
.filter(Boolean);
if (!targets.length || !("IntersectionObserver" in window)) return;
var visible = new Set();
var observer = new IntersectionObserver(function (entries) {
entries.forEach(function (entry) {
if (entry.isIntersecting) visible.add(entry.target.id);
else visible.delete(entry.target.id);
});
var first = targets.filter(function (t) { return visible.has(t.id); })[0];
links.forEach(function (a) { a.classList.remove("here"); });
if (first && byId[first.id]) byId[first.id].classList.add("here");
}, { rootMargin: "0px 0px -70% 0px" });
targets.forEach(function (t) { observer.observe(t); });
})();
</script>
</body>
</html>