hird 0.2.2

Cross-harness agent work queue and shared assertion memory, backed by one local SQLite database
Documentation
# Example hird configuration.
#
# Copy to ${XDG_CONFIG_HOME:-~/.config}/hird/config.toml. Every key is
# optional; anything left out uses the default shown here.

# How long a claim survives without a `task_update`, in minutes.
#
# Agents are told this value during the MCP handshake and asked to check in at
# half the interval, so raising it is all that is needed to give slow tasks more
# room. If an agent dies, its claim lapses after this long and the task returns
# to `open` on its own.
lease_ttl_minutes = 15

# Whether `task_list`, `mem_search` and `hird ls` span every project by default
# rather than just the current one.
#
# Explicit `--all-projects` / `all_projects: true` arguments still win, so this
# only changes what happens when nothing is specified.
all_projects_by_default = false

# What to do when a task declares files that overlap what another agent is
# already working on.
#
#   "report"  record the declaration and tell the agent who else is in there
#   "refuse"  reject the claim outright, rolling back anything it had taken
#
# "report" suits a human who is watching the board and can arbitrate; "refuse"
# suits an unattended swarm where a lost edit costs more than a stalled task.
path_conflicts = "report"

# What a finished dependency under an unfinished review does to its dependents.
#
# When work marked for review completes, a review of it is filed and the work
# is `done` — but `done` under an open review is provisional, because a
# sent-back verdict reopens it.
#
#   "clears"  the dependents become workable at once. Whoever claims one is
#             told, in `built_on`, that the ground it stands on is provisional,
#             and hears at its next check-in if the verdict then takes that
#             ground away.
#   "holds"   the dependents stay unclaimable until the review delivers its
#             verdict. Slower, and immune to building on work that gets sent
#             back.
#
# "clears" suits a queue that would rather keep every agent busy and absorb the
# occasional rework; "holds" suits work whose later stages are expensive enough
# that building them on a wrong answer costs more than the wait.
under_review = "clears"

# Whether `task_next` — the tool agents call to be handed the next piece of
# work — passes over tasks whose declared file scope overlaps live work.
#
# On by default: when the queue gets to choose which task to hand out, there is
# no reason to choose one that will collide. Turn it off to have agents take
# work strictly in priority order and sort the overlaps out themselves.
dispatch_avoids_conflicts = true

# How many recalled assertions a claimed task arrives with.
#
# When a task is claimed, hird looks up what earlier agents recorded while
# working the same files — or, failing that, work that reads like this task —
# and hands those facts over unasked. Each one says why it surfaced.
#
# Keep it small: this lands in an agent's context whether or not it needed it.
# Zero turns recall off and agents go back to calling `mem_search` themselves.
recall_limit = 5

# Whether the queue watches the working tree.
#
# On, a claim records a content fingerprint of the repository and every check-in
# takes another, so `hird show` can tell you which files a task actually changed
# rather than which ones it said it would — and so a file that two agents both
# declared, and that has since moved under both of them, is reported to both as
# a contention rather than left to be discovered at merge time.
#
# Needs git, and goes quiet by itself in a project that has none. Costs nothing
# while no task in the project holds a lease: with nobody to measure, git is
# never invoked at all.
witness = true

# Whether an assertion remembers what it was learned against.
#
# On, storing a fact records the files behind it and the content hash each of
# them had at that moment. Every later reader — a search, a claim's recall, the
# memory browser — is told whether that ground has since moved, so a fact
# recorded against code that has been rewritten twice arrives marked `shaky`
# instead of arriving looking exactly like one recorded this morning.
#
# It never says a fact is false; a rename and a rewrite look the same from here.
# It says which facts are worth a re-read, which is the useful half. Confirming
# one costs nothing extra: restate it and hird re-anchors it to the tree as it
# stands and records you as another voice for it.
#
# Rides on the same working-tree access as `witness` and is off wherever that
# is; this switch is for keeping the witness while giving up the footing.
memory_footing = true

# Whether the witness keeps what it sees.
#
# On, every file version the witness fingerprints is also kept, content-
# addressed, in the same database as everything else. That is what lets
# `hird diff` show the uncommitted diff of what a task actually changed —
# during the work and after it — lets the review a completion files carry the
# diff of the work under judgement instead of a list of file names, and lets
# `hird salvage` bring back the last version the witness saw of a file that
# another agent's write has since landed on.
#
# Versions are deduplicated by content and pruned once nothing references
# them, so the store grows with what actually changed, not with time. Rides
# on `witness` and is off wherever that is; this switch is for keeping the
# watching while giving up the keeping.
exhibit = true

# A command to run whenever a task becomes claimable. Empty means no hook.
#
# hird is pull: agents call `task_next` when they want work, and a task that
# becomes ready while every agent is idle waits in silence. This hook is the
# one push in that design — hird runs the command, detached, at the moment a
# task becomes claimable: filed with nothing blocking it, unblocked by a
# finished dependency, reopened by a `sent_back` verdict or a human, handed
# back by its holder, filed as a review of finished work, or dropped by an
# expired lease (announced by whichever sweep notices, since expiry itself is
# enforced lazily).
#
# The command runs through `sh -c` with the announcement in its environment:
#
#   HIRD_EVENT    filed | unblocked | review_filed | sent_back | reopened |
#                 released | answered | lease_expired
#   HIRD_TASK     the task number
#   HIRD_TITLE    its title
#   HIRD_PROJECT  its project root
#   HIRD_RECUSED  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.
#   HIRD_REQUIRES capabilities a worker must advertise, comma-separated;
#                 empty for work any equipped harness may take
#   HIRD_DB       the database, so the hook's own `hird` calls read the same
#                 board
#
# hird does not wait for it and does not read its answer; stdout and stderr
# are closed. What it does is your business: append to a log, post a
# notification, or — the case it was built for — prompt an idle agent through
# a terminal multiplexer that can address them, e.g. under herdr
# (https://herdr.dev):
#
#   dispatch_hook = 'herdr agent prompt worker "hird task $HIRD_TASK (\"$HIRD_TITLE\") is ready; work the hird queue."'
#
# A hook that always prompts the same agent will, sooner or later, summon it
# to a review of its own work — which the queue then refuses. `HIRD_RECUSED`
# is what lets one line of shell route around that; commas cannot appear in a
# harness name, so the membership test is safe:
#
#   dispatch_hook = '''
#   worker=claude; case ",$HIRD_RECUSED," in *,claude-code,*) worker=codex;; esac
#   herdr agent prompt "$worker" "hird task $HIRD_TASK (\"$HIRD_TITLE\") is ready; work the hird queue."
#   '''
#
# examples/dispatch-hook.sh shows the announcements land; the FAQ covers the
# herdr pairing.
dispatch_hook = ""

# A command to run whenever a task raises a question. Empty means no hook.
#
# A task released with a question steps out of dispatch on purpose: it is
# waiting for a human, not another agent, so the dispatch hook stays quiet.
# But a human who is not watching the board waits in the same silence an idle
# agent did — a question raised while you are at lunch sits unanswered until
# you happen to look. This hook is the dispatch hook's twin for that other
# audience: hird runs the command, detached, the moment a question gate
# opens, with the question in its environment:
#
#   HIRD_EVENT    always `asked` — the same word the event trail records, so
#                 one script can serve both hooks and branch on it
#   HIRD_TASK     the task number
#   HIRD_TITLE    its title
#   HIRD_PROJECT  its project root
#   HIRD_QUESTION the question itself
#   HIRD_ASKED_BY who asked, as the board records it — `harness:session`
#   HIRD_DB       the database, so the hook's own `hird` calls read the same
#                 board
#
# hird does not wait for it and does not read its answer; stdout and stderr
# are closed. Point it at whatever reaches you:
#
#   question_hook = 'notify-send "hird task $HIRD_TASK asks" "$HIRD_QUESTION"'
#
# Answering stays a human act — `hird answer` or the TUI — and the moment you
# do, the dispatch hook announces the task back to the agents.
question_hook = ""