← ClaudeAtlas

initlisted

Write or refresh the "## Tech debt operations" section in AGENTS.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. Invoke explicitly via $init (solo users get the same content from the SessionStart inject).
bcanfield/agentic-tech-debt · ★ 6 · AI & Automation · score 71
Install: claude install-skill bcanfield/agentic-tech-debt
# init Write or update a `## Tech debt operations` section in `./AGENTS.md`. Idempotent — only the managed section changes. ## 1. Read the cached commands ```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" LIST="$CACHE_DIR/feedback.list" [ -f "$LIST" ] && cat "$LIST" # Detected ADR/registry dirs. Fall back to the co-located defaults if the # cache files aren't written yet. ADR_DIR=$( [ -s "$CACHE_DIR/adr-dir" ] && cat "$CACHE_DIR/adr-dir" || echo "docs/adr" ) REGISTRY_DIR=$( [ -s "$CACHE_DIR/registry-dir" ] && cat "$CACHE_DIR/registry-dir" || echo "docs/debt" ) echo "adr-dir: $ADR_DIR" echo "registry-dir: $REGISTRY_DIR" ``` If the file doesn't exist, the SessionStart discovery prompt hasn't run yet. Tell the developer: > No cached quality commands yet. Start a new session so I can detect them, then re-run $init. …and stop. ## 2. Compose the section (template) Substitute `{{COMMANDS}}` with the cache contents verbatim, `{{ADR_DIR}}` with the detected `adr-dir`, and `{{REGISTRY_DIR}}` with the detected `registry-dir` (from step 1). ```markdown ## Tech debt operations <!-- this section is auto-managed by the debt-ops Codex plugin; safe to edit, run $init to regenerate --> ### Disciplines 1. The test for