Skip to main content
ClaudeWave
Skill8 repo starsupdated today

dos-stats

dos-stats reads the append-only observation log written by the bundled DOS hook binary on each tool call, fold its records into a summary report showing adjudication counts, decision outcomes, reason classes, latency percentiles, and delegation rates. Use it to audit the kernel's own activity, verify native hooks are serving calls rather than silently delegating to Python, and confirm hook execution speed on your project.

Install in Claude Code
Copy
git clone --depth 1 https://github.com/anthony-chaudhary/dos-kernel /tmp/dos-stats && cp -r /tmp/dos-stats/claude-plugin/skills/dos-stats ~/.claude/skills/dos-stats
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

# dos-stats — read the kernel's own activity log

> **The DOS hooks judge your agents from non-forgeable evidence. This skill turns
> that lens on the kernel itself.** Every time a hook fires (before a tool call, after
> a read, on a stop), the bundled native `dos-hook` binary writes ONE line to a
> durable log describing what it decided. This skill folds that log into a report you
> read. It is the binary's own dogfood: the kernel emits evidence about its own
> adjudication, the same way it demands evidence from the agents it judges (docs/276).

## What writes the log (so the numbers mean something)

The plugin's hooks call the bundled `dos-hook` binary on every tool call. On each
call the binary appends one record to `.dos/metrics/observations.jsonl` under this
workspace — the verb it ran, the decision it reached, the reason class, the dialect,
the exit code, how long it took. The log is **append-only and local**; nothing reads
it back until you run this. It is on by default and opt-OUT with `DOS_HOOK_METRICS=0`.

## Step 1 — Fold the log into a report

The binary lives in the plugin bundle, so call it by its bundle path (the same
launcher the hooks use picks the right binary for your machine):

```bash
"${CLAUDE_PLUGIN_ROOT}/bin/dos-hook" stats --workspace .
```

A populated run looks like this:

```
dos-hook stats — /your/project
  observations   4
  tool calls     3 adjudicated — 2 passed untouched (66.7%), 1 intervened (33.3%)
  by verb       posttool=1  pretool=3
  by outcome    deny=1  passthrough=3
  by exit code  0=3  2=1
  pretool rung  admission=1  none=1  provenance=1
  dialect       claude-code=3
  stream state  ADVANCING=1
  delegates     0  (native declined → Python)
  stop blocks   0  (false-done refusals)
  latency (ms)  verb            n     mean    p50    p95    max
                posttool          1    2.29   2.29   2.29   2.29
                pretool           3    5.32   5.32   5.42   5.42
```

**If it says `(no observations yet …)`** that is normal and correct — the log is
empty until the hooks have fired at least once. Make any tool call in this project
(read a file, run a command) and re-run; the count climbs.

## Step 2 — Read the lines that matter

- **observations / by verb** — how many calls the kernel adjudicated, split by hook
  (`pretool` = before a tool runs, `posttool` = after a read, `stop` = on a stop,
  `marker` = the keep-alive budget).
- **tool calls** — the intervention RATE: of every tool call adjudicated (one
  `pretool` record each), what share passed untouched vs was warned or denied. This
  is the "is the substrate a light touch or a nanny?" number — numerator and
  denominator come from the same log, so the percent cannot be argued with. A
  delegated call is counted in neither (Python decided it; see **delegates**).
- **by outcome** — `passthrough` (let it run), `deny` (refused a structurally-unsafe
  call, e.g. a self-modify of the kernel's own path), `warn` (advisory re-surface),
  `block` (a stop refused on an unverified claim).
- **delegates** — how often the fast native path **declined and fell back to Python**.
  The native binary exists to erase that cold-start, so a high delegate count is the
  one number you want LOW; `0` means the fast path is owning every call.
- **stop blocks** — how many times verify-on-stop **refused to let the loop close on a
  "done" the git history did not back**. This is the headline safety number.
- **reason class** — which refusals fired (`SELF_MODIFY`, a lane collision, …), when
  the kernel denied or warned.
- **latency (ms)** — per-verb wall time. The native path's whole point is sub-30 ms
  (the docs/270 claim) — here it is, measured live and continuously on your machine.
- **⚠ panics** — only appears if the fail-safe fired (a Go crash that recovered to a
  no-op so it never broke your turn). Non-zero here is worth a bug report.

## Step 3 — Narrow the window or get the machine form (optional)

```bash
# only the last hour (or 30m, 15m, …) — the clock lives at this read-only boundary:
"${CLAUDE_PLUGIN_ROOT}/bin/dos-hook" stats --workspace . --since 1h

# the same aggregate as a JSON object, to pipe into jq or a dashboard:
"${CLAUDE_PLUGIN_ROOT}/bin/dos-hook" stats --workspace . --json
```

`--since` with an unreadable value (or omitted) folds everything; it never errors —
a read-only surface degrades to "show what we have."

## What this skill deliberately does NOT do

- **It changes nothing.** It is a pure fold over a log the hooks already wrote — no
  lease, no launch, no mutation. It does not even add to the log it reads (the `stats`
  verb is the one verb that is NOT itself recorded, so it cannot count its own reads).
- **It does not decide ground truth.** It reports counts; the kernel made the
  decisions those counts summarize, at the moment each hook fired.
- **It is not a server.** A hook is a one-shot process, so there is nothing to scrape;
  the durable per-call log IS the cross-process surface, and this verb folds it on
  demand. To watch it live, re-run it (or wrap it in `/loop`).
issue-verifySkill

Adjudicate a GitHub issue's "this is resolved" claim from witnesses the claimant didn't author — then close it carrying the evidence, or refuse with the typed gap. Use when an issue looks already-solved, after landing a fix that should have closed one, or to sweep open issues for silently-resolved ones.

issue-workSkill

Pick the next most important open GitHub issue this agent can actually complete, make its done-condition true, land it with witnesses (suite + parity + commit-audit), and priority-tag every issue touched along the way. Use when asked to "work the backlog", "complete the next most important issue", or to fix a specific issue number end-to-end.

releaseSkill

Cut a versioned release of the DOS kernel — bump the version, draft release notes, commit, tag, push to master, and create a GitHub release. The tag push triggers the gated PyPI publish pipeline (publish.yml); the skill surfaces the run and its approval gate.

stable-releaseSkill

Promote an already-shipped rolling release (vX.Y.Z) of the DOS kernel to a named stable channel — gated on a green kernel suite + a green third-party CI run on the candidate + a clean truth syscall + a soak window. Writes an evidence file and adds a stable/<codename> git tag on the same commit. Does NOT bump versions or build new artifacts.

dos-class-cycleSkill

One automatic plan-class lifecycle tick. Reads the DECLARED class set + transition list from the workspace `[lifecycle]` table (not a hardcoded taxonomy), evaluates each trigger, spawns a read-only JUDGE-rung adjudicator (the `dos.judges` seam — advisory, fail-to-abstain) to approve/defer each candidate transition, applies the gated transitions as plan-meta edits + one commit per cycle, and logs to the run archive. Failsafes (per-cycle cap, per-plan cooldown, a veto class) are `[lifecycle]` data; the judge content is a host `dos.judges` driver. Every path/class comes from `dos doctor --json`. Use to garden a plan portfolio's lifecycle automatically, judge-gated. The DOS lifecycle gardener (SKP Axis 5, docs/207 Phase 5c).

dos-dispatch-loopSkill

Run /dos-dispatch on a recurring cadence, alternating with /dos-replan when the backlog drains — the dispatch→replan→dispatch cycle. The continue/stop/next-mode decision is the kernel's typed loop decision, not inline prose: each iteration is classified (`dos gate`) into a verdict and the loop's counters (drained-twice, the unclear/dirty-zero breakers, the iteration cap) drive the next step. Several loops on disjoint lanes run concurrently, each taking its own lane lease via `dos arbitrate`. Driven entirely by `dos` verbs + the workspace's `dos.toml`. The DOS reference loop workflow (SKP Axis 5).

dos-dispatchSkill

End-to-end plan-and-ship for one lane — snapshot the portfolio with /dos-next-up, take a lane lease via `dos arbitrate` so parallel dispatches don't collide, gate the empty case via `dos gate`, ship the packet, and archive the run under the configured run dir. Driven entirely by `dos` verbs + the workspace's `dos.toml`; names no host path, lane, or commit convention. Use when you want to plan and ship the next batch on one lane in a single command, with concurrency safety. The DOS reference dispatch workflow (SKP Axis 5).

dos-goal-gateSkill

Ground a "keep working until the goal is met" stop condition in a witness the agent did not author, instead of letting the agent self-certify "done". A harness goal/Stop-hook condition is normally checked by the model re-reading its OWN work — consistency, not grounding. This skill turns the operator's goal into checkable EFFECT claims and wires `dos hook stop` so the Stop is refused until git ancestry (a shipped phase) or an effect read-back corroborates the claimed effect. Driven by `dos` verbs and the workspace's own `dos.toml` — no host-specific paths, lanes, or commit conventions. Use when you want a self-stopping agent (or a `/loop` worker) to be unable to declare a goal complete on its own say-so. The single-agent self-stop analogue of `dos-witness-claim`.