debt-ops-metricslisted
Install: claude install-skill bcanfield/agentic-tech-debt
# debt-ops-metrics
Read the hidden metrics log and tell the user whether the tripwires are tripping.
## 1. Find the log
The repo-hash is computed in Python (not `shasum`) so this is identical across
macOS, Linux, and Windows — no BSD/GNU coreutils dependency.
```bash
REPO_HASH=$(python3 -c "import hashlib,subprocess;t=subprocess.run(['git','rev-parse','--show-toplevel'],capture_output=True,text=True).stdout.strip();print(hashlib.sha1(t.encode()).hexdigest()[:12] if t else '')")
# Hooks and skills share one deterministic cache base. Override 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 [ -n "$REPO_HASH" ] && [ -f "$LOG" ]; then
tail -n 500 "$LOG"
else
echo "MISSING: no metrics.jsonl found for repo hash ${REPO_HASH:-<not-a-git-repo>}"
fi
```
If the file is missing or empty, tell the user no debt-ops activity has been logged
for this repo yet and stop. On a skills-only tool (no hook adapter), only
`register` and `review` events are logged — the per-edit `edit`/`feedback`/`session`
events come from the hook adapter, so feedback metrics will be absent. Say so rather
than reporting them as zero.
## 2. The log format
One JSON object per line. Event shapes:
- `{"event":"register","slug":"...","ai_authored":bool,"letter":"...","ts":"..."}` — each capture
- `{"event":"review","total":N,"stale":N,"cold":N,"active":N,"ts":"..."}` — each review
- `{"event":"edit","