Repository navigation
feat: tech debt metrics — Phase 1 (debt tracker foundation) #206 - #252
Merged
Merged
Conversation
#206) - New src/engine/debt_tracker.rs with DebtSnapshot, DebtReport, DebtConfig - Auto-save review snapshots to .cora/history/ after each review - Category mapping from LLM issue_type to tracking groups - Quality score calculation from severity distribution - Trend analysis (improving/stable/worsening) across snapshots - Config section 'debt:' in .cora.yaml (enabled, history_dir, retention_days) - Best-effort snapshot save — never fails review - 32 unit tests covering all debt_tracker logic - Hook integrated in execute_review and execute_chunked_review - All 485 tests pass, clippy clean, fmt clean
- Snapshot filename: add nanosecond suffix to prevent same-second collision - Git context: cache with LazyLock to avoid spawning git per review - Config merge: field-by-field debt merge instead of wholesale replace - All 485 tests pass, clippy clean
- Use content-based hash (findings + categories + timestamp) for unique filenames - Config merge: always apply all debt fields from .cora.yaml (allows explicit reset)
This was referenced Jun 10, 2026
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 1: Debt Tracker Foundation (Issue #206)
What's New
**** — new module with:
DebtSnapshot— lightweight JSON per-review (timestamp, commit, branch, findings by severity/category, quality score, gate status)DebtReport— aggregation across snapshots with trend analysisDebtConfig— config sectiondebt:in.cora.yamlissue_type→ normalized tracking groups (security, bug_risk, performance, error_handling, complexity, style, best_practice, other)Auto-save after every review — hooks into
execute_review()andexecute_chunked_review()LazyLockto avoid extra process spawnsConfig —
debt:section in.cora.yaml:Files Changed
src/engine/debt_tracker.rssrc/engine/mod.rssrc/config/schema.rsdebttoConfig,CoraFile, merge logicsrc/commands/review.rsVerification
cargo test— 485/485 pass (32 new debt_tracker tests)cargo clippy --all-targets -- -D warnings— cleancargo fmt --all -- --check— cleanPhase 2 (next PR)
cora debtsubcommand with--json,--trend,--since