stats · git:20260727.4c516a8 · 2026-07-27 · sha256 47a940ab52e3ea8f
stats git:20260727.4c516a8A
Immutable. This exact content is served forever at /api/v1/blob/47a940ab52e3ea8f.
---
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 two 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; and a value free report or maintenance request made only of any combination of `--json`, `--audit`, `--all`, and `--prune-dead`, each at most once. 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.
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 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. 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