Skip to content
Skills Library
Management & product · Analysis

stats

/stats

Query or render ledger state and propose backlog rows off anomalies. Use when asked to SEE it -- "show me the ledger state", "my waived gates", "telemetry", "token cost", "kit runs", "render the ledger" -- or to check it -- "any ledger anomalies". NOT for understanding debt (`| DEBT |` lines; use `bin/reflect debt list`). NOT for editing/mutating any ledger. NOT for ad-hoc SQL exploration. NOT a persistent TUI/app.

Repository
dwarves-kit ↗
Licence
MIT
Last repository change
28.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 28.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Query or render ledger state and propose backlog rows off anomalies. Use when asked to SEE it -- "show me the ledger state", "my waived gates", "telemetry", "token cost", "kit runs", "render the ledger" -- or to check it -- "any ledger anomalies". NOT for understanding debt (`| DEBT |` lines; use `bin/reflect debt list`). NOT for editing/mutating any ledger. NOT for ad-hoc SQL exploration. NOT a persistent TUI/app.

Triggers from the description

show me the ledger statemy waived gatestelemetrytoken costkit runsrender the ledgerany ledger anomalies
Original author description

Query or render ledger state and propose backlog rows off anomalies. Use when asked to SEE it -- "show me the ledger state", "my waived gates", "telemetry", "token cost", "kit runs", "render the ledger" -- or to check it -- "any ledger anomalies". NOT for understanding debt (`| DEBT |` lines; use `bin/reflect debt list`). NOT for editing/mutating any ledger. NOT for ad-hoc SQL exploration. NOT a persistent TUI/app.

How it works

  1. Scope and triggers
  2. One data path: always query via the stats CLI
  3. Which command answers which question
  4. Surface-selection rule (pick ONE per ask)
  5. Examples
  6. Install
  7. When NOT to use this skill
  8. Known tradeoffs (read before trusting an anomaly at face value)
Original SKILL.md headings · 117 lines, 1,164 words
SKILL.md preview
---
name: stats
description: Query or render ledger state and propose backlog rows off anomalies. Use when asked to SEE it -- "show me the ledger state", "my waived gates", "telemetry", "token cost", "kit runs", "render the ledger" -- or to check it -- "any ledger anomalies". NOT for understanding debt (`| DEBT |` lines; use `bin/reflect debt list`). NOT for editing/mutating any ledger. NOT for ad-hoc SQL exploration. NOT a persistent TUI/app.
---

# stats

Read-only, agent-callable observability over the ledgers dwarves-kit and its
neighbors (tide, tg-cleanup, learned-ledger) already write. The tool dir is
`~/workspace/<owner>/dwarves-kit/lib/stats` (run `uv run stats <cmd>`
there). **Everything is read-only: the CLI never writes back to a source ledger; there
is no path through this skill that mutates anything.**

## Scope and triggers

Covers the ledgers `stats` reads: the dwarves-kit gate/proof/telemetry corpus, tide file-move state, tg-cleanup snapshots, the learning ledger. Additional trigger phrases: "waived gates", "telemetry", "how much am I spending on tokens", "kit runs", "kit lane telemetry", "ledger status", "render the ledger", "ledger dashboard", "share this as an artifact" (mid-ledger-conversation), "are my waived gates over threshold", "propose a backlog row from the ledger state".

Drives the read-only `stats` CLI (dwarves-kit/lib/stats) and renders the result as EITHER an in-terminal reply (bot-reply-formatting, tables + bar-fills) or a shareable web Artifact, both from the same one query; `stats anomalies` is the feedback-loop path, PROPOSE-only (stages a cc-backlog candidate, never files a board row). READ-ONLY by hard contract over every source ledger, the CLI never writes back to a source ledger; the one exception is `stats anomalies --propose`, whose ONLY write is the gitignored cc-backlog staging buffer.

For ad-hoc SQL exploration, drive `stats query`/`stats show` directly; this skill is the rendered-answer path. There is no persistent TUI/app or daemon here, only an on-demand agent-driven query + render + propose.

## One data path: always query via the `stats` CLI

Never re-derive a ledger reading by grepping `~/.local/state/dwarves-kit/logs/` or
`tide`'s sqlite or `tg-cleanup`'s json yourself , that is a second, divergent data
source and breaks the whole point of the lens (the understanding-gate work already reuses
`lane-telemetry` for the kit read; re-implementing it here would drift). Always go through `stats`.

## Which command answers which question

| The operator wants | Command |
|---|---|
| "show me the ledger state" / "kit runs" / "kit lane telemetry" | `stats render kit_runs --surface terminal` |
| "my waived gates" / "how many gates did we waive" | `stats anomalies` (the `waived_gates` anomaly checks `SUM(kit_runs.gates_ovr)` against `waived_gates_max`). This is waived gates only, never understanding debt: that lives in the `\| DEBT \|` ledger lines (`bin/reflect debt list`). For the raw numbers behind it, `stats query "SELECT rid, gates_ovr FROM kit_runs WHERE gates_ovr > 0" --surface terminal` |
| "any ledger anomalies" / "should I propose anything" | `stats anomalies` (report only) or `stats anomalies --propose` (stage a candidate row per fired anomaly into the cc-backlog staging buffer; never files a board row) |
| "is the pipeline ceremony" / "gate work vs what shipped" / "dispatches and tokens per run" | `stats ceremony` (add `--json`, `--from/--to` or `--since-sha` to compare windows); the `ceremony_share` anomaly shows in `stats anomalies` |
| "telemetry" (tide moves) | `stats render tide_moves --surface terminal` |
| "token cost" / "how much am I spending on tokens" | `stats render tide_tier_b_calls --surface terminal` (per-call cost/token rows); for a spike check specifically, `stats anomalies` |
| "ledger status" / a quick glance at everything | `stats tables` first (row counts per table), then render the table the operator actually cares about |
| "render the ledger" / "ledger dashboard" / "share this as an artifact" | the same `render` command with `--surface artifact --out <tmp path>.html`, then call the **Artifact** tool on that file |
| an ad-hoc cross-ledger question ("which runs correspond to which tide moves") | `stats render --query "<read-only SQL JOIN>" --surface terminal` |

Full table list + schema: `lib/stats/README.md`. `stats tables` also
lists what's materialized right now.

## Surface-selection rule (pick ONE per ask)

- **Quick look, mid-conversation** (the operator just wants an answer now) ->
  `--surface terminal`. This prints a `bot-reply-formatting`-shaped fenced code-block
  table (right-aligned numerics, a bar-fill column for any `*_pct`/`*_rate`/`*ratio*`
  column) , paste that output directly into your reply, do not re-summarize it into
  prose first.
- **"Share this" / "send it to me" / "for review"** -> `--surface artifact --out
  <tmp-path>.html`, then call the **Artifact** tool on the written file (self-contained
  HTML, CSP-safe, no external requests , the file already satisfies the Artifact tool's
  contract as-is).
- Both surfaces render from the exact same query result (one `stats render`
  invocation, one row set); there is no divergent second read between them.
- A wide result (many columns) reads badly as a phone-width code block , prefer
  `--surface artifact` for those rather than fighting the terminal table's width.

## Examples

```bash
cd ~/workspace/<owner>/dwarves-kit/lib/stats

# Quick look: "show me the ledger state"
uv run stats render kit_runs --surface terminal --limit 10

# Share: "send me the token-cost breakdown as an artifact"
uv run stats render tide_tier_b_calls --surface artifact --title "Token cost" \
  --out /tmp/ledger-token-cost.html
# then: call the Artifact tool on /tmp/ledger-token-cost.html

# Ad-hoc cross-ledger question, terminal surface
uv run stats render --query \
  "SELECT k.repo, count(*) AS n FROM kit_runs k GROUP BY 1 ORDER BY n DESC" \
  --surface terminal --title "Runs per repo"

# Feedback loop: "any anomalies? propose a backlog row if so"
uv run stats anomalies --propose
```

If the db has never been built on this host, `stats render` (like `show`/`query`)
lazy-rebuilds from the source files first (existing lane-telemetry behavior, unchanged here); no extra
step needed.

## Install

This skill's canonical source is this file (`skills/stats/SKILL.md`; relocated
from `lib/stats/skill/` -- at the old subsystem-internal
path it never installed, because `install.sh` globs `skills/*/SKILL.md` only).
It now installs automatically on both install paths (bash installer + plugin),
same as `get-api-docs` and `skill-review`. No symlink step needed; edit the
in-repo file.

## When NOT to use this skill

- Editing or mutating any ledger , there is no such path here, or anywhere in this
  tool (read-only by hard contract; `stats anomalies --propose`'s only write is the
  gitignored cc-backlog staging buffer, never a ledger, never a board).
- Ad-hoc SQL you're going to iterate on yourself , just run `stats query`/`ledger
  show` directly; this skill is the rendered-answer path, not a SQL console.
- Filing a board row directly , `stats anomalies --propose` only STAGES a candidate;
  promoting it to `_meta/BACKLOG.md` still goes through the existing `board promote`
  human gate (ex `add-backlog`), same as any other cc-backlog candidate.
- A persistent dashboard or TUI , there isn't one; every render (or anomaly check) is
  one on-demand query, driven by the agent, per the ROADMAP's binding "consumer is the
  agent on-demand, not a human TUI" decision.

## Known tradeoffs (read before trusting an anomaly at face value)

- `stats anomalies`' `home` field is a static per-detector guess, not derived from
  data; waived-gates/misfire sums are GLOBAL across every repo in `kit_runs`, and ~44% of
  `kit_runs` rows carry `repo = "?"` (unattributed) as of this writing. Treat a fired
  anomaly's "home" as a starting guess for the operator to confirm, not a fact.
- A missing source (e.g. no tide `state.sqlite` on this host) reads identically to a
  present-but-empty one; `stats tables`/`anomalies` cannot currently tell you which.
  Full list + the other two (schema double-definition, lane-telemetry coupling):
  `lib/stats/README.md` "Known tradeoffs".

Versions

RepositoryScoreLicence
This page · dwarvesf/dwarves-kit100MIT
entireio/entire-graph100MIT
harnessprotocol/harness-kit100Apache-2.0
Shweta-Mishra-ai/tokenmizer100MIT
kalinbogatzevski/captain-memo95Apache-2.0
get-engram/engram95Apache-2.0
bondie/agent-harness91MIT

Database snapshot: 13.11.2026 · package version 12212d458882 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 96ledger
    Show a Gauntlet campaign ledger through its existing read-only table command. Use when the user asks for campaign status, a campaign ledger, PR state for a named or current campaign run, or hidden, merged, and aborted campaign entries.
  • 100technical-debt-identification-backlog-prioritization
    Use this skill when quantify, document, and prioritize technical debt reduction in engineering sprint backlogs.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.