Skip to content

Harness Operations — centrally managing the fleet's AI harnesses and schedules

Managing the fleet's AI harnesses and schedules: the harnesses: contract, the daily inventory, mass deploy via the harness fan-out (fanout.yml, kit harness), caps, cost forecasting, and the local stack.

docs/HARNESS.md is the architecture: the six layers, the scorecard, the trip wires — the hub watching itself. This document is the operations counterpart: how the hub manages the harnesses deployed across the fleet — observe them, create them, mass-update them, bound their throughput, and forecast their cost — how the read-only monitoring plane differs from the processing plane you run locally or in the cloud, and what the local stack is: the Harness Console, the data lake that extracts GitHub's records for local management, and the Phoenix trace store that gives every agent run a trace.

The model in one paragraph

The contract lives in version control (_data/fleet.yml → harnesses:); observed reality is gathered daily into a committed inventory (_data/harness_registry.yml, by dash-gen harnesses inside fleet-pulse.yml); a static page renders it read-only on GitHub Pages (/harnesses/); and every finding names its lever — the fan-out that deploys/updates kit artifacts (fanout.yml (kit harness)), the rotation loop that provisions credentials (token-rotation.yml), or the doctor that fixes failures (fleet-pulse.yml). Nothing on the observation path writes to a fleet repo; nothing on the write path skips a pull request. That is the same declare → observe → reconcile split the token contract and the registry already use, applied to the harnesses themselves.

   DECLARE                    OBSERVE                      ACT (levers, all PR-gated)
_data/fleet.yml          dash-gen harnesses            fanout.yml (kit: harness)   (deploy/upgrade kit)
  harnesses:      ──►   _data/harness_registry.yml ──► token-rotation.yml  (secrets)
  (baseline,             (daily, committed)            fleet-pulse doctor  (failures)
   throughput,                 │                       a human retuning a cron or a cap
   budget)                     ▼
                        /harnesses/  (read-only, GitHub Pages)

What is a "harness" here

The deployable unit is the agent-context kit (templates/agent-context/): the @claude mention workflow (claude.yml, credential order from the repo's CLAUDE_AUTH_ORDER), the CLAUDE.md scaffold, and the opt-in .claude artifacts (settings baseline, shared guardrails, agent auditor). A repo's harness state is what the inventory reads back: every workflow that reaches a model, by any route (mention handler / scheduled agent / event agent; see the harness standard), on which action ref and auth shape, with which kit version stamp, plus its agent-context file, its CLAUDE_CODE_OAUTH_TOKEN presence (from the rotation ledger — never a value), and every cron it schedules. Repos may additionally declare their lanes in a fleet.manifest.yml (the fleet/v1 spec from wtd, now packages/wtd/ in bamr87/gitorio); the inventory records the manifest's presence (📜 on the board). Repos managed by GitFactory (bamr87/gitorio) carry a .factory/ design directory — blueprints that the app compiles into factory--*.yml lines — and the inventory records that too: ⚙ on the board, factory + factory_blueprints per repo (from the root listing already fetched, so it costs no extra request), and factory: {blueprint, hash} per harness read from the ⚙ GENERATED BY GITFACTORY header, the same expressions the app's own fact extractor uses. Each harness also records its kill switch (switch: the vars.*_ENABLED variable it gates on — GitFactory's gate job pattern, where an unset variable reads as idle, never as "safe to run"); a scheduled agent without one is a switch-missing attention item, because the only way to stop it is a commit.

The harness standard

The baseline asks whether a repo has a harness. The standard asks whether each harness is built the way the constitution and the standing rules say. It is declared in _data/fleet.yml harnesses.standard, the inventory grades every harness against it on each scan, and every harness that falls short carries the lever that rebuilds it.

A harness is any workflow that reaches a model, and a route is how it does. The inventory used to recognise one route, the claude-code-action step. On 2026-11-11 that hid 56 of the fleet's 117 AI workflows: every caller of the hub's own ai-lane.yml and claude-run, every bare claude -p, and every other provider. It also hid 63 agents from _data/agents.yml and thirteen AI crons in one hour of one day: twelve evolve.yml lanes had kept the template's example cron (17 6 * * 1, Monday 06:17 UTC), beside a link checker at Monday 06:00. Routes are matched against the workflow file with its comment lines removed, so a file that only mentions an action is not a harness.

Route What it is On the standard
claude-code-action an anthropics/claude-code-action step yes
ai-lane a caller of the hub's reusable ai-lane.yml yes
claude-run a step using the hub's claude-run action yes
claude-cli a bare claude -p in a run: step no
ai-script a vendored scripts/ai/run.sh no
other-provider another provider's API key (OpenAI, xAI, Gemini) no

A control is a fact the scan reads from the workflow file without running it. Each one names the rule it comes from and the kinds it binds:

Control What it asks Rule Binds
standard-route reaches the model through a fleet route the shared kits and actions; templates/ai-runner/ all
model-pinned names an exact model from ai_models.allowed, never an alias constitution § 13.3, § 29.1 all
budget-cap passes a per-run dollar ceiling (--max-budget-usd) AGENTS.md standing rule; § 29.1 all
turn-cap passes a turn cap (--max-turns) HARNESS.md production readiness 7 scheduled, event
kill-switch checks a vars.*_ENABLED switch before doing work constitution § 17.1 scheduled, event
auth-ordered takes its credential in the repo's CLAUDE_AUTH_ORDER AGENTS.md standing rule; ai_auth: all
trusted-author gates a run a stranger can trigger on its author #514 all
least-privilege declares top-level permissions:, never write-all #514 all
no-wildcard-bots never lets every bot start the run: no allowed_bots: '*' on a claude-code-action step #514 all
safe-pr-target never checks out a PR's head on pull_request_target #514 all
timeout bounds wall-clock time (timeout-minutes) HARNESS.md layer 3 all
off-hour-cron no cron fires on the hour AGENTS.md standing rule; the schedule map below scheduled

A control is counted only where it can bind. A workflow no stranger can trigger has no author gate to check. One that only a person or a caller workflow starts has no standing run for a kill switch to stop, and a manual dispatch bypasses the switch by design. A reusable workflow with no trigger of its own runs under its caller's permissions. Only a claude-code-action step carries an allowed_bots list, so no-wildcard-bots binds only where there is one. The action checks a person's repository permission but never a listed bot's, so '*' lets any GitHub App's comment spend the credential. safe-pr-target binds only on pull_request_target, which runs with the base repository's secrets and a write token. An actions/checkout whose ref: or repository: names the head (github.event.pull_request.head.*, github.head_ref, merge_commit_sha, refs/pull/*/head or /merge) fails it, and so does a run step that does gh pr checkout or fetches or checks out pull/…. Naming the head SHA to post a status passes, and a plain pull_request run is not graded, because GitHub gives a fork's run no secrets. A model or a bot list handed over as an expression is decided at run time, so the file cannot say which it is. Mention handlers are not held to kill-switch or turn-cap, the same exemption harness.efficacy.kinds.ci-mention declares. The two hub routes supply what a caller does not pass: ai-lane carries the dollar cap, the ordered credential and the timeout, and resolves a pinned model itself. Those defaults are read from the lane's own files at scan time, so the inventory cannot disagree with the lane it grades.

Every harness off the standard has a lever. The rebuild plan on /harnesses groups them, and the attention queue carries one standard-gap finding per lever instead of one per harness:

Lever When How the harness is rebuilt
kit-upgrade the kit's claude.yml, still byte-identical to a shape the kit seeded fanout.yml (kit harness) with upgrade: true: one PR replaces it with the current kit copy
kit-adopt a mention handler written or edited by hand replace it with templates/agent-context/claude.yml in a PR in its own repo; the fan-out never overwrites an edited copy
fix-controls already on ai-lane or claude-run add the inputs it does not pass yet, in a PR in its own repo
lane-adopt a bespoke loop, or a hand-rolled route rebuild it as a caller of ai-lane.yml from templates/ai-runner/ai-lane.template.yml
factory-recompile a GitFactory line change the blueprint in the studio and recompile; a compiled line is never edited by hand
hub-fix the hub's own workflow a PR in this repo
retire the project is archived a repo GitHub has archived cannot run its workflows: they are listed, and counted for nothing. One the registry marks archived while GitHub still serves it can, so it stays in every count and raises archive-mismatch until the repo is archived (a setting, the maintainer's) or the workflow is removed

Retirement has two meanings, and only one stops a workflow. Dormant is archived on GitHub, where Actions is disabled. Retired is that, or status: archived in the registry. csv-vscoode was retired in the registry on 2026-10-20 and was still live on GitHub three weeks later, with a mention handler that could still be triggered. The fan-out seeds and upgrades neither kind.

kit-upgrade and kit-adopt are told apart by the fan-out's own test, run at scan time: the copy is compared byte for byte with the current template and every shape in archive/ (kit_pristine). The stamp alone was not enough. A copy that carried a stamp but had been edited by hand read as upgradeable for months, and its kit-drift finding named a lever that would never close it.

The kit is graded like any other harness. test_harness_registry.py fails if templates/agent-context/claude.yml misses a control, and if the hub's own .github/workflows/claude.yml is not that template rendered. Kit 0.6.0 exists because 0.5.0 failed three controls in every untouched copy while the hub's copy had been hand-edited to pass two of them.

To change the standard, edit harnesses.standard and run tools/dash harnesses --offline: the verdicts are recomputed from the facts the last scan stored, with no network. Removing a control from the block turns it off. A new control needs a detector in harness_registry.py (CONTROL_CHECKS); an id with no detector is ignored with a warning. The block is a fleet standard, so the PR is gated (constitution § 12.3).

Observe (read-only, statically generated)

  • /harnesses/ — the inventory: every AI workflow in the fleet with its route, its caps and its verdict against the standard; the rebuild plan grouped by lever; the standard's controls with how many harnesses miss each; and, on the Repos view, the per-repo baseline and the kit deploy. The attention queue (ranked, lever named), cost trends and forecast, throughput against the caps and the fleet-wide UTC schedule calendar from the same file are on Overview, Costs and Schedules. It is rendered by build-dash.yml from the committed _data/harness_registry.yml, so the published site needs no credentials, no API calls, and no server — the monitoring plane is a static artifact of the data plane, deliberately.
  • tools/dash harnesses — rebuild the inventory on demand. With a GitHub token it re-scans the fleet; without one it reuses the previous committed scan and refreshes only the offline analytics (trends, throughput, grading), so the command is always safe to run.
  • tools/dash config show harnesses — the contract in force.
  • The hub's own health stays on /harness/ (dash harness, singular) — the two boards deliberately share the daily pulse commit.

Create (enrol a repo)

Enrolment is the existing registration path plus two levers — nothing new to remember:

  1. Register the repo in _data/projects.yml (the update-registry / new-project skills, or by hand). The next daily pulse scans it and grades it against the baseline; its gaps appear on /harnesses/ and in dash harnesses gaps.
  2. Deploy the kit: dispatch fanout.yml (kit harness) with target: gaps (or tools/dash harnesses deploy --gaps), review the dry-run, re-dispatch with dry_run: false. Each target gets one PR in its own repo — additive-only, never a default-branch push.
  3. Credentials arrive on their own: the weekly token-rotation.yml writes CLAUDE_CODE_OAUTH_TOKEN to any registry repo missing it (dash secrets rotate --apply to not wait). A missing secret is deliberately not a fan-out target — files and credentials ride different loops with different blast-radius rules.

Mass update / deploy

fanout.yml (kit harness) is the third fan-out on the shared engine (tools/fanout.sh), so it inherits every guarantee: dry-run by default, PRs only, external upstreams skipped, additive-only seeding. What it adds is the plan step: target: gaps reads the committed inventory and opens PRs only where the data says so — repos missing a kit-deployable baseline artifact, or running a machine-seeded harness whose stamp is behind the current kit version.

gaps names only repos the fan-out can actually reach — and reachability is ownership, not mounting. fanout.sh clones each target fresh from GitHub, so .gitmodules was only ever supplying a URL; it now falls back to _data/projects.yml when a registered repo has no submodule_path. While it did not, every unmounted repo was a dead end: emitting one produced a target list the run no-opped on (skip <repo>: not in .gitmodules, exit 0), so they were excluded and reported as a gap-not-deployable attention item instead. That finding is gone, because the class it named is now empty rather than merely smaller — bamr87/SCHEMA, the upstream of the linter this hub vendors, is a live example of what it used to strand. What is_deployable() still refuses is what the engine refuses: an upstream outside github.com/bamr87 (not ours to seed) and an archived repo. Both are already excused by evaluate_coverage, so neither has a gap left to report.

  • Deploy (artifacts: claude, the default; add agent-context,claude-settings,claude-guardrails,claude-agent-auditor as wanted): seeds what is absent, touches nothing that exists.
  • Update (upgrade: true): refreshes an existing copy only when it is byte-identical to the current template or an archived machine-seeded shape — proof it was seeded and never touched. Hand-modified harnesses are never rewritten, stamp or no stamp. This is the safe half of "mass update"; the unsafe half (rewriting a hand-edited workflow) intentionally does not exist.
  • Version discipline: bump templates/agent-context/VERSION and snapshot the outgoing shape into archive/ before editing a template — skip that and --upgrade silently stops reaching the fleet (see the header of tools/fanout.sh for the incident).
  • CLI equivalent: tools/dash harnesses deploy [--gaps|--target <name>] [--artifacts csv] [--upgrade] [--apply].

Requires FLEET_TOKEN with contents + pull-requests + workflows write on the targets (GitHub refuses a push touching .github/workflows/* without it).

Hub pins that do not resolve

A fleet caller that pins bamr87/bamr87/.github/workflows/<file>@<ref> (or an action) at a ref without that file fails at startup with no job, and the failure names nothing. law-ai's CI on main failed this way from 2026-10-30, with spec-gate.yml@v2 pinned while v2 predated the file (FF-0037, #610). Three places now resolve these pins through one module, hub_refs.py. Each resolves a distinct target@ref once per run, to ok, ref-missing, file-missing-at-ref or unverified:

  • The daily inventory. The scan already reads every owned repo's workflow files, so each row of _data/harness_registry.yml also carries hub_refs (path, line, target, ref, status, and the computed fix when a pin is broken). The pins are resolved against GitHub; the hub is public, so a 404 there is authoritative. A broken pin becomes a hub-ref-broken attention item, severity 88, one per repo and target@ref, and its action is the fix: when the file is on main, cut the next vX.Y.0 and move vX; when the ref was never cut, cut it or repin; when the file is gone from main too, repin to its replacement. An unverified pin is not a finding. A repo the token cannot read stays scanned: false. Files past inventory.max_workflow_files, and files the scan could not fetch, are counted in hub_refs_unread_files. Either way they are unread, never clean, and the totals carry hub_refs, hub_refs_broken, hub_refs_unverified, hub_refs_unread_repos and hub_refs_unread_files.
  • Drift check (q). On every pull request it resolves the pins in templates/ against the hub's own tags, offline, and warns only. Under --remote/--ci it also lists the broken fleet callers from the committed inventory, with no API call.
  • The fan-out pre-flight. tools/fanout.sh resolves the kit's caller templates before it clones a target. The dry run names an unresolved pin; --apply refuses to run until it resolves.

The release rules these checks serve are in WORKFLOW-VERSIONING.md.

Control throughput

Scheduled agent work is a standing commitment — it runs whether or not anyone asked that day — so it is the half the contract caps (harnesses.throughput):

Knob Meaning
max_scheduled_ai_per_day_fleet Estimated cron-driven AI workflow runs/day, fleet-wide
max_scheduled_ai_per_day_repo The same per repo, so one repo can't absorb the whole budget
max_ai_crons_per_utc_hour AI crons that can fire in one UTC hour of one day — the Claude loops share one OAuth account's rate limit, so adjacency is contention

The hour cap is counted per weekday: crons contend only when they fire in the same hour of the same day, so five weekly lanes at 14:xx on five different days are not a collision. A day-of-month cron counts toward every weekday, because it lands on whichever one the month gives it. Each entry in throughput.hour_collisions names the hour bucket (utc_hour: "06:00" is 06:00 to 06:59), the most that can fire in it on one day (count, with that day's entries), the weekdays over the cap (days), and the exact minutes two or more of them share (same_minute). The finding reads "13 AI crons fire in the 06 UTC hour on Mon; 12 at exactly 06:17", never "share 06:00 UTC". Until 2026-11-13 the count ignored the weekday and the wording named the top of the hour: of the three collisions reported on 2026-11-11, only the Monday 06 one was real. A lane whose switch is off still wakes at its cron to check the switch, so a collision of disarmed lanes costs runner minutes today and becomes rate-limit contention the day they are armed.

The estimate is cron arithmetic (hourly = 24/day, weekly ≈ 0.14/day; the approximations are documented on cron_fires_per_day), cross-checked against the observed rate from ai_usage.yml (which includes mention/PR traffic riding on top). A violation is an attention item naming the cron; the fix is a human retuning the cron or the cap — by design there is no automatic throttle, because silently skipping a scheduled loop is exactly the failure mode (stale-data) the harness watches for. Per-run depth stays where it always was: each loop's caps and --max-turns in fleet.yml, asserted by fixture tests.

The schedule map

Placement is a contract, not a habit. _data/fleet.yml schedule: declares every hub cron, and test_schedule.py fails on three things: a hub workflow whose cron differs from the declaration (or is missing from it — update_submodules said weekly there and ran daily for months), a hub cron on the hour (:00 is the minute GitHub delays and drops most, and 06:00 was where four AI crons collided on one OAuth rate limit), and a scheduled agent loop without a vars.<NAME>_ENABLED switch that a manual dispatch bypasses. The map: hub housekeeping at :07 (rotation 02, submodules 03, README 04, reconcile 05), the daily agent chain at :37 (pulse 05, build 06, issue-pipeline 07), the weekly passes at :07/:37 (schema-vendor Mon 08, evolution Mon 10). Fleet repos should place their own AI crons from 11:00 UTC onward, off the hour — the per-hour cap is 3 and the hub already occupies one slot in 05, 07 and (Mondays) 10. A switch added to a loop that is already in service is default-ON (!= 'false'), so adding it changes nothing until it is pulled; a new loop starts default-OFF (== 'true'), the convention wtd, ai-seed, lifehacker.dev and it-journey already follow.

harnesses.budget declares the ceilings; the inventory computes, from the committed ledgers (never a live API):

  • Claude CI spend (ai_usage.yml by-day): window total, last-7d vs prior-7d, week-over-week %, and projected monthly = last-7-day daily average × 30.44.
  • Actions minutes (actions_usage.yml billing:): GitHub's own meter — the account's metered minutes per month, one request per sweep against the billing usage API — projected as this month's run-rate once a week of it exists, else the last full month, with growth measured month-over-month. The meter is account-level: it files the whole total under one or a few repository names (account_total_filed_under_*), which are not per-repo shares; per-repo minutes are the analytics' by_repo job-minutes, and parity.actions_minutes reports how far their total sits from the meter's. The analytics series (by_day, job-minutes since actions-usage/v2) is kept beside it as proxy_projected_monthly and still ranks workflows, but it never decides the budget status: a run parked in action_required reports days it never billed, and an external mirror's CI is not this account's spend at all — the proxy once projected 287k min/month against ~24k billed and held a phantom breach at the top of the attention queue (2026-09 review, WORKFLOW-OPTIMIZATION.md). When the billing call fails (scope, moved endpoint) the block carries an error and the wire falls back to the proxy, saying so.

Crossing a ceiling → a budget-breach attention item; growing faster than trend_warn_pct → cost-trend. Caveats, stated because they matter: CI logs price only what claude-code-action reports (unpriced_runs are counted, not guessed); Actions minutes on public repos are free (net_usd 0) but still metered — the ceiling bounds load, not dollars, which is exactly what makes a runaway visible. Deeper attribution lives on /ai-usage/, /actions/, and the engagement ledger (docs/ESTIMATION.md); mid-run dollar enforcement remains the roadmap item tracked in docs/HARNESS.md.

The two planes — local, cloud, enterprise

Read-only plane (anyone, no credentials). GitHub Pages serves /harnesses/ and the other boards as static HTML built from committed _data/*.yml. Nothing secret is in the data (the token ledger carries names and ages, never values), nothing is computed at view time, and an outage of every API leaves yesterday's board standing.

Processing plane (credentialed, two equivalent homes):

  • Cloud — the default. GitHub Actions is the hosted control plane: the scheduled loops (pulse, issue pipeline, rotation, evolution) run in ephemeral runners with secrets held by GitHub, and every write lands as a PR. There is nothing to keep alive; "deploying the stack" is having the workflows and secrets in the repo.
  • Local — the maintenance bench, with a front end. docker compose up -d devenv console gives the same toolchain in a container with the repo mounted at /workspace, plus the Harness Console on http://127.0.0.1:4001 (tools/console/, also tools/dash console natively): one browser surface to view every committed signal (the harness matrix, schedules and UTC-hour load, throughput vs caps, cost trends vs budget, triage, credential ages), manage the contract (the Config pages edit every declared knob of _data/fleet.yml — toolchain, schedule, remediation, issue pipeline, evolution, harness, harnesses, rotation, canonical variables — one top-level block at a time, comments preserved, git diff shown), authenticate (the Credentials page hands this process a credential, or signs the gh CLI in with a pasted token over stdin, so a console that starts without credentials is not a dead end), orchestrate the loops (run each one's local half as a job with a live log, or dispatch its workflow in CI), and deploy the kit (dry-run → confirm → apply, or dispatch fanout.yml with kit harness). Every project, loop, operation, job, content site and contract block has its own page, and the terminal dash runs inside it (the Terminal page, a pty bridged over a WebSocket). It runs only the allowlisted tools/dash operations — parameters validated into argv, never a shell string — gates every GitHub-writing operation behind a confirm and a single lock, edits only contract keys the file already declares, never hands a credential back (names, presence and provenance only; .env is written solely on an explicit confirm, and DASH_CONSOLE_AUTH=off refuses every credential write), and never commits: generated data lands in the working tree for you to review. Since P2 of epic #484 it also runs a loop's agent step on this machine — the JEV loop runner as the loop-run op (JEV.md): the same spec, planner and prompt bytes CI renders, one capped attempt per item in the § 13.8 sandbox, a dry-run preview under .fleet/runs/ and never a filing (apply is refused until the § 11 decision on #487; a live attempt asks first because it spends). The public site — the same page built static (tools/dash serve, :4000; CONSOLE-PAGES.md) — is its read-only twin until a visitor connects GitHub or a console. Everything CI runs is a tools/ entrypoint first, so local and cloud execute the same code — CI is just cron plus credentials around the CLI. The console is one of three local services; the full stack — with the data lake and the Phoenix trace store — is the next section. Every write the console makes to GitHub — the remote operations (content-file, deploy-*, dispatch, secrets-push) and the loop runner's apply through the loop-run op — is the OPS remote-write path of constitution § 11.8 (amendment ops-remote-write-path): marked remote, run only with confirm=true, one such job at a time under the job manager's lock, a dry run first and only its reviewed bytes filed, the token probed with gh api user before any write, the same tools/dash / tools/dash-gen code CI runs, never a merge, a force-push, a delete or a settings change; the fleet MCP reaches it only through the console's job API (console_run with confirm=true).

Enterprise hardening (an org account, not a personal one, unlocks the rest): move the fleet into a GitHub organization and the version-controlled substitutes here upgrade to platform features — org-level secrets/variables replace dash config sync projection; org rulesets replace per-repo protection; Workload Identity Federation replaces the stored one-year OAuth token entirely (the zero-rotation path documented in docs/TOKEN-ROTATION.md, which needs the Anthropic org console); larger runners or self-hosted runner groups absorb the minutes budget; and the same committed-YAML surfaces keep working unchanged, because they never depended on the account type. The contract file stays valuable even then — it is the reviewable record of intent that org settings pages don't give you.

The local stack

Cockpit direction: COCKPIT.md — Gitorio is the one-stop local operator UI; this stack is the engine (dash jobs, lake, Phoenix). Pages stays the static projection. The Harness Console on :4001 remains the allowlisted job bridge until Gitorio absorbs its tabs.

The local stack is what runs on the bench: three services and a database, all fed by the same tools/ entrypoints CI runs, so nothing here is a second implementation of anything. A fourth concern sits beside them behind docker compose --profile elk: the log plane — Elasticsearch, Logstash, Kibana and Filebeat, with Grafana drawing trends over the same indices. Phoenix below answers what shape did this run have; the log plane answers what exactly did it say, and the two join on the same trace.id. See OBSERVABILITY.md.

Claude runs in TWO planes, and each has its own extractor into the one lake:

GitHub  ──  runs · jobs · steps · run logs · issues · workflow files · .factory/ blueprints · fleet.manifest.yml
   │                                                    ~/.claude/projects  ──  session transcripts (JSONL)
   │  tools/dash lake sync                                 │
   │  (PyGithub · windowed · idempotent upserts ·          │  tools/dash lake sessions
   │   no token → nothing extracted, never a crash)        │  (local disk only · no network · mtime-skipped)
   ▼                                                       ▼
.dash-lake/fleet.sqlite  ◀──────  Harness Console :4001 reads it (/api/lake), runs every op as a job
   │                     ◀──────  tools/dash lake status
   │                     ◀──────  tools/dash lake review   (BOTH planes unified · offline · no Phoenix needed)
   │                     ◀──────  tools/dash lake recall   (past sessions by keyword · read-only · redacted excerpts)
   │  tools/dash lake export      (OpenInference spans · OTLP/HTTP · deterministic trace ids · export ledger)
   ▼
Phoenix :6006            traces: workflow → job → step → Claude agent (model · turns · cost) → tool calls
                         --local adds this machine's Claude Code sessions (every turn and tool call, real timestamps)

Pages (bamr87.github.io/bamr87) = the console's page built static, read-only until GitHub or a console is connected · GitHub Actions = the cloud plane running the same tools/
Service What it is Start Port
Harness Console The write-capable front end: every committed signal, the allowlisted dash operations as jobs, workflow dispatch, the whole-contract Config editor, Credentials (this process, gh sign-in), Traces (the lake + Phoenix), a drill-down per project, GitHub (sign in through an OAuth App; manage fleet repos' issues, runs and workflows), and the terminal dash itself on the Terminal page; the Django backend beside it serves the admin on /admin/ and the health endpoints on /api/v1/ (ADR 0006) — tools/console/ tools/dash console or docker compose up -d console 4001
Data lake .dash-lake/fleet.sqlite (gitignored — it holds logs): the fleet's GitHub records extracted for local management and deployment — repos, workflow files (classified: kind, auth, kill switch, GitFactory provenance), .factory/** + fleet.manifest.yml, runs → jobs → steps, run-log entries, the Claude facts parsed from them (model, session id, turns, cost, tool grants — from claude-code-action's output and the hub loops' claude-cost echo, summed over every Claude call in a run), issues/PRs — plus the export ledger tools/dash lake sync [--days 7] [--repo NAME] [--jobs ai\|all\|none] [--logs ai\|all\|none] —
Local sessions The same lake's sessions / session_turns / session_tools tables: this machine's Claude Code transcripts — one row per session (repo, branch, models, turns, tokens, cost, first prompt), per assistant turn, and per tool call (closed by its tool_result, so errors and durations are real). Keyed on the SAME trace key the exporter uses, so a stored session joins to its Phoenix trace tools/dash lake sessions [--days 30] [--repo NAME] [--force] —
The console's assistant page_audit (one row per page command, pairing and operator's end, from the page bridge's audit) and assist_runs (its rows of the AI ledger, keyed by the Claude Code session id, which is also sessions.session_id). The report joins them to the sessions whose transcripts show a page tool call: docked when the console started the session, paired when a person's own session attached with a pairing code, which is the only cost record a paired session has tools/dash lake assist [--days 30] [--json] —
Review The analysis layer over both planes — cost, turns, tool histogram with error counts, CI failures and permission denials, top sessions/runs, and ranked findings. A CI run whose Claude cost cannot be read is unknown, never $0; skipped and no-job runs are a real $0. Pure SQL over the lake: no network, no Phoenix, no re-read of ~/.claude tools/dash lake review [--days 30] [--repo NAME] [--json] —
Recall Keyword search over the stored local sessions: every word of the query must appear in a session's first prompt or in one of its assistant turns, one result per session, best match first (FTS5 bm25; a substring match, newest first, on a sqlite built without FTS5). Each result carries the session key, id, repo, start and end, where it matched and an excerpt of at most 300 characters, redacted with the context pack's Scrubber before it is clipped ($HOME and any /Users/<name> → ~, credential shapes masked). Only that redacted text is indexed and matched, so a query cannot probe what the redaction hides (a masked token, a home's user name, an address). The lake is attached mode=ro and the index lives in memory for one call, so recall never writes the lake; no network. The console serves it as /api/lake/recall and the MCP tool lake_recall tools/dash lake recall --query WORDS [--days 30] [--repo NAME] [--limit 10] [--json] —
Phoenix Arize Phoenix, the traceability store: trace trees, latency, token and cost breakdowns per project. SQLite-backed in the phoenix-data volume; loopback-only ports docker compose up -d phoenix 6006 (UI + OTLP/HTTP), 4317 (OTLP/gRPC)
Log plane Elasticsearch + Logstash + Kibana + Filebeat: every line the fleet's CI and this machine's containers produced, replayed from the lake and autodiscovered by label. Opt-in behind --profile elk; loopback-only, never in CI — docs/OBSERVABILITY.md tools/dash observe up 5601 (Kibana), 9200 (ES)
Metrics Grafana over the same indices — volume, error rate, agent spend by model, index growth against the disk budget. Prometheus joins it as a second datasource under FF-0003 same profile 3001
Public site The console's page built static exactly as GitHub Pages publishes it — a snapshot of the console's documents; a visitor can connect GitHub or a running console from it (CONSOLE-PAGES.md) tools/dash serve 4000

dash-gen lake (fleet_lake.py) is the module behind the middle rows: sync and sessions extract (the CI plane and the local plane), review analyzes, recall searches the stored sessions by keyword, status reports (--json is the console's /api/lake document), export ships. Extract before you analyze — review reads only the lake, which is what makes it reproducible, offline, and independent of whether Phoenix is up; sessions is separately idempotent (a transcript whose mtime has not moved is skipped, and a resumed session has its turns REPLACED rather than appended, so the rows mirror the transcript instead of accumulating it). session_facts and build_session_spans parse the same records through the same helpers, so what you review and what you trace can never disagree. The lake is local-only by construction — .dash-lake/ is gitignored, the daily pulse never runs it, and nothing in it is published — which is exactly what lets it hold run logs the committed _data/*.yml aggregates deliberately leave out.

In GitFactory's vocabulary

The stack deliberately speaks the same language as bamr87/gitorio (GitFactory), the framework law-ai and the other factory-managed repos already use, so the hub and the studio describe one fleet rather than two:

  • A blueprint (.factory/*.blueprint.json: triggers → gates/limiters → agent.claude → sinks) compiles into a line (.github/workflows/factory--<slug>.yml) whose header names the blueprint and its hash. The inventory marks lines as ⚙ and the lake mirrors every .factory/** file, so a line in the lake can be diffed against the blueprint it claims — the console's Lines view shows blueprint@hash and whether that blueprint is present.
  • A gate is the vars.<NAME>_ENABLED repo variable a line checks before running; the inventory records it as switch and flags scheduled agents without one.
  • Sinks (labels, comments, PRs, merges) are what a line is allowed to write; the hub's fan-outs only ever open PRs, and the console never commits or merges — the same no-self-merge invariant.
  • The inventory (_data/harness_registry.yml) is the studio's consumed fleet model (gitorio specs/012-fleet-studio): roster, per-repo harness attributes, coverage, and the contract, read from the committed file with zero API calls per repo. See "Consumed by GitFactory" below.
  • Compiling is the app's job. GitFactory's compiler is TypeScript inside the studio (no CLI ships today), so the hub does not compile blueprints locally; it observes the compiled lines, mirrors the design files, and deploys static kit artifacts through the fan-outs. Adopting a hand-built workflow into a blueprint stays a studio operation, and the Lines view is where the candidates are visible.

Observability and traceability

tools/dash lake export turns the lake into OpenInference traces for Phoenix — the same semantic conventions LLM tooling agrees on, so Phoenix's own cost, latency, and token views work unchanged:

  • CI agent runs — one trace per completed workflow run that used claude-code-action: the run (CHAIN, with the GitHub facts and session.id) → each job → each step; the Claude step becomes the AGENT span carrying llm.model_name, llm.token_count.* when the log has them, llm.cost.total, turns, --max-turns, permission denials, and the tool grants; tool calls become TOOL spans only when the action ran with show_full_output: true — its default hides the per-message JSON, in which case the trace still has model, turns, cost, and timing from the result block (Phoenix computes cost itself from tokens and its price table when tokens are present).
  • Local Claude Code sessions (--local) — one trace per ~/.claude/projects transcript: the session (AGENT) → every assistant turn (LLM: model, tokens, cache reads/writes, shadow-priced cost, output text) → every tool call (TOOL: name, input, closed by its tool_result). Real timestamps throughout — this is the richest evidence the stack has, and it never leaves the machine unless you export it.
  • Deterministic ids: trace and span ids are sha256 of the run/session key, so a re-export is idempotent at Phoenix rather than a duplicate; the lake's exports ledger skips what was shipped unless --force. --dry-run builds everything and writes .dash-lake/export-preview.json without the OpenTelemetry SDK installed.
  • Projects: fleet-harnesses (CI) and claude-code-local (sessions), both overridable; PHOENIX_COLLECTOR_ENDPOINT (compose sets http://phoenix:6006 for the console service) and an optional PHOENIX_API_KEY are forwarded, never printed.
docker compose up -d phoenix console      # the trace store + the front end
tools/dash lake sync --days 7             # extract the CI plane (gh auth login, or GH_TOKEN)
tools/dash lake sessions                  # extract the local plane (~/.claude transcripts)
tools/dash lake assist                    # the console assistant's page audit + ledger rows, and the sessions behind them
tools/dash lake review                    # analyze both, offline — no Phoenix required
tools/dash lake recall --query 'fts5'     # find past sessions by keyword (read-only, redacted excerpts)
tools/dash lake export --local --dry-run  # preview: traces, span counts, ids
tools/dash lake export --local            # ship; then open http://127.0.0.1:6006/projects
# In the compose console, ~/.claude is mounted read-only for exactly these two commands;
# without that mount `--local` finds no transcripts and says so rather than reporting success.

Consumed by GitFactory — the stability note

_data/harness_registry.yml is a consumed interface: GitFactory's Fleet Studio reads it as its fleet roster and contract source. The generator stamps schema: harness-registry/v1 as the file's first key. Additive changes are free (new keys, new attention kinds, new totals); a rename or removal of an existing key bumps the marker, and the studio's parser is tolerant-by-construction until it catches up. The fields the studio reads today: contract (kit, version, baseline, throughput, budget), each repos[] row's repo / nwo / external / archived / manifest / factory / factory_blueprints / agent_context / oauth_secret / coverage, and each harnesses[] row's path / kind / auth / model / max_turns / kit / kit_status / crons / switch / factory. Roadmap item FF-0024 in _data/roadmap.yml is the record of this decision. Each harnesses[] row also carries max_budget_usd (additive, 2026-10-03): the per-invocation --max-budget-usd / max-budget-usd: ceiling the workflow passes, or null when it passes none.

The harness standard (2026-11-11) is additive too, so the marker stays harness-registry/v1. New keys: contract.standard, the top-level catalog (counts by kind, route and lever, and misses per control), four totals, and on each harnesses[] row id (the id _data/agents.yml gives the same workflow), route, routes, model_source, kit_pristine, author_gate, least_privilege, timeout, standard and lever; on each repos[] row workflows_listed and workflows_truncated. Four existing values changed meaning, each to stop a wrong number:

  • external is now "owned by none of hub.owners", the list tools/fanout.sh writes to. It used to mean "not under bamr87/", which left the fleet's own organizations unscanned.
  • max_budget_usd is the ceiling in force: for an ai-lane or claude-run caller that passes none, the route's default.
  • totals.ai_workflows, mention_handlers, scheduled_agents and the throughput estimate count live harnesses only. The workflows of a repo GitHub has archived are still listed, with lever: retire.
  • deployable is now also false for a repo the registry marks archived, so --gaps never offers one to the fan-out.

Hub pins (FF-0037) are additive as well, and the marker holds. New keys: on each scanned repos[] row, hub_refs (a list of path, line, kind, target, ref, uses and status, plus detail and fix when they apply) and hub_refs_unread_files; five totals (hub_refs, hub_refs_broken, hub_refs_unverified, hub_refs_unread_repos, hub_refs_unread_files); and the hub-ref-broken attention kind. A row from a scan taken before this change has no hub_refs key, and hub_refs.py fleet reports that as not yet recorded, never as clean.

A reader that wants only the harnesses the old scanner saw can filter on route: claude-code-action.

The two #514 controls (2026-11-15) are additive as well: each harnesses[] row gains wildcard_bots and pr_target_head_checkout. Each one is true or false, or null when there is nothing to ask: no claude-code-action step, a bot list handed over as an expression, or a workflow not on pull_request_target. A row from a scan stored before the keys existed has neither key, and neither control is graded on it until the next live scan.

Operate — the short card

tools/dash console                        # the front end: view / manage / orchestrate / deploy / traces on :4001
tools/dash lake sync                      # extract GitHub's records into .dash-lake/fleet.sqlite (local only)
tools/dash lake sessions                  # extract this machine's Claude Code transcripts into the same lake
tools/dash lake review                    # analyze both planes: cost, turns, tools, failures, findings
tools/dash lake recall --query WORDS      # past local sessions by keyword (--json is /api/lake/recall)
tools/dash lake status                    # what the lake holds + whether Phoenix answers
tools/dash lake export --local            # OpenInference traces → Phoenix :6006 (--dry-run to preview)
tools/dash harnesses                      # rebuild the inventory (offline degrade without a token)
tools/dash harnesses gaps                 # what the fan-out would fix
tools/dash harnesses deploy --gaps        # dry-run the kit PRs
tools/dash harnesses deploy --gaps --apply --upgrade
tools/dash config show harnesses          # the contract
tools/dash secrets rotate --apply         # credentials now instead of Monday
python3 .github/scripts/dash-gen/test_harness_registry.py   # the invariants

From a Claude Code session the same card is three namespaces of slash commands, each a front door onto the console's operation allowlist through tools/dash ops: /harness: observes and gates the harness (status, inventory, health, decisions, graph, gates, refine, learn, lake), /loops: runs one stage of one loop (/loops:scout rehearse kvlite, /loops:conflicts resolve <owner/repo#n>, /loops:pulse ci), and /console: reaches any operation. A stage that writes to GitHub or spends Claude budget asks first, exactly where the console does (.claude/README.md).

Dispatch surface: fanout.yml (kit harness) (target: gaps|all|<name>, artifacts, dry_run, upgrade). Daily refresh: fleet-pulse.yml → publish → /harnesses/ after the 08:37 build-dash run. Fixture tests for the lake and the exporter: python3 .github/scripts/dash-gen/test_fleet_lake.py. Thresholds: _data/fleet.yml harnesses: — tune them the way the trip wires are tuned: a cap that is always breached is noise, prune or raise it deliberately.