Local Development
Prerequisites
-
Node.js 26 to develop (every CI job that runs Node runs 26); the published packages require ≥ 22.19, pi’s own floor, so nothing may use an API newer than that. No CI job runs 22 to catch one: check a new Node API’s version history before using it.
-
pnpm 11:
npm install -g pnpm@11, as CI does. The official Node 26 build ships no corepack, socorepack enableis not there to use. -
pi (
@earendil-works/pi-coding-agent) for end-to-end extension testing -
gcloudCLI with ADC configured, for Vertex integration testing -
GPG key configured for commit signing (required)
Setup
git clone git@gitlab.com:gadhs/standard/package/pi.git && cd pi
pnpm install
git config core.hooksPath .githooks && chmod +x .githooks/* # mandatory
git config commit.gpgsign true && git config user.signingkey <YOUR_KEY>
The task runner
node tools/task.mjs <verb> is the single automation entrypoint (ADR-001; no
loose shell scripts):
| Verb | Does |
|---|---|
|
Biome format (writes) |
|
Biome check (no writes) |
|
|
|
vitest per package with tests. Its transform cache is |
|
SPDX header check on tracked |
|
canonical Status vocabulary in plan pages |
|
build what |
|
regenerate the TUI themes from the Orchard palette data ( |
|
|
|
prints that the synced standards pages are never-edit snapshots, re-synced by hand; the mechanical drift gate was retired (ADR-002, ADR-003). Not part of |
|
|
|
suites that make real model calls (needs ADC) |
|
one package’s suite |
|
the judge corpus — the gate for any judge change ( |
|
the model battery: |
|
install the distribution as a consumer would and check it loads (the release rehearsal) |
|
the judge field study: headless auto-mode sessions on scratch repositories, then their stops read (The judge field study; real model work, hours) |
|
the adjudication audit trail, with asks and reasons |
|
the bash calls of the session files under a directory replayed offline through the gate, no judge: how many the plain-line stage allows, and why it stood back for the rest ( |
|
drift between the live permission seed and the package default |
|
which GitLab identity is actually in effect |
|
bump every workspace manifest in lockstep to |
|
find the merge of |
|
the remote tag peels to the tagged commit, and |
GitLab writes (glab issue/MR operations) authenticate via GITLAB_TOKEN
in the environment — load it per shell (set -a; source .env.local; set +a)
or via direnv, or on the same command line ahead of glab (the set -a is
what makes the file’s KEY=value lines reach glab); the file itself stays gitignored. Without a
token, glab would fall back SILENTLY to whatever ~/.config/glab-cli holds:
on a shared machine, likely another team’s bot, and a write that succeeds
under the wrong identity emits no signal at all. So pi keeps that stored login
out of reach when it starts without a token, and glab fails with 401 instead
(#300). task gitlab-check
project_85791508 confirms who you actually are before it matters.
validate is deliberately offline and free; the live suites and the judge
corpus cost real model calls and are separate verbs.
Debugging a live session
# Isolated pi with the working-tree extensions (throwaway agent dir):
PI_CODING_AGENT_DIR=$(mktemp -d) pi -e ./packages/pi-modes/index.ts ...
# Diagnostics to a file of your own (they are always on, in the agent dir, otherwise):
GADHS_PI_DIAGNOSTICS=/tmp/d.jsonl pi
This repo runs the PUBLISHED @gadhs/pi like every other repo on the box —
there is no project-local .pi/ harness (removed at the 0.2.0 cutover).
Working-tree changes are exercised by the unit suites, by task
consumer-sim (which packs and boots the tree), and on demand by the
isolated pi -e recipe above; they reach a normal session only through a
release, which is exactly the discipline consumers live under.
Hooks
.githooks/ (activated via core.hooksPath):
-
commit-msg— type-prefixed subject (feat|fix|chore|refactor|docs|test), ≤72 chars,Co-Authored-Byreminder. -
pre-commit— staged SPDX check (renames into.ts/.mjsincluded), untracked-debt-marker gate (a marker anywhere on an added line, column 1 too; #412). The J1–J8 reflection pause is NOT here: it ships in the extension as a tool_call interceptor so it applies in every repo, not only those that vendored these hooks and setcore.hooksPath. -
pre-push— a direct-to-main guard that refuses a non-mergefeat/fix/refactor/testcommit new tomain, read alongmain’s first parents from its old tip, so a commit already pushed on another branch is still checked and a merge’s own feature commits are not (#412); and `node tools/task.mjs check(the static checks only: lint, typecheck, SPDX, plan-lint, themes drift; #960).task checkreads the working tree, not a temporary checkout of the pushed commits (#944): keep the checkout you push from clean (put concurrent helpers in their own worktrees or a separate checkout). No test suite runs on push: GitLab’s merge train runs the full battery against the merged commit tree and owns correctness, and GitLab’sreject_unsigned_commitspush rule refuses unsigned commits server-side.
Never --no-verify. If a hook is wrong, change the hook.
Testing extensions against pi safely
Use an isolated agent dir so your real ~/.pi/agent is untouched:
TMP=$(mktemp -d)
PI_CODING_AGENT_DIR="$TMP" pi -e ./packages/pi-vertex/index.ts --list-models
rm -rf "$TMP"
For Vertex live tests you also need ANTHROPIC_VERTEX_PROJECT_ID and a seeded
sentinel credential; see the package README.
Publishing (GitLab npm registry)
@gadhs-scoped packages publish to the GitLab registry (see .npmrc; auth via
${GITLAB_TOKEN} in the environment). Publishing runs from CI on tag push.
Versioning is SemVer 2.0.0 with annotated signed tags on main and a matching
CHANGELOG.adoc entry.
CI is the merge gate
GitLab’s merge train is the merge gate (#960), mirroring craig and canopy.
Bare-branch pushes do not spawn pipelines. Every MR pipeline runs lint
(node tools/task.mjs check) automatically with the car jobs available
manually; adding the MR to the merge train runs all three car jobs in parallel
against the merged result and blocks the merge on any red job:
| Job | MR’s own pipeline | Merge-train car | main |
vX.Y.Z tag |
|---|---|---|---|---|
|
runs |
- |
- |
- |
|
- |
runs, blocks |
runs |
- |
|
by hand |
runs, blocks |
- |
runs |
|
by hand |
runs, blocks |
- |
runs |
|
by hand |
runs, blocks |
- |
runs |
|
- |
- |
- |
runs |
|
- |
- |
runs |
- |
Landing an MR: push (git push -u origin <branch> — the hook runs task check),
open the MR (glab mr create with Closes #N), then add it to the merge train
with auto_merge=true and squash=false:
glab api -X PUT projects/gadhs%2Fstandard%2Fpackage%2Fpi/merge_requests/<iid>/merge \
-F auto_merge=true -F squash=false -F sha=<HEAD>
A direct merge without auto_merge=true answers 405 Method Not Allowed by
design. Wait for the merge in a job or monitor that ends when the MR is merged
or leaves the train; a dropped car is a finding to fix and re-add.
The project settings enforcing the gate (and the operator rollback if the runner fleet is down):
P=projects/gadhs%2Fstandard%2Fpackage%2Fpi
glab api $P/push_rule -X PUT -F reject_unsigned_commits=true
glab api $P -X PUT -F merge_pipelines_enabled=true -F merge_trains_enabled=true \
-F only_allow_merge_if_pipeline_succeeds=true -F allow_merge_on_skipped_pipeline=false \
-F merge_trains_skip_train_allowed=false
# undo (operator decision when runners are down):
glab api $P -X PUT -F merge_trains_enabled=false -F merge_pipelines_enabled=false \
-F only_allow_merge_if_pipeline_succeeds=false
Tests that require tools absent from the node:26 car image (such as bwrap,
cargo, ruff, cached corpora, or Vertex ADC) skip visibly in the car and run
locally during the release rehearsal below (and any gap is tracked in its
follow-up issue).
Rehearsals
Two rehearsals gate a release, one each way:
-
node tools/task.mjs consumer-simpacks@gadhs/pifrom the working tree (running itsprepackbundle step) and proves the stack comes up from an install of that single tarball — the pre-publish gate (#836). -
consumer-sim --registry [version]skips packing and installs the published package from the group registry: the exact experience ofpi install npm:@gadhs/pion a fresh box, network included — the post-publish check.
lint, the three car jobs (validate, validate-unprivileged, rehearse),
publish and published run on the 2xlarge runner class, RUNNER_2XLARGE in
.gitlab-ci.yml (#761, #960); the scans and pages stay on small. A tag
pipeline reads the CI file at its own commit, so a change of class takes effect
from the next tag.
Non-Linux platforms run off the merge train on GitLab hosted runners (#281):
validate-macos ($RUNNER_MACOS, macos-26-xcode-26, provisioning pinned
rg, fd, and shellcheck via tools/ci-search-tools.mjs) and
validate-windows ($RUNNER_WINDOWS, Windows Server 2022 VM, timeout: 2h,
switched to Eastern Standard Time so non-UTC/DST paths are exercised) run
node tools/task.mjs validate on scheduled nightly main pipelines and are
manually triggerable on non-train MR pipelines when touching platform code.
Scheduled pipelines skip pages so nightly checks do not redeploy the site.
The car and tag pipelines run the pre-publish half itself, as the rehearse job
before publish, with --no-model. The pack, the install of the
distribution’s tarball alone, that it is the only package installed (fresh,
and after an update from 0.162.1), the files the bundles read, and pi loading every extension
from the installed tree against a model that does not exist (with the three
seedings that load performs: the permission chain, the agency agents and
web search’s fallback) all run; the checks that need a model are
skipped by name. Loading is what catches an entry that imports a module
its files list does not name. A release keeps one local rehearsal on the
release commit before release tag: node tools/task.mjs validate and
node tools/consumer-sim.mjs in full on a box with ADC, which is where
consumer-sim’s 12 live-model rows and the tests needing tools absent from the
car image run (#960). The release MR lands through the merge train like any
other, and the tag pipeline runs the car jobs ahead of publish.
The post-publish half runs there too, as the published job after
publish (#515): consumer-sim --no-model --registry <version> installs
the tag’s @gadhs/pi from the group registry and boots it. It cannot
unpublish, but a red published means do not announce. It is the check
that would have stopped 0.128.3’s announcement: that release pinned a
pi-guidance the registry held without the export pi-ssh imports, and pi
failed at load (#513).
The full run’s model checks use Haiku 5.5, plus one call each to a Gemini and a MaaS model. The headless probe keeps plan mode on Haiku 5.5 too (#364): the shipped plan mode switches to Fable 5.2, whose capacity on Vertex is not something a check about headless timeouts should depend on. Its plan’s cold review goes to the reviewer floor, Sonnet 5.5.
The probe also bounds each of that review’s provider calls at 60 s, in
its own gadhs-pi-workflow.json, and waits up to 15 minutes for the
approval (#547). The shipped bound is 600 s a call, and a review makes
several calls over its two rounds, so one stalled call could outlast
the probe’s old 300 s wait and read as a hang. A wait that still runs out
says whether the turn ended and quotes the session’s last diagnostics
records, which the stage’s removal would otherwise take with it.
Two failures that are a model’s and not the release’s are told apart from it (#783). The probe’s model is told to ask for the plan approval after the review; when it ends its turn without asking, the probe asks it again, twice at most, and then fails saying the model did not ask, where it used to wait out the 15 minutes and report a hang. And each "does the model answer" check waits 2 minutes for an answer and asks once more: a check that passed on the second attempt says so in its report.
Interrupting a rehearsal (Ctrl-C, or a runner’s SIGTERM) ends its probe
children and removes the stage directory before exiting; --keep keeps
the stage and says where. Signals are handled between steps: a terminal
Ctrl-C also reaches the running step’s child through the process group and
stops the run at once, while a SIGTERM to the parent alone waits for the
step, which its own timeout bounds. A step node itself ended — that
timeout, or output past maxBuffer — is recorded as a failure, not read
as an interruption. window-probe behaves the same between its runs.
One probe answers a standing question rather than gating a release:
-
node tools/window-probe.mjs [--models ref,ref] [--below 0.85] [--above 1.1] [--out file]checks the Vertex catalog’s context windows. It sends each model (every MaaS entry by default) one headless pi prompt just under its claimedcontextWindowand one just over, halving on refusal until a run answers, and reports whether the claim holds, the error text the adapter surfaced, and whether pi-ai calls it an overflow. Run it when an entry’s window changes or a new one lands — a window claimed larger than the real one deadlocks a session. It spends about two windows' worth of input tokens per model, more when it halves.
The model battery
The battery measures the models themselves, one permutation at a time: a task × a subject (a model and its knobs) × a stack (the extensions the lane runs under). Model battery: every shipped model, per role, as permutations is the page it renders; this section is how to run it and what keeps it honest.
node tools/task.mjs battery run --task judge --model haiku-5-5 --sweep thinking=off,low --runs 3 node tools/task.mjs battery run --task explore --model hydrogen --max-tokens 8000 --case pi/ --stack bare node tools/task.mjs battery fill [--retry-errors] [--refresh REF] [--only REF] [--task T] # the manifest's gaps node tools/task.mjs battery summarise | render | tasks | models | knobs REF node tools/task.mjs battery rescore [--task reviewer|planning] # after an anchor change; calls no model node tools/task.mjs battery compare --base DIR --arm DIR [--model REF] # two judge runs, case by case; calls no model node tools/task.mjs battery rubric <mode> [--without CODE[,CODE...]] # shipped rubric, optionally with rules removed; calls no model
battery compare reads the judge runs two stores hold (a --store run of
the rubric as it is, and one of an edit), pairs them by task, stack and
subject, and prints each pair: both sides' counts, how many of its denies
and defers each rule code was cited for, and three lists. Lost is a case
right in every base run and right in no arm run. Verdict moved is a case
whose verdicts differ. Rule moved is a case with the same verdicts under a
different rule. It is how a rubric edit is read before it ships (#946).
battery rubric writes a judged mode’s shipped rubric verbatim to stdout
(raw bytes, no extra trailing newline), optionally removing named rule
blocks with --without, without touching production files (#948). Setting
BATTERY_JUDGE_RUBRICS=DIR points the judge driver (drivers/judge.mjs)
at a directory holding <mode>.md overrides for one or more judged modes
(auto, plan): modes present in the directory run on those files and
change the record’s promptSha, while modes absent from it keep their
shipped rubrics. A missing directory, a directory holding no file for any
judged mode, or an empty or path-shaped file is refused before any model
call.
Tasks, records and the store
Tasks are files under tools/model-battery/tasks/ — production’s prompts,
read at run time, or any task file by path. Records land in
tools/model-battery/store/<task>/<stack>/<subject>/, one JSON per call
with the fingerprint of what it was measured against.
-
A slice already in the store is kept on a relaunch;
--forceremakes it. -
fill --retry-errorsremakes only the records whose error was the transport’s, not the model’s (TRANSIENT_ERRORinlib/manifest.mjs, #430). That means a rate limit, a 5xx (or Google’sINTERNAL,UNAVAILABLE), the lane’s wall-clock timeout, Node’s fetch header timeout, a dropped connection, or a stream cut before it finished. A usage-policy refusal, a malformed tool call or a 4xx request error is the model’s answer, and stands. Run it at--jobs 1after a parallel fill. -
The fingerprint is provenance, not a to-do: nothing re-measures because the tree moved. A re-measure is a person’s decision —
fill --refresh REF,run --force, orrun --store DIRfor a confirmation off to the side.--refreshtakes a model’s exact ref or id, which forces that model alone, or any other text as a substring (haiku), which forces every model whose id contains it (#241).--only REF, matched the same way and repeatable, leaves every other model’s permutations out of the fill, so some models can be measured while the manifest’s other gaps stay (#858). -
Every verb that would call a model prints a cost projection first and refuses over
--budget(default US$300) before any call, so--budget 0prints the projection and calls nothing. A knob the model cannot honour is refused before any call too (battery knobs REFprints what a model accepts).
battery.json is the manifest: the permutations the page argues from and
the matrix rules. battery render writes Model battery: every shipped model, per role, as permutations from
the store’s summary and the manifest.
The reviewer and planning cases
-
Every planted defect names a tier:
surface(the diff shows it),cross-file(only a read of the tree outside the diff does) orburied(a few lines inside a large legitimate change). Recall is reported per tier beside the pooled figure, and the matrix’s reviewer and planning rules read cross-file recall as well as recall. -
A key’s decoys are hunks that look wrong and are right, the reason in a file outside the diff. A FAIL block that names a decoy and no planted defect is a false flag, so precision is measured on every case, not only the control.
-
A review lane with no
thinkingknob sends the level production sends with nothing configured: pi-workflow’s default,medium, raised to the reviewer’s floor for a commit or a plan (#434), clamped to what the model accepts. The record’seffective.thinkingshows it, with a note when a floor raised it. A subject that sets the knob is sent its own level: that is the thinking arm (the manifest’s:lowand:highsubjects), measured as experiments beside the matrix. -
The cases are Rust and TypeScript trees.
test/cases.test.mjsproves them honest: each tree’s own tests pass before and after the change (the defects are the review’s to find), a cross-file defect’s evidence is in the tree and not the diff, and a decoy’s reason is in the tree. The Rust half needs cargo (one target directory per tree under~/.cache/gadhs-battery/cargo-target) and skips visibly without it. -
The anchors are calibrated against hand scores (
tools/model-battery/cases/reviewer/CALIBRATION.md;node tools/model-battery/scorers/anchors.mjs --calibrate). After an anchor changes,battery rescore [--store DIR]re-scores stored records from their outputs; the measurement is untouched and the record gainsrescored.
Specimens and the hard tier
To keep review evaluation below the saturation ceiling, the battery adds
shared legacy-code specimens under tools/model-battery/cases/specimens/
read by reviewer-heisenbug (commit review) and planning-p5p6-hard
(P5/P6 plan review):
-
Layout. Each specimen holds a legacy codebase (
base/, 15 to 40 files), two overlays of the same tidy change (buggy/with one cross-file heisenbug,fixed/with its safeguard), commit messages (commit.<variant>.txt), plans (plan.<variant>.adoc), andspecimen.json. For each task, the loader emits<name>/buggy(carrying the planted defect) and<name>/fixed(a paired control carrying a derived twin decoy). -
Honesty suite (
test/specimens.test.mjs). Each specimen’s own tests pass onbase/,buggy/, andfixed/; copying the fixed overlay’s deterministic witness test ontobuggy/must fail every named witness test at runtime and pass onfixed/. The dependency chain must be 3–6 files within one quarter of the commit read budget, evidence and authored decoys must live inbase/outside the diff (and outsideplan.contextfor plan defects), both plans must passplanShapeProblemsand name only existing files, and no readable file, message, or plan may leak the specimen name or key ids. -
Effectiveness, band, and freeze rule. Review aggregates report
effectiveness = (caught + controlsClean) / (planted + controls), so flagging everything and passing everything both score0.50on paired specimens; errored or exhausted controls are never counted clean. Tasks with aband(0.75–0.85, freeze at0.95on the frontier subjects) render a calibration-band table under their role with the status reading (not measured,below the band,in the band,above the band, orfreeze this tier as a regression floor and open the next rung). When a future frontier model reaches0.95, the tier is frozen as a regression floor and a harder rung is added beside it.
The coder sandbox
The coder task gives the model bash inside a throwaway copy outside the
repo, under bubblewrap (bwrap must be installed; the task refuses to run
without it):
-
Everything but the copy is read-only.
-
An empty tmpfs masks the battery’s own tree — the hidden suites, the reference solutions, every other lane’s recorded output, the store wherever it lives — along with
~/.ssh,~/.gnupg,~/.awsand the operator’s session transcripts. -
The ADC credential under
~/.config/gcloudis masked too. The lane’s pi mints its Vertex tokens from a GCE-metadata shim the battery runs on loopback outside the sandbox, serving a one-hour token minted from the real credential, so the model’s bash can reach that token and never the refresh credential. An unsandboxed lane (explore) reads the file as any session does. -
The lane is its own PID namespace, so whatever the model started — a test runner’s workers, a server it forgot — dies with the lane, whether pi exits or the timeout kills it (
coder.test.mjspins both ways of ending a lane). -
The hidden suite then runs the model’s code under the same sandbox, its report written to a fresh directory outside the copy, so a file the model pre-wrote is never read as a score.
What aborts a run
-
A lane with a write path (write, edit, bash or subagent among its tools) aborts the run if the repository’s
git statuschanges under it. A read-only lane is not guarded by that, so an explore fill survives you editing files that are not the harness. -
The harness itself — the battery’s code and tasks,
tools/lib,packages/pi-vertex— is digested as the battery starts, again before every lane spawns and again before its record is written, and any difference refuses the run, naming the changed paths. Each lane spawnspi, which importsyield-tool.mjsand pi-vertex from the working tree at that moment while the runner keeps the code it started with, so a merge under a running fill would otherwise measure a mixed harness with no lane failing. A lane in flight during the move is dropped; every record in the store was measured under the start harness, andbattery fillresumes from them.
Do not edit or merge battery or pi-vertex code while a fill runs — finish it or stop it.
Evidence
A lane’s record keeps the numbers; what they were computed from sits
beside it in <case>-<run>.evidence/:
-
A coder lane keeps
patch.diff(the model’ssrc/against the starter, roots rewritten tostarter/andmodel/),hidden-report.json(vitest’s full report) andprovenance.json(sha256 of every task file, the prompt and the packaged catalog; the repository commit; model, thinking level and tools). Explore lanes keep provenance too. -
Every headless lane writes
transcript.jsonl— assistant text, each tool call’s arguments and each result’s text, clipped per entry — which is where a yield rejection’s wording or a 300-call loop can be read.
Evidence stays on the box that ran the lane and is never committed
(.gitignore, #902). Nothing reads it back: summarise, render and
rescore work from the records alone. Before 2026-11-23 everything but
transcripts was committed with the run, and git history keeps that
evidence. The store’s tree holds the records and summary.json, and a
permutation no table of the battery page shows is dropped from it once
nothing cites it (git history keeps it).
Run the battery on purpose, not from a hook. Its own tests (task test
includes tools/model-battery) cover the scorers, the runner, the corpora
and the renderer without a model; the reviewer scorer’s calibration
against the 2026-09-07 hand scores runs with them.
Explore corpora
The explore task asks its questions of more than one repository, because a
helper that finds its way around this small TypeScript monorepo says
nothing about a large one. Each corpus is a directory under
tools/model-battery/cases/explore/ with a pin.json naming a commit
and, for a repository other than this one, a public clone URL and tag. The
runner makes that clone shallow into ~/.cache/gadhs-battery/repos/<corpus>
on first use (no credentials) and refuses the corpus if the clone’s HEAD is
not the pin. Two ship: pi (this repository) and ruff (astral-sh/ruff
0.16.6, ~800k lines of Rust across 52 crates). Path recall is reported per
corpus and the matrix reads the worst, so fit means fit on the large
repository too.
The questions are not written by whoever writes the key: a key-writer’s questions paraphrase the identifier and state the architecture, which turns the task into a grep on which strong models sit at ceiling. The rule:
-
A fresh-context model that has never seen a key reads the repository and writes what a new developer would ask — a symptom, a task, a how-does-it-work — naming no identifier from the repository’s code (no file, crate, package, type, function, constant or configuration key of its own; a domain term such as a Python packaging field is allowed) and stating no mechanism.
-
A different agent derives the key from the tree: the files a correct answer must cite, with alternatives where more than one is legitimate. Symbols are not scored.
-
The pin records who authored the questions and when. A test forbids any key identifier or multi-word file stem in a question and refuses symbol keys.
Adding a corpus is a directory, a pin, and twelve questions produced that way; the task checks every key path exists at the pin before any call.
The large-diff arms
--task reviewer-large and --task reviewer-large-cut measure the commit
review on a staged diff far larger than the reviewer corpus’s (#878). The
commit review used to cut a diff at 180,000 characters before the reviewer
saw it; these two say what that cost and what reading the whole diff does.
Their first run is why the commit review now reads a diff whole up to
1,500,000 characters and refuses a longer one.
The cases are built when a lane runs, not stored: each is a few lines of
JSON under cases/reviewer-large/ naming two commits of this repository
and three small cases of the reviewer corpus. The change between the two
commits in packages/ TypeScript is the bulk, and the three cases are laid
whole at the head, the middle and the tail of the diff (git orders a diff
by path, so the directory each is laid in decides its place). The key is
the three cases' own eleven defects. A finding counts for one only when it
names a file of that case, so a remark about the bulk cannot pass for a
catch. Recall is reported per position as well as overall.
| Case | Staged diff | Past the cut |
|---|---|---|
|
about 8,000 characters |
nothing: the control, the three cases alone |
|
about 150,000 |
nothing: both arms send the same text |
|
about 430,000 |
the middle and tail cases |
|
about 990,000 |
the middle and tail cases |
|
about 1,500,000 |
the middle and tail cases |
reviewer-large hands the reviewer the whole diff, as the commit review
does; reviewer-large-cut cuts it at 180,000 characters, as it did.
Everything else is the reviewer task’s: the
shipped prompts, level, tools and read budget. Neither is in the manifest,
so a fill never runs them; they are run by name, and they need this
repository’s history (a shallow clone refuses by name).
The ripwire arms
--task explore-ripwire runs the same helper, corpora and cases with one
addition: a read-only ripwire tool (verbs for, callers, impact,
expand, situ) and a paragraph on when to reach for it, so the page can
show whether a call-graph map changes what the helper finds. It is not a
matrix role; its table sits beside explore’s. --task
explore-ripwire-first inverts the note (answer from the map; file tools
as a last resort), asking whether a model’s reads are habit or
instruction.
Neither 0.5.0 (#85) nor 0.6.8 (#445) is material for the shipped helpers, so ripwire is not integrated. Measured against a same-day explore baseline on five models, 0.6.8 lifts none of them consistently:
-
Flash and Argon are unchanged.
-
Opus gains on ruff and loses on design.
-
Sonnet gains a little; Haiku loses a little.
The arms stay, so that a later release or a harder corpus can be measured. Their records are not committed; the verdict and its table are on the issue.
The runner fetches the pinned ripwire release into
~/.cache/gadhs-battery/bin/ on first use and verifies it against the
sha256 pinned in tools/model-battery/lib/ripwire.mjs before trusting it
(the digest GitHub serves beside the tarball proves only that the download
arrived intact); a platform with no pin is refused. The pin is 0.6.8
(#445), for linux x64 and arm64, macOS arm64, and Windows x64 (#281: a zip
holding ripwire.exe, unpacked with Windows' own tar); 0.6.x publishes
no macOS x64 or Windows arm64 build. BATTERY_RIPWIRE_BIN
names another binary instead, and the record then says an override ran. A
box that cannot obtain one gets a refusal when the task is asked for,
never a silent run without the tool.
When to re-run it
Not per release. The battery measures production’s prompts against the
catalog, so it has something new to say only when one of those changed: a
model added or a window, allowance or rate corrected; a shipped prompt or
contract edited (the review prompt, the judge rubric, an agent body); or a
default being argued. Most re-runs are partial — one model across the
tasks, or one task across the models — and battery fill makes only the
calls the manifest is missing. Read the projection before spending. Vertex
rate-limits a model hit from several lanes at once (429s recorded as
errors); after a parallel fill, fill --retry-errors --jobs 1 remakes
those records alone.
Dogfooding
This repo consumes the published distribution like everyone else. For a live session against unreleased tree code:
-
The isolated recipe:
PI_CODING_AGENT_DIR=$(mktemp -d) pi -e ./packages/<pkg>/index.ts— a throwaway agent dir, explicit extension loading, nothing global touched. Add a fabricatedsettings.jsonwith{"packages": ["npm:@gadhs/pi"]}in that dir to compose against the published siblings. -
task consumer-simpacks the tree and boots it cold — the closest thing to the old always-on harness, and unlike it, provenance-exact. -
If a standing project harness is ever reintroduced, pi’s scope/dedup rule is the tool: a project entry with the same npm identity as a global package wins, and empty-resource entries (
"extensions": []…) silence a global package per-project, without touching anyone’s settings.
Documentation site
The docs site uses the shared GADHS Orchard theme
(antora-theme) in the
human-services palette.
pnpm install # theme extensions must be installed
npx antora antora-playbook.yml # output in build/site
Two independent parts. The UI bundle is a prebuilt ui-bundle.zip fetched
by pinned, immutable URL — nothing is compiled for it, and bumping the version
in the playbook is the whole upgrade. The pipeline extensions are npm
packages that execute inside the Antora build, so they must be installed in a
node_modules beside the playbook (our workspace root). Their require:
values are deliberately extensionless: Antora treats a require containing a
file extension as a path relative to the playbook rather than a package.
What the extensions add: SVG admonition icons, a .md mirror of every page,
and /llms.txt + /llms-full.txt — machine-readable outputs for agents
consuming these docs.
Search dual-ships Orama and Pagefind, with a runtime "Low bandwidth" toggle
that swaps providers. Orama also builds an opt-in in-browser semantic lane
(semantic: true). That self-hosts a ~58 MB MiniLM model, but ordinary
readers never download it — it is fetched only when someone turns semantic
search on. The costs are Pages storage and an embedding pass per build.
The semantic embedder (onnxruntime-node) is a native module with no musl
prebuild, so the .node-pnpm base that validate, rehearse and pages
extend runs on Debian node:26. Only publish and publish-dry-run run
on node:26-alpine, installing with --ignore-scripts — no publish needs
the search embedder.
The @gadhs scope resolves from the group registry, which serves reads
publicly, so a docs build needs no token. Publishing still targets each
package’s own project endpoint via publishConfig.