/debt-ops:metricsfrom debt-ops
Prints a debt-ops health summary from the metrics log, covering registration rate, hook feedback action rate, ADR creation, and AI-authored share. Read-only, never writes the log.
Ships in debt-ops. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Read the hidden metrics log and tell the user whether v1's tripwires are tripping.
TOPLEVEL=$(git rev-parse --show-toplevel)
REPO_HASH=$(printf '%s' "$TOPLEVEL" | shasum | cut -c1-12)
# Locate this repo's plugin cache. CLAUDE_PLUGIN_DATA is set in hook
# subprocesses but NOT in the skill's bash env, so glob the standard
# Claude Code plugin-data dirs and fall back to the legacy cache path.
CACHE_DIR=""
for D in \
${CLAUDE_PLUGIN_DATA:+"$CLAUDE_PLUGIN_DATA/cache/$REPO_HASH"} \
"$HOME/.claude/plugins/data"/debt-ops*/cache/"$REPO_HASH" \
"$HOME/.cache/debt-ops/cache/$REPO_HASH"; do
[ -d "$D" ] && { CACHE_DIR="$D"; break; }
done
LOG="$CACHE_DIR/metrics.jsonl"
if [ -n "$CACHE_DIR" ] && [ -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.
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 sessionTimestamps are ISO-8601 UTC.
Filter to the last 7 days. Then compute:
event:edit and event:session.registry_count minus first (across either edit or session events). >0 means Discipline 1 is firing.adr_count minus first (session events only).ai_authored_count / registry_count, when registry_count>0).count(result:pass) / count(event:feedback).result:fail, look at the next feedback event for the same file. Count those that flipped to pass. Divide by total fails. Below 50% means Claude isn't reliably acting on hook output — the architectural alarm bell.If there are fewer than 5 sessions in the window, say "need more data" and skip the verdict.
One screen. No padding. Use → and ↑/↓ for trends. Example shape:
debt-ops metrics — last 7 days
─────────────────────────────────
edits : 142 (8 sessions, ~18 edits/session)
registry : +3
adrs : +1
ai-authored : 50% → 60% ↑
feedback ran : 89 times
pass rate : 88%
fail → pass rate: 80% (8/10)
verdict: ok
End with one judgment line:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub bcanfield/agentic-tech-debt --plugin debt-ops4 skills in this plugin
/addRegister a deferred decision in the debt registry. Trigger by judgment, not a marker scan, whenever a future reader would ask "why this way?": an unmade decision, stub, loosened type, bypassed check, swallowed error, a default picked "for now", or a TODO/FIXME/HACK/XXX marker. Trigger immediately whenever you defer work, or when the user invokes /debt-ops:add. Over-register freely; the developer drops with "drop A", "drop A,C", or "drop all"./initWrite or refresh the `## Tech debt operations` section in CLAUDE.md so a team shares one source of truth for debt-ops disciplines and cached quality commands. Idempotent. Only the managed section changes; other sections are untouched. Invoked explicitly via /debt-ops:init (solo users get the same content from the SessionStart inject)./