Skip to content

feat: cora debt subcommand (Phase 2 of #206) - #253

Merged
ajianaz merged 3 commits into
developfrom
feat/debt-subcommand
Jun 10, 2026
Merged

ajianaz merged 3 commits into
developfrom
feat/debt-subcommand

Conversation

@ajianaz

@ajianaz ajianaz commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Phase 2: cora debt CLI Subcommand (Issue #206)

What's New

cora debt — show tech debt report from review history.

cora debt                    # Show debt report table
cora debt --json             # Machine-readable JSON output
cora debt --trend            # Quality score trend graph
cora debt --since 2026-06-01 # Filter by date
cora debt --since v0.4.5     # Filter by git tag
cora debt --branch develop   # Filter by branch

Features

  • Terminal table — severity breakdown, category breakdown with trends, quality score
  • --json — full DebtReport JSON for CI integration
  • --trend — ASCII quality score graph over review history
  • --since — filter by date (YYYY-MM-DD) or git tag
  • --branch — filter by branch name
  • Auto-cleanup of old snapshots on each run

Files Changed

File Change
src/commands/debt.rs NEW — subcommand handler, table formatting, trend graph, filters
src/commands/mod.rs Add module export
src/main.rs Add Debt subcommand to CLI

Verification

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

ajianaz added 3 commits June 11, 2026 00:22
- New src/commands/debt.rs with `cora debt` CLI subcommand
- `--json` flag for machine-readable output
- `--trend` flag for ASCII quality score graph
- `--since <date|tag>` filter by date or git tag
- `--branch <name>` filter by branch
- Terminal-formatted debt report table with severity breakdown
- Category breakdown with trend indicators (improving/stable/worsening)
- Quality score with color-coded display
- Auto-cleanup of old snapshots on each run
- All 485 tests pass, clippy clean, fmt clean
- Use NaiveDate::parse_from_str for YYYY-MM-DD (was RFC3339 which rejects plain dates)
- Fix trend graph: top row check uses height-1 instead of row==0
- All 485 tests pass, clippy clean
- Top row (row == height-1) range includes max_score boundary
- Cleaner in_range condition with inline comment
@ajianaz
ajianaz merged commit 027fdfb into develop Jun 10, 2026
10 checks passed
@ajianaz
ajianaz deleted the feat/debt-subcommand branch June 10, 2026 17:31
ajianaz added a commit that referenced this pull request Jun 11, 2026
PR #252 and #253 merged tech debt metrics but docs were not updated.

Changes:
- CHANGELOG.md + docs/changelog.md: added debt tracker to [0.5.0] Added
- docs/roadmap.md: #206 Planned → Done
- README.md: added 'cora debt' to commands table
- docs/cli-reference.md: added cora debt subcommand with all flags
- docs/configuration.md: added Tech Debt Tracker section (config + CLI)
- AGENT.md: test count 453→485, added debt_tracker.rs + debt.rs to structure
- .agent.md: test count 453→485
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