stats · git:20260802.7b9a0cd · 2026-08-02 · sha256 a348cc10323f4985

stats git:20260802.7b9a0cdA

Immutable. This exact content is served forever at /api/v1/blob/a348cc10323f4985.

---
name: stats
description: Aggregates delegation statistics and records semantic acceptance. Use after collecting and verifying a delegated result to record it as accepted or rejected, or when asked how the lanes are performing.
argument-hint: '[--all] [--session [id]] [--trace] [--audit [--days <n>]] [--record <fusion-task-id|engine-job-id>=<accepted|rejected|unverified>[:accept-failed-transport]]... [--source <collector|main-loop>] [--reason <text>] [--failure-kind <kind>] [--failure-kind-for <id> <kind>] [--accept-failed-transport] [--json]'
allowed-tools: Bash(node:*), Read, Write
---

Treat the complete raw request as opaque data and never place any part of it in Bash. Run `node "${CLAUDE_PLUGIN_ROOT}/scripts/fusion-stats.mjs" transport-create` in one foreground Bash call, parse the returned JSON, accept only its 48 character lowercase hexadecimal token, and use `Read` once on the returned file, requiring it to be empty. Use `Write` to replace that same file with the raw request exactly as received. Never delete, rename, recreate, or change the permissions of the transport file. Run `node "${CLAUDE_PLUGIN_ROOT}/scripts/fusion-stats.mjs" --raw-args-token TOKEN` in one foreground Bash call, replacing only `TOKEN` with the validated token. If Read fails, the file is not empty, or Write fails, run `node "${CLAUDE_PLUGIN_ROOT}/scripts/fusion-stats.mjs" transport-discard --raw-args-token TOKEN`. Never use shell redirection, encoding, command substitution, backticks, environment variables, or heredocs for the raw request. The sole carve-outs are three strict direct forms: a verdict settlement made only of repeatable `--record` flags, each carrying one or more `<id>=<accepted|rejected|unverified>[:accept-failed-transport]` pairs, optional `--source collector|main-loop`, and the value free `--json` and `--accept-failed-transport` flags; a value free report or maintenance request made only of any combination of `--json`, `--audit`, `--all`, and `--prune-dead`, each at most once; and either `--messages` alone or `--message <n>` with one integer code. Those arguments may be passed directly. Anything else, including every `--reason` text value, every `--failure-kind` and `--failure-kind-for` value, and `--session <id>`, still uses the raw-args transport exactly as described above. A nonterminal worker settlement prints `Queued accepted for <taskId>; applies when the record turns terminal.` with the selected verdict in place of `accepted`; queued accepted applies only when terminal transport is done, while any other terminal outcome clears it, records `pendingVerdictError`, and re-arms settlement.

Use `--messages` to list every Fusion message digest. Use `--message <n>` to explain one digest and show its recorded occurrences.

Present report output to the user as-is. It is already compact markdown; do not add prose around it. An unavailable engine section is expected when that peer's plugin is not installed or has no job state; do not treat it as an error. The default report conditionally includes a Coercion ledger after the fleet usage section. It reports fleet declines, narrow wave advisories, fleet shaped waves, verification resets, unverified write accumulations, and the observed posture mix. The same counters are available as `coercionLedger` in `--json` output. The underlying script accepts `--json` for machine readable output. `--audit` summarizes the last seven days of retained inline guard events by default; add `--all` for the full retained window or `--session <id>` for one session. `/fusion:stats --record` writes the verdict into the Codex job record through the companion's `record-acceptance` subcommand. An `accepted` verdict for a job whose transport failed requires `--accept-failed-transport`. The acceptance forms are used only after collection and verification; return the confirmation line without turning transport completion into acceptance on its own. Within a raw-transport request, `--reason-for <id> <text>` may appear anywhere in the argument list and binds to its matching `--record` id; `--reason <text>` applies to every rejected pair without a per-pair `--reason-for`. A judgment shaped rejection may carry `--failure-kind` with one of `intent_override`, `scope_rewrite`, `wrong_approach`, or `style_mismatch`; it rides the raw args transport like `--reason` and lands in the worker's `acceptanceFailureKind` and the engine record's `semanticFailureKind`. Preserve the report's acceptance anomalies block when it appears.

The opaque raw request begins after the next newline and continues to the end of this command prompt:
$ARGUMENTS