Watch · Self-audit

Self-audit

Your app can name a runtime problem from its own measurements. RepoOps samples its runtime metrics, checks them on demand or on an optional schedule, and proposes a held recommendation when it finds a flap or a climb. Optional terminal capture adds build and test patterns. The hosted fleet view groups findings from connected installs, and an approved recommendation records only the change it can measure.

Start here if you want to inspect runtime findings across your installs: Runtime health. This page covers the local audit and its optional capture inputs.

See it in motion

Where to find it

  • Localhost: the "Self-audit" section on http://localhost:4000/brain-health.html - a live, read-only card for the latest finding (root cause, tier, narration source), or an honest "no finding right now" empty state.
  • Hosted: repoops.ai/team/runtime-health - which installs in your team's fleet are flapping or wasteful right now, grouped per install.
  • API: POST /api/self-audit/run, GET /api/self-audit (own runtime), POST /api/env-audit/run, and GET /api/env-audit (terminal and environment).

What it does for you

See a finding grounded in measured runtime data.The self-audit pass reads recent runtime.metric events, classifies a memory recycle flap, RSS climb, or endpoint latency regression, and proposes an AI-authored or deterministic recommendation from a fixed remediation menu. Every proposal waits for human approval.
You'll catch flaky tests and slow builds automatically, if you opt in.Turn on local log-file capture and the environment-audit pass can name flaky-test, repeated-error-loop, failing-fetch-churn, and slow-build-hotspot patterns. The capture path redacts each line before writing its runtime.terminal event.
You'll see your whole team's fleet health in one place./team/runtime-health rolls up every connected install's findings, so an eng manager sees which machines are flapping without asking each developer.
You'll trust the numbers, because a win is never invented.An applied recommendation re-samples the flagged metric afterward. If it got worse the ledger says improved:false, and a flat re-sample stays improved:null. It never flips to true merely because a fix was applied.

Configure

The five-minute metric sample runs with the app. The audit pass runs by request unless you enable its schedule. Terminal and session inputs remain separate opt-ins:

  • REPOOPS_SELF_AUDIT_SCHEDULE=1 turns on the scheduled self-audit and environment-audit passes. The default is off; POST /api/self-audit/run and POST /api/env-audit/run work either way.
  • account-settings.json::terminalCapture.enabled turns on local log-file capture. The default is false. Pair it with terminalCapture.logFiles, the list of named paths to tail.
  • Claude Code session capture (P3) needs TWO separate opt-ins, not one. This is a genuinely advanced, power-user setting, not a single toggle:
    • REPOOPS_DEEP_CAPTURE=1 records the underlying per-turn messages. On its own, it does not feed them into self-audit.
    • account-settings.json::terminalCapture.claudeCodeSessions, default false, is the separate consent to bridge that captured content into environment audit.
    Both must be true before a single Claude Code turn is bridged. Turning on deep capture for cost/usage reasons alone never silently enables this.

Use it well

  1. Run a pass from Brain health when something feels off.

    The Run a pass now button works without the schedule flag. A quiet window produces no proposal; a finding includes the sampled evidence that triggered it.
  2. Turn on terminalCapture.enabled once you want build/test signal, not before.

    It is off by default. Point logFiles at the build or test logs you choose; the capture path applies the repository's redactor before it appends an event.
  3. Only enable the Claude Code session bridge if you already run with deep capture on.

    It has no effect unless REPOOPS_DEEP_CAPTURE is also set. Think of it as a second, deliberate decision layered on top of an existing one, not a quick toggle.
  4. Use the fleet view to triage, not to page someone.

    /team/runtime-health groups current findings by source machine. Check the outcome measurement before treating an approved recommendation as an improvement.

Examples

✓
A recycle flap catches itself (Vince)
A series of rapid recycles can trigger a memory-recycle flap finding. The Brain health card shows its severity, sampled evidence, root cause, and proposed remediation.
⚠
Two opt-ins, on purpose (Andy)
Deep capture alone does not feed session content into self-audit. The separate terminalCapture.claudeCodeSessions setting must also be on before repeated failed Bash commands can produce an agent-retry-loop finding.

Read more

Last updated