Repository navigation
docs(standards): make shallow findings advisory, CC > 15 the stop rule - #69
Merged
Merged
Conversation
- Only declarations above cognitive_complexity 15 are work items; stop at max <= 15. - shallow / file_split findings are review prompts, not gates; never run --fail-on-safe-inline. Re-inline only true pass-throughs with no same-shape siblings and no meaningful name or doc comment. - Benchmark hot per-element loops before splitting; prefer a per-declaration `// cognitive_complexity:ignore` with a reason. - Point to the dart-cognitive-complexity skill for details.
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.
Problem
The shallow-helper bullet in
.agents/CODING_STANDARDS.mdtold agents to runshallowand re-inline single-callerSAFE_INLINEhelpers, so agents treatedthose findings as a gate.
Change
shallow/file_splitfindings are advisory review prompts. Never run--fail-on-safe-inlineas a gate. Re-inline only true pass-throughs with nosame-shape siblings and no meaningful name or doc comment.
// cognitive_complexity:ignorewith a reason comment.dart-cognitive-complexityskill.Evidence
Blind reviews of four dogfood PRs found the CC > 15 fixes were improvements,
while
SAFE_INLINEre-inlining was mostly a regression. It deleted well-namedhelpers with same-shape siblings and made callers longer.
Splitting a hot loop to meet CC <= 15 cost 39-66% performance; fixed with an
ignore comment in kevmoo/qr.dart#175.