Repository navigation
Conversation
CRAP (Change Risk Anti-Patterns) combines cyclomatic complexity with test coverage: cc^2 * (1 - cov)^3 + cc. It is computed at output time from the existing complexity and coverage data, so no analysis types change. - JSON: metrics.crap is a number with coverage data and null without it, so consumers can parse the key unconditionally. - Terminal and LLM markdown output show it next to coverage. - [crap].coverage_source selects direct (default) or transitive coverage.
This was referenced Oct 12, 2026
This was referenced Oct 13, 2026
Score each function's editability per model tier (small to frontier) from complexity, nesting, length, coverage, context tokens and ripple, with ranked improvement actions. Opt-in via [llm_editability].
Lower LLM editability when LLM co-authored edits keep getting reworked: repeated recent LLM edits, fixes or reverts after them, and bursts of conventional fixes per scope (or per file for scope-less fix: commits). Older LLM edits never fixed or reverted add a small, capped bonus. Agents are detected from Co-authored-by trailers and Generated-with footers; configure via [llm_editability.churn].
thedrow
force-pushed
the
feat/llm-churn
branch
from
October 13, 2026 02:18
d61f903 to
1f56018
Compare
2 tasks done
Reject windows above 100 years so date arithmetic cannot panic, and carry the earlier editability review fixes onto this branch.
This branch has not been deployed
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.
Summary
Detect LLM-co-authored commits (
Co-authored-bytrailers and "Generated with" footers; built-in agent globs, extendable in config) and score how LLM edits to each function hold up. Only recent commits count (default 14-day window):This reverts commit <hash>line, or landing shortly after one),fix(scope):, or by file for scope-lessfix:commits.These signals add up to a
reworkfeature that lowers the score and adds an advice action. Older LLM edits that were never fixed or reverted add a small, capped bonus. Commit facts come from the existing repo-wide history walk, so there is no extra git pass. Configure with[llm_editability.churn].Uses
git2trailer parsing,git-conventional, andglobset.This is PR 3 of 5. Next: topic matching (#151).
Test plan
llm_churn_integration_test: builds a real git repo fixture with agent trailers and backdated commits (repo-localcore.hooksPath, no global config changes), checks per-function churn via the git provider and viadebtmap analyze --format jsoncargo test --bin debtmap,output_validation_testNot yet done
[llm_editability.churn]section (window, agents, proven-edit bonus) and the churn fields in the JSON/markdown output.How to stack these
These pull requests target
master. From a clone ofiepathos/debtmap, link them bottom to top, then merge the stack:gh stack linkrecords the stack on GitHub.gh stack mergemerges that stack in one step. Pass a pull request number to stop at that pull request. Order: CRAP scores (#148), editability (#149), churn (#150), topics (#151), content reverts (#152).