← ClaudeAtlas

metricslisted

Print a debt-ops health summary from the metrics log, covering registration rate, hook feedback action rate, ADR creation, and AI-authored share. Use when the user asks for "debt-ops metrics", "debt health", "registry stats", or invokes $metrics. Read-only, never writes the log.
bcanfield/agentic-tech-debt · ★ 6 · AI & Automation · score 71
Install: claude install-skill bcanfield/agentic-tech-debt
# metrics Read the hidden metrics log and tell the user whether v1's tripwires are tripping. ## 1. Find the log ```bash TOPLEVEL=$(git rev-parse --show-toplevel) REPO_HASH=$(printf '%s' "$TOPLEVEL" | shasum | cut -c1-12) # Hooks and skills share one deterministic cache base (ADR 0011). Override the # base with DEBT_OPS_CACHE; default is ~/.cache/debt-ops. CACHE_DIR="${DEBT_OPS_CACHE:-$HOME/.cache/debt-ops}/cache/$REPO_HASH" LOG="$CACHE_DIR/metrics.jsonl" if [ -f "$LOG" ]; then tail -n 500 "$LOG" else echo "MISSING: no metrics.jsonl found for repo hash $REPO_HASH" fi ``` If the file is missing or empty, tell the user the hooks haven't fired yet in this repo and stop. ## 2. The log format One JSON object per line, three event shapes: - `{"event":"edit","file":"...","registry_count":N,"ts":"..."}` — every agent edit - `{"event":"feedback","file":"...","result":"pass|fail","ts":"..."}` — every quality-check fire - `{"event":"session","registry_count":N,"adr_count":M,"ai_authored_count":K,"ts":"..."}` — start of each session Timestamps are ISO-8601 UTC. ## 3. Compute the tripwires Filter to the last 7 days. Then compute: - **Edits / sessions** — counts of `event:edit` and `event:session`. - **Registry growth** — last `registry_count` minus first (across either edit or session events). >0 means Discipline 1 is firing. - **ADR growth** — last `adr_count` minus first (session events only). - **AI-authored share trend** — first vs. last session percentage (`ai_authore