agentleFS
camilooscargbaptistacamilooscargbaptista/cto-toolkit/tech-debt-prioritization/SKILL.md

tech-debt-prioritization

Skill9 starsChanged 8 months agoMITView on GitHub

Framework for identifying, quantifying and prioritizing technical debt with RICE scoring

The file

Files
SKILL.md

Tech Debt Prioritization

When to Use

  • Sprint planning: deciding which tech debt to tackle
  • Quarterly planning: allocating tech debt budget
  • Stakeholder communication: justifying tech debt investment
  • Codebase health assessment

Tech Debt Quadrant (Martin Fowler)

                    Deliberate              Inadvertent
              ┌─────────────────────┬─────────────────────┐
  Reckless    │ "We don't have time │ "What's a           │
              │  for tests"         │  repository pattern?"│
              │  → High priority    │  → Training need     │
              ├─────────────────────┼─────────────────────┤
  Prudent     │ "Ship now, refactor │ "Now we know how    │
              │  next sprint"       │  it should be done"  │
              │  → Track + schedule │  → Natural evolution  │
              └─────────────────────┴─────────────────────┘

Identification Checklist

Code-Level Debt

  • Functions > 50 lines (complexity)
  • Files > 500 lines (god class)
  • Duplicated code (> 3 occurrences)
  • // TODO, // FIXME, // HACK comments
  • @ts-ignore, any types without justification
  • Tests with .skip() or no assertions
  • Dead code (unused functions, unreachable branches)

Architecture-Level Debt

  • Circular dependencies between modules
  • Business logic in controllers/resolvers
  • Database queries in non-repository layers
  • Direct dependency on external services (no abstraction)
  • Shared mutable state (global variables)
  • Missing error boundaries

Infrastructure Debt

  • Manual deployment steps
  • Missing monitoring for critical paths
  • No automated backups or disaster recovery
  • Outdated dependencies (> 2 major versions behind)
  • Missing rate limiting on public APIs
  • No CI/CD pipeline

RICE Scoring for Prioritization

RICE Score = (Reach × Impact × Confidence) / Effort

Reach:      How many users/developers are affected? (1-10)
Impact:     How much does it improve things? (0.25=minimal, 0.5=low, 1=medium, 2=high, 3=massive)
Confidence: How sure are we of the estimates? (0.5=low, 0.8=medium, 1.0=high)
Effort:     Person-weeks to complete (1=1 week, 2=2 weeks, etc.)

Example Prioritization

Tech Debt ItemReachImpactConfidenceEffortRICE
Add TypeORM query logging820.8112.8
Refactor billing service530.843.0
Upgrade NestJS v8→v101010.531.7
Remove dead code20.51.011.0
Rewrite auth module620.580.75

Rule: Tackle highest RICE first.

Cost of Delay

For items that block or slow down other work:

Cost of Delay = Impact per week × Duration until addressed

Example:
  "Slow CI/CD pipeline" (adds 20 min per deploy)
  Impact: 3 deploys/day × 20 min × 5 engineers = 5h/day wasted
  Weekly cost: ~R$5,000 in lost productivity
  Fix effort: 2 weeks (R$20,000)
  Payback: 4 weeks
  
  → HIGH PRIORITY: fix immediately

Sprint Allocation Strategy

The 20% Rule

Sprint capacity:    100 story points
Feature work:        80 points (80%)
Tech debt:           15 points (15%)
Innovation/learning:  5 points (5%)

Adjust based on debt severity:
  Low debt:     10% tech debt allocation
  Medium debt:  20% tech debt allocation
  High debt:    30% tech debt allocation (debt sprint)
  Critical:     50%+ (stop features, fix foundations)

Communication Template

# Tech Debt Investment Request: [Item]

## The Problem
[What is broken/suboptimal, in business terms]

## Business Impact
- Current cost: [R$/month in developer time, cloud costs, or incidents]
- Risk: [What could go wrong if not addressed]
- Opportunity cost: [What we can't build because of this debt]

## Proposed Solution
[Technical approach in 2-3 sentences]

## Investment Required
- Engineering time: [X person-weeks]
- Risk level: [Low/Medium/High]

## Expected Outcome
- [Measurable improvement 1]
- [Measurable improvement 2]
- Payback period: [X weeks/months]

Quality Gates

  • Tech debt inventory maintained (quarterly review)
  • RICE scores assigned to all items > 1 story point
  • Sprint allocation includes explicit tech debt budget
  • Stakeholders informed about debt levels and risks
  • "Debt sprints" scheduled when RICE scores indicate urgency
  • No new deliberate debt without tracking issue

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.