distribution-audit
Maintainer-only. Find every file that would newly ship to adopters and decide, one file at a time, whether to ship it or withhold it. Drives the release CLI,…
Maintainer-only autonomous health audit + auto-heal loop. Runs N=3 fresh-team audit-fix-audit cycles with circuit breakers, reports an F-to-A+ verdict (folding in the shared Claude-integration fitness grade) or escalates.
$ npx -y skills add gaia-react/gaia --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
/health-auditContext preview
What this command does when you run it.
Maintainer-only autonomous health audit + auto-heal loop. Runs N=3 fresh-team audit-fix-audit cycles with circuit breakers, reports an F-to-A+ verdict (folding in the shared Claude-integration fitness grade) or escalates.
name: health-audit description: Maintainer-only autonomous health audit + auto-heal loop. Runs N=3 fresh-team audit-fix-audit cycles with circuit breakers, reports an F-to-A+ verdict (folding in the shared Claude-integration fitness grade) or escalates.
Maintainer-only. You are the **Orchestrator** for a GAIA health audit.
This command runs fresh-team audit-fix cycles that commit against the clone. If invoked from a linked worktree, reject hard: `gaia_refuse_if_worktree` (`.gaia/scripts/main-only-lib.sh`) asks the shared resolver which tree this is and refuses out loud, naming the main checkout, when the answer is a worktree.
Detection (run this first, before anything else):
. .gaia/scripts/main-only-lib.sh gaia_refuse_if_worktree "/health-audit" || exit 1
If the detection does not fire, fall through to `## Step 1, Read the runbook` below.
Read `.gaia/cli/health/runbook.md` end-to-end before doing anything else. The runbook codifies role structure, bucket definitions, fixer lane mapping, model selection, circuit breakers, and escalation criteria. Do not improvise around it.
Execute the cycle loop defined in the runbook's **§Cycle loop** (max N=3), applying the **§Termination** section's oscillation-threshold definition to detect a stuck fix. Both sections were already read in full at Step 1. **Do not restate the loop or the oscillation definition here.** The runbook is the single source of truth for this control flow.
Bucket E runs the shared Claude-integration fitness protocol defined in `wiki/decisions/Claude Integration Fitness.md` over every fitness category that page defines. The Bucket E auditor does not re-specify those checks, it reads the wiki page and runs its protocol. Fitness findings route to the existing `claude-surface` Fixer lane.
On the first cycle that meets the clean gate, you spawn a false-clean challenger (BS/MC/GH lenses always, FV when a prior cycle ran a Fixer) before the A+ report and the RUN_DIR deletion; a substantiated finding revokes the clean exit, injected as `real-fix` (non-cycle-3) or escalated `false-clean-refuted` (cycle 3). It runs at most once per run. The runbook's §False-clean challenger is the source of truth.
You spawn the five buckets, the Adjudicator, and the Fixers, and every one is a leaf subagent, because a subagent cannot spawn another subagent (the hard depth-1 limit). So you, the Orchestrator on this main thread, own every spawn. Stay mechanical: counters, directory creation, disk reads, the `jq`/`comm` oscillation compare, and dispatch. You never audit, adjudicate, or fix in your own context, so whatever session state you inherit cannot bias a grade.
A fresh Adjudicator per cycle keeps prior-cycle findings from bleeding into this cycle's verification: it never reads a prior cycle's `findings.json` (you own the cross-cycle oscillation compare), so every cycle's Adjudicator starts on clean context. **Bucket E** runs as its own leaf so its voluminous raw fitness output stays on disk and out of the Adjudicator's context: the Adjudicator reads only Bucket E's findings JSON. Each bucket is spawned with its assigned model (Haiku for the mechanical buckets, Sonnet for the judgment-bearing ones; see the runbook's model table), which pins per-bucket models correctly now that the Orchestrator dispatches them directly.
After the loop above breaks or escalates — clean exit and escalation both route through here — and before the Step 5 report is emitted, run the **Comprehensive Audit phase** per `.gaia/cli/health/comprehensive/runbook.md`. It is diff-gated (a pre-flight gauge picks skip / scoped / full), report-only (no auto-heal, files nothing), and maintainer-only.
Follow the runbook's **§Circuit breakers**, already read in full at Step 1. **Do not restate the breaker list here.** The runbook is the single source of truth for this list.
If the human refuses → escalate.
On clean exit (no open findings remain; the reported grade is the honest floor: A+ when there were no findings at all, otherwise capped by any non-blocking residual `info`, typically A):
HEALTH AUDIT: <overall grade, A+ or A> Overall grade: <A+ | A> Shared-fitness grade: <honest floor of the category grades> Cycles: <N> Findings closed: <count> (per cycle: <breakdown>) Non-blocking residuals: <count> (e.g. wiki/.state.json post-sync drift, recorded not blocking) Artifacts: cleaned (this run's .gaia/local/audit/archived/<stamp>/ folder removed) comprehensive: skipped (no framework-facing changes since <tag>)
On escalation:
HEALTH AUDIT: ESCALATED Overall grade: <F-to-A+, floor of Bucket D verdict, findings-count signal, shared-fitness grade> Shared-fitness grade: <F-to-A+, floor of the category grades from Bucket E> Reason: <max-loops | oscillation | circuit-breaker | unclassified-finding | fixer-unable-to-fix | false-clean-refuted> Outstanding findings: <list with fingerprints> Cycles run: <N> Artifacts: preserved at .gaia/local/audit/archived/<stamp>/c1/, c2/, c3/ (see fi
Claude is raw power. GAIA is order and focus. The foundation that keeps Claude-shipped code production-grade as your team scales. The React frontend is handled. You build the rest of your app on top. Every convention enforced in code.
Repo: gaia-react/gaia
Maintainer-only. Find every file that would newly ship to adopters and decide, one file at a time, whether to ship it or withhold it. Drives the release CLI,…
Audit memory, wiki, and auto-loaded files for duplication, conflicting instructions, and stale content. The default path researches, then asks you a single…
Fix the tech-debt backlog, a single issue or a recommended related batch, highest severity then oldest first, on a fresh isolated branch through the audit…
Health-check and auto-heal this project's Claude integration, triage, heal, verify, and report an F-to-A+ grade.
Turn a GAIA workflow misfire into a redacted, classified, filing-ready bug report in one read-only pass. Self-diagnoses config issues inline; files probable…
Judge-the-form, human-gated hardening. Reviews recurring code-audit-frontend findings and, with approval, drafts the lowest-context-weight form (deterministic…