Skip to content
Development
Skill

/debt-ops-init

Write or refresh a "Tech debt operations" section in the project's AGENTS.md so the team shares one source of truth for debt-ops disciplines. Run ONLY when the user explicitly asks to set up, install, or initialize debt-ops disciplines — never auto-invoke. Idempotent; only the

From plugin
agentic-tech-debt
98 skills

Claude Code

$ npx -y skills add bcanfield/agentic-tech-debt --skill debt-ops-init --agent claude-code

SKILL.md

debt-ops-init.SKILL.md
name: debt-ops-init
description: Write or refresh a "Tech debt operations" section in the project's AGENTS.md so the team shares one source of truth for debt-ops disciplines. Run ONLY when the user explicitly asks to set up, install, or initialize debt-ops disciplines — never auto-invoke. Idempotent; only the managed section changes, other sections are untouched.

debt-ops-init

Write or update a `## Tech debt operations` section in the project's agent charter. Idempotent — only the managed section changes.

**Run only on explicit user request** ("set up debt-ops", "init debt-ops", "write the disciplines"). Do not invoke this as part of normal work. (Tools with a debt-ops hook adapter inject these disciplines per-session automatically; this skill is the persistence step for everyone else.)

Why this matters more on skills-only tools

Without a hook adapter there is no per-edit enforcement and no automatic capture. The charter is the *only* place the disciplines live, so the agent self-applies them. That's "vibes," not a tripwire — be honest with the user that the persistent charter is the substitute for, not the equal of, the hook-driven write-time loop.

1. Pick the charter file

Use `AGENTS.md` at the repo root — the cross-tool charter most agents read. If the project clearly standardizes on a different file your agent auto-loads (`GEMINI.md`, `.github/copilot-instructions.md`, `CLAUDE.md`), use that instead and tell the user which you picked.

2. Read any cached quality commands (optional)

If a hook adapter previously ran in this repo, it cached the project's quality commands. Include them if present; otherwise leave the placeholder.

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 '')")
CACHE_DIR="${DEBT_OPS_CACHE:-$HOME/.cache/debt-ops}/cache/$REPO_HASH"
[ -f "$CACHE_DIR/feedback.list" ] && cat "$CACHE_DIR/feedback.list"
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 no commands are cached, detect the project's lint/type/test commands by scanning its manifests (`package.json`, `pyproject.toml`, `Cargo.toml`, `go.mod`, `Makefile`, …). Prefer commands that take a changed-file argument and run in a few seconds.

3. Compose the section (template)

Substitute `{{ADR_DIR}}`, `{{REGISTRY_DIR}}`, and `{{COMMANDS}}` (the cached or detected commands, one per line; leave a `# add your lint/type/test commands here` placeholder if none found).

## Tech debt operations

<!-- this section is auto-managed by the debt-ops agent skill; safe to edit, run debt-ops-init to regenerate -->

### Disciplines

1. The test for debt: would a future reader ask "why this way?" If yes, register via the `debt-ops-add` skill immediately — no prompt. This is judgment, not a marker scan: a `TODO`/`FIXME`/`HACK`/`XXX` is the obvious case, but an unmade decision, a stub, a loosened type, or a default picked "for now" all count even with no marker in the diff. Use `payoff_trigger: unknown` if unsure. Announce: `+1 entry: <slug> (drop?)`. Over-register freely; the developer drops with "drop it".

2. When making an architecturally significant change — a data model, public interface, security boundary, release pipeline, or a dep-manifest change that is a major-version bump or a *new* top-level dependency — draft an ADR under `{{ADR_DIR}}/` in Nygard format: a `# NNNN — Title` heading, `**Date:**` and `**Status:**` lines, then Context, Decision, Consequences, Alternatives, Payoff trigger. Create the directory if needed. Only draft an ADR when there are two credible alternatives; if you cannot list two, it is a comment, not an ADR. An ADR with a payoff trigger *is* deliberate debt — when you write one, also use `debt-ops-add` so the registry entry mirrors the ADR.

3. Read entries under `{{REGISTRY_DIR}}/` before changing files they reference.

### Quality checks

If a debt-ops hook adapter is installed (e.g. the Copilot adapter), it reads the marker block below and runs these after every edit under a 3 s budget. Without an adapter (skills-only tool), they are *not* enforced automatically — you, the agent, run them after editing and fix failures before moving on. Lines starting with `#` are estimates/comments and are skipped at run time.

<!-- debt-ops:feedback v1 -->
{{COMMANDS}}
<!-- /debt-ops:feedback -->

4. Apply

  • **If the charter file doesn't exist:** create it with the section above as the

entire file.

  • **If it has a `## Tech debt operations` section:** replace exactly that section —

from the heading through (but not including) the next `## ` heading, or EOF if none. Leave every other byte unchanged.

  • **If it exists without the section:** append the section after the last line, with

one blank line between.

5. Announce

`charter updated: <file> — disciplines + N quality commands` (N = non-comment, non-blank lines inside the marker block; 0 if placeholder).

Marker contract — do not deviate

  • `<!-- debt-ops:feedback v1 -->` is the open marker the hook adapters key on.

Exact string; the `v1` is part of the marker.

  • `<!-- /debt-ops:feedback -->` is the close marker.
  • This must stay identical across every adapter's `feedback.py` and `init` skill —

see CLAUDE.md "Adapter parity." A drift here silently breaks the Copilot write-time loop (it reads the block by this exact marker).

Don't

  • Don't auto-invoke. Only on explicit user request.
  • Don't touch any byte outside the `## Tech debt operations` section.
  • Don't claim the charter gives deterministic enforcement — it doesn't without a

hook adapter. Say so.

Read more
@bcanfield
Ships withagentic-tech-debt

Catches AI-introduced tech debt at write-time Works with any coding agent. Any stack. Two decades of tech-debt research, distilled into a plugin and validated across dozens of codebases.

Stars on GitHub

Momentum

stars in total
9
Star history of bcanfield/agentic-tech-debt on GitHub, a chart by star-history.com

Other skills on agentic-tech-debt.

add

add

Register a deferred decision in the debt registry. Trigger by judgment, not a marker scan, whenever a future reader would ask…

init

init

Write or refresh the `## Tech debt operations` section in CLAUDE.md so a team shares one source of truth for debt-ops disciplines…

metrics

metrics

Print a debt-ops health summary from the metrics log, covering registration rate, hook feedback action rate, ADR creation, and…

review

review

Audit the debt registry, rank survivors by churn × Fowler quadrant, surface a top-N list, then walk paydown on user follow-up.…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills11d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc13d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react2d252k
@facebook@facebookInstall Skill

Questions about debt-ops-init.

Which coding agents can use debt-ops-init?
debt-ops-init installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.