Skip to content

feat: debt tracker Phase 3+4 — badge, estimation, docs (#206) - #254

Merged
ajianaz merged 3 commits into
developfrom
feat/debt-phase3-4
Jun 11, 2026
Merged

ajianaz merged 3 commits into
developfrom
feat/debt-phase3-4

Conversation

@ajianaz

@ajianaz ajianaz commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Phase 3+4: Advanced Features + Docs (Issue #206)

Phase 3 — Advanced

  • --badge — shields.io-compatible JSON endpoint for README badges
    • generate_badge() — score + trend arrow, color-coded (green/yellow/red)
    • generate_badge_with_debt() — includes estimated fix time when --estimate is set
  • --estimate — estimated debt fix time
    • Per-severity weights: critical 2h, major 1h, minor 15min, info 6min
    • Human-readable: ~30min, ~3.5h, ~2.0d
  • Debt estimation shown in terminal table when --estimate flag is used
  • JSON output includes estimated_debt_hours and estimated_debt_human fields

Phase 4 — Polish

  • 10 new unit tests (total 495): estimation, badge, formatting, badge serialization
  • docs/cli-reference.md — cora debt commands added
  • docs/usage.md — new "Tech Debt Tracking" section with examples
  • docs/configuration.md — new "Debt Tracking" config section with badge integration docs
  • AGENT.md — code structure updated, test count 495
  • .agent.md — test count updated

Verification

  • cargo test — 495/495 pass
  • cargo clippy --all-targets -- -D warnings — clean
  • cargo fmt --all -- --check — clean
  • Cora review: 0 issues on final commit

ajianaz added 3 commits June 11, 2026 00:56
Phase 3 — Advanced:
- `--badge` flag: shields.io-compatible JSON endpoint
- `--estimate` flag: estimated debt fix time (hours/days)
- estimate_debt_hours() with per-severity fix time weights
- BadgeData struct with schemaVersion (camelCase for shields.io)
- generate_badge() with green/yellow/red color thresholds

Phase 4 — Polish:
- 10 new unit tests (estimation, badge, formatting) — total 495
- docs/cli-reference.md: cora debt commands added
- docs/usage.md: Tech Debt Tracking section with examples
- docs/configuration.md: Debt Tracking config section
- AGENT.md: code structure updated, test count 495
- .agent.md: test count updated

All 495 tests pass, clippy clean, fmt clean
- generate_badge_with_debt() includes estimated fix time in badge message
- --badge respects --estimate flag for richer badge output
- Clarified trend arrow semantics in docs (▼ = fewer findings = improving)
- All 495 tests pass, clippy clean
@ajianaz
ajianaz merged commit d4329e6 into develop Jun 11, 2026
10 checks passed
@ajianaz
ajianaz deleted the feat/debt-phase3-4 branch June 11, 2026 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant