Public report of affaan-m/ECC, published 24 October 2026. It has the same score, grades and number of findings as the full report. The details of security findings (where they are in the code, which known vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive report Measured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.10.5). Watchdog signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey → Signed and filed in the standard's public register, 24 October 2026, 10:35 UTC · Survey ID cd_5d0562833131477b91176e19bbb48bfb

affaan-m/ECC

Measured 24 October 2026, 10:25 UTC, at code version 90606c8

Regression: 1 dimension fell since the last survey Knowledge freshness: not measured

A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.

Knowledge freshness is not measured: Freshness signal contradicted by repo activity.

CAI score 52out of 100 Adequate
CriticalWeakAdequateStrongExemplary
No change since the last survey

The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.

A large codebase: 176,895 lines of product code in 28 projects, tests not counted · Estimated rebuild effort: about 2.3 person-years · Weakest lens: Code Health, 42

Findings by how serious they are

26 critical 1672 serious 188 minor

10 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.

This survey was produced by

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
24 October 2026, 10:25 UTC

A measurement, not a certificate. The Code Assurance Index records a number together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee the code. The standard was written by Canine Development, which also builds Watchdog. It is open to any tool that implements it, and today Watchdog is the only one that does.

The score is deterministic, which means the same code always gets the same score. Watchdog works it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸

82of 87 dimensions measured by tools. The other 5 are advisory notes from an AI model, which explain the code but don't count towards the score.
1865of 1886 findings point to an exact file and line, so you can open each one in the code. The other 21 concern the repository as a whole, such as missing documentation.
87dimensions across 8 lenses, read from 176,895 lines of product code in 28 projects.
Chapters

Executive summary

affaan-m/ECC scores 52 out of 100 and is rated Adequate, while seven of its eight lenses score higher still: Event Sourcing at 100 and Architecture at 92, both rated Exemplary, Maturity at 85 and Accessibility at 74, both rated Strong, and Security and Compliance at 68, Performance at 60 and Production Readiness at 53, all rated Adequate.

The score is lower than those seven because the weakest lens counts most, and here that is Code Health, which scores 42 and is rated Weak. Its Type Safety dimension scores 0 out of 10, and until that reaches 4, Code Health can't be rated higher than Adequate. The first actions are to resolve the 2 Leaked secret finding(s) in Secret Scanning and to migrate the remaining .js/.jsx files to TypeScript, and if Code Health rose to 70, the score would rise from 52 to about 61.

26 findings are critical: 15 in Static Analysis (SAST), four in Dependency Vulnerabilities, three in Secrets (history), two in Secret Scanning, one in Circular Imports and one in IaC & Container Security.

Watchdog couldn't measure 9 dimensions in this code, among them Code Coverage, Navigability and Data Protection, so they are left out of the score. The product code is 176,895 lines, which would take an estimated 2.3 person-years, around €330,000, to rebuild.

A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.

How the score is built: what each lens counts for The lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
Code Health 42 · counts for 45%Production Readiness 53 · counts for 25%Performance 60 · counts for 14%Security and Compliance 68 · counts for 8%Accessibility 74 · counts for 4%Maturity 85 · counts for 2%Architecture 92 · counts for 1%Event Sourcing 100 · counts for 1%

If Code Health rose from 42 to 70, the lowest score rated Strong, the score would rise from 52 to about 61.

Code composition: what the lines of code are
Product code 52%Tests 48%
New since the last survey: 389 findings

These 389 critical or serious findings weren't in the previous survey, on 10 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.

  • Cyclomatic Complexity · run-intent.parseArgs (cyclomatic 41) docker/gateguard-effectiveness/run-intent.js
  • Cyclomatic Complexity · shadow-trail.transition (cyclomatic 41) scripts/lib/agent-proximity/shadow-trail.js
  • Cyclomatic Complexity · run-intent.main (cyclomatic 40) docker/gateguard-effectiveness/run-intent.js
  • Cyclomatic Complexity · gateguard-turn-scan.scanCurrentTurn (cyclomatic 39) scripts/lib/gateguard-turn-scan.js
  • Cyclomatic Complexity · run.parseArgs (cyclomatic 29) docker/gateguard-effectiveness/run.js
  • Cyclomatic Complexity · qwen-adapt-agents.adaptFrontmatter (cyclomatic 29) scripts/qwen-adapt-agents.js
  • Cyclomatic Complexity · gateguard-search-filters.applyShellFilterArg (cyclomatic 29) scripts/lib/gateguard-search-filters.js
  • Cyclomatic Complexity · context-selection.citationFor (cyclomatic 29) scripts/lib/context-selection.js
  • Cyclomatic Complexity · statusline-render.readInstalledPlugins (cyclomatic 29) scripts/lib/statusline-render.js
  • Cyclomatic Complexity · validate-carrier-closure.extractReferences (cyclomatic 27) scripts/ci/validate-carrier-closure.js
  • Cyclomatic Complexity · context-routing-index.readRoutingIndex (cyclomatic 27) scripts/lib/context-routing-index.js
  • Cyclomatic Complexity · lib.parseStream (cyclomatic 26) docker/gateguard-effectiveness/lib.js
  • Cyclomatic Complexity · run.main (cyclomatic 26) docker/gateguard-effectiveness/run.js
  • Cyclomatic Complexity · astra-review.parseArgs (cyclomatic 26) scripts/astra-review.js
  • Cyclomatic Complexity · agent-convert.main (cyclomatic 24) scripts/agent-convert.js
  • Cyclomatic Complexity · gateguard-search-filters.wildcardMatch (cyclomatic 24) scripts/lib/gateguard-search-filters.js
  • Cyclomatic Complexity · shadow-trail.normalizePayload (cyclomatic 24) scripts/lib/agent-proximity/shadow-trail.js
  • Cyclomatic Complexity · check-evidence.checkEvidence (cyclomatic 23) skills/frontend-design-direction/scripts/check-evidence.js
  • Cyclomatic Complexity · gateguard-eval.validateStep (cyclomatic 22) scripts/dev/gateguard-eval.js
  • Cyclomatic Complexity · gateguard-change-profile.words (cyclomatic 22) scripts/lib/gateguard-change-profile.js
  • Cyclomatic Complexity · gateguard-search-evidence.createSearchEvidence.shellSearchEvidence (cyclomatic 21) scripts/lib/gateguard-search-evidence.js
  • Cyclomatic Complexity · gateguard-search-evidence.createSearchEvidence.findClosestMiss (cyclomatic 21) scripts/lib/gateguard-search-evidence.js
  • Cyclomatic Complexity · intent-eval.loadIntentScenarios (cyclomatic 20) docker/gateguard-effectiveness/intent-eval.js
  • Cyclomatic Complexity · gateguard-eval.summarize (cyclomatic 20) scripts/dev/gateguard-eval.js
  • Cyclomatic Complexity · gateguard-file-context.csharpStringEnd (cyclomatic 20) scripts/lib/gateguard-file-context.js
  • Cyclomatic Complexity · gateguard-file-context.shSubstitutionEnd (cyclomatic 20) scripts/lib/gateguard-file-context.js
  • Cyclomatic Complexity · powershell-destructive-command.splitStaticArrayItems (cyclomatic 19) REDACTED
  • Cyclomatic Complexity · gateguard-file-context.pythonStringEnd (cyclomatic 19) scripts/lib/gateguard-file-context.js
  • Cyclomatic Complexity · gateguard-change-profile.shellRedirectsFile (cyclomatic 19) scripts/lib/gateguard-change-profile.js
  • Cyclomatic Complexity · OllamaProvider.generate (cyclomatic 18) REDACTED
  • Cyclomatic Complexity · context-profile-interactive.startInteractiveProfile (cyclomatic 18) scripts/lib/context-profile-interactive.js
  • Cyclomatic Complexity · session.runConversation (cyclomatic 18) docker/gateguard-effectiveness/session.js
  • Cyclomatic Complexity · scope.defaultRunGit (cyclomatic 18) scripts/lib/astra-review/scope.js
  • Cyclomatic Complexity · gateguard-eval.prepareScenario (cyclomatic 18) scripts/dev/gateguard-eval.js
  • Cyclomatic Complexity · block-no-verify.skipSedAddress (cyclomatic 18) scripts/hooks/block-no-verify.js
  • Cyclomatic Complexity · block-no-verify.sedScriptParts (cyclomatic 18) scripts/hooks/block-no-verify.js
  • Cyclomatic Complexity · powershell-destructive-command.consumeInertChar (cyclomatic 18) REDACTED
  • Cyclomatic Complexity · gateguard-file-context.stepJs (cyclomatic 18) scripts/lib/gateguard-file-context.js
  • Cyclomatic Complexity · cost-tracker.sumUsageFromTranscript (cyclomatic 18) scripts/hooks/cost-tracker.js
  • Cyclomatic Complexity · statusline-render.buildSessionLine (cyclomatic 18) scripts/lib/statusline-render.js
  • Cyclomatic Complexity · astra-review.runCli (cyclomatic 17) scripts/astra-review.js
  • Cyclomatic Complexity · gateguard-metrics.isMetricsEvent (cyclomatic 17) scripts/lib/gateguard-metrics.js
  • Cyclomatic Complexity · block-no-verify.sedExecParts (cyclomatic 17) scripts/hooks/block-no-verify.js
  • Cyclomatic Complexity · shell-substitution.readBraceBody (cyclomatic 17) scripts/lib/shell-substitution.js
  • Cyclomatic Complexity · gateguard-target-class.classifyTarget (cyclomatic 17) scripts/lib/gateguard-target-class.js
  • Cyclomatic Complexity · gateguard-code-lexer.normalizeCodeLine (cyclomatic 17) REDACTED
  • Cyclomatic Complexity · gateguard-code-lexer.shDoubleQuoteEnd (cyclomatic 17) REDACTED
  • Cyclomatic Complexity · gateguard-file-context.psStartsFresh (cyclomatic 17) scripts/lib/gateguard-file-context.js
  • Cyclomatic Complexity · gateguard-search-filters.applyLongFilter (cyclomatic 17) scripts/lib/gateguard-search-filters.js
  • Cyclomatic Complexity · gateguard-search-evidence.parseSearchArgs (cyclomatic 17) scripts/lib/gateguard-search-evidence.js
  • Cyclomatic Complexity · gateguard-search-evidence.createSearchEvidence.findCreditingSearch (cyclomatic 17) scripts/lib/gateguard-search-evidence.js
  • Cyclomatic Complexity · gateguard-search-evidence.createSearchEvidence.itemMiss (cyclomatic 17) scripts/lib/gateguard-search-evidence.js
  • Cyclomatic Complexity · instinct-cli.parse_instinct_file (cyclomatic 16) skills/continuous-learning-v2/scripts/instinct-cli.py
  • Cyclomatic Complexity · context-profile-native.response (cyclomatic 16) REDACTED
  • Cyclomatic Complexity · context-profile-native.prepareNativeProfile (cyclomatic 16) REDACTED
  • Cyclomatic Complexity · evidence.verifyManifest (cyclomatic 16) docker/gateguard-effectiveness/evidence.js
  • Cyclomatic Complexity · opencode-script-boundary.assertScriptBoundary (cyclomatic 16) scripts/lib/install/opencode-script-boundary.js
  • Cyclomatic Complexity · shell-scan.scanOperator (cyclomatic 16) scripts/hooks/lib/shell-scan.js
  • Cyclomatic Complexity · gateguard-file-context.pythonFieldStep (cyclomatic 16) scripts/lib/gateguard-file-context.js
  • Cyclomatic Complexity · gateguard-file-context.shStartsFresh (cyclomatic 16) scripts/lib/gateguard-file-context.js
  • Cyclomatic Complexity · gateguard-file-context.trivialInFile (cyclomatic 16) scripts/lib/gateguard-file-context.js
  • Cyclomatic Complexity · gateguard-search-filters.findSearchFilters (cyclomatic 16) scripts/lib/gateguard-search-filters.js
  • Cyclomatic Complexity · gateguard-search-evidence.flagEffect (cyclomatic 16) scripts/lib/gateguard-search-evidence.js
  • Cyclomatic Complexity · plugin-hook-bootstrap.main (cyclomatic 16) scripts/hooks/plugin-hook-bootstrap.js
  • Cyclomatic Complexity · ledger.requireHardlinks (cyclomatic 16) REDACTED
  • Cyclomatic Complexity · ledger.replaceTable (cyclomatic 16) REDACTED
  • Cyclomatic Complexity · ledger.main (cyclomatic 16) REDACTED
  • Cognitive Complexity · gateguard-turn-scan.scanCurrentTurn (cognitive 61) scripts/lib/gateguard-turn-scan.js
  • Cognitive Complexity · main (cognitive 48) docker/gateguard-effectiveness/run-intent.js
  • Cognitive Complexity · agent-convert.main (cognitive 46) scripts/agent-convert.js
  • Cognitive Complexity · qwen-adapt-agents.adaptFrontmatter (cognitive 45) scripts/qwen-adapt-agents.js
  • Cognitive Complexity · gateguard-search-filters.applyShellFilterArg (cognitive 43) scripts/lib/gateguard-search-filters.js
  • Cognitive Complexity · lib.parseStream (cognitive 41) docker/gateguard-effectiveness/lib.js
  • Cognitive Complexity · block-no-verify.sedScriptParts (cognitive 40) scripts/hooks/block-no-verify.js
  • Cognitive Complexity · run-intent.parseArgs (cognitive 39) docker/gateguard-effectiveness/run-intent.js
  • Cognitive Complexity · gateguard-eval.summarize (cognitive 36) scripts/dev/gateguard-eval.js
  • Cognitive Complexity · shadow-trail.transition (cognitive 36) scripts/lib/agent-proximity/shadow-trail.js
  • Cognitive Complexity · main (cognitive 35) docker/gateguard-effectiveness/run.js
  • Cognitive Complexity · gateguard-file-context.csharpStringEnd (cognitive 34) scripts/lib/gateguard-file-context.js
  • Cognitive Complexity · run.parseArgs (cognitive 32) docker/gateguard-effectiveness/run.js
  • Cognitive Complexity · astra-review.parseArgs (cognitive 32) scripts/astra-review.js
  • Cognitive Complexity · context-selection.citationFor (cognitive 30) scripts/lib/context-selection.js
  • Cognitive Complexity · gateguard-readonly-shell.passesCharacterScreen (cognitive 29) scripts/lib/gateguard-readonly-shell.js
  • Cognitive Complexity · gateguard-code-lexer.normalizeCodeLine (cognitive 27) REDACTED
  • Cognitive Complexity · gateguard-file-context.pythonStringEnd (cognitive 27) scripts/lib/gateguard-file-context.js
  • Cognitive Complexity · dashboard.renderDashboard (cognitive 27) scripts/lib/skill-evolution/dashboard.js
  • Cognitive Complexity · gateguard-code-lexer.shDoubleQuoteEnd (cognitive 26) REDACTED
  • Cognitive Complexity · gateguard-change-profile.shellRedirectsFile (cognitive 26) scripts/lib/gateguard-change-profile.js
  • Cognitive Complexity · statusline-render.readInstalledPlugins (cognitive 26) scripts/lib/statusline-render.js
  • Cognitive Complexity · powershell-destructive-command.consumeInertChar (cognitive 25) REDACTED
  • Cognitive Complexity · gateguard-search-filters.wildcardMatch (cognitive 25) scripts/lib/gateguard-search-filters.js
  • Cognitive Complexity · gateguard-search-filters.findSearchFilters (cognitive 25) scripts/lib/gateguard-search-filters.js
  • Cognitive Complexity · gateguard-search-evidence.parseSearchArgs (cognitive 25) scripts/lib/gateguard-search-evidence.js
  • Cognitive Complexity · ledger.recover (cognitive 25) REDACTED
  • Cognitive Complexity · generate-hooks-config.generateConfig (cognitive 24) scripts/dsh/generate-hooks-config.js
  • Cognitive Complexity · proximity.decodeGitPath (cognitive 23) scripts/lib/control-pane/proximity.js
  • Cognitive Complexity · gateguard-eval.prepareScenario (cognitive 23) scripts/dev/gateguard-eval.js
  • Cognitive Complexity · block-no-verify.skipSedAddress::one (cognitive 23) scripts/hooks/block-no-verify.js
  • Cognitive Complexity · shell-substitution.readBraceBody (cognitive 23) scripts/lib/shell-substitution.js
  • Cognitive Complexity · gateguard-file-context.shSubstitutionEnd (cognitive 23) scripts/lib/gateguard-file-context.js

Watchdog compares every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.

Fixed since the last survey: 483 findings

These 483 critical or serious findings were in the previous survey, on 10 October 2026, and are gone from this one. The first 100 are listed here.

  • Cyclomatic Complexity · shell-substitution.extractBraceGroups (cyclomatic 115) scripts/lib/shell-substitution.js
  • Cyclomatic Complexity · powershell-destructive-command.extractExecutableContainers (cyclomatic 94) REDACTED
  • Cyclomatic Complexity · operator-readiness-dashboard.buildRequirements (cyclomatic 87) scripts/operator-readiness-dashboard.js
  • Cyclomatic Complexity · gateguard-fact-force.isDestructiveGit (cyclomatic 61) scripts/hooks/gateguard-fact-force.js
  • Cyclomatic Complexity · validate-hooks.validateHooks (cyclomatic 55) scripts/ci/validate-hooks.js
  • Cyclomatic Complexity · powershell-destructive-command.normalizeHereStrings (cyclomatic 54) REDACTED
  • Cyclomatic Complexity · shell-substitution.extractSubshellGroups (cyclomatic 52) scripts/lib/shell-substitution.js
  • Cyclomatic Complexity · powershell-destructive-command.parseStatements (cyclomatic 50) REDACTED
  • Cyclomatic Complexity · powershell-destructive-command.scanPowerShell (cyclomatic 50) REDACTED
  • Cyclomatic Complexity · ai-eval-lib.runEvaluation (cyclomatic 49) docker/context-profiles/ai-eval-lib.js
  • Cyclomatic Complexity · install-lifecycle.repairInstalledStates.results::performRepair (cyclomatic 46) scripts/lib/install-lifecycle.js
  • Cyclomatic Complexity · powershell-destructive-command.scanStartProcess (cyclomatic 46) REDACTED
  • Cyclomatic Complexity · gateguard-fact-force.run (cyclomatic 44) scripts/hooks/gateguard-fact-force.js
  • Cyclomatic Complexity · session-end.extractSessionSummary (cyclomatic 38) scripts/hooks/session-end.js
  • Cyclomatic Complexity · session-end.main (cyclomatic 37) scripts/hooks/session-end.js
  • Cyclomatic Complexity · ai-eval-lib.validateComplexCorpus (cyclomatic 36) docker/context-profiles/ai-eval-lib.js
  • Cyclomatic Complexity · powershell-destructive-command.scanNestedPowerShell (cyclomatic 33) REDACTED
  • Cyclomatic Complexity · install-lifecycle.inspectManagedOperation (cyclomatic 32) scripts/lib/install-lifecycle.js
  • Cyclomatic Complexity · gateguard-fact-force.isReadOnlyGitIntrospection (cyclomatic 30) scripts/hooks/gateguard-fact-force.js
  • Cyclomatic Complexity · nasiko-release.extractQualifiedTarGzip (cyclomatic 30) scripts/lib/nasiko-release.js
  • Cyclomatic Complexity · operator-readiness-dashboard.parseArgs (cyclomatic 30) scripts/operator-readiness-dashboard.js
  • Cyclomatic Complexity · install-lifecycle.analyzeRecord (cyclomatic 29) scripts/lib/install-lifecycle.js
  • Cyclomatic Complexity · validate-hooks.validateHookEntry (cyclomatic 29) scripts/ci/validate-hooks.js
  • Cyclomatic Complexity · block-no-verify.shellRole (cyclomatic 29) scripts/hooks/block-no-verify.js
  • Cyclomatic Complexity · powershell-destructive-command.scanCmdWords (cyclomatic 29) REDACTED
  • Cyclomatic Complexity · gateguard-fact-force.ddLauncherCommandIndex (cyclomatic 29) scripts/hooks/gateguard-fact-force.js
  • Cyclomatic Complexity · operator-readiness-dashboard.eccToolsNextLevelGap (cyclomatic 29) scripts/operator-readiness-dashboard.js
  • Cyclomatic Complexity · install-lifecycle.executeUninstallOperation (cyclomatic 28) scripts/lib/install-lifecycle.js
  • Cyclomatic Complexity · powershell-destructive-command.readBalancedGroup (cyclomatic 28) REDACTED
  • Cyclomatic Complexity · powershell-destructive-command.stripPowerShellComments (cyclomatic 27) REDACTED
  • Cyclomatic Complexity · operator-readiness-dashboard.eccToolsNextLevelEvidence (cyclomatic 27) scripts/operator-readiness-dashboard.js
  • Cyclomatic Complexity · ai-eval-lib.outcomeTrial (cyclomatic 26) docker/context-profiles/ai-eval-lib.js
  • Cyclomatic Complexity · gateguard-fact-force.isDestructiveFindExec (cyclomatic 26) scripts/hooks/gateguard-fact-force.js
  • Cyclomatic Complexity · shell-scan.heredocDelimiter (cyclomatic 25) scripts/hooks/lib/shell-scan.js
  • Cyclomatic Complexity · powershell-destructive-command.staticStringArrayResult (cyclomatic 24) REDACTED
  • Cyclomatic Complexity · nasiko-release.uninstallNasiko (cyclomatic 24) scripts/lib/nasiko-release.js
  • Cyclomatic Complexity · (anonymous) (cyclomatic 23) docker/context-profiles/complex-eval/cases3/chained-tickets/steps/04-analytics/check.cjs
  • Cyclomatic Complexity · (anonymous) (cyclomatic 23) docker/context-profiles/complex-eval/cases4/chained-tickets/steps/04-analytics/check.cjs
  • Cyclomatic Complexity · (anonymous) (cyclomatic 23) .cursor/hooks/before-shell-execution.js
  • Cyclomatic Complexity · block-no-verify.checkGitWords (cyclomatic 22) scripts/hooks/block-no-verify.js
  • Cyclomatic Complexity · nasiko-release.installNasiko (cyclomatic 22) scripts/lib/nasiko-release.js
  • Cyclomatic Complexity · (anonymous) (cyclomatic 22) REDACTED
  • Cyclomatic Complexity · (anonymous) (cyclomatic 22) REDACTED
  • Cyclomatic Complexity · ai-eval-lib.executeAdapter (cyclomatic 19) docker/context-profiles/ai-eval-lib.js
  • Cyclomatic Complexity · install-lifecycle.executeRepairOperation (cyclomatic 17) scripts/lib/install-lifecycle.js
  • Cognitive Complexity · shell-substitution.extractBraceGroups (cognitive 233) scripts/lib/shell-substitution.js
  • Cognitive Complexity · block-no-verify.checkCommand (cognitive 144) scripts/hooks/block-no-verify.js
  • Cognitive Complexity · powershell-destructive-command.extractExecutableContainers (cognitive 126) REDACTED
  • Cognitive Complexity · block-no-verify.executableWords (cognitive 109) scripts/hooks/block-no-verify.js
  • Cognitive Complexity · powershell-destructive-command.scanPowerShell (cognitive 107) REDACTED
  • Cognitive Complexity · validate-hooks.validateHooks (cognitive 100) scripts/ci/validate-hooks.js
  • Cognitive Complexity · powershell-destructive-command.parseStatements (cognitive 95) REDACTED
  • Cognitive Complexity · shell-substitution.extractSubshellGroups (cognitive 93) scripts/lib/shell-substitution.js
  • Cognitive Complexity · gateguard-fact-force.isDestructiveGit (cognitive 90) scripts/hooks/gateguard-fact-force.js
  • Cognitive Complexity · operator-readiness-dashboard.buildRequirements (cognitive 84) scripts/operator-readiness-dashboard.js
  • Cognitive Complexity · gateguard-fact-force.run (cognitive 81) scripts/hooks/gateguard-fact-force.js
  • Cognitive Complexity · powershell-destructive-command.scanStartProcess (cognitive 74) REDACTED
  • Cognitive Complexity · powershell-destructive-command.scanNestedPowerShell (cognitive 68) REDACTED
  • Cognitive Complexity · session-end.extractSessionSummary (cognitive 61) scripts/hooks/session-end.js
  • Cognitive Complexity · install-lifecycle.repairInstalledStates.results::performRepair (cognitive 59) scripts/lib/install-lifecycle.js
  • Cognitive Complexity · session-end.main (cognitive 59) scripts/hooks/session-end.js
  • Cognitive Complexity · install-lifecycle.executeUninstallOperation (cognitive 53) scripts/lib/install-lifecycle.js
  • Cognitive Complexity · powershell-destructive-command.readBalancedGroup (cognitive 50) REDACTED
  • Cognitive Complexity · powershell-destructive-command.stripPowerShellComments (cognitive 47) REDACTED
  • Cognitive Complexity · runEvaluation (cognitive 47) docker/context-profiles/ai-eval-lib.js
  • Cognitive Complexity · install-lifecycle.inspectManagedOperation (cognitive 44) scripts/lib/install-lifecycle.js
  • Cognitive Complexity · shell-scan.heredocDelimiter (cognitive 42) scripts/hooks/lib/shell-scan.js
  • Cognitive Complexity · powershell-destructive-command.scanCmdWords (cognitive 42) REDACTED
  • Cognitive Complexity · ai-eval-lib.outcomeTrial (cognitive 40) docker/context-profiles/ai-eval-lib.js
  • Cognitive Complexity · validateComplexCorpus (cognitive 38) docker/context-profiles/ai-eval-lib.js
  • Cognitive Complexity · validate-hooks.validateHookEntry (cognitive 36) scripts/ci/validate-hooks.js
  • Cognitive Complexity · install-lifecycle.analyzeRecord (cognitive 35) scripts/lib/install-lifecycle.js
  • Cognitive Complexity · gateguard-fact-force.isReadOnlyGitIntrospection (cognitive 35) scripts/hooks/gateguard-fact-force.js
  • Cognitive Complexity · block-no-verify.checkGitWords (cognitive 33) scripts/hooks/block-no-verify.js
  • Cognitive Complexity · gateguard-fact-force.isDestructiveFindExec (cognitive 33) scripts/hooks/gateguard-fact-force.js
  • Cognitive Complexity · nasiko-release.extractQualifiedTarGzip (cognitive 27) scripts/lib/nasiko-release.js
  • Cognitive Complexity · (anonymous) (cognitive 26) docker/context-profiles/complex-eval/cases3/chained-tickets/steps/04-analytics/check.cjs
  • Cognitive Complexity · (anonymous) (cognitive 26) docker/context-profiles/complex-eval/cases4/chained-tickets/steps/04-analytics/check.cjs
  • Cognitive Complexity · install-lifecycle.executeRepairOperation (cognitive 25) scripts/lib/install-lifecycle.js
  • Cognitive Complexity · powershell-destructive-command.staticStringArrayResult (cognitive 25) REDACTED
  • Cognitive Complexity · nasiko-release.uninstallNasiko (cognitive 25) scripts/lib/nasiko-release.js
  • Cognitive Complexity · nasiko-release.installNasiko (cognitive 24) scripts/lib/nasiko-release.js
  • Cognitive Complexity · (anonymous) (cognitive 24) REDACTED
  • Cognitive Complexity · (anonymous) (cognitive 24) REDACTED
  • Cognitive Complexity · powershell-destructive-command.extractExecutableContainers::appendContext (cognitive 23) REDACTED
  • Cognitive Complexity · (anonymous) (cognitive 23) .cursor/hooks/before-shell-execution.js
  • Cognitive Complexity · operator-readiness-dashboard.eccToolsNextLevelGap (cognitive 22) scripts/operator-readiness-dashboard.js
  • Cognitive Complexity · operator-readiness-dashboard.eccToolsNextLevelEvidence (cognitive 20) scripts/operator-readiness-dashboard.js
  • Cognitive Complexity · executeAdapter (cognitive 19) docker/context-profiles/ai-eval-lib.js
  • Cognitive Complexity · atomic-write.writeFileAtomic (cognitive 16) scripts/lib/atomic-write.js
  • God Classes · FunctionTooLong: install-lifecycle.repairInstalledStates scripts/lib/install-lifecycle.js
  • God Classes · FunctionTooLong: install-lifecycle.repairInstalledStates.results scripts/lib/install-lifecycle.js
  • God Classes · FunctionTooLong: shell-substitution.extractBraceGroups scripts/lib/shell-substitution.js
  • God Classes · FunctionTooLong: install-lifecycle.inspectManagedOperation scripts/lib/install-lifecycle.js
  • God Classes · FunctionTooLong: install-lifecycle.executeUninstallOperation scripts/lib/install-lifecycle.js
  • God Classes · FunctionTooLong: validate-hooks.validateHooks scripts/ci/validate-hooks.js
  • God Classes · FunctionTooLong: install-lifecycle.analyzeRecord scripts/lib/install-lifecycle.js
  • Code Duplication · Edited copy of a member (35 corresponding lines) skills/taste-application/scripts/taste/grade.py
  • Code Duplication · Edited copy of a member (111 corresponding lines) skills/taste-application/scripts/taste/timeline.py
  • Code Duplication · Edited copy of a member (14 corresponding lines) skills/taste-application/scripts/mint.py
Rebuild cost: about €330,000 · Estimate
Cost to rebuild€110,000 to €550,000, for 1,814 to 5,755 hours of work, about 2.3 person-years for 1 to 5 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.7 at a score of 52. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeLarge: 176,895 lines of product code

How the estimate is made: Watchdog prices the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.

Top priorities

The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.

1
Resolve the 2 Leaked secret finding(s) in Secret Scanning — start with REDACTED, REDACTED.
Raises the score by about 4 points · Low effort · Secret Scanning
2
Migrate the remaining .js/.jsx files to TypeScript.
Raises the score by about 6 points · Medium effort · Type Safety
3
Interpolated log message defeats structured logging
Raises the score by about 3 points · Medium effort · Structured logging

Diagnosis: what the measurements show together

Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.

Where the investment is most exposed · Value at risk
This code would cost about €330,000 to build again, about 2.3 person-years of work. Its weakest lens is Code Health, at 42 (Weak). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first · First action
Resolve the 2 Leaked secret finding(s) in Secret Scanning. Of all the actions in this report, it raises the score most for the work it takes: about 4 points for low effort, because it clears the 2 Secret Scanning findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 5.9 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 5% to 12% on every change. The history of the code shows how much it changes: about 338,433 lines over the last 90 days, which is about 1,372,534 lines a year. At that pace, the extra work comes to an estimated 181.4 to 1088.4 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of Watchdog's own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture: which parts of the code depend on which

The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.

259 modules, with 83 dependencies between them. One loop runs through 6 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 219 more are left out to keep it readable.

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 .agents.skills.docs-governance.scripts.audit-docs2 ecc_tui.harness_eval3 ecc_tui.notifications4 ecc_tui.session.output5 integrations.aura6 skills.skill-comply.scripts.scenario_generator7 skills.taste-application.scripts.taste.cadence8 skills.taste-application.scripts.taste.grade9 skills.taste-application.scripts.taste.pack10 skills.taste-distillation.scripts.taste.cadence11 skills.taste-distillation.scripts.taste.grade12 skills.taste-distillation.scripts.taste.pack13 src.llm.core.types14 .agents.skills.docs-governance.scripts15 ecc_tui.config16 ecc_tui.session.store17 skills.skill-comply.scripts.runner18 skills.taste-application.scripts19 skills.taste-application.scripts.taste20 skills.taste-distillation.scripts21 skills.taste-distillation.scripts.taste22 src.llm.core.interface23 ecc_tui.comms24 ecc_tui.observability25 ecc_tui.session.daemon26 ecc_tui.tui.app27 ecc_tui.tui.widgets28 skills.skill-comply.scripts29 src.llm.providers30 src.llm.providers.astraflow31 src.llm.providers.atlas32 src.llm.providers.claude33 src.llm.providers.ollama34 src.llm.providers.openai35 ecc_tui.session36 ecc_tui.session.runtime37 ecc_tui.worktree38 ecc_tui.session.manager39 ecc_tui40 ecc_tui.tui.dashboard
1 .agents.skills.docs-governance.scripts.audit-docs
2 ecc_tui.harness_eval
3 ecc_tui.notifications
4 ecc_tui.session.output
5 integrations.aura
6 skills.skill-comply.scripts.scenario_generator
7 skills.taste-application.scripts.taste.cadence
8 skills.taste-application.scripts.taste.grade
9 skills.taste-application.scripts.taste.pack
10 skills.taste-distillation.scripts.taste.cadence
11 skills.taste-distillation.scripts.taste.grade
12 skills.taste-distillation.scripts.taste.pack
13 src.llm.core.types
14 .agents.skills.docs-governance.scripts1
15 ecc_tui.config3
16 ecc_tui.session.store32218
17 skills.skill-comply.scripts.runner1
18 skills.taste-application.scripts213
19 skills.taste-application.scripts.taste111
20 skills.taste-distillation.scripts112
21 skills.taste-distillation.scripts.taste111
22 src.llm.core.interface3
23 ecc_tui.comms11
24 ecc_tui.observability22
25 ecc_tui.session.daemon12
26 ecc_tui.tui.app11
27 ecc_tui.tui.widgets3
28 skills.skill-comply.scripts11
29 src.llm.providers31
30 src.llm.providers.astraflow31
31 src.llm.providers.atlas21
32 src.llm.providers.claude21
33 src.llm.providers.ollama21
34 src.llm.providers.openai21
35 ecc_tui.session111
36 ecc_tui.session.runtime31
37 ecc_tui.worktree11
38 ecc_tui.session.manager432141
39 ecc_tui81129
40 ecc_tui.tui.dashboard3346221365
Uses a module listed above itPart of a loopThe module itself
1 .agents.skills.docs-governance.scripts.audit-docs2 ecc_tui.harness_eval3 ecc_tui.notifications4 ecc_tui.session.output5 integrations.aura6 skills.skill-comply.scripts.scenario_generator7 skills.taste-application.scripts.taste.cadence8 skills.taste-application.scripts.taste.grade9 skills.taste-application.scripts.taste.pack10 skills.taste-distillation.scripts.taste.cadence11 skills.taste-distillation.scripts.taste.grade12 skills.taste-distillation.scripts.taste.pack13 src.llm.core.types14 .agents.skills.docs-governance.scripts15 ecc_tui.config16 ecc_tui.session.store17 skills.skill-comply.scripts.runner18 skills.taste-application.scripts19 skills.taste-application.scripts.taste20 skills.taste-distillation.scripts21 skills.taste-distillation.scripts.taste22 src.llm.core.interface23 ecc_tui.comms24 ecc_tui.observability25 ecc_tui.session.daemon26 ecc_tui.tui.app27 ecc_tui.tui.widgets28 skills.skill-comply.scripts29 src.llm.providers30 src.llm.providers.astraflow31 src.llm.providers.atlas32 src.llm.providers.claude33 src.llm.providers.ollama34 src.llm.providers.openai35 ecc_tui.session36 ecc_tui.session.runtime37 ecc_tui.worktree38 ecc_tui.session.manager39 ecc_tui40 ecc_tui.tui.dashboard.agents.skills.docs-governance.scripts.audit-docs1ecc_tui.harness_eval2ecc_tui.notifications3ecc_tui.session.output4integrations.aura5skills.skill-comply.scripts.scenario_generator6skills.taste-application.scripts.taste.cadence7skills.taste-application.scripts.taste.grade8skills.taste-application.scripts.taste.pack9skills.taste-distillation.scripts.taste.cadence10skills.taste-distillation.scripts.taste.grade11skills.taste-distillation.scripts.taste.pack12src.llm.core.types13.agents.skills.docs-governance.scripts14ecc_tui.config15ecc_tui.session.store16skills.skill-comply.scripts.runner17skills.taste-application.scripts18skills.taste-application.scripts.taste19skills.taste-distillation.scripts20skills.taste-distillation.scripts.taste21src.llm.core.interface22ecc_tui.comms23ecc_tui.observability24ecc_tui.session.daemon25ecc_tui.tui.app26ecc_tui.tui.widgets27skills.skill-comply.scripts28src.llm.providers29src.llm.providers.astraflow30src.llm.providers.atlas31src.llm.providers.claude32src.llm.providers.ollama33src.llm.providers.openai34ecc_tui.session35ecc_tui.session.runtime36ecc_tui.worktree37ecc_tui.session.manager38ecc_tui39ecc_tui.tui.dashboard40133221812131111121113112212113113131212121211113111432141811293346221365+219 more modules (most-connected shown)

At a glance — Code Health · 42% · Weak · gated by D1, D2, R1, X4 ·

At a glance — Architecture · 92% · Exemplary ·

At a glance — Maturity · 85% · Strong ·

At a glance — Readiness · 53% · Adequate · gated by D13, P3, P7 ·

At a glance — Security · 68% · Adequate · gated by D29 ·

At a glance — Event Sourcing · 100% · Exemplary ·

At a glance — Accessibility · 74% · Strong ·

At a glance — Performance · 60% · Adequate ·

Security & Compliance — OWASP Top-10 mapping

Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).

OWASP categoryFindingsSeverity
A05:2025 — Injection76High / Critical
A03:2025 — Software Supply Chain Failures13High / Critical
A07:2025 — Authentication Failures6High / Critical
A02:2025 — Security Misconfiguration3High / Critical

Roadmap

First, migrate the remaining JavaScript files to TypeScript to establish type safety and resolve the two leaked secrets found in the codebase. Next, address the widespread use of synchronous APIs by converting them to asynchronous equivalents and replace interpolated log messages with structured logging to improve observability. Finally, integrate a static analysis security testing step into the CI pipeline to automatically block security regressions before they are merged.

Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.

Do thisHelpsEffortDimension
Resolve the 2 Leaked secret finding(s) in Secret Scanning — start with REDACTED, REDACTED.+4.0 ptsLowSecret Scanning
Migrate the remaining .js/.jsx files to TypeScript.+6.0 ptsMediumType Safety
Interpolated log message defeats structured logging+2.7 ptsMediumStructured logging
TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.+2.2 ptsMediumAsync & latency hygiene
Add a SAST step to CI running what this repository's stack ships: cargo-audit / cargo-deny (or clippy) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.+1.9 ptsMediumSecurity & performance tooling
Bound every outbound call: pass `signal: AbortSignal.timeout(ms)` to `fetch`, set `timeout` on the axios instance (`axios.create({ timeout })`), and add retries with back-off (`axios-retry`, `p-retry`) and a breaker (`opossum`, `cockatiel`) around dependencies that fail.+1.9 ptsMediumOutbound HTTP resilience
Bring the 19 bodies over 60 down to 60 or less in Cognitive Complexity — start with ecc_tui::main (cognitive 342), Dashboard::selected_session_metrics_text (cognitive 136), contract.validate_artifact_receipt (cognitive 109).+1.8 ptsHighCognitive Complexity
Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.+1.3 ptsMediumCyclomatic Complexity

File quality

Per-file score 0–10 — a quality signature. Of 330 files carrying findings, judged against the Production bar: 2% slop · 77% mixed · 21% near-clean.

FileScoreBandWorst signal
REDACTED0.8SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.1SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.0SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.0SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED3.6SlopStatic Analysis (SAST): High: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.1MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.2MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.3MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.4MixedSecret Scanning: Leaked secret: REDACTED
REDACTED4.6MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.6MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.6MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.9MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.9MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.9MixedStatic Analysis (SAST): Medium: REDACTED

How the grades work

Every finding carries one of four grades. Three say how serious it is. The fourth says this survey could not settle it — and it is a grade, not a gap.

Critical — 26

A definite problem that already costs you something and drags the score down: a missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here tends to cause failures elsewhere.

Serious — 1672

Likely wrong, but not failing yet. It degrades the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to carry for two years either.

Minor — 188

Recorded, with no effect on how the codebase functions. Present so the survey is complete, not because it needs doing.

Could not be resolved — 10

Something this survey could not settle from the outside, and which could be critical or serious. Either a control was required and no positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean result. These are excluded from the score rather than awarded a pass, so the number on the cover neither rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each one is named under Limitations.

Methodology & how to trust this report

Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 82 of 87 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 5 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.

Every figure here is one of three kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact; ◐ Advisory — an LLM prose judgement. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.

What we checked — 87 dimensions across the health lenses
D1D2D3D4D5D6D7D9D10D11D12D13D14D15D16D17D19D20D21D22D26D28D29D30D31D35D36D37D43D44AC2AC6AC7AX10AX3AX4AX9ES1ES2GD1IC1M1M2M3M4P1P10P2P3P4P6P7PF3R1R10R11R2R3R4R5R6R7R8R9X1X12X13X14X15X16X17X18X19X2X21X22X23X24X25X26X27X28X29X3X30X4X5

Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.

How to trust any code-health report — three questions
  1. Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 1865 of 1886 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

This report answers yes to all three. That's the bar to hold any assessment to.

Tools & methods

The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Watchdog duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivy · checkovSecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3 · 3.2.533✓ deterministic
LLM (sampled · advisory)Documentation quality, ADR conformance, naming — sampled over a bounded sample; advisory, never a deterministic measurementLocal LLM◐ LLM · sampled · advisory

Every finding is locatable in findings.md. Run 01a16d71-8969-741a-9ef2-ec39fc580b06.

The exact command behind every deep-scan dimension — tool, version, invocation and retained raw output — is in Appendix B — Reproduction & audit trail.

Run transparency — what happened this run

What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.

  • D8 Code Coverage — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: this repository's production source spans .ts, .tsx, .rs, and our analyzer cannot run the .rs test suite(s) — so no coverage was collected for the repository as a whole. The JavaScript/TypeScript half did build and run, and its own line coverage came back at 81.1% — but that is a figure for one half of the product, and we do not publish a partial one as if it were complete. This is OUR limitation, not a defect in the repo — coverage is excluded from the score rather than counted as a near-zero. In the meantime, produce a coverage report in a standard format (lcov — `c8 --reporter=lcovonly <your existing test command>` (c8 is already a devDependency here), or lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures and real coverage will be read. You can widen what we reach: optional: produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — then both halves are read on the next scan.
  • D10 Test Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 6,650 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 52 test source file(s) (.py, .rs) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
  • D11 Test Reliability — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Test reliability for the node:test suite in docker/context-profiles/complex-eval/cases3/chained-tickets/files/ was NOT MEASURED: the node:test run in docker/context-profiles/complex-eval/cases3/chained-tickets/files/ produced no per-test report (> test). This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
  • D11 Test Reliability — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Test reliability for the node:test suite in docker/context-profiles/complex-eval/cases4/chained-tickets/files/ was NOT MEASURED: the node:test run in docker/context-profiles/complex-eval/cases4/chained-tickets/files/ produced no per-test report (> test). This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
  • D14 License Compliance — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares a Python pyproject.toml/requirements.txt (pip/uv/Poetry), but the licence verdict published here was taken over its crate dependencies. Nothing was read about its Python dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D14 License Compliance — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares package.json, but the licence verdict published here was taken over its crate dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D27 Navigability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
  • D34 Knowledge Freshness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. File-level freshness contradicts repo activity: 1632 commits in the last 90 days, yet 60 of 105 significant files carry no living knowledge. Those two readings cannot both be true, so the per-file recency signal is treated as unreliable here and freshness is not scored for this run.
  • AXR1 Runtime accessibility — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DockerCompose (REDACTED). compose up failed (exit 18 — an image could not be pulled) — fixture-tests Pulling real-cli Pulling real-cli-ubuntu Pulling fixture-tests Error Get "https://registry-1.docker.io/v2/": Forbidden real-cli Warning context canceled real-cli-ubuntu Warning context canceled Error response from daemon: Get "https://registry-1.docker.io/v2/": Forbidden; the earlier `compose pull` step reported: real-cli Warning Get "https://registry-1.docker.io/v2/": Forbidden fixture-tests Error Get "https://registry-1.docker.io/v2/": Forbidden WARNING: Some service image(s) must be built from source by running: docker compose build real-cli-ubuntu real-cli Error response from daemon: Get "https://registry-1.docker.io/v2/": Forbidden; the runtime sandbox reaches registries only through the in-fence pull-through mirror, so an image the mirror does not carry cannot be fetched — this is a limit of our sandbox, not of your stack; runtime evidence skipped.
  • C1 Data Protection — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
  • C2 Access Controls — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
  • C3 Audit Trail — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
  • C4 Data Retention — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
  • C5 Data-Subject Rights — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
  • M4 Documentation accuracy — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 84 further occurrence(s) are not listed individually; the score already reflects all 124.
  • P7 Outbound HTTP resilience — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 19 further occurrence(s) are not listed individually; the score already reflects all 59.
  • PF3 Async & latency hygiene — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 64 further occurrence(s) are not listed individually; the score already reflects all 104.
  • R10 Code Duplication — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 323 further occurrence(s) are not listed individually; the score already reflects all 363.
  • R4 Test Coverage — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 98 further occurrence(s) are not listed individually; the score already reflects all 138.
  • S1 Web-Security Posture — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
  • X3 Exception handling — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 184 further occurrence(s) are not listed individually; the score already reflects all 224.
  • X4 Structured logging — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 58 further occurrence(s) are not listed individually; the score already reflects all 98.
  • X7 Silent fallback defaults — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 28 further occurrence(s) are not listed individually; the score already reflects all 68.

Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.

Limitations & what we did not check

Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.

Per-dimension blind spots

For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D7 Architectural Integrity: Layering is checked against detected/declared rules — an architecture whose boundaries live in convention or in code review, not in a rule a scanner can read, is not enforced here.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D11 Test Reliability: Flakiness is inferred from history/markers — Watchdog runs the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
  • D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
  • D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
  • D22 Internal API Consistency: API-surface coherence is an LLM judgement over a sample of the public surface — consistency of intent across the whole API is approximated, not exhaustively verified.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

The LLM boundary

LLM-set scores this run (5): D19, D20, D21, D22, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.

Dimensions

D1 · Cyclomatic Complexity2.9 / 10Weak✓ Tool-verified

What it measures: How tangled the control flow is — methods with many branches are hard to test and change.

Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.

Maturity: Documented → Verified → Prevented · effective 2.9 / 10 · rule-coverage 100% · ceiling Prevented

356 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was ecc_tui::main at 170. A further 11 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being Dashboard::empty_timeline_message at 24 — they are counted neither in the figure above nor in this dimension's score. 2 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: scripts/ci/check-unicode-safety.js (check-unicode-safety.isDangerousInvisibleCodePoint at 20), scripts/harness-audit.js (harness-audit.getConsumerChecks at 18). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

ecc_tui::main (cyclomatic 170) · ×9ecc2/src/main.rs:1426
Dashboard::selected_session_metrics_text (cyclomatic 54) · ×5ecc2/src/tui/dashboard.rs:6133
(anonymous) (cyclomatic 35) · ×4docker/context-profiles/complex-eval/cases4/production-ready/check.cjs:26
StateStore::ensure_session_columns (cyclomatic 41) · ×3REDACTED:551
markdown_links.inline_link_targets (cyclomatic 22) · ×3.agents/skills/docs-governance/scripts/markdown_links.py:77

+ 315 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 1 body over 120 down to 120 or less in Cyclomatic Complexity — start with ecc_tui::main (cyclomatic 170). — Refactoring it lifts Cyclomatic Complexity from 2.9 to about 3.7/10.
  2. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.

D2 · Cognitive Complexity2.0 / 10Critical✓ Tool-verified

What it measures: How hard the code is for a person to follow, beyond raw branching.

Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.

Maturity: Documented → Verified → Prevented · effective 2.0 / 10 · rule-coverage 100% · ceiling Prevented

540 method(s) exceeded the cognitive complexity threshold of 15; the worst was ecc_tui::main at 342.

ecc_tui::main (cognitive 342) · ×23ecc2/src/main.rs:1426
Dashboard::selected_session_metrics_text (cognitive 136) · ×12ecc2/src/tui/dashboard.rs:6133
markdown_links.inline_link_targets (cognitive 43) · ×3.agents/skills/docs-governance/scripts/markdown_links.py:77
StateStore::ensure_session_columns (cognitive 40) · ×3REDACTED:551
audit-docs.check_adr_lifecycle (cognitive 23) · ×3.agents/skills/docs-governance/scripts/audit-docs.py:519

+ 461 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 19 bodies over 60 down to 60 or less in Cognitive Complexity — start with ecc_tui::main (cognitive 342), Dashboard::selected_session_metrics_text (cognitive 136), contract.validate_artifact_receipt (cognitive 109). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 19 together lifts Cognitive Complexity from 2.0 to about 3.6/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
  2. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.

D3 · God Classes8.6 / 10Strong✓ Tool-verified

What it measures: Over-large classes that try to do too much ("god classes").

Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.

Maturity: Documented → Verified → Prevented · effective 8.6 / 10 · rule-coverage 100% · ceiling Prevented

87 god class(es) detected.

FileTooLong: tui/dashboard.rs · ×37ecc2/src/tui/dashboard.rs
FunctionTooLong: ecc_tui::main · ×35ecc2/src/main.rs:1426
MethodTooLong: Dashboard.selected_session_metrics_text · ×9ecc2/src/tui/dashboard.rs:6133
ClassTooLong: Dashboard · ×2ecc2/src/tui/dashboard.rs:107
TooManyMethods: Dashboard · ×2ecc2/src/tui/dashboard.rs:107

+ 1 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 37 FileTooLong finding(s) in God Classes — start with mod.rs (3), audit-docs.py (3), dashboard.rs. — One of this dimension's main actionable groups (37 warning-level).
  2. Resolve the 35 FunctionTooLong finding(s) in God Classes — start with main.rs (6), REDACTED (4), manager.rs (4). — One of this dimension's main actionable groups (35 warning-level).
  3. Resolve the 9 MethodTooLong finding(s) in God Classes — start with dashboard.rs (5), REDACTED (4). — One of this dimension's main actionable groups (9 warning-level).
  4. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.

D4 · Code Duplication9.2 / 10Stronggated by 296 serious findings✓ Tool-verified

What it measures: Copy-pasted code that should be shared instead.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.

Maturity: Documented → Verified → Prevented · effective 9.2 / 10 · rule-coverage 100% · ceiling Verified

282 duplicated block group(s) detected. A further 14 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. Measured on part of this repository only: .js (54% of production source) was not exposed to THIS dimension's token comparison and is not in this count; duplication there is measured by R10 Code Duplication, the frontend lens's card running the same clone algorithm over the JS/TS token stream.

Duplicated block (5 lines × 2) · ×18ecc2/src/main.rs:8025
Duplicated block (10 lines × 2) · ×15ecc2/src/main.rs:4637
Duplicated block (9 lines × 2) · ×15ecc2/src/main.rs:6690
Duplicated block (8 lines × 2) · ×13ecc2/src/main.rs:4966
Duplicated block (12 lines × 2) · ×11ecc2/src/main.rs:8482

+ 100 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 18 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with main.rs (4), grade.py (3), plates.py (3). — One of this dimension's main actionable groups (18 warning-level).
  2. Resolve the 15 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with REDACTED (4), main.rs (2), evaluate.py (2). — One of this dimension's main actionable groups (15 warning-level).
  3. Resolve the 15 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with grade.py (5), main.rs (4), REDACTED. — One of this dimension's main actionable groups (15 warning-level).
  4. Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.

D5 · Coupling10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.

Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.

Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

5 production modules (Cargo+npm+Python), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 0 module(s) off the main sequence, with abstractness counted on 4 of the 5 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).

✓ On the Gold path — maintain.

Detailed fixes: d5_recommendation.md.

D6 · Cohesion (LCOM4)9.4 / 10Stronggated by 1 serious finding✓ Tool-verified

What it measures: Whether a class's methods are focused on a single responsibility.

Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.

Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.

Maturity: Documented → Verified → Prevented · effective 9.4 / 10 · rule-coverage 100% · ceiling Verified

1 of 20 classes have LCOM4 above 3.

Low cohesion: Config (LCOM4 4)ecc2/src/config/mod.rs:220

What to do

  1. Resolve the 1 Low cohesion finding(s) in Cohesion (LCOM4) — start with mod.rs. — One of this dimension's main actionable groups (1 warning-level).
  2. Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.

D7 · Architectural Integrity6.0 / 10Adequate✓ Tool-verified

What it measures: Whether the code respects its intended layering / architecture rules.

Method: Enforcement rung (Prevented/Verified/Documented) per checkable ADR via Roslyn, plus dependency cycles via the engine shared with D5/AX3. Deterministic, exact.

Maturity: Documented → Verified → Prevented · effective 6.0 / 10 · rule-coverage 100% · ceiling Prevented

No mechanizable ADR was identified, so enforcement is not measured. Dependency cycles not checked (no project-reference graph; where this repository's language has an import-cycle lens, cycles are reported there).

What to do

  1. Enforce Architectural Integrity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d7_recommendation.md.

D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.

Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

7883 test methods: 7840 unit, 33 integration, 0 BDD, 10 e2e. The JavaScript/TypeScript suite contributes 6650 `it`/`test` case(s) across 406 test file(s) declaring at least one; its tier split is read from package names and paths only. The Rust suite contributes 495 `#[test]` function(s) across 14 file(s) declaring at least one; its unit/integration split is Cargo's own — 0 of those file(s) are integration-test targets under a crate's tests/ directory, and the rest are #[test] functions compiled into the crate they test. The Python suite contributes 738 test function(s) across 48 file(s) declaring at least one — every `def test…` in a file pytest or unittest would collect, which is those frameworks' own definition of a case; a parametrize table counts once, so this is a floor. Its tier split is read from file names and paths only.

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

D10 · Test Quality10.0 / 10Stronggated by 9 serious findings✓ Tool-verified

What it measures: Whether the tests truly assert behaviour rather than just running the code.

Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

14 skipped (14 with a documented reason), 9 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 6650 tests. Measured on the JavaScript/TypeScript suite only — at least 52 test source file(s) (.py, .rs) went unread, so its test quality is unmeasured and is not in these counts.

No assertions: workflow IDs come from exact-path metadata and unrelated spoof results do not gate · ×9tests/ci/release-packed-artifact-workflow.test.js:330
Skipped (documented): (unnamed test) · ×14tests/ci/run-all.test.js:276

What to do

  1. Resolve the 9 No assertions finding(s) in Test Quality — start with control-pane-contention.test.js (2), release-packed-artifact-workflow.test.js, stop-format-typecheck.test.js. — One of this dimension's main actionable groups (9 warning-level).
  2. Enforce Test Quality in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.

D11 · Test Reliability10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the tests pass reliably, with no flakiness.

Method: Suite re-run N times within tiered wall-clock budgets (unit to e2e); tests failing non-deterministically across runs flagged; guarded tests retried when #if guards detected.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 flaky across 2 measured tier(s). JavaScript/TypeScript (node:test via `yarn install --immutable --mode=skip-build` in docker/context-profiles/complex-eval/cases/incident-triage/files/ (1 tests); node:test via `yarn install --immutable --mode=skip-build` in docker/context-profiles/complex-eval/cases/sentinel-api/files/ (1 tests); node:test via `yarn install --immutable --mode=skip-build` in docker/context-profiles/complex-eval/cases/webhook-relay/files/ (1 tests); node:test via `yarn install --immutable --mode=skip-build` in docker/context-profiles/complex-eval/cases2/event-stats-api/files/ (1 tests); node:test via `yarn install --immutable --mode=skip-build` in docker/context-profiles/complex-eval/cases2/forge-cli/files/ (1 tests); node:test via `yarn install --immutable --mode=skip-build` in docker/context-profiles/complex-eval/cases2/keccak-selector/files/ (1 tests); node:test via `yarn install --immutable --mode=skip-build` in docker/context-profiles/complex-eval/cases3/chained-tickets/files/; node:test via `yarn install --immutable --mode=skip-build` in docker/context-profiles/complex-eval/cases3/idempotent-webhooks/files/ (1 tests); node:test via `yarn install --immutable --mode=skip-build` in docker/context-profiles/complex-eval/cases3/production-ready/files/ (1 tests); node:test via `yarn install --immutable --mode=skip-build` in docker/context-profiles/complex-eval/cases4/chained-tickets/files/; node:test via `yarn install --immutable --mode=skip-build` in docker/context-profiles/complex-eval/cases4/idempotent-webhooks/files/ (1 tests); node:test via `yarn install --immutable --mode=skip-build` in docker/context-profiles/complex-eval/cases4/production-ready/files/ (1 tests)): measured (0 flaky); Rust (ecc2, 14 test files): measured (0 flaky).

✓ On the Gold path — maintain.

Detailed fixes: d11_recommendation.md.

D12 · Dependency Hygiene9.7 / 10Exemplary✓ Tool-verified

What it measures: Whether dependencies are current, secure, and not bloated.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (saturating for vulnerabilities, capped-linear for deprecation/outdated) per KLoC. Exhaustive, deterministic.

Maturity: Documented → Verified → Prevented · effective 9.7 / 10 · rule-coverage 100% · ceiling Verified

7 outdated, 0 yanked direct Cargo dependencies. Only DIRECT edges are graded: a transitive crate cannot be moved past what its parent's requirement admits, so reporting one would be advice its owner cannot take. A newer release is reported only where this repository's OWN requirement already admits it, so the remedy is `cargo update` and never a manifest edit — which means a release outside the declared range is deliberately NOT charged, because a written-down constraint is a decision rather than a defect. Note that a bare requirement is a CARET, and for a 0.x crate its ceiling is the minor. Whether any crate is UNMAINTAINED is not graded — crates.io publishes no maintenance status, and release age does not stand in for one. Known CVEs in this dependency graph are D30's question, read from REDACTED there.

Outdated: libc · ×7

✓ On the Gold path — maintain.

Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.

D13 · Secret Scanning0.0 / 10Critical✓ Tool-verified

What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.

Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Prevented

2 secret(s) detected.

REDACTED

What to do

  1. Resolve the 2 Leaked secret finding(s) in Secret Scanning — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
  2. Enforce Secret Scanning in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.

D14 · License Compliance10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether the licenses of third-party packages are compatible with your policy.

Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 of 330 shipped crate(s) use a banned license. Licences were resolved from crates.io over the crates a consumer compiles — this repository's REDACTED closed over its manifests' `[dependencies]` and `[build-dependencies]`. Crates it asks for ONLY under `[dev-dependencies]` are excluded: they are not compiled by anything that depends on this repository. This repository publishes itself under MIT, which is its own choice and is not judged here. ★ COVERAGE OF THIS VERDICT: it grades this repository's crate dependencies and nothing else. The repository also declares a Python pyproject.toml/requirements.txt (pip/uv/Poetry) and package.json, and the licences of those dependency graphs were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots9.7 / 10Stronggated by 101 serious findings✓ Tool-verified

What it measures: Files that change often and are also complex — the riskiest hotspots.

Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.

Maturity: Documented → Verified → Prevented · effective 9.7 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: scripts/hooks/gateguard-fact-force.js (52×63=3276); scripts/lib/install/apply.js (37×48=1776); scripts/hooks/block-no-verify.js (15×73=1095) Repeated repair below the complexity floor: scripts/lib/skill-evolution/versioning.js (9 of 9 changes were fixes); scripts/lib/install-executor.js (6 of 9 changes were fixes); scripts/lib/install-targets/claude-home.js (6 of 7 changes were fixes)

Hotspot: scripts/hooks/gateguard-fact-force.js · ×65scripts/hooks/gateguard-fact-force.js:729
Repeated repair: scripts/lib/skill-evolution/versioning.js · ×36scripts/lib/skill-evolution/versioning.js:348

What to do

  1. Resolve the 65 Hotspot finding(s) in Churn × Complexity Hotspots — start with markdown_links.py (2), audit-docs.py (2), REDACTED (2). — One of this dimension's main actionable groups (65 warning-level).
  2. Resolve the 36 Repeated repair finding(s) in Churn × Complexity Hotspots — start with versioning.js, install-executor.js, claude-home.js. — One of this dimension's main actionable groups (36 warning-level).

Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.

D16 · Bus Factor8.1 / 10Strong✓ Tool-verified

What it measures: Whether knowledge is concentrated in too few people (the "bus factor").

Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.

Maturity: Documented → Verified → Prevented · effective 8.1 / 10 · rule-coverage 100% · ceiling Documented

20 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is ecc2/src/tui/dashboard.rs. Counted over 105 of the 132 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Off-boarding risk: anonymized user #1
Further sole-owners (lower concentration)

What to do

  1. Resolve the 1 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).
  2. Resolve the 1 Further sole-owners (lower concentration) finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.

D17 · Explicit Debt10.0 / 10Exemplary○ Nothing flagged

What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.

Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

0 deducted task-comment markers across 74776 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.

✓ On the Gold path — maintain.

Detailed fixes: d17_recommendation.md.

D19 · Documentation QualityExemplary◐ Sampled · advisory

What it measures: Whether the project's documentation is clear, complete, and useful.

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.

Maturity: Documented → Verified → Prevented · effective Exemplary / 10 · rule-coverage 100% · ceiling Documented

The repository's READMEs and architecture/Docs files are all well written for the deploy tiers they document: each README is focused on its own directory with install, usage, and contribution guidance. The ECC plugin manifest (qoder-plugin/README.md), Trae plugin installer (trae/README.md), and Rust-based ECC 2.0 scaffold (ecc2/README.md) all carry clear project descriptions plus installation steps for the directories they cover. The architecture/design docs are fully present but not shown in this summary, so any missing-architecture-docs defect would be flagged against those files rather than the READMEs. This is a comprehensive documentation set for the ECC project: READMEs and architecture/design docs cover every directory in the repository. The root README gives an overview of what ECC does (Harness-native agent operating system) and its scope, while each subdirectory's README documents that directory rather than the whole repo. All visible documents are well-structured with clear headings; the only unshown content is the full outline under each heading, which is not a defect. (11 of 25 sampled documents could not be assessed: 1 of 3 evaluation groups failed.)

Documentation: written for insiders · ×2.trae/README.md

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md · top locations in Appendix A, every location in findings.md.

D20 · ADR QualityExemplary◐ Sampled · advisory

What it measures: Whether architecture decisions are recorded well (context, decision, consequences).

Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.

Maturity: Documented → Verified → Prevented · effective Exemplary / 10 · rule-coverage 100% · ceiling Documented

Evaluated 2 ADR(s) individually; mean quality 9.0/10 (consistently complete and clear). 0 flagged with a specific gap.

✓ On the Gold path — maintain.

Detailed fixes: d20_recommendation.md.

D21 · Naming ConsistencyExemplary◐ Sampled · advisory

What it measures: Whether names — types, methods, variables — are clear and consistent.

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.

Maturity: Documented → Verified → Prevented · effective Exemplary / 10 · rule-coverage 100% · ceiling Verified

0 naming inconsistencies across 0 sampled symbols.

✓ On the Gold path — maintain.

Detailed fixes: d21_recommendation.md.

D22 · Internal API ConsistencyStronggated by 1 serious finding◐ Sampled · advisory

What it measures: Whether the internal API surface is consistent and coherent.

Method: Judged by language model at low temperature over a sample of the public API surface (IsPackable or .Contracts types). Sampled, advisory; confidence discounted by model uncertainty.

Maturity: Documented → Verified → Prevented · effective Strong / 10 · rule-coverage 100% · ceiling Verified

1 API inconsistencies across 42 exposed types.

Inconsistent parameter naming in the `generate` method across provider implementations. The interface and some providers (Ollama, OpenAI, Claude) use the parameter name `input`, while others (Astraflow, Atlas) use `llm_input`.

What to do

  1. Resolve the 1 Inconsistent parameter naming in the `generate` method across provider… finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d22_recommendation.md · top locations in Appendix A, every location in findings.md.

D26 · Project Cohesion8.6 / 10Strong✓ Tool-verified

What it measures: Whether each project is a focused, coherent unit rather than an oversized grab-bag.

Method: Project size overshoot penalties (LoC / public-type count / namespace count, 2-of-3 flag) weighted by log magnitude. Exhaustive across projects, deterministic, LLM-independent.

Maturity: Documented → Verified → Prevented · effective 8.6 / 10 · rule-coverage 100% · ceiling Documented

2 of 28 build units (Cargo, Python, npm) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

  1. Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.

D28 · Secrets (history)7.0 / 10Adequategated by 3 critical findings✓ Tool-verified

What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.

Method: Secret scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.

Maturity: Documented → Verified → Prevented · effective 7.0 / 10 · rule-coverage 100% · ceiling Documented

3 finding(s): 0 critical, 3 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.

REDACTED
REDACTED

What to do

  1. Resolve the 3 High secret finding(s) in Secrets (history) — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 issue-level).
  2. Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.

D29 · Static Analysis (SAST)0.0 / 10Critical✓ Tool-verified

What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.

Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.

Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

76 finding(s): 0 critical, 15 high, 58 medium, 3 low. semgrep hit a parse error in 9 file(s) — `.claude/homunculus/instincts/inherited/ecc-instincts.yaml`, `docker/context-profiles/ai-eval-lib.js`, `scripts/hooks/gateguard-fact-force.js`, `scripts/hooks/run-with-flags-shell.sh` (line 28), `skills/continuous-learning-v2/agents/observer-loop.sh` (line 373), … (+4 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 2 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

+ 6 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 11 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3), REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (11 issue-level).
  2. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  3. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).

Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.

D30 · Dependency Vulnerabilities6.6 / 10Adequate✓ Tool-verified

What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.

Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05.

Maturity: Documented → Verified → Prevented · effective 6.6 / 10 · rule-coverage 100% · ceiling Documented

9 finding(s): 0 critical, 4 high, 5 medium, 0 low.

REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 4 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (3), REDACTED. — One of this dimension's main actionable groups (4 issue-level).
  2. Resolve the 3 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 warning-level).
  3. Resolve the 1 Medium advisory (unsound) finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.

D31 · IaC & Container Security9.5 / 10Adequategated by 1 critical finding✓ Tool-verified

What it measures: Whether Dockerfiles / Terraform / Kubernetes config follow security best practices.

Method: IaC/container misconfiguration scan via trivy config (REDACTED/Terraform/K8s/Helm/CloudFormation); severity rules to 0-10 moderate normalizer. NotApplicable without manifests. Exhaustive, deterministic.

Maturity: Documented → Verified → Prevented · effective 9.5 / 10 · rule-coverage 100% · ceiling Documented

3 finding(s): 0 critical, 1 high, 2 medium, 0 low.

REDACTED
REDACTED

What to do

  1. Resolve the 1 High IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 2 Medium IaC finding(s) in IaC & Container Security — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 warning-level).

Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.

D35 · Change Coupling10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.

Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.

Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No strong hidden change-coupling between production files.

✓ On the Gold path — maintain.

Detailed fixes: d35_recommendation.md.

D36 · Supply-chain Provenance & Signing5.0 / 10Adequate✓ Tool-verified

What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.

Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.

Maturity: Documented → Verified → Prevented · effective 5.0 / 10 · rule-coverage 100% · ceiling Documented

2/4 supply-chain integrity signals present (provenance, signing, SBOM, pinned actions).

REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
  3. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.

D37 · Vulnerability-disclosure Policy10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.

Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

A vulnerability-disclosure policy (SECURITY.md) is published with a reporting contact.

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.md.

D43 · Malicious Dependencies10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Scored apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.

Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. SCORED, not informational.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No dependency in any ecosystem this repository declares is published as malicious.

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

D44 · Platform End-of-Life6.0 / 10Adequate✓ Tool-verified

What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.

Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.

Maturity: Documented → Verified → Prevented · effective 6.0 / 10 · rule-coverage 100% · ceiling Documented

1 end-of-life runtime(s) and 0 end-of-life framework(s), read from 3 platform declaration(s) and 13 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.

End-of-life runtime: Node.js 20.tool-versions:1

What to do

  1. Resolve the 1 End-of-life runtime finding(s) in Platform End-of-Life — start with .tool-versions. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d44_recommendation.md · top locations in Appendix A, every location in findings.md.

Frontend & cross-cutting dimensions

R = React/JS · M = Maturity · P = Readiness.

AC2 · Forms & labels10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.

Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

AC6 · Visual & motion safety10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.

Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.

Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

AC7 · A11y enforcement4.0 / 10Weak✓ Tool-verified

Other · Accessibility — Whether accessibility is ENFORCED in the toolchain — an accessibility checker configured over the markup (an a11y lint rule set, e.g. eslint-plugin-jsx-a11y or vuejs-accessibility where the project lints JavaScript) and an automated accessibility assertion wired into tests or CI (axe/pa11y/Lighthouse or an equivalent) — on the Documented→Verified→Prevented ladder.

Method: Repo config/CI scan: an accessibility checker configured over the markup (an a11y lint rule set such as eslint-plugin-jsx-a11y / vuejs-accessibility where JavaScript is linted) and an automated accessibility assertion in tests or CI (axe/pa11y/Lighthouse or equivalent), graded on the Documented→Verified→Prevented rungs. Deterministic, presence/rung detection.

Coverage: Population: the repository's own tooling configuration — lint config, test and CI files — NOT the markup. It is read for a configured accessibility checker and an automated accessibility assertion (axe/pa11y/Lighthouse, or a native-toolkit equivalent), and it credits an INVOCATION, never a mention: a licence filename, an import comment or a doc reference earns no rung. Enforcement configured entirely outside the repository leaves no evidence here and cannot be credited.

  • No accessibility enforcement found — no a11y linter (an accessibility check that can read your UI — no component framework was detected and your pages are rendered by server-side templates, which neither the JSX/Vue ESLint plugins nor the HTML-template linters can parse; run axe/pa11y over the rendered pages, or assert the accessibility invariants over that rendered HTML in the test suite you already have) and no axe/pa11y/Lighthouse in tests or CI. Start by running that check over your rendered pages in CI. What was searched, so you can tell an absence from a miss: the 5 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.

What to do

  • Enforce accessibility in the toolchain: add an accessibility check that can read your UI — no component framework was detected and your pages are rendered by server-side templates, which neither the JSX/Vue ESLint plugins nor the HTML-template linters can parse; run axe/pa11y over the rendered pages, or assert the accessibility invariants over that rendered HTML in the test suite you already have, then assert with your test runner's axe binding (jest-axe, vitest-axe, cypress-axe or @axe-core/playwright) in tests, then gate axe/pa11y/Lighthouse in CI.
AX10 · Code composition9.9 / 10Exemplary✓ Tool-verified

Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.

Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.

Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.

What to do

  • The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).

Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.

AX4 · Dependency direction10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.

Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.

AX9 · CQS / query purity10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.

Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.

Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.

ES1 · Fold determinism10.0 / 10Exemplary✓ Tool-verified

Other · Event Sourcing — Whether the recovery-replay fold is deterministic — state derived purely from each event's own fields, no clock/random/IO on the replay path.

Method: Roslyn syntax scan (event-sourcing gated): Apply/When folds checked for forbidden tokens (DateTime.Now, Guid.NewGuid, Random, IO), stripped of comments/strings. Deterministic, hard fact per fold.

ES2 · Immutable events10.0 / 10Exemplary✓ Tool-verified

Other · Event Sourcing — Whether domain events stay immutable (private fields, set once) rather than carrying mutable state.

Method: Roslyn scan (event-sourcing gated): persisted events checked for public setters; immutability verified per property/field. Deterministic, hard fact.

GD1 · Unfinished & placeholder code10.0 / 10Exemplary✓ Tool-verified

Other · Code Health — Unreviewed-generation residue in this repository's JavaScript/TypeScript: functions whose whole body still throws a "not implemented" error, and placeholder text (lorem ipsum, changeme/replace_me…) left in strings and JSX of non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.

Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.

  • A shipped function's whole body still throws a "not implemented" error — generated scaffolding that was never completed. Implement it or remove the dead surface. (×2) — docker/context-profiles/complex-eval/cases2/forge-cli/files/src/cli.js:4, docker/context-profiles/complex-eval/cases2/keccak-selector/files/src/selector.js:4

What to do

  • Finish or delete the functions that still throw "not implemented", and replace placeholder text before shipping.
IC1 · Incompleteness & stubs7.8 / 10Strong✓ Tool-verified

Other · Code Health — Unfinished work detected by code SHAPE, not keywords, in this repository's JavaScript/TypeScript: functions that only throw a "not implemented" error, functions that take inputs and return a constant or do nothing, async functions that never await, dead `if (false)` branches, and skeleton classes most of whose methods are holes.

Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, guards that return what the code already falls through to, tests an earlier guard already decided, comparisons against NaN, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.

  • `run` throws an exception whose message says it isn't finished — a not-implemented stub wearing an ordinary exception. Implement it or remove it. — docker/context-profiles/complex-eval/cases2/forge-cli/files/src/cli.js:4
  • `functionSelector` throws an exception whose message says it isn't finished — a not-implemented stub wearing an ordinary exception. Implement it or remove it. — docker/context-profiles/complex-eval/cases2/keccak-selector/files/src/selector.js:4
  • `main` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. (×3) — scripts/hooks/evaluate-session.js:44, scripts/hooks/pre-compact.js:113, scripts/hooks/session-end.js:307
  • A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something. (×3) — tests/lib/context-pack-registry.test.js:132, tests/lib/context-profile-native.test.js:258, tests/lib/context-profile-store.test.js:92

What to do

  • Finish or delete the unfinished stubs (functions that throw "not implemented", or whose body is empty or a bare constant) — they are dead surface that looks live.
  • Clear the softer debt: re-enable or delete skipped tests, decide whether each empty function is a deliberate no-op (and say so in a comment), and replace blanket `eslint-disable` / `@ts-nocheck` with targeted, justified suppressions.
M1 · Documentation (README)9.1 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.

Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.

What to do

  • Add a README to the 14 of 30 project(s) that lack one — worth up to 0.9 pts.
M2 · Architecture documentation7.0 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.

Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.

What to do

  • Grow the ADR log (currently 2) — reach 8 to raise the maturity tier; document significant decisions as they're made.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repo is organised deliberately — src/test separation and consistent project naming.

Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.

M4 · Documentation accuracy9.4 / 10Exemplary◐ Sampled · advisory

Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).

Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.

  • README.md names `.github/skills/`, but no file or folder `.github/skills` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — README.md:437
  • README.md names `.github/agents/`, but no file or folder `.github/agents` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — README.md:437
  • README.md names `.cursor/commands/`, but no file or folder `.cursor/commands` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — README.md:1478
  • README.md names `.cursor/mcp.json`, but no file or folder `.cursor/mcp.json` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — README.md:1479
  • README.md names `.cursor/ecc-agent-data.json`, but no file or folder `.cursor/ecc-agent-data.json` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — README.md:1493
  • README.md names `.cursor/rules/ecc-agent-data-home.mdc`, but no file or folder `.cursor/rules/ecc-agent-data-home.mdc` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — README.md:1494
  • README.md names `.github/ecc-install-state.json`, but no file or folder `.github/ecc-install-state.json` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — README.md:1793
  • README.md documents the environment variable `CLAUDE_CODE_EFFORT_LEVEL`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — README.md:1874
  • README.md documents the environment variable `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — README.md:1880
  • .hermes/README.md names `rules/ecc/`, but no file or folder `rules/ecc` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — .hermes/README.md:7
  • .hermes/README.md names `skills/ecc/`, but no file or folder `skills/ecc` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — .hermes/README.md:8
  • .openclaw/README.md names `rules/ecc/`, but no file or folder `rules/ecc` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — .openclaw/README.md:7
  • .openclaw/README.md names `skills/ecc/`, but no file or folder `skills/ecc` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — .openclaw/README.md:8
  • docs/ANTIGRAVITY-GUIDE.md names `.agents/rules/`, but no file or folder `.agents/rules` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/ANTIGRAVITY-GUIDE.md:51
  • docs/ANTIGRAVITY-GUIDE.md names `.agents/workflows/`, but no file or folder `.agents/workflows` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/ANTIGRAVITY-GUIDE.md:52
  • docs/ANTIGRAVITY-GUIDE.md names `.agents/ecc-install-state.json`, but no file or folder `.agents/ecc-install-state.json` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/ANTIGRAVITY-GUIDE.md:113
  • docs/HERMES-HOOKS.md documents the environment variable `HOOK_DIR`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/HERMES-HOOKS.md:47
  • docs/ITO-DESK.md names `docs/PLAN.md`, but no file or folder `docs/PLAN.md` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/ITO-DESK.md:24
  • docs/ITO-DESK.md names `docs/spec/`, but no file or folder `docs/spec` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/ITO-DESK.md:25
  • docs/SELECTIVE-INSTALL-ARCHITECTURE.md names `./.cursor/ecc-install-state.json`, but no file or folder `.cursor/ecc-install-state.json` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/SELECTIVE-INSTALL-ARCHITECTURE.md:669
  • docs/SELECTIVE-INSTALL-ARCHITECTURE.md names `./.agents/ecc-install-state.json`, but no file or folder `.agents/ecc-install-state.json` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/SELECTIVE-INSTALL-ARCHITECTURE.md:671
  • docs/TROUBLESHOOTING.md documents the environment variable `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/TROUBLESHOOTING.md:31
  • docs/TROUBLESHOOTING.md documents the environment variable `MAX_THINKING_TOKENS`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/TROUBLESHOOTING.md:65
  • docs/hook-bug-workarounds.md documents the environment variable `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/hook-bug-workarounds.md:40
  • docs/hook-bug-workarounds.md documents the environment variable `MAX_THINKING_TOKENS`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/hook-bug-workarounds.md:64
  • docs/token-optimization.md documents the environment variable `CLAUDE_CODE_EFFORT_LEVEL`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/token-optimization.md:28
  • docs/token-optimization.md documents the environment variable `CLAUDE_CODE_SUBAGENT_MODEL`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/token-optimization.md:36
  • docs/token-optimization.md documents the environment variable `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/token-optimization.md:164
  • hooks/README.md runs `npm run dev`, but no package.json declares a `dev` script. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — hooks/README.md:51
  • .kiro/docs/shortform-guide.md names `docs/migration-from-ecc.md`, but no file or folder `docs/migration-from-ecc.md` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — .kiro/docs/shortform-guide.md:289
  • docker/context-profiles/README.md names `skills/list`, but no file or folder `skills/list` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docker/context-profiles/README.md:15
  • docs/control-plane/TCAS-HOOK.md names `scripts/hooks/tcas-pre-edit.js`, but no file or folder `scripts/hooks/tcas-pre-edit.js` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/control-plane/TCAS-HOOK.md:60
  • docs/control-plane/TCAS-HOOK.md names `scripts/lib/control-pane/tcas.js`, but no file or folder `scripts/lib/control-pane/tcas.js` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/control-plane/TCAS-HOOK.md:60
  • docs/de-DE/README.md names `.cursor/commands/`, but no file or folder `.cursor/commands` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/de-DE/README.md:1247
  • docs/de-DE/README.md names `.cursor/mcp.json`, but no file or folder `.cursor/mcp.json` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/de-DE/README.md:1248
  • docs/de-DE/README.md documents the environment variable `MAX_THINKING_TOKENS`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/de-DE/README.md:1640
  • docs/de-DE/README.md documents the environment variable `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/de-DE/README.md:1641
  • docs/design/context-carriers.md names `.opencode/skills/`, but no file or folder `.opencode/skills` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/design/context-carriers.md:40
  • docs/design/context-profile-ai-evaluation.md installs `@openai/codex` (`npm install --prefix ~/.ecc-eval/codex @openai/codex@0.155.1`), but no package.json declares it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/design/context-profile-ai-evaluation.md:50
  • docs/design/ecc-pro-fleet-dashboard.md documents the environment variable `BUNDLE_DIGEST_EXCLUDED_FILES`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/design/ecc-pro-fleet-dashboard.md:312

What to do

  • Reconcile the README with reality: README.md names `.github/skills/`, but no file or folder `.github/skills` exists; README.md names `.github/agents/`, but no file or folder `.github/agents` exists; README.md names `.cursor/commands/`, but no file or folder `.cursor/commands` exists; README.md names `.cursor/mcp.json`, but no file or folder `.cursor/mcp.json` exists; README.md names `.cursor/ecc-agent-data.json`, but no file or folder `.cursor/ecc-agent-data.json` exists.
P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — Whether an automated pipeline builds and tests every change.

Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.

P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.

Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.

P2 · Observability5.6 / 10Adequate✓ Tool-verified

Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.

Method: Filesystem/Roslyn scan: structured-logging frameworks (Serilog, NLog), OpenTelemetry, and health-check endpoint patterns. Exhaustive, deterministic.

  • Only 2/10 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `docker/context-profiles/complex-eval/cases/sentinel-api/files`, `docker/context-profiles/complex-eval/cases/webhook-relay/files`, `docker/context-profiles/complex-eval/cases2/event-stats-api/files`, `docker/context-profiles/complex-eval/cases3/idempotent-webhooks/files` and 3 more.

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
  • Add OpenTelemetry tracing/metrics (@opentelemetry/sdk-node) so requests are traceable across the system, not just health-probable.
P3 · Security & performance tooling3.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).

Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.

  • No static application security testing detected. For this repository's stack, add cargo-audit / cargo-deny (or clippy) (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 68296 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.

What to do

  • Add a SAST step to CI running what this repository's stack ships: cargo-audit / cargo-deny (or clippy) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback8.0 / 10Strong✓ Tool-verified

Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.

Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.

  • Deployment is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever reaches the release trigger goes to production unreviewed, so a mistaken merge or tag is live before anyone can stop it.

What to do

  • Add an approval/environment gate (required reviewers / protection rules) before production promotion.
P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.

Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.

P7 · Outbound HTTP resilience3.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.

Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.

  • `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×40) — docker/context-profiles/complex-eval/calibrate-stats.js:56, docker/context-profiles/complex-eval/cases/sentinel-api/check.cjs:42, docker/context-profiles/complex-eval/cases/sentinel-api/check.cjs:69, …

What to do

  • Bound every outbound call: pass `signal: AbortSignal.timeout(ms)` to `fetch`, set `timeout` on the axios instance (`axios.create({ timeout })`), and add retries with back-off (`axios-retry`, `p-retry`) and a breaker (`opossum`, `cockatiel`) around dependencies that fail.
  • Pass `timeout=` on every `requests`/`httpx` call (requests has no default and will wait forever), mount an `HTTPAdapter(max_retries=Retry(...))` on shared sessions, and wrap calls to flaky dependencies in `tenacity` retries or a `pybreaker` circuit breaker.
PF3 · Async & latency hygiene6.0 / 10Adequate✓ Tool-verified

Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.

Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from the language model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.

  • `fs.rmSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×4) — docker/context-profiles/complex-eval/calibrate-stats.js:71, docker/context-profiles/complex-eval/calibrate-stats.js:72, docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:74, …
  • `fs.readFileSync` in `callback to map` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — docker/context-profiles/complex-eval/cases/sentinel-api/check.cjs:50
  • `fs.readFileSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×20) — docker/context-profiles/complex-eval/cases2/event-stats-api/check.cjs:134, docker/context-profiles/complex-eval/cases3/chained-tickets/steps/01-core/check.cjs:84, docker/context-profiles/complex-eval/cases3/chained-tickets/steps/01-core/check.cjs:87, …
  • `fs.readdirSync` in `walk` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — docker/context-profiles/complex-eval/cases2/event-stats-api/check.cjs:137, docker/context-profiles/complex-eval/cases3/production-ready/check.cjs:105
  • `fs.readFileSync` in `walk` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — docker/context-profiles/complex-eval/cases2/event-stats-api/check.cjs:140, docker/context-profiles/complex-eval/cases3/production-ready/check.cjs:108
  • `fs.readdirSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×8) — docker/context-profiles/complex-eval/cases3/chained-tickets/steps/01-core/check.cjs:87, docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:99, REDACTED:66, …
  • `fs.existsSync` in `callback to every` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — docker/context-profiles/complex-eval/cases3/chained-tickets/steps/01-core/check.cjs:92
  • `fs.mkdirSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:84
  • `fs.writeFileSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:85

What to do

  • TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.
R1 · Type Safety0.0 / 10Critical✓ Tool-verified

React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.

Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.

  • 4 typed · 979 plain JS — the untyped files are docker/context-profiles/ai-eval-lib.js, docker/context-profiles/ai-eval.js, docker/context-profiles/complex-eval/build-corpus.js, docker/context-profiles/complex-eval/calibrate-stats.js, docker/context-profiles/complex-eval/cases/incident-triage/check.cjs, docker/context-profiles/complex-eval/cases/incident-triage/files/src/inventory-client.js (+973 more).

What to do

  • Migrate the remaining .js/.jsx files to TypeScript.
R10 · Code Duplication8.4 / 10Strong✓ Tool-verified

React / JS · Code Health — Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm over JS/TS tokens, D-386): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.

Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Deterministic.

  • docker/context-profiles/complex-eval/cases3/ and docker/context-profiles/complex-eval/cases4/ are near-verbatim copies of each other: 31 files are byte-identical under the same relative paths (~848 lines; the trees hold 32 and 48 files). That is one structural fact, not 31 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place. — docker/context-profiles/complex-eval/cases3/idempotent-webhooks/check.cjs:1
  • docker/context-profiles/complex-eval/reference3/ and docker/context-profiles/complex-eval/reference4/ are near-verbatim copies of each other: 15 files are byte-identical under the same relative paths (~674 lines; the trees hold 15 and 21 files). That is one structural fact, not 15 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place. — docker/context-profiles/complex-eval/reference3/chained-tickets/test/links.test.js:1
  • 24 duplicated blocks under docker/context-profiles/complex-eval/ have copies in at least two of the sibling directories cases, cases2, cases3, cases4, reference, reference2 (+2 more sibling(s) not listed) — 23 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 24 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 24 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 24 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — docker/context-profiles/complex-eval/cases3/production-ready/check.cjs:4
  • 22 duplicated blocks under the repository root have copies in at least two of the sibling directories docker, scripts, skills — 19 of them are reported below, and 3 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 22 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 22 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 22 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — docker/gateguard-effectiveness/run-intent.js:375
  • 18 duplicated blocks under scripts/ have copies in at least two of the sibling directories ci, codemaps, hooks, lib — 13 of them are reported below, and 5 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 18 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 18 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 18 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — scripts/hooks/ecc-context-monitor.js:64
  • 6 duplicated blocks under scripts/lib/ have copies in at least two of the sibling directories control-pane, eval-harness, install, install-targets, skill-evolution — 4 of them are reported below, and 2 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 6 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 6 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 6 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — scripts/lib/install-targets/cursor-project.js:20
  • scripts/preview-pack-smoke.js:91 · scripts/release-approval-gate.js:104 — the two spans are one implementation copied and then locally edited — 1146 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — scripts/preview-pack-smoke.js:91
  • scripts/lib/session-adapters/codex-worktree.js:12 · scripts/lib/session-adapters/opencode.js:12 — the two spans are one implementation copied and then locally edited — 1189 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — scripts/lib/session-adapters/codex-worktree.js:12
  • docker/context-profiles/complex-eval/cases4/recurring-incident/steps/01-refund-retry/check.cjs:20 · docker/context-profiles/complex-eval/cases4/recurring-incident/steps/02-payout-storm/check.cjs:17 — the two spans are one implementation copied and then locally edited — 1314 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — docker/context-profiles/complex-eval/cases4/recurring-incident/steps/01-refund-retry/check.cjs:20
  • docker/gateguard-effectiveness/run-intent.js:51 · docker/gateguard-effectiveness/run.js:36 — the two spans are one implementation copied and then locally edited — 1310 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — docker/gateguard-effectiveness/run-intent.js:51
  • scripts/discussion-audit.js:217 · scripts/operator-readiness-dashboard.js:965 — the two spans are one implementation copied and then locally edited — 607 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — scripts/discussion-audit.js:217
  • docker/context-profiles/complex-eval/cases3/production-ready/check.cjs:4 · docker/context-profiles/complex-eval/cases4/production-ready/check.cjs:4 — these 2 files are line-for-line copies of one another — 93 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — docker/context-profiles/complex-eval/cases3/production-ready/check.cjs:4
  • scripts/gemini-adapt-agents.js:37 · scripts/qwen-adapt-agents.js:74 — the two spans are one implementation copied and then locally edited — 553 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — scripts/gemini-adapt-agents.js:37
  • docker/context-profiles/complex-eval/cases3/idempotent-webhooks/check.cjs:5 · docker/context-profiles/complex-eval/cases4/idempotent-webhooks/check.cjs:5 — these 2 files are line-for-line copies of one another — 88 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — docker/context-profiles/complex-eval/cases3/idempotent-webhooks/check.cjs:5
  • docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:4 · docker/context-profiles/complex-eval/cases4/chained-tickets/steps/02-persistence/check.cjs:4 — these 2 files are line-for-line copies of one another — 79 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:4
  • docker/context-profiles/complex-eval/cases3/chained-tickets/steps/01-core/check.cjs:3 · docker/context-profiles/complex-eval/cases4/chained-tickets/steps/01-core/check.cjs:3 — these 2 files are line-for-line copies of one another — 77 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — docker/context-profiles/complex-eval/cases3/chained-tickets/steps/01-core/check.cjs:3
  • docker/context-profiles/complex-eval/reference3/production-ready/src/app.js:2 · docker/context-profiles/complex-eval/reference4/production-ready/src/app.js:2 — these 2 files are line-for-line copies of one another — 69 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — docker/context-profiles/complex-eval/reference3/production-ready/src/app.js:2
  • scripts/discussion-audit.js:65 · scripts/platform-audit.js:77 — the two spans are one implementation copied and then locally edited — 428 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — scripts/discussion-audit.js:65
  • docker/context-profiles/complex-eval/cases3/chained-tickets/steps/04-analytics/check.cjs:4 · docker/context-profiles/complex-eval/cases4/chained-tickets/steps/04-analytics/check.cjs:4 — these 2 files are line-for-line copies of one another — 67 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — docker/context-profiles/complex-eval/cases3/chained-tickets/steps/04-analytics/check.cjs:4
  • docker/context-profiles/complex-eval/cases/sentinel-api/files/src/app.js:29 · docker/context-profiles/complex-eval/reference/sentinel-api/src/app.js:45 — the two spans are one implementation copied and then locally edited — 538 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — docker/context-profiles/complex-eval/cases/sentinel-api/files/src/app.js:29
  • REDACTED:4 · REDACTED:4 — these 2 files are line-for-line copies of one another — 62 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — REDACTED:4
  • docker/context-profiles/complex-eval/reference3/idempotent-webhooks/src/app.js:2 · docker/context-profiles/complex-eval/reference4/idempotent-webhooks/src/app.js:2 — these 2 files are line-for-line copies of one another — 59 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — docker/context-profiles/complex-eval/reference3/idempotent-webhooks/src/app.js:2
  • docker/context-profiles/complex-eval/reference3/chained-tickets/src/routes.js:2 · docker/context-profiles/complex-eval/reference4/chained-tickets/src/routes.js:2 — these 2 files are line-for-line copies of one another — 56 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — docker/context-profiles/complex-eval/reference3/chained-tickets/src/routes.js:2
  • docker/context-profiles/complex-eval/reference3/chained-tickets/src/service.js:2 · docker/context-profiles/complex-eval/reference4/chained-tickets/src/service.js:2 — these 2 files are line-for-line copies of one another — 56 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — docker/context-profiles/complex-eval/reference3/chained-tickets/src/service.js:2
  • scripts/repair.js:20 · scripts/uninstall.js:30 — the two spans are one implementation copied and then locally edited — 407 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — scripts/repair.js:20
  • REDACTED:251 · REDACTED:346 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — REDACTED:251
  • scripts/lib/install-targets/claude-home.js:1 · scripts/lib/install-targets/claude-project.js:1 — these 2 files are line-for-line copies of one another — 53 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — scripts/lib/install-targets/claude-home.js:1
  • docker/context-profiles/complex-eval/cases3/idempotent-webhooks/files/src/app.js:8 · docker/context-profiles/complex-eval/cases4/idempotent-webhooks/files/src/app.js:8 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — docker/context-profiles/complex-eval/cases3/idempotent-webhooks/files/src/app.js:8
  • scripts/orchestration-status.js:11 · scripts/session-inspect.js:30 — the two spans are one implementation copied and then locally edited — 249 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — scripts/orchestration-status.js:11
  • scripts/lib/install/excluded-paths-reconciliation.js:116 · scripts/lib/install/opencode-legacy-migration.js:113 — the two spans are one implementation copied and then locally edited — 300 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — scripts/lib/install/excluded-paths-reconciliation.js:116
  • docker/context-profiles/complex-eval/cases3/production-ready/files/src/app.js:8 · docker/context-profiles/complex-eval/cases4/production-ready/files/src/app.js:8 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — docker/context-profiles/complex-eval/cases3/production-ready/files/src/app.js:8
  • docker/context-profiles/complex-eval/cases/webhook-relay/files/src/app.js:14 · docker/context-profiles/complex-eval/reference/webhook-relay/src/app.js:34 — the two spans are one implementation copied and then locally edited — 328 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — docker/context-profiles/complex-eval/cases/webhook-relay/files/src/app.js:14
  • scripts/hooks/pre-bash-git-push-reminder.js:17 · scripts/hooks/pre-bash-tmux-reminder.js:22 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — scripts/hooks/pre-bash-git-push-reminder.js:17
  • scripts/lib/install-targets/codebuddy-project.js:16 · scripts/lib/install-targets/joycode-project.js:16 · scripts/lib/install-targets/zed-project.js:16 — the 3 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — scripts/lib/install-targets/codebuddy-project.js:16
  • scripts/lib/session-adapters/claude-history.js:120 · scripts/lib/session-adapters/codex-worktree.js:311 · scripts/lib/session-adapters/opencode.js:275 — the 3 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — scripts/lib/session-adapters/claude-history.js:120
  • scripts/lib/shell-substitution.js:174 · scripts/lib/shell-substitution.js:262 — the two spans are one implementation copied and then locally edited — 226 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — scripts/lib/shell-substitution.js:174
  • scripts/lib/github-discussions.js:15 · scripts/platform-audit.js:222 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — scripts/lib/github-discussions.js:15
  • REDACTED:495 · REDACTED:584 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — REDACTED:495
  • scripts/harness-audit.js:129 · scripts/observability-readiness.js:68 — the two spans are one implementation copied and then locally edited — 146 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — scripts/harness-audit.js:129
  • scripts/operator-readiness-dashboard.js:29 · scripts/platform-audit.js:37 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — scripts/operator-readiness-dashboard.js:29

What to do

  • Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
R11 · Import Boundaries9.8 / 10Exemplary✓ Tool-verified

React / JS · Architecture — Conformance to the detected frontend architecture layout (feature-sliced / layered src) plus cross-package deep-import rules (D-386).

Method: Conformance to the detected frontend layout (feature-sliced / layered src) plus cross-package deep-import rules, over the module graph. Deterministic.

  • docker/context-profiles/native-probe.js:71 imports tests/lib/helpers/context-carrier-fixture.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — docker/context-profiles/native-probe.js:71
  • docker/context-profiles/packed-smoke.js:11 imports tests/lib/helpers/context-carrier-fixture.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — docker/context-profiles/packed-smoke.js:11

What to do

  • Fix the listed violations: move the shared test helper into a source directory production code may depend on (2 rows).
R2 · Cyclomatic Complexity5.0 / 10Adequate✓ Tool-verified

React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.

Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.

  • runTests has cyclomatic complexity 279 and cognitive complexity 537; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — tests/hooks/gateguard-fact-force.test.js:738
  • runTests has cyclomatic complexity 268 and cognitive complexity 525; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — tests/hooks/hooks.test.js:374
  • runTests has cyclomatic complexity 197 and cognitive complexity 391; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — tests/lib/utils.test.js:30
  • runTests has cyclomatic complexity 180 and cognitive complexity 352; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — tests/lib/session-manager.test.js:42
  • runTests has cyclomatic complexity 118 and cognitive complexity 233; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — tests/lib/package-manager.test.js:68
  • runTests has cyclomatic complexity 116 and cognitive complexity 228; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — tests/lib/session-aliases.test.js:52
  • runTests has cyclomatic complexity 75 and cognitive complexity 147; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — tests/lib/install-lifecycle.test.js:333
  • runTests has cyclomatic complexity 65 and cognitive complexity 127; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — tests/hooks/hook-flags.test.js:64
  • resolveTaskContext has cyclomatic complexity 64 and cognitive complexity 46; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/lib/context-selection.js:333
  • runTests has cyclomatic complexity 62 and cognitive complexity 121; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — tests/lib/plan-canvas-markdown.test.js:26
  • validate has cyclomatic complexity 60 and cognitive complexity 114; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/lib/install-state.js:43
  • runTests has cyclomatic complexity 55 and cognitive complexity 107; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — tests/lib/install-targets.test.js:35
  • execute has cyclomatic complexity 52 and cognitive complexity 73; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/lib/context-profile-commands.js:81
  • handle has cyclomatic complexity 52 and cognitive complexity 55; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/memory-mcp.mjs:365
  • runTests has cyclomatic complexity 51 and cognitive complexity 100; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — tests/scripts/install-apply.test.js:104
  • validateInstallManifests has cyclomatic complexity 51 and cognitive complexity 90; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/ci/validate-install-manifests.js:71
  • runTests has cyclomatic complexity 48 and cognitive complexity 93; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — tests/lib/selective-install.test.js:46
  • uninstallLegacyCodexSync has cyclomatic complexity 47 and cognitive complexity 78; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/lib/codex-legacy-sync.js:521
  • (anonymous) has cyclomatic complexity 47 and cognitive complexity 48; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. (×2) — docker/context-profiles/complex-eval/cases3/idempotent-webhooks/check.cjs:27, docker/context-profiles/complex-eval/cases4/idempotent-webhooks/check.cjs:27

What to do

  • Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
R3 · Large Files9.9 / 10Exemplary✓ Tool-verified

React / JS · Code Health — How many source files exceed the large-file threshold.

Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.

  • docker/context-profiles/ai-eval-lib.js has 895 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — docker/context-profiles/ai-eval-lib.js:1
  • docker/gateguard-effectiveness/lib.js has 447 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — docker/gateguard-effectiveness/lib.js:1

What to do

  • Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R4 · Test Coverage7.4 / 10Strong✓ Tool-verified

React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.

Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.

  • docker/context-profiles/complex-eval/reference3/idempotent-webhooks/test/webhooks.test.js:5 imports '../src/store', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — docker/context-profiles/complex-eval/reference3/idempotent-webhooks/test/webhooks.test.js:5
  • docker/context-profiles/complex-eval/reference4/idempotent-webhooks/test/webhooks.test.js:5 imports '../src/store', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — docker/context-profiles/complex-eval/reference4/idempotent-webhooks/test/webhooks.test.js:5
  • docker/context-profiles/complex-eval/reference4/recurring-incident/test/idempotency.test.js:6 imports '../src/charge.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — docker/context-profiles/complex-eval/reference4/recurring-incident/test/idempotency.test.js:6
  • No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×37) — REDACTED:1, docker/gateguard-effectiveness/lib.js:1, docker/gateguard-effectiveness/run-intent.js:1, …

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R5 · Dependency Freshness9.2 / 10Exemplary✓ Tool-verified

React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).

Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.

What to do

  • Bump outdated dependencies to current versions to limit upgrade debt.
R6 · Tooling10.0 / 10Exemplary✓ Tool-verified

React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.

Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.

  • This repository declares test tooling, and the ✓ above records that declaration — but docker/context-profiles/complex-eval/reference3/idempotent-webhooks/test/webhooks.test.js and 2 other test file(s) in this workspace cannot be loaded at all: it imports a module that names no file in this repository, so the runner throws while collecting it and none of its cases execute. The wiring is present and the suite it points at does not run as written, which is why the tooling tick must not be read as a statement that the tests pass. Fix the unloadable file(s) — each one is reported with its failing import under Test Coverage — then the declared script exercises what it claims to. — docker/context-profiles/complex-eval/reference3/idempotent-webhooks/test/webhooks.test.js:5
R7 · Dead Code9.9 / 10Exemplary✓ Tool-verified

React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).

Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.

  • This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it. — tests/integration/hooks.test.js:19
R8 · Dependency Hygiene10.0 / 10Exemplary✓ Tool-verified

React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.

Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.

R9 · Circular Imports8.3 / 10Strong✓ Tool-verified

React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.

Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.

  • scripts/lib/context-profile-interactive.js → REDACTED → scripts/lib/context-profile-interactive.js — scripts/lib/context-profile-interactive.js:70

What to do

  • Break each cycle by extracting the shared piece into a module both sides can import.
X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.

Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.

X12 · Unreachable branch10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.

Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.

X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.

Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.

X14 · Bypassable address classification10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.

Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.

X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.

Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.

X16 · Unfloored truncation loop10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.

Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.

X17 · Uncapped recursion over a caller-supplied document2.0 / 10Critical✓ Tool-verified

Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.

Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.

  • `parse_urls` is public, takes a document from its caller (line 339) and hands it to `walk`, which calls itself at line 357 (`walk`) with a piece of `node` (and at line 360) — and nowhere in `walk` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `walk` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. (×3) — skills/taste-application/scripts/falapi.py:357, skills/taste-application/scripts/taste/falapi.py:357, skills/taste-distillation/scripts/taste/falapi.py:357
  • `validate` is public and takes `instance: Any` from its caller, and it calls itself at line 75 (`validate`) with a piece of `instance` (and at line 79, line 90) — and nowhere in `validate` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `validate` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — skills/taste-application/scripts/tasteforge/schema.py:75

What to do

  • Each finding names the externally-callable member that accepts the document and the self-call that descends, and states that no depth parameter or counter exists anywhere in the walk. Confirm from the two, then thread a depth argument through the walk and reject documents past a fixed maximum, or rewrite it with an explicit stack.
X18 · Disposal-pattern correctness10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.

Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.

X19 · Unrestored process-global state10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.

Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.

X2 · Cancellation propagation5.5 / 10Adequate✓ Tool-verified

Other · Code Health — Whether async functions that make a cancellable request accept or pass on an AbortSignal (adoption curve).

Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.

  • Only 2/8 async functions that make a cancellable request (fetch, axios, ky, ofetch) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
  • `measure` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — docker/context-profiles/complex-eval/calibrate-stats.js:46
  • `createPaste` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — docker/context-profiles/complex-eval/cases/sentinel-api/check.cjs:41
  • `waitForStatus` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — docker/context-profiles/complex-eval/cases/webhook-relay/check.cjs:37
  • `query` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — docker/context-profiles/complex-eval/cases2/event-stats-api/check.cjs:54
  • `release` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — scripts/discord/ecc-bot.mjs:171
  • `respond` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — scripts/discord/ecc-bot.mjs:181

What to do

  • Thread an AbortSignal through async functions that make requests, so the work stops when its caller gives up.
X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.

Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.

X22 · Contradicted release guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.

Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.

X23 · Unguarded diagnostic materialisation10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.

Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.

X24 · Document value interpolated into markup unescaped10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.

Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.

X25 · Inert configuration knob10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.

Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.

X26 · Unsynchronised callback handoff10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.

Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.

X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `for` loop leaves the `RefCell` it is walking alone — safe Rust rejects a body that changes the collection its loop borrows at compile time, except through interior mutability: a `RefCell` borrowed in the loop's header stays borrowed until the loop ends, so a `borrow_mut()` of it inside the body panics with `already borrowed: BorrowMutError` and the remaining elements are never seen. Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items are never seen.

Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.

X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.

Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.

X29 · Per-element action decided by a fixed element5.4 / 10Adequate✓ Tool-verified

Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.

Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.

  • This loop runs once per element of `words`, and the statement it guards acts on the element it is on — `words[i]`. The test deciding whether that statement runs does not: `name !== 'unset' && equals >= 0` reads `words[0]`, a subscript that does not move, so whatever it answers for that one element it answers for ALL of them. One `if` names the same collection at two different subscripts — the fixed one at line 910, which is the contradiction: either the test was meant to be per-element, in which case every element that differs from the fixed one is handled wrongly and all in the same direction, or it really is one answer for the whole collection, in which case it is being re-asked on every pass and belongs above the loop. The `if` is in the wrong place under both readings. Give the test the loop variable, or hoist it out. — scripts/hooks/block-no-verify.js:924

What to do

  • Each finding names the test and the statement it guards, which index the same collection at two different subscripts — one fixed, one the loop variable. Confirm from the two, then decide which subscript the test meant. If it was meant to be per-element, give it the loop variable so each element is judged on itself. If it really is one answer for the whole collection, hoist the test OUT of the loop, where a reader can see it is asked once and where it is not re-evaluated on every pass — leaving it inside, reading a fixed element, is the one arrangement that cannot be right under either reading.
X3 · Exception handling5.2 / 10Adequate✓ Tool-verified

Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.

Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.

  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×40) — docker/context-profiles/ai-eval-lib.js:272, docker/context-profiles/ai-eval-lib.js:540, docker/context-profiles/complex-eval/cases/incident-triage/check.cjs:11, …

What to do

  • Swallowed exception (empty catch)
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.

Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.

X4 · Structured logging3.4 / 10Weak✓ Tool-verified

Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.

Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `package.json` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.

  • `warning` at line 209 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — skills/delivery-gate/hooks/quality-gate.py:209
  • `warn!` at line 268 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — ecc2/src/notifications.rs:268
  • `warn!` at line 305 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. (×2) — ecc2/src/notifications.rs:305, ecc2/src/session/daemon.rs:305
  • `warn!` at line 333 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — ecc2/src/notifications.rs:333
  • `warn!` at line 4003 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — ecc2/src/main.rs:4003
  • `warn!` at line 1526 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — ecc2/src/session/manager.rs:1526
  • `info!` at line 2396 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — ecc2/src/session/manager.rs:2396
  • `error!` at line 2436 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — ecc2/src/session/manager.rs:2436
  • `warn!` at line 2485 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — ecc2/src/session/manager.rs:2485
  • `warn!` at line 2516 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — ecc2/src/session/manager.rs:2516
  • `error!` at line 27 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — ecc2/src/session/daemon.rs:27
  • `error!` at line 31 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — ecc2/src/session/daemon.rs:31
  • `error!` at line 35 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — ecc2/src/session/daemon.rs:35
  • `error!` at line 39 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — ecc2/src/session/daemon.rs:39
  • `error!` at line 43 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — ecc2/src/session/daemon.rs:43
  • `error!` at line 47 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — ecc2/src/session/daemon.rs:47
  • `error!` at line 51 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — ecc2/src/session/daemon.rs:51
  • `warn!` at line 61 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — ecc2/src/session/daemon.rs:61
  • `warn!` at line 83 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — ecc2/src/session/daemon.rs:83
  • `info!` at line 103 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — ecc2/src/session/daemon.rs:103
  • `info!` at line 122 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — ecc2/src/session/daemon.rs:122
  • `info!` at line 215 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — ecc2/src/session/daemon.rs:215
  • `info!` at line 235 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — ecc2/src/session/daemon.rs:235
  • `info!` at line 299 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — ecc2/src/session/daemon.rs:299
  • `info!` at line 359 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — ecc2/src/session/daemon.rs:359
  • `info!` at line 410 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — ecc2/src/session/daemon.rs:410
  • `warn!` at line 413 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — ecc2/src/session/daemon.rs:413
  • `warn!` at line 419 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — ecc2/src/session/daemon.rs:419
  • `info!` at line 422 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — ecc2/src/session/daemon.rs:422
  • `warn!` at line 425 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — ecc2/src/session/daemon.rs:425
  • `info!` at line 463 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — ecc2/src/session/daemon.rs:463
  • `info!` at line 466 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — ecc2/src/session/daemon.rs:466
  • `info!` at line 469 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — ecc2/src/session/daemon.rs:469
  • `warn!` at line 2183 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — ecc2/src/tui/dashboard.rs:2183
  • `warn!` at line 2217 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — ecc2/src/tui/dashboard.rs:2217
  • `warn!` at line 2249 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — ecc2/src/tui/dashboard.rs:2249
  • `warn!` at line 2386 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — ecc2/src/tui/dashboard.rs:2386
  • `warn!` at line 2414 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — ecc2/src/tui/dashboard.rs:2414
  • `warn!` at line 2445 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — ecc2/src/tui/dashboard.rs:2445

What to do

  • Interpolated log message defeats structured logging
X5 · Nullable reference types10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether strict null checking is enabled and not undermined by heavy `!` assertion — TypeScript's `strictNullChecks` (which `strict` turns on) is what makes `string` exclude `null` and `undefined`, and the postfix `!` is the operator that silences it.

Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.

WCAG coverage — what static analysis assessed

Statically assessed 5 of 55 WCAG 2.2 Level A/AA success criteria (9%; ≈10% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 50 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).

DimensionWCAG 2.2 A/AA criteriaCoverage
AC2 · Forms & labels1.3.1, 3.3.2, 4.1.2Partial signal
AC6 · Visual & motion safety1.4.3, 2.4.7Partial — literal CSS only
AC7 · A11y enforcementenforcement — no page criterionEnforcement posture (process)

Not statically assessed — these 50 Level A/AA criteria need runtime or manual evaluation (WCAG-EM): 1.1.1, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.4.1, 1.4.2, 1.4.4, 1.4.5, 1.4.10, 1.4.11, 1.4.12, 1.4.13, 2.1.1, 2.1.2, 2.1.4, 2.2.1, 2.2.2, 2.3.1, 2.4.1, 2.4.2, 2.4.3, 2.4.4, 2.4.5, 2.4.6, 2.4.11, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.7, 2.5.8, 3.1.1, 3.1.2, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.6, 3.3.1, 3.3.3, 3.3.4, 3.3.7, 3.3.8, 4.1.3.

Reference — by lens

The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.

LensScoreRatingImpact
Code Health42%Weak — gated by D1, D2, R1, X4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture92%ExemplarySolid.
Maturity85%StrongSolid.
Readiness53%Adequate — gated by D13, P3, P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security68%Adequate — gated by D29Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Event Sourcing100%ExemplaryStrongest area.
Accessibility74%StrongSolid.
Performance60%AdequateAcceptable, with room to improve.
Unscored — 3 check(s) recorded observations but carry no score

These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.

  • X10 Duplicated predicate — 25 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X6 Hand-rolled structured-format parsing — 2 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 4 control(s) we could not find positive evidence for

These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.

  • C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 40 check(s) not relevant to this codebase

These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.

  • AC1 Text alternatives — No image/media element found in the parsed markup — AC1 not applicable here.
  • AC3 Page structure — No structural check found in the parsed markup — AC3 not applicable here.
  • AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
  • AC5 ARIA correctness — No ARIA usage found in the parsed markup — AC5 not applicable here.
  • AX1 Captive dependencies — Not applicable: this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's Python imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; Rust with no dependency-injection crate has no container to hand one lifetime's instance to another — every value is owned by the code that builds it, and the borrow checker rejects a longer-lived value keeping a borrow of a shorter-lived one; this repository's TypeScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. No Swift request handler (a Vapor, Hummingbird, Kitura, Swifter or Perfect route handler, as a method or a registered closure) is declared, so no state is shared between request threads. Rust's compiler refuses unsynchronised shared mutation — a value shared across threads must be Sync — so the race this check looks for cannot be written. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX6 Interface segregation — no exported interface declares behaviour
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — compose up failed (exit 18 — an image could not be pulled) — fixture-tests Pulling real-cli Pulling real-cli-ubuntu Pulling fixture-tests Error Get "https://registry-1.docker.io/v2/": Forbidden real-cli Warning context canceled real-cli-ubuntu Warning context canceled Error response from daemon: Get "https://registry-1.docker.io/v2/": Forbidden; the earlier `compose pull` step reported: real-cli Warning Get "https://registry-1.docker.io/v2/": Forbidden fixture-tests Error Get "https://registry-1.docker.io/v2/": Forbidden WARNING: Some service image(s) must be built from source by running: docker compose build real-cli-ubuntu real-cli Error response from daemon: Get "https://registry-1.docker.io/v2/": Forbidden; the runtime sandbox reaches registries only through the in-fence pull-through mirror, so an image the mirror does not carry cannot be fetched — this is a limit of our sandbox, not of your stack; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ projects each declaring an entity of their own. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — No inline comments to assess — comment value is not applicable here.
  • D25 ADR Conformance — none of 2 ADRs are conformance-checkable — unverifiable.
  • D27 Navigability — D27 reads resolved call sites in the languages it reads only — this repository's production source is .lua, .py, .swift, .ts, .tsx, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
  • D34 Knowledge Freshness — knowledge concentrated in recent work — freshness signal contradicted by repo activity
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D8 Code Coverage — Coverage not measured — polyglot repository, one half has no runner
  • DM1 Domain Modelling — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 46 value object(s); 1 domain event(s); its domain events are published by services or handlers — no domain entity raises one
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and this analysis resolves a call's owner only where the receiver's type is written down in the source. Reported as guidance rather than measured
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage data present for 10 file(s), but no domain-layer files were identified: no covered file's path contains any of the markers this check keys on (/domain/, /aggregates/, /valueobjects/, /domainmodel/, .domain/, /entities/), which are matched case-insensitively anywhere in the path. With no domain partition there is nothing to compare the web/controller layer against — if this repository keeps its business rules under a folder named none of those, that naming is what the check cannot see, not the domain logic.
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for tinybench, mitata, benchmark.js, benny or vitest `bench(...)` calls in files that import them (or `*.bench.*` files), or one of those in a package.json, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not applicable: allocation awareness is rated where code engineers for it — at least 400 production lines that ship benchmarks or already use allocation-aware idioms (8 or more). This repository's Swift code has 258 production line(s), 0 such use(s) and no benchmarks, so there is no allocation work to rate. The card is reward-only: its absence costs nothing.
  • S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.

Critical — 26 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · High CVE · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D28 · Secrets (history) · High secret · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D13 · Secret Scanning · Leaked secret · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D31 · IaC & Container Security · High IaC · ×1
  • REDACTED
R9 · Circular Imports · Import cycle (2 files) · ×1
  • Import cycle (2 files) scripts/lib/context-profile-interactive.js:70 — scripts/lib/context-profile-interactive.js → REDACTED → scripts/lib/context-profile-interactive.js
Serious — 1672 finding(s)
D15 · Churn × Complexity Hotspots · Hotspot · ×65
  • Hotspot: scripts/hooks/gateguard-fact-force.js scripts/hooks/gateguard-fact-force.js:729 — scripts/hooks/gateguard-fact-force.js changed 52 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 63 in gateguard-fact-force.unwrapLeadWrappers at line 729. 36 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- scripts/hooks/gateguard-fact-force.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: scripts/lib/install/apply.js scripts/lib/install/apply.js:771 — scripts/lib/install/apply.js changed 37 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in apply.applyInstallPlanLocked at line 771. 33 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- scripts/lib/install/apply.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: scripts/hooks/block-no-verify.js scripts/hooks/block-no-verify.js:987 — scripts/hooks/block-no-verify.js changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 73 in block-no-verify.checkCommand at line 987. 9 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- scripts/hooks/block-no-verify.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: scripts/lib/context-selection.js scripts/lib/context-selection.js:333 — scripts/lib/context-selection.js changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 67 in context-selection.resolveTaskContext at line 333. 11 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- scripts/lib/context-selection.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: scripts/lib/install-lifecycle.js scripts/lib/install-lifecycle.js:1916 — scripts/lib/install-lifecycle.js changed 29 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in install-lifecycle.uninstallInstalledStates.results at line 1916. 24 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- scripts/lib/install-lifecycle.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: scripts/lib/install-state.js scripts/lib/install-state.js:42 — scripts/lib/install-state.js changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 69 in install-state.createFallbackValidator at line 42. 4 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- scripts/lib/install-state.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: scripts/lib/install-manifests.js scripts/lib/install-manifests.js:557 — scripts/lib/install-manifests.js changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in install-manifests.resolveInstallPlan at line 557. 10 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- scripts/lib/install-manifests.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: scripts/lib/codex-legacy-sync.js scripts/lib/codex-legacy-sync.js:521 — scripts/lib/codex-legacy-sync.js changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 47 in codex-legacy-sync.uninstallLegacyCodexSync at line 521. 8 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- scripts/lib/codex-legacy-sync.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: scripts/memory-mcp.mjs scripts/memory-mcp.mjs:365 — scripts/memory-mcp.mjs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 50 in memory-mcp.createMemoryMcpService.handle at line 365. 6 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- scripts/memory-mcp.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: scripts/lib/state-store/index.js scripts/lib/state-store/index.js:214 — scripts/lib/state-store/index.js changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 49 in index.wrapSqlJsDatabase at line 214. 6 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- scripts/lib/state-store/index.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: scripts/install-apply.js scripts/install-apply.js:87 — scripts/install-apply.js changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in install-apply.printHumanPlan at line 87. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- scripts/install-apply.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: docker/gateguard-effectiveness/run-intent.js docker/gateguard-effectiveness/run-intent.js:216 — docker/gateguard-effectiveness/run-intent.js changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in run-intent.main at line 216. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- docker/gateguard-effectiveness/run-intent.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: scripts/dev/gateguard-eval.js scripts/dev/gateguard-eval.js:435 — scripts/dev/gateguard-eval.js changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in gateguard-eval.summarize at line 435. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- scripts/dev/gateguard-eval.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: .opencode/plugins/ecc-hooks.ts .opencode/plugins/ecc-hooks.ts:358 — .opencode/plugins/ecc-hooks.ts changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in tool.execute.after at line 358. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- .opencode/plugins/ecc-hooks.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:492 — REDACTED changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in powershell-destructive-command.expandStaticDoubleQuotedString at line 492. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:141 — REDACTED changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in OllamaProvider.generate at line 141. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: .agents/skills/docs-governance/scripts/markdown_links.py .agents/skills/docs-governance/scripts/markdown_links.py:77 — .agents/skills/docs-governance/scripts/markdown_links.py changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in markdown_links.inline_link_targets at line 77. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- .agents/skills/docs-governance/scripts/markdown_links.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: skills/docs-governance/scripts/markdown_links.py skills/docs-governance/scripts/markdown_links.py:77 — skills/docs-governance/scripts/markdown_links.py changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in markdown_links.inline_link_targets at line 77. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- skills/docs-governance/scripts/markdown_links.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: scripts/hooks/cost-tracker.js scripts/hooks/cost-tracker.js:151 — scripts/hooks/cost-tracker.js changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in cost-tracker.sumUsageFromTranscript at line 151. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- scripts/hooks/cost-tracker.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: scripts/hooks/run-with-flags.js scripts/hooks/run-with-flags.js:192 — scripts/hooks/run-with-flags.js changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in run-with-flags.main at line 192. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- scripts/hooks/run-with-flags.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: scripts/ecc.js scripts/ecc.js:270 — scripts/ecc.js changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in ecc.runCommand at line 270. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- scripts/ecc.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: scripts/qwen-adapt-agents.js scripts/qwen-adapt-agents.js:133 — scripts/qwen-adapt-agents.js changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in qwen-adapt-agents.adaptFrontmatter at line 133. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- scripts/qwen-adapt-agents.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: tests/run-all.js tests/run-all.js:196 — tests/run-all.js changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in reportTestFile at line 196. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- tests/run-all.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: scripts/lib/install/plan.js scripts/lib/install/plan.js:258 — scripts/lib/install/plan.js changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in plan.createManifestInstallPlan at line 258. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- scripts/lib/install/plan.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:291 — REDACTED changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in ledger.replaceTable at line 291. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • + 40 more in this group — see findings.md.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×40
  • Outbound HTTP without resilience docker/context-profiles/complex-eval/calibrate-stats.js:56 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience docker/context-profiles/complex-eval/cases/sentinel-api/check.cjs:42 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience docker/context-profiles/complex-eval/cases/sentinel-api/check.cjs:69 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience docker/context-profiles/complex-eval/cases/sentinel-api/check.cjs:70 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience docker/context-profiles/complex-eval/cases/sentinel-api/check.cjs:71 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience docker/context-profiles/complex-eval/cases/sentinel-api/check.cjs:75 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience docker/context-profiles/complex-eval/cases/sentinel-api/check.cjs:78 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience docker/context-profiles/complex-eval/cases/sentinel-api/check.cjs:82 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience docker/context-profiles/complex-eval/cases/sentinel-api/check.cjs:89 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience docker/context-profiles/complex-eval/cases/sentinel-api/check.cjs:102 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience docker/context-profiles/complex-eval/cases/sentinel-api/check.cjs:110 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience docker/context-profiles/complex-eval/cases/sentinel-api/check.cjs:113 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience docker/context-profiles/complex-eval/cases/sentinel-api/check.cjs:116 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience docker/context-profiles/complex-eval/cases/webhook-relay/check.cjs:32 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience docker/context-profiles/complex-eval/cases/webhook-relay/check.cjs:42 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience docker/context-profiles/complex-eval/cases/webhook-relay/check.cjs:105 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience docker/context-profiles/complex-eval/cases2/event-stats-api/check.cjs:56 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience docker/context-profiles/complex-eval/cases3/chained-tickets/steps/01-core/check.cjs:34 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience docker/context-profiles/complex-eval/cases3/chained-tickets/steps/01-core/check.cjs:36 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience docker/context-profiles/complex-eval/cases3/chained-tickets/steps/01-core/check.cjs:70 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:48 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:57 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:77 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:41 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience docker/context-profiles/complex-eval/cases3/chained-tickets/steps/04-analytics/check.cjs:42 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • + 15 more in this group — see findings.md.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×40
  • Sync-over-async blocking docker/context-profiles/complex-eval/calibrate-stats.js:71 — `fs.rmSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking docker/context-profiles/complex-eval/calibrate-stats.js:72 — `fs.rmSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking docker/context-profiles/complex-eval/cases/sentinel-api/check.cjs:50 — `fs.readFileSync` in `callback to map` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking docker/context-profiles/complex-eval/cases2/event-stats-api/check.cjs:134 — `fs.readFileSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking docker/context-profiles/complex-eval/cases2/event-stats-api/check.cjs:137 — `fs.readdirSync` in `walk` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking docker/context-profiles/complex-eval/cases2/event-stats-api/check.cjs:140 — `fs.readFileSync` in `walk` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking docker/context-profiles/complex-eval/cases3/chained-tickets/steps/01-core/check.cjs:84 — `fs.readFileSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking docker/context-profiles/complex-eval/cases3/chained-tickets/steps/01-core/check.cjs:87 — `fs.readdirSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking docker/context-profiles/complex-eval/cases3/chained-tickets/steps/01-core/check.cjs:87 — `fs.readFileSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking docker/context-profiles/complex-eval/cases3/chained-tickets/steps/01-core/check.cjs:92 — `fs.existsSync` in `callback to every` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:70 — `fs.readFileSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:74 — `fs.rmSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:84 — `fs.mkdirSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:85 — `fs.writeFileSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:92 — `fs.rmSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:96 — `fs.readFileSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:99 — `fs.readdirSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:99 — `fs.readFileSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking REDACTED:66 — `fs.readdirSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking REDACTED:67 — `fs.readFileSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking REDACTED:73 — `fs.readFileSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking REDACTED:76 — `fs.readdirSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking REDACTED:76 — `fs.readFileSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking docker/context-profiles/complex-eval/cases3/chained-tickets/steps/04-analytics/check.cjs:75 — `fs.readFileSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking docker/context-profiles/complex-eval/cases3/chained-tickets/steps/04-analytics/check.cjs:78 — `fs.readFileSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • + 15 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (empty catch) · ×40
  • Swallowed exception (empty catch) docker/context-profiles/ai-eval-lib.js:272 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) docker/context-profiles/ai-eval-lib.js:540 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) docker/context-profiles/complex-eval/cases/incident-triage/check.cjs:11 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) docker/context-profiles/complex-eval/cases/incident-triage/check.cjs:26 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) docker/context-profiles/complex-eval/cases/incident-triage/check.cjs:30 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) docker/context-profiles/complex-eval/cases/incident-triage/check.cjs:38 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) docker/context-profiles/complex-eval/cases/sentinel-api/check.cjs:121 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) docker/context-profiles/complex-eval/cases/webhook-relay/check.cjs:47 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) docker/context-profiles/complex-eval/cases/webhook-relay/check.cjs:123 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) docker/context-profiles/complex-eval/cases2/event-stats-api/check.cjs:130 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) docker/context-profiles/complex-eval/cases2/forge-cli/check.cjs:13 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) docker/context-profiles/complex-eval/cases2/forge-cli/check.cjs:79 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) docker/context-profiles/complex-eval/cases2/keccak-selector/check.cjs:26 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) docker/context-profiles/complex-eval/cases2/keccak-selector/check.cjs:31 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) docker/context-profiles/complex-eval/cases2/keccak-selector/check.cjs:54 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) docker/context-profiles/complex-eval/cases3/chained-tickets/steps/01-core/check.cjs:28 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) docker/context-profiles/complex-eval/cases3/chained-tickets/steps/01-core/check.cjs:75 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) docker/context-profiles/complex-eval/cases3/chained-tickets/steps/01-core/check.cjs:84 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) docker/context-profiles/complex-eval/cases3/chained-tickets/steps/01-core/check.cjs:88 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:70 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:93 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:96 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:100 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:62 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:69 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • + 15 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×37
  • FileTooLong: tui/dashboard.rs ecc2/src/tui/dashboard.rs — FileTooLong — 6784 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 72% of them inside a single declaration: Dashboard (2 blocks, 107-7232), declaring 95 free functions. The bar is 500 significant lines; this is 6284 over it, 13.57× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: src/main.rs ecc2/src/main.rs — FileTooLong — 6414 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 153 free functions. The bar is 500 significant lines; this is 5914 over it, 12.83× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 4464 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 82% of them inside a single declaration: StateStore (3 blocks, 27-5717), declaring 41 free functions. The bar is 500 significant lines; this is 3964 over it, 8.93× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: session/manager.rs ecc2/src/session/manager.rs — FileTooLong — 3174 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 108 free functions. The bar is 500 significant lines; this is 2674 over it, 6.35× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 1591 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1091 over it, 3.18× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: scripts/instinct-cli.py skills/continuous-learning-v2/scripts/instinct-cli.py — FileTooLong — 1589 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1089 over it, 3.18× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: hooks/gateguard-fact-force.js scripts/hooks/gateguard-fact-force.js — FileTooLong — 1580 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1080 over it, 3.16× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: lib/install-lifecycle.js scripts/lib/install-lifecycle.js — FileTooLong — 1445 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 945 over it, 2.89× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: worktree/mod.rs ecc2/src/worktree/mod.rs — FileTooLong — 1167 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 60 free functions. The bar is 500 significant lines; this is 667 over it, 2.33× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 880 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 380 over it, 1.76× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: scripts/operator-readiness-dashboard.js scripts/operator-readiness-dashboard.js — FileTooLong — 845 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 345 over it, 1.69× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: hooks/block-no-verify.js scripts/hooks/block-no-verify.js — FileTooLong — 792 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 292 over it, 1.58× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: scripts/harness-audit.js scripts/harness-audit.js — FileTooLong — 788 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 288 over it, 1.58× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: state-store/queries.js scripts/lib/state-store/queries.js — FileTooLong — 773 significant lines (blank, comment-only and punctuation-only lines excluded), about 62% of them inside a single declaration: createQueryApi (399-938). The bar is 500 significant lines; this is 273 over it, 1.55× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: scripts/release-video-suite.js scripts/release-video-suite.js — FileTooLong — 771 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 271 over it, 1.54× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: install/apply.js scripts/lib/install/apply.js — FileTooLong — 753 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 253 over it, 1.51× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: context-profiles/ai-eval-lib.js docker/context-profiles/ai-eval-lib.js — FileTooLong — 725 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 225 over it, 1.45× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: tasteforge/workflow.py skills/taste-application/scripts/tasteforge/workflow.py — FileTooLong — 704 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 204 over it, 1.41× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: config/mod.rs ecc2/src/config/mod.rs — FileTooLong — 674 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 174 over it, 1.35× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: lib/gateguard-file-context.js scripts/lib/gateguard-file-context.js — FileTooLong — 662 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 162 over it, 1.32× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: ./ecc_dashboard.py ecc_dashboard.py — FileTooLong — 652 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 152 over it, 1.30× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: lib/memory-vault.js scripts/lib/memory-vault.js — FileTooLong — 622 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 122 over it, 1.24× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: scripts/audit-docs.py .agents/skills/docs-governance/scripts/audit-docs.py — FileTooLong — 612 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 112 over it, 1.22× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: scripts/audit-docs.py pi/core/skills/docs-governance/scripts/audit-docs.py — FileTooLong — 612 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 112 over it, 1.22× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: scripts/audit-docs.py skills/docs-governance/scripts/audit-docs.py — FileTooLong — 612 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 112 over it, 1.22× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • + 12 more in this group — see findings.md.
R4 · Test Coverage · No test reaches this file · ×37
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file docker/gateguard-effectiveness/lib.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file docker/gateguard-effectiveness/run-intent.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file skills/ck/commands/shared.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file scripts/codemaps/generate.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file workflows/orch-review.workflow.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file docker/gateguard-effectiveness/coverage.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file scripts/discord/ecc-bot.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file docker/gateguard-effectiveness/run.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file skills/ck/hooks/session-start.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file scripts/discord/release-announce.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file skills/ck/commands/save.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file skills/remotion-video-creation/rules/assets/charts-bar-chart.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file docker/context-profiles/native-probe.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file docker/gateguard-effectiveness/session.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file docker/gateguard-effectiveness/intent-eval.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file docker/context-profiles/complex-eval/cases4/production-ready/check.cjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file docker/context-profiles/complex-eval/cases2/event-stats-api/check.cjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file docker/context-profiles/packed-smoke.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file scripts/ci/check-hooks-schema-keys.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file docker/context-profiles/complex-eval/cases3/production-ready/check.cjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file docker/context-profiles/complex-eval/cases2/forge-cli/check.cjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • + 12 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Repeated repair · ×36
  • Repeated repair: scripts/lib/skill-evolution/versioning.js scripts/lib/skill-evolution/versioning.js:348 — scripts/lib/skill-evolution/versioning.js changed 9 times in last 90 days and 9 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is versioning.rollbackTo at line 348), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: preflight and document snapshot storage capability”; “fix: normalize root overrides and report unverified snapshot staging”; “fix: preserve rollback version state and bounded runtime workflows”; “fix: publish rollback target snapshot before replacing live skill”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- scripts/lib/skill-evolution/versioning.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: scripts/lib/install-executor.js scripts/lib/install-executor.js:452 — scripts/lib/install-executor.js changed 9 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is install-executor.createLegacyInstallPlan at line 452), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(opencode): complete legacy root migration”; “fix(opencode): isolate explicit home contexts”; “fix(opencode): route lifecycle through config overrides”; “fix(release): make ECC 2.2 ready to publish”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- scripts/lib/install-executor.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: scripts/lib/install-targets/claude-home.js scripts/lib/install-targets/claude-home.js:14 — scripts/lib/install-targets/claude-home.js changed 7 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is claude-home.getClaudeManagedDestinationPath at line 14), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: protect commands-only CommonJS runtime in Claude installs”; “fix(install): limit followup to target-compatible dependency resolution”; “fix: stop home installs copying .agents into ~/.claude and ~/.codex”; “fix(install): keep home targets target-safe”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- scripts/lib/install-targets/claude-home.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: scripts/hooks/session-end.js scripts/hooks/session-end.js:57 — scripts/hooks/session-end.js changed 7 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is session-end.collectEntry at line 57), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: keep session summaries within the lifecycle deadline”; “fix(session-start): scope summary lookup to repository identity (#3160) (#3168)”; “fix(hooks): preserve metadata-marked human prompts”; “fix(hooks): preserve short sessions and quote evolved metadata”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- scripts/hooks/session-end.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: skills/skill-comply/scripts/runner.py skills/skill-comply/scripts/runner.py:210 — skills/skill-comply/scripts/runner.py changed 5 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is runner._parse_stream_json at line 210), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: reject linked sandbox bases before scenario cleanup”; “fix: reject the shared base as a scenario sandbox”; “fix: close truth and portability review gaps”; “fix(skill-comply): harden home path redaction”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- skills/skill-comply/scripts/runner.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: docker/gateguard-effectiveness/coverage.js docker/gateguard-effectiveness/coverage.js:182 — docker/gateguard-effectiveness/coverage.js changed 5 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is coverage.renderHoles at line 182), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(gateguard): make harness graders check content and count only valid trials”; “fix(gateguard): harden effectiveness evidence”; “fix(gateguard): enforce evaluation validity guards”; “fix(gateguard): do not charge the ungated arm with gate-specific holes”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- docker/gateguard-effectiveness/coverage.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src/llm/providers/reasoning.py src/llm/providers/reasoning.py:19 — src/llm/providers/reasoning.py changed 5 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is reasoning.strip_reasoning at line 19), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: require explicit reasoning format before stripping content”; “fix(llm): keep answers too deeply nested to parse whole in prefilled mode”; “fix(llm): fall back when a prefilled answer is too deeply nested to parse”; “fix(llm): keep complete JSON answers whole in prefilled reasoning mode”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- src/llm/providers/reasoning.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: scripts/lib/install-targets/opencode-home.js scripts/lib/install-targets/opencode-home.js:26 — scripts/lib/install-targets/opencode-home.js changed 5 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is opencode-home.isExpectedType at line 26), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(opencode): preserve CommonJS runtime scope and user script ownership”; “fix: resolve installed OpenCode skill paths consistently”; “fix: resolve OpenCode source imports and installed skills paths”; “fix(release): clear final review blockers”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- scripts/lib/install-targets/opencode-home.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: scripts/lib/state-store/file-lock.js scripts/lib/state-store/file-lock.js:43 — scripts/lib/state-store/file-lock.js changed 5 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is file-lock.releaseOwnedLock at line 43), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(state-store): tolerate missing Windows lock device IDs”; “fix(state-store): keep cleanup diagnostics off caller errors”; “fix(state-store): preserve permission errors after lock retries”; “fix(state-store): retry Windows contention and repair fixtures”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- scripts/lib/state-store/file-lock.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: scripts/hooks/posttooluse-dispatcher.js scripts/hooks/posttooluse-dispatcher.js:233 — scripts/hooks/posttooluse-dispatcher.js changed 7 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is posttooluse-dispatcher.runHooks at line 233), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(hooks): keep silent hook paths silent (#2987)”; “fix(hooks): harden Hookify rule enforcement”; “fix: close PowerShell destructive command gate bypass”; “fix(skill-evolution): wire Skill PostToolUse tracker so skill-health shows real runs (#2490)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- scripts/hooks/posttooluse-dispatcher.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: REDACTED REDACTED:107 — REDACTED changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is catalog.parseReadmeExpectations at line 107), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(catalog): reject unmarked agent-tree skill undercounts”; “fix: complete reviewed integration workflows and safety checks”; “fix(ci): close catalog gate holes on README project tree”; “fix(ci): validate cross-harness catalog counts”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: ecc2/src/config/mod.rs ecc2/src/config/mod.rs:799 — ecc2/src/config/mod.rs changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is ResolvedAgentProfile::apply at line 799), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(ecc2): report test config root cleanup failures instead of ignoring them”; “fix: reconcile stewardship batch on current main”; “fix(ecc2): also sandbox the legacy ~/.claude/ecc2.toml path under cfg(test)”; “fix(ecc2): sandbox Config::config_path() under cfg(test)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- ecc2/src/config/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: scripts/lib/install-targets/claude-project.js scripts/lib/install-targets/claude-project.js:14 — scripts/lib/install-targets/claude-project.js changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is claude-project.getClaudeManagedDestinationPath at line 14), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: protect commands-only CommonJS runtime in Claude installs”; “fix: isolate Claude project hooks from ESM hosts (#3184)”; “fix(install): harden Claude settings lifecycle”; “fix: flatten Claude skill installs (#2582)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- scripts/lib/install-targets/claude-project.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: scripts/lib/control-pane/proximity.js scripts/lib/control-pane/proximity.js:19 — scripts/lib/control-pane/proximity.js changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is proximity.decodeGitPath at line 19), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(proximity): decode quoted paths with precise line ranges”; “fix(proximity): isolate diff headers and preserve partial probes”; “fix(proximity): retain all tracked working-set paths”; “fix(proximity): observe uncommitted worktree changes”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- scripts/lib/control-pane/proximity.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: scripts/lib/install/hook-consent.js scripts/lib/install/hook-consent.js:100 — scripts/lib/install/hook-consent.js changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is hook-consent.isHookRuntimeOperation at line 100), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(opencode): avoid duplicate home plugin initialization”; “fix(opencode): guard legacy cleanup and portable consent fixtures”; “fix(install): gate OpenCode hook activation”; “fix(install): preserve opencode non-hook defaults”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- scripts/lib/install/hook-consent.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: scripts/lib/harness-capabilities.js scripts/lib/harness-capabilities.js:345 — scripts/lib/harness-capabilities.js changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is harness-capabilities.normalizeHarnessSelection at line 345), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(install): register AdaL capability metadata”; “fix(release): clear final review blockers”; “fix(release): make ECC 2.2 ready to publish”; “fix(install): harden ECC installer lifecycle”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- scripts/lib/harness-capabilities.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: docker/gateguard-effectiveness/scenarios-intent/csv-export-delimiter/grader.cjs docker/gateguard-effectiveness/scenarios-intent/csv-export-delimiter/grader.cjs:15 — docker/gateguard-effectiveness/scenarios-intent/csv-export-delimiter/grader.cjs changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is grader.valuesMatch at line 15), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: validate evaluator files before pipe reads and strengthen grader controls”; “fix: reject constant grader output and classify overflow errors”; “fix(gateguard): fix the CSV grader's expected values before the export runs”; “fix(gateguard): make harness graders check content and count only valid trials”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- docker/gateguard-effectiveness/scenarios-intent/csv-export-delimiter/grader.cjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: scripts/lib/atomic-write.js scripts/lib/atomic-write.js:54 — scripts/lib/atomic-write.js changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is atomic-write.writeFileAtomic at line 54), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: allow bounded sustained Windows atomic replacement contention”; “fix(state): retry Windows sharing reads without dropping published aliases”; “fix(fs): retry bounded Windows atomic rename sharing failures”; “fix(install): pin Claude settings parent during atomic replacement”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- scripts/lib/atomic-write.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: scripts/hooks/plan-canvas-pending.js scripts/hooks/plan-canvas-pending.js:101 — scripts/hooks/plan-canvas-pending.js changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is plan-canvas-pending.pendingSessions at line 101), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(plan-canvas): reconcile profile resolver and retain invalid feedback queues”; “fix(plan-canvas): validate feedback IPC locator and request shape”; “fix(plan-canvas): route session state through CLAUDE_CONFIG_DIR”; “fix(hooks): honor CLAUDE_CONFIG_DIR instead of writing to ~/.claude”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- scripts/hooks/plan-canvas-pending.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: scripts/lib/agent-data-home.js scripts/lib/agent-data-home.js:140 — scripts/lib/agent-data-home.js changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is agent-data-home.readProjectConfigAt at line 140), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(hooks): honor CLAUDE_CONFIG_DIR instead of writing to ~/.claude”; “fix(hooks): keep ~/.claude eligible as project sharing root with CLAUDE_CONFIG_DIR”; “fix(hooks): honor CLAUDE_CONFIG_DIR for the default agent data home”; “fix: harden local dashboard and data boundaries (#2585)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- scripts/lib/agent-data-home.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: scripts/hooks/config-protection.js scripts/hooks/config-protection.js:147 — scripts/hooks/config-protection.js changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is config-protection.run at line 147), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(hooks): distinguish Biome configs from results files”; “fix(config-protection): cover the TypeScript and ESM config variants”; “fix(config-protection): protect ignore files and current config spellings”; “fix(config-protection): protect shared/base linter configs, not just entry points”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- scripts/hooks/config-protection.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: scripts/lib/transcript-context.js scripts/lib/transcript-context.js:90 — scripts/lib/transcript-context.js changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is transcript-context.readLatestContextTokens at line 90), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: close truth and portability review gaps”; “fix(suggest-compact): don't quote a percentage against an assumed window”; “fix: add claude-opus-5 to KNOWN_MODEL_WINDOW_TOKENS (#2609)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- scripts/lib/transcript-context.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: scripts/control-pane.js scripts/control-pane.js:21 — scripts/control-pane.js changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is control-pane.main at line 21), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: restore plan canvas process launcher”; “fix(scripts): extract cross-platform openBrowser helper with structured launch result (#3180)”; “fix(install): ship ajv/sql.js with the plugin install bundle (#2822)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- scripts/control-pane.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: scripts/repair.js scripts/repair.js:17 — scripts/repair.js changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is repair.parseArgs at line 17), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: installer slice from PR #3120 review (Haelyra)”; “fix(opencode): isolate explicit home contexts”; “fix(install): harden ECC installer lifecycle”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- scripts/repair.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: skills/skill-comply/scripts/classifier.py skills/skill-comply/scripts/classifier.py:66 — skills/skill-comply/scripts/classifier.py changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is classifier._parse_classification at line 66), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: reject constant grader output and classify overflow errors”; “fix: reject malformed classifier values before reporting”; “fix: raise on unparseable skill-comply classifier output”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 17:28:23 -04:00' --until='2026-10-20 17:28:23 -04:00' --full-history --no-merges -- skills/skill-comply/scripts/classifier.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • + 11 more in this group — see findings.md.
D3 · God Classes · FunctionTooLong · ×35
  • FunctionTooLong: ecc_tui::main ecc2/src/main.rs:1426 — FunctionTooLong — ecc_tui::main runs 1234 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 1134 over it, 12.34× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: queries.createQueryApi scripts/lib/state-store/queries.js:399 — FunctionTooLong — createQueryApi runs 480 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 380 over it, 4.80× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: server.createPlanCanvasServer REDACTED:232 — FunctionTooLong — createPlanCanvasServer runs 359 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 259 over it, 3.59× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: harness-audit.getRepoChecks scripts/harness-audit.js:396 — FunctionTooLong — getRepoChecks runs 215 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 115 over it, 2.15× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: apply.applyInstallPlanLocked scripts/lib/install/apply.js:771 — FunctionTooLong — applyInstallPlanLocked runs 214 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 114 over it, 2.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: observability-readiness.buildChecks scripts/observability-readiness.js:113 — FunctionTooLong — buildChecks runs 208 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 108 over it, 2.08× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: ecc_tui::build_legacy_migration_plan_report ecc2/src/main.rs:7269 — FunctionTooLong — ecc_tui::build_legacy_migration_plan_report runs 200 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 100 over it, 2.00× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: server.createControlPaneServer REDACTED:162 — FunctionTooLong — createControlPaneServer runs 166 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 66 over it, 1.66× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: ecc_tui::build_legacy_migration_audit_report ecc2/src/main.rs:5127 — FunctionTooLong — ecc_tui::build_legacy_migration_audit_report runs 158 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 58 over it, 1.58× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: install-manifests.resolveInstallPlan scripts/lib/install-manifests.js:557 — FunctionTooLong — resolveInstallPlan runs 148 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 48 over it, 1.48× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: install-state.createFallbackValidator scripts/lib/install-state.js:42 — FunctionTooLong — createFallbackValidator runs 142 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 42 over it, 1.42× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: index.wrapSqlJsDatabase scripts/lib/state-store/index.js:214 — FunctionTooLong — wrapSqlJsDatabase runs 142 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 42 over it, 1.42× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: ecc_tui::handle_remote_dispatch_connection ecc2/src/main.rs:4010 — FunctionTooLong — ecc_tui::handle_remote_dispatch_connection runs 139 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 39 over it, 1.39× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: block-no-verify.checkCommand scripts/hooks/block-no-verify.js:987 — FunctionTooLong — checkCommand runs 133 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 33 over it, 1.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: claude-scope-migration.migrateClaudePluginScope scripts/lib/claude-scope-migration.js:327 — FunctionTooLong — migrateClaudePluginScope runs 130 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 30 over it, 1.30× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: run-intent.main docker/gateguard-effectiveness/run-intent.js:216 — FunctionTooLong — main runs 127 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 27 over it, 1.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: ecc_tui::import_legacy_remote_dispatch ecc2/src/main.rs:7110 — FunctionTooLong — ecc_tui::import_legacy_remote_dispatch runs 125 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 25 over it, 1.25× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: server.createPlanCanvasServer.handleApi REDACTED:398 — FunctionTooLong — createPlanCanvasServer.handleApi runs 125 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 25 over it, 1.25× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: ecc_tui::session::manager::build_merge_queue ecc2/src/session/manager.rs:2110 — FunctionTooLong — ecc_tui::session::manager::build_merge_queue runs 123 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 23 over it, 1.23× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: server.createControlPaneServer.server REDACTED:195 — FunctionTooLong — createControlPaneServer.server runs 123 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 23 over it, 1.23× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: status.renderMarkdown scripts/status.js:287 — FunctionTooLong — renderMarkdown runs 122 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 22 over it, 1.22× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: validate-install-manifests.validateInstallManifests scripts/ci/validate-install-manifests.js:71 — FunctionTooLong — validateInstallManifests runs 120 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 20 over it, 1.20× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: block-no-verify.executableWords scripts/hooks/block-no-verify.js:338 — FunctionTooLong — executableWords runs 119 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 19 over it, 1.19× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: sandbox-smoke.smoke docker/context-profiles/sandbox-smoke.js:37 — FunctionTooLong — smoke runs 117 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 17 over it, 1.17× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: sessions.createSessionStore scripts/lib/plan-canvas/sessions.js:101 — FunctionTooLong — createSessionStore runs 115 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 15 over it, 1.15× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • + 10 more in this group — see findings.md.
D2 · Cognitive Complexity · ecc_tui · ×23
  • ecc_tui::main (cognitive 342) ecc2/src/main.rs:1426 — ecc_tui::main has cognitive complexity 342 (threshold 15). Drivers by points: if/else 150 (288 pts), loops 11 (36 pts), match/switch 7 (13 pts), boolean chains 5 (nesting depth added 169). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • ecc_tui::session::manager::enforce_conflict_resolution (cognitive 44) ecc2/src/session/manager.rs:1255 — ecc_tui::session::manager::enforce_conflict_resolution has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (37 pts), loops 4 (6 pts), boolean chains 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ecc_tui::session::manager::build_agent_command (cognitive 40) ecc2/src/session/manager.rs:3071 — ecc_tui::session::manager::build_agent_command has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (33 pts), loops 2 (6 pts), match/switch 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ecc_tui::tui::app::run (cognitive 38) ecc2/src/tui/app.rs:15 — ecc_tui::tui::app::run has cognitive complexity 38 (threshold 15). Drivers by points: if/else 6 (22 pts), match/switch 3 (14 pts), boolean chains 1, loops 1 (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • ecc_tui::session::manager::build_configured_harness_command (cognitive 36) ecc2/src/session/manager.rs:3190 — ecc_tui::session::manager::build_configured_harness_command has cognitive complexity 36 (threshold 15). Drivers by points: if/else 17 (31 pts), loops 3 (5 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ecc_tui::worktree::base_checkout_path (cognitive 27) ecc2/src/worktree/mod.rs:1571 — ecc_tui::worktree::base_checkout_path has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 4, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ecc_tui::session::manager::rebalance_team_backlog (cognitive 26) ecc2/src/session/manager.rs:1051 — ecc_tui::session::manager::rebalance_team_backlog has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ecc_tui::session::manager::build_merge_queue (cognitive 26) ecc2/src/session/manager.rs:2110 — ecc_tui::session::manager::build_merge_queue has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ecc_tui::build_legacy_migration_plan_report (cognitive 25) ecc2/src/main.rs:7269 — ecc_tui::build_legacy_migration_plan_report has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 3, match/switch 2 (3 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ecc_tui::build_legacy_remote_add_command (cognitive 24) ecc2/src/main.rs:7025 — ecc_tui::build_legacy_remote_add_command has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (20 pts), match/switch 3 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ecc_tui::session::manager::process_merge_queue (cognitive 24) ecc2/src/session/manager.rs:1866 — ecc_tui::session::manager::process_merge_queue has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 2 (6 pts), loops 3 (5 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ecc_tui::tui::dashboard::summarize_completion_decisions (cognitive 24) ecc2/src/tui/dashboard.rs:8896 — ecc_tui::tui::dashboard::summarize_completion_decisions has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ecc_tui::parse_markdown_memory_sections (cognitive 23) ecc2/src/main.rs:3695 — ecc_tui::parse_markdown_memory_sections has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ecc_tui::format_merge_queue_human (cognitive 23) ecc2/src/main.rs:8214 — ecc_tui::format_merge_queue_human has cognitive complexity 23 (threshold 15). Drivers by points: loops 5 (16 pts), if/else 4 (7 pts) (nesting depth added 14). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
  • ecc_tui::import_legacy_remote_dispatch (cognitive 22) ecc2/src/main.rs:7110 — ecc_tui::import_legacy_remote_dispatch has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 5 (9 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ecc_tui::session::manager::render_task_with_profile_projection (cognitive 22) ecc2/src/session/manager.rs:3468 — ecc_tui::session::manager::render_task_with_profile_projection has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • ecc_tui::session::store::derive_board_conflict_signals (cognitive 20) REDACTED:4820 — ecc_tui::session::store::derive_board_conflict_signals has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 7 (10 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ecc_tui::parse_dotenv_memory_entries (cognitive 19) ecc2/src/main.rs:3629 — ecc_tui::parse_dotenv_memory_entries has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ecc_tui::import_legacy_schedules (cognitive 17) ecc2/src/main.rs:6008 — ecc_tui::import_legacy_schedules has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 2 (4 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ecc_tui::session::manager::enforce_budget_hard_limits (cognitive 17) ecc2/src/session/manager.rs:1177 — ecc_tui::session::manager::enforce_budget_hard_limits has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 5, loops 3 (4 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ecc_tui::worktree::detect_shared_dependency_strategies (cognitive 17) ecc2/src/worktree/mod.rs:1222 — ecc_tui::worktree::detect_shared_dependency_strategies has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 5 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ecc_tui::handle_remote_dispatch_connection (cognitive 16) ecc2/src/main.rs:4010 — ecc_tui::handle_remote_dispatch_connection has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), match/switch 5 (8 pts) (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • ecc_tui::tui::dashboard::build_worktree_diff_columns (cognitive 16) ecc2/src/tui/dashboard.rs:8186 — ecc_tui::tui::dashboard::build_worktree_diff_columns has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×18
  • Duplicated block (5 lines × 2) ecc2/src/main.rs:8025 — ecc2/src/main.rs:8025-8029 | ecc2/src/tui/dashboard.rs:5489-5493 — before extracting anything, compare `ecc2/src/main.rs` and `ecc2/src/tui/dashboard.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) ecc2/src/main.rs:6451 — ecc2/src/main.rs:6451-6455 | ecc2/src/main.rs:6719-6723 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) ecc2/src/main.rs:6699 — ecc2/src/main.rs:6699-6703 | ecc2/src/main.rs:6954-6958 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) ecc2/src/main.rs:5987 — ecc2/src/main.rs:5987-5991 | ecc2/src/main.rs:7069-7073 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) ecc_dashboard.py:437 — ecc_dashboard.py:437-441 | ecc_dashboard.py:550-554 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) pi/core/skills/agent-self-evaluation/scripts/evaluate.py:153 — pi/core/skills/agent-self-evaluation/scripts/evaluate.py:153-157 | skills/agent-self-evaluation/scripts/evaluate.py:153-157 — before extracting anything, compare `pi/core/skills/agent-self-evaluation/scripts/evaluate.py` and `skills/agent-self-evaluation/scripts/evaluate.py` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 279 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (5 lines × 2) skills/continuous-learning-v2/scripts/instinct-cli.py:757 — skills/continuous-learning-v2/scripts/instinct-cli.py:757-762 | skills/continuous-learning-v2/scripts/instinct-cli.py:1316-1320 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) skills/taste-application/scripts/mint.py:129 — skills/taste-application/scripts/mint.py:129-133 | skills/taste-distillation/scripts/mint.py:129-133 — before extracting anything, compare `skills/taste-application/scripts/mint.py` and `skills/taste-distillation/scripts/mint.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) skills/taste-application/scripts/taste/cadence.py:212 — skills/taste-application/scripts/taste/cadence.py:212-216 | skills/taste-distillation/scripts/taste/cadence.py:212-216 — before extracting anything, compare `skills/taste-application/scripts/taste/cadence.py` and `skills/taste-distillation/scripts/taste/cadence.py` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 194 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `skills/taste-application/scripts/taste/cadence.py:212` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) skills/taste-application/scripts/taste/grade.py:132 — skills/taste-application/scripts/taste/grade.py:132-136 | skills/taste-distillation/scripts/taste/grade.py:132-136 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 484 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) skills/taste-application/scripts/taste/grade.py:218 — skills/taste-application/scripts/taste/grade.py:218-222 | skills/taste-distillation/scripts/taste/grade.py:218-222 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 484 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `skills/taste-application/scripts/taste/grade.py:218` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (5 lines × 2) skills/taste-application/scripts/taste/plates.py:227 — skills/taste-application/scripts/taste/plates.py:227-231 | skills/taste-distillation/scripts/taste/plates.py:227-231 — before extracting anything, compare `skills/taste-application/scripts/taste/plates.py` and `skills/taste-distillation/scripts/taste/plates.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) skills/taste-application/scripts/taste/plates.py:241 — skills/taste-application/scripts/taste/plates.py:241-245 | skills/taste-distillation/scripts/taste/plates.py:241-245 — before extracting anything, compare `skills/taste-application/scripts/taste/plates.py` and `skills/taste-distillation/scripts/taste/plates.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) skills/taste-application/scripts/taste/render3d.py:92 — skills/taste-application/scripts/taste/render3d.py:92-96 | skills/taste-distillation/scripts/taste/render3d.py:92-96 — before extracting anything, compare `skills/taste-application/scripts/taste/render3d.py` and `skills/taste-distillation/scripts/taste/render3d.py` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) skills/taste-application/scripts/tasteforge/media/glitch.py:218 — skills/taste-application/scripts/tasteforge/media/glitch.py:218-222 | skills/taste-application/scripts/tasteforge/media/stills.py:90-94 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) skills/taste-application/scripts/taste/grade.py:537 — skills/taste-application/scripts/taste/grade.py:537-541 | skills/taste-distillation/scripts/taste/grade.py:537-541 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 484 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) skills/taste-application/scripts/taste/pack.py:139 — skills/taste-application/scripts/taste/pack.py:139-143 | skills/taste-distillation/scripts/taste/pack.py:139-143 — before extracting anything, compare `skills/taste-application/scripts/taste/pack.py` and `skills/taste-distillation/scripts/taste/pack.py` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (5 lines × 2) skills/taste-application/scripts/taste/plates.py:233 — skills/taste-application/scripts/taste/plates.py:233-237 | skills/taste-distillation/scripts/taste/plates.py:233-237 — before extracting anything, compare `skills/taste-application/scripts/taste/plates.py` and `skills/taste-distillation/scripts/taste/plates.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D29 · Static Analysis (SAST) · REDACTED · ×17
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×17
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×15
  • Duplicated block (10 lines × 2) ecc2/src/main.rs:4637 — ecc2/src/main.rs:4637-4646 | ecc2/src/main.rs:4692-4701 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) ecc2/src/main.rs:6573 — ecc2/src/main.rs:6573-6582 | ecc2/src/main.rs:6859-6868 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) ecc2/src/session/manager.rs:2617 — ecc2/src/session/manager.rs:2617-2626 | ecc2/src/session/manager.rs:2722-2731 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) REDACTED:2639 — REDACTED:2639-2648 | REDACTED:2674-2683 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) REDACTED:2691 — REDACTED:2691-2700 | REDACTED:2708-2717 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) REDACTED:5065 — REDACTED:5065-5074 | REDACTED:5318-5327 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) REDACTED:4547 — REDACTED:4547-4556 | ecc2/src/tui/dashboard.rs:8605-8614 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (10 lines × 2) ecc2/src/tui/dashboard.rs:3297 — ecc2/src/tui/dashboard.rs:3297-3306 | ecc2/src/tui/dashboard.rs:3321-3330 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) ecc_dashboard.py:630 — ecc_dashboard.py:630-639 | ecc_dashboard.py:680-689 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) pi/core/skills/agent-self-evaluation/scripts/evaluate.py:343 — pi/core/skills/agent-self-evaluation/scripts/evaluate.py:343-352 | skills/agent-self-evaluation/scripts/evaluate.py:343-352 — before extracting anything, compare `pi/core/skills/agent-self-evaluation/scripts/evaluate.py` and `skills/agent-self-evaluation/scripts/evaluate.py` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 279 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) pi/core/skills/agent-self-evaluation/scripts/evaluate.py:353 — pi/core/skills/agent-self-evaluation/scripts/evaluate.py:353-362 | skills/agent-self-evaluation/scripts/evaluate.py:353-362 — before extracting anything, compare `pi/core/skills/agent-self-evaluation/scripts/evaluate.py` and `skills/agent-self-evaluation/scripts/evaluate.py` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 279 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `pi/core/skills/agent-self-evaluation/scripts/evaluate.py:353` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (10 lines × 2) skills/taste-application/scripts/taste/cadence.py:197 — skills/taste-application/scripts/taste/cadence.py:197-206 | skills/taste-distillation/scripts/taste/cadence.py:197-206 — before extracting anything, compare `skills/taste-application/scripts/taste/cadence.py` and `skills/taste-distillation/scripts/taste/cadence.py` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 194 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `skills/taste-application/scripts/taste/cadence.py:197` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) skills/taste-application/scripts/taste/frames.py:229 — skills/taste-application/scripts/taste/frames.py:229-238 | skills/taste-distillation/scripts/taste/frames.py:229-238 — before extracting anything, compare `skills/taste-application/scripts/taste/frames.py` and `skills/taste-distillation/scripts/taste/frames.py` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 233 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) skills/taste-application/scripts/taste/grade.py:199 — skills/taste-application/scripts/taste/grade.py:199-208 | skills/taste-distillation/scripts/taste/grade.py:199-208 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 484 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) skills/taste-application/scripts/taste/plates.py:129 — skills/taste-application/scripts/taste/plates.py:129-138 | skills/taste-distillation/scripts/taste/plates.py:129-138 — before extracting anything, compare `skills/taste-application/scripts/taste/plates.py` and `skills/taste-distillation/scripts/taste/plates.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×15
  • Duplicated block (9 lines × 2) ecc2/src/main.rs:6690 — ecc2/src/main.rs:6690-6698 | ecc2/src/main.rs:6945-6953 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) ecc2/src/main.rs:8495 — ecc2/src/main.rs:8495-8503 | ecc2/src/tui/dashboard.rs:2962-2970 — before extracting anything, compare `ecc2/src/main.rs` and `ecc2/src/tui/dashboard.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) REDACTED:2626 — REDACTED:2626-2634 | REDACTED:2661-2669 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) ecc2/src/main.rs:6771 — ecc2/src/main.rs:6771-6779 | ecc2/src/main.rs:6972-6980 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) ecc2/src/main.rs:6071 — ecc2/src/main.rs:6071-6079 | ecc2/src/main.rs:6081-6089 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) skills/continuous-learning-v2/scripts/instinct-cli.py:1464 — skills/continuous-learning-v2/scripts/instinct-cli.py:1464-1472 | skills/continuous-learning-v2/scripts/instinct-cli.py:1666-1674 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) skills/taste-application/scripts/mint.py:185 — skills/taste-application/scripts/mint.py:185-193 | skills/taste-distillation/scripts/mint.py:185-193 — before extracting anything, compare `skills/taste-application/scripts/mint.py` and `skills/taste-distillation/scripts/mint.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) skills/taste-application/scripts/taste/frames.py:86 — skills/taste-application/scripts/taste/frames.py:86-94 | skills/taste-distillation/scripts/taste/frames.py:86-94 — before extracting anything, compare `skills/taste-application/scripts/taste/frames.py` and `skills/taste-distillation/scripts/taste/frames.py` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 233 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) skills/taste-application/scripts/taste/grade.py:229 — skills/taste-application/scripts/taste/grade.py:229-237 | skills/taste-distillation/scripts/taste/grade.py:229-237 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 484 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `skills/taste-application/scripts/taste/grade.py:229` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) skills/taste-application/scripts/taste/grade.py:499 — skills/taste-application/scripts/taste/grade.py:499-507 | skills/taste-distillation/scripts/taste/grade.py:499-507 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 484 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) skills/taste-application/scripts/taste/grade.py:607 — skills/taste-application/scripts/taste/grade.py:607-615 | skills/taste-distillation/scripts/taste/grade.py:607-615 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 484 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) skills/taste-application/scripts/taste/grade.py:631 — skills/taste-application/scripts/taste/grade.py:631-639 | skills/taste-distillation/scripts/taste/grade.py:631-639 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 484 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `skills/taste-application/scripts/taste/grade.py:631` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) skills/taste-application/scripts/distill.py:206 — skills/taste-application/scripts/distill.py:206-214 | skills/taste-distillation/scripts/distill.py:206-214 — before extracting anything, compare `skills/taste-application/scripts/distill.py` and `skills/taste-distillation/scripts/distill.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 396 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) skills/taste-application/scripts/taste/grade.py:153 — skills/taste-application/scripts/taste/grade.py:153-161 | skills/taste-distillation/scripts/taste/grade.py:153-161 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 484 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (9 lines × 2) skills/taste-application/scripts/taste/plates.py:80 — skills/taste-application/scripts/taste/plates.py:80-88 | skills/taste-distillation/scripts/taste/plates.py:80-88 — before extracting anything, compare `skills/taste-application/scripts/taste/plates.py` and `skills/taste-distillation/scripts/taste/plates.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×13
  • Duplicated block (8 lines × 2) ecc2/src/main.rs:4966 — ecc2/src/main.rs:4966-4973 | ecc2/src/main.rs:5036-5043 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) REDACTED:975 — REDACTED:975-982 | REDACTED:2835-2842 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) ecc2/src/tui/dashboard.rs:1255 — ecc2/src/tui/dashboard.rs:1255-1262 | ecc2/src/tui/dashboard.rs:1290-1297 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) ecc2/src/comms/mod.rs:139 — ecc2/src/comms/mod.rs:139-146 | ecc2/src/main.rs:5922-5929 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (8 lines × 2) ecc2/src/session/manager.rs:2641 — ecc2/src/session/manager.rs:2641-2648 | ecc2/src/session/manager.rs:2742-2749 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) skills/taste-application/scripts/taste/grade.py:103 — skills/taste-application/scripts/taste/grade.py:103-110 | skills/taste-distillation/scripts/taste/grade.py:103-110 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 484 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) skills/taste-application/scripts/taste/grade.py:462 — skills/taste-application/scripts/taste/grade.py:462-469 | skills/taste-distillation/scripts/taste/grade.py:462-469 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 484 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) skills/taste-application/scripts/taste/grade.py:545 — skills/taste-application/scripts/taste/grade.py:545-552 | skills/taste-distillation/scripts/taste/grade.py:545-552 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 484 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) skills/taste-application/scripts/taste/plates.py:44 — skills/taste-application/scripts/taste/plates.py:44-51 | skills/taste-distillation/scripts/taste/plates.py:44-51 — before extracting anything, compare `skills/taste-application/scripts/taste/plates.py` and `skills/taste-distillation/scripts/taste/plates.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) skills/taste-application/scripts/taste/plates.py:58 — skills/taste-application/scripts/taste/plates.py:58-65 | skills/taste-distillation/scripts/taste/plates.py:58-65 — before extracting anything, compare `skills/taste-application/scripts/taste/plates.py` and `skills/taste-distillation/scripts/taste/plates.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) skills/taste-application/scripts/taste/render3d.py:76 — skills/taste-application/scripts/taste/render3d.py:76-83 | skills/taste-distillation/scripts/taste/render3d.py:76-83 — before extracting anything, compare `skills/taste-application/scripts/taste/render3d.py` and `skills/taste-distillation/scripts/taste/render3d.py` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) skills/taste-application/scripts/taste/frames.py:136 — skills/taste-application/scripts/taste/frames.py:136-143 | skills/taste-distillation/scripts/taste/frames.py:136-143 — before extracting anything, compare `skills/taste-application/scripts/taste/frames.py` and `skills/taste-distillation/scripts/taste/frames.py` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 233 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) skills/taste-application/scripts/taste/frames.py:326 — skills/taste-application/scripts/taste/frames.py:326-333 | skills/taste-distillation/scripts/taste/frames.py:326-333 — before extracting anything, compare `skills/taste-application/scripts/taste/frames.py` and `skills/taste-distillation/scripts/taste/frames.py` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 233 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D2 · Cognitive Complexity · Dashboard · ×12
  • Dashboard::selected_session_metrics_text (cognitive 136) ecc2/src/tui/dashboard.rs:6133 — Dashboard::selected_session_metrics_text has cognitive complexity 136 (threshold 15). Drivers by points: if/else 44 (90 pts), loops 12 (45 pts), boolean chains 1 (nesting depth added 79). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • Dashboard::board_text (cognitive 70) ecc2/src/tui/dashboard.rs:6574 — Dashboard::board_text has cognitive complexity 70 (threshold 15). Drivers by points: if/else 30 (59 pts), loops 5 (11 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Dashboard::render_output (cognitive 32) ecc2/src/tui/dashboard.rs:850 — Dashboard::render_output has cognitive complexity 32 (threshold 15). Drivers by points: if/else 17 (29 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Dashboard::submit_spawn_prompt (cognitive 27) ecc2/src/tui/dashboard.rs:3631 — Dashboard::submit_spawn_prompt has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (18 pts), match/switch 4 (7 pts), loops 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Dashboard::sync_session_state_notifications (cognitive 24) ecc2/src/tui/dashboard.rs:4210 — Dashboard::sync_session_state_notifications has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 6 (7 pts), match/switch 1 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Dashboard::output_title (cognitive 22) ecc2/src/tui/dashboard.rs:1005 — Dashboard::output_title has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Dashboard::session_graph_recall_lines (cognitive 21) ecc2/src/tui/dashboard.rs:5448 — Dashboard::session_graph_recall_lines has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Dashboard::sync_selected_lineage (cognitive 19) ecc2/src/tui/dashboard.rs:4950 — Dashboard::sync_selected_lineage has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 5 (13 pts), if/else 3 (4 pts), loops 1 (2 pts) (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • Dashboard::metrics_line_count_before_delegates (cognitive 17) ecc2/src/tui/dashboard.rs:6013 — Dashboard::metrics_line_count_before_delegates has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15 (17 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • Dashboard::render_status_bar (cognitive 16) ecc2/src/tui/dashboard.rs:1442 — Dashboard::render_status_bar has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • Dashboard::sync_runtime_metrics (cognitive 16) ecc2/src/tui/dashboard.rs:4026 — Dashboard::sync_runtime_metrics has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Dashboard::board_overlap_risks (cognitive 16) ecc2/src/tui/dashboard.rs:6785 — Dashboard::board_overlap_risks has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (6 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×11
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×11
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×11
  • Duplicated block (12 lines × 2) ecc2/src/main.rs:8482 — ecc2/src/main.rs:8482-8493 | ecc2/src/tui/dashboard.rs:2949-2960 — before extracting anything, compare `ecc2/src/main.rs` and `ecc2/src/tui/dashboard.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) ecc2/src/session/manager.rs:1578 — ecc2/src/session/manager.rs:1578-1589 | ecc2/src/session/manager.rs:3797-3808 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) ecc2/src/tui/dashboard.rs:2036 — ecc2/src/tui/dashboard.rs:2036-2047 | ecc2/src/tui/dashboard.rs:2083-2094 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) ecc2/src/main.rs:7328 — ecc2/src/main.rs:7328-7339 | ecc2/src/main.rs:7371-7382 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) ecc2/src/main.rs:3564 — ecc2/src/main.rs:3564-3575 | ecc2/src/main.rs:3587-3598 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) pi/core/skills/agent-self-evaluation/scripts/evaluate.py:305 — pi/core/skills/agent-self-evaluation/scripts/evaluate.py:305-316 | skills/agent-self-evaluation/scripts/evaluate.py:305-316 — before extracting anything, compare `pi/core/skills/agent-self-evaluation/scripts/evaluate.py` and `skills/agent-self-evaluation/scripts/evaluate.py` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 279 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) pi/core/skills/agent-self-evaluation/scripts/evaluate.py:383 — pi/core/skills/agent-self-evaluation/scripts/evaluate.py:383-394 | skills/agent-self-evaluation/scripts/evaluate.py:383-394 — before extracting anything, compare `pi/core/skills/agent-self-evaluation/scripts/evaluate.py` and `skills/agent-self-evaluation/scripts/evaluate.py` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 279 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) skills/taste-application/scripts/taste/grade.py:411 — skills/taste-application/scripts/taste/grade.py:411-422 | skills/taste-distillation/scripts/taste/grade.py:411-422 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 484 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) skills/taste-application/scripts/taste/render3d.py:278 — skills/taste-application/scripts/taste/render3d.py:278-289 | skills/taste-distillation/scripts/taste/render3d.py:278-289 — before extracting anything, compare `skills/taste-application/scripts/taste/render3d.py` and `skills/taste-distillation/scripts/taste/render3d.py` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (12 lines × 2) skills/taste-application/scripts/taste/grade.py:248 — skills/taste-application/scripts/taste/grade.py:248-259 | skills/taste-distillation/scripts/taste/grade.py:248-259 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 484 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) skills/taste-application/scripts/taste/pack.py:81 — skills/taste-application/scripts/taste/pack.py:81-92 | skills/taste-distillation/scripts/taste/pack.py:81-92 — before extracting anything, compare `skills/taste-application/scripts/taste/pack.py` and `skills/taste-distillation/scripts/taste/pack.py` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×11
  • Duplicated block (11 lines × 2) ecc2/src/main.rs:6554 — ecc2/src/main.rs:6554-6564 | ecc2/src/main.rs:6840-6850 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) ecc2/src/worktree/mod.rs:710 — ecc2/src/worktree/mod.rs:710-720 | ecc2/src/worktree/mod.rs:1430-1440 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) ecc2/src/session/manager.rs:4200 — ecc2/src/session/manager.rs:4200-4210 | ecc2/src/tui/dashboard.rs:8616-8626 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (11 lines × 2) ecc2/src/main.rs:1738 — ecc2/src/main.rs:1738-1748 | ecc2/src/main.rs:1886-1896 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) ecc2/src/worktree/mod.rs:1067 — ecc2/src/worktree/mod.rs:1067-1077 | ecc2/src/worktree/mod.rs:1100-1110 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) skills/taste-application/scripts/distill.py:470 — skills/taste-application/scripts/distill.py:470-480 | skills/taste-distillation/scripts/distill.py:470-480 — before extracting anything, compare `skills/taste-application/scripts/distill.py` and `skills/taste-distillation/scripts/distill.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 396 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) skills/taste-application/scripts/taste/render3d.py:142 — skills/taste-application/scripts/taste/render3d.py:142-152 | skills/taste-distillation/scripts/taste/render3d.py:142-152 — before extracting anything, compare `skills/taste-application/scripts/taste/render3d.py` and `skills/taste-distillation/scripts/taste/render3d.py` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) src/llm/cli/selector.py:59 — src/llm/cli/selector.py:59-69 | src/llm/cli/selector.py:81-91 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) src/llm/tools/executor.py:66 — src/llm/tools/executor.py:66-76 | src/llm/tools/executor.py:95-105 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) skills/taste-application/scripts/taste/render3d.py:264 — skills/taste-application/scripts/taste/render3d.py:264-274 | skills/taste-distillation/scripts/taste/render3d.py:264-274 — before extracting anything, compare `skills/taste-application/scripts/taste/render3d.py` and `skills/taste-distillation/scripts/taste/render3d.py` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) src/llm/providers/astraflow.py:28 — src/llm/providers/astraflow.py:28-38 | src/llm/providers/atlas.py:29-39 — before extracting anything, compare `src/llm/providers/astraflow.py` and `src/llm/providers/atlas.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×11
  • Duplicated block (7 lines × 2) ecc2/src/session/manager.rs:1569 — ecc2/src/session/manager.rs:1569-1575 | ecc2/src/session/manager.rs:3788-3794 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) REDACTED:2736 — REDACTED:2736-2742 | REDACTED:2796-2802 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) ecc2/src/tui/dashboard.rs:1022 — ecc2/src/tui/dashboard.rs:1022-1028 | ecc2/src/tui/dashboard.rs:1087-1093 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) ecc2/src/worktree/mod.rs:297 — ecc2/src/worktree/mod.rs:297-303 | ecc2/src/worktree/mod.rs:313-319 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) ecc2/src/tui/dashboard.rs:6459 — ecc2/src/tui/dashboard.rs:6459-6465 | ecc2/src/tui/dashboard.rs:6476-6482 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) REDACTED:5174 — REDACTED:5174-5180 | REDACTED:5217-5223 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) skills/taste-application/scripts/distill.py:173 — skills/taste-application/scripts/distill.py:173-179 | skills/taste-distillation/scripts/distill.py:173-179 — before extracting anything, compare `skills/taste-application/scripts/distill.py` and `skills/taste-distillation/scripts/distill.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 396 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (7 lines × 2) skills/taste-application/scripts/distill.py:318 — skills/taste-application/scripts/distill.py:318-324 | skills/taste-distillation/scripts/distill.py:318-324 — before extracting anything, compare `skills/taste-application/scripts/distill.py` and `skills/taste-distillation/scripts/distill.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 396 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (7 lines × 2) skills/taste-application/scripts/taste/cadence.py:244 — skills/taste-application/scripts/taste/cadence.py:244-250 | skills/taste-distillation/scripts/taste/cadence.py:244-250 — before extracting anything, compare `skills/taste-application/scripts/taste/cadence.py` and `skills/taste-distillation/scripts/taste/cadence.py` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 194 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) skills/taste-application/scripts/taste/pack.py:147 — skills/taste-application/scripts/taste/pack.py:147-153 | skills/taste-distillation/scripts/taste/pack.py:147-153 — before extracting anything, compare `skills/taste-application/scripts/taste/pack.py` and `skills/taste-distillation/scripts/taste/pack.py` as WHOLE FILES: 100% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (7 lines × 2) skills/taste-application/scripts/taste/timeline.py:240 — skills/taste-application/scripts/taste/timeline.py:240-246 | skills/taste-distillation/scripts/taste/timeline.py:240-246 — before extracting anything, compare `skills/taste-application/scripts/taste/timeline.py` and `skills/taste-distillation/scripts/taste/timeline.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 243 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×10
  • Duplicated block (9 lines × 3) ecc2/src/main.rs:7843 — ecc2/src/main.rs:7843-7851 | ecc2/src/main.rs:7873-7881 | ecc2/src/main.rs:7901-7909 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (9 lines × 3) ecc2/src/main.rs:6327 — ecc2/src/main.rs:6327-6335 | ecc2/src/main.rs:6560-6568 | ecc2/src/main.rs:6846-6854 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (9 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:268 — .agents/skills/docs-governance/scripts/audit-docs.py:268-276 | pi/core/skills/docs-governance/scripts/audit-docs.py:268-276 | skills/docs-governance/scripts/audit-docs.py:268-276 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 3) skills/taste-application/scripts/falapi.py:114 — skills/taste-application/scripts/falapi.py:114-122 | skills/taste-application/scripts/taste/falapi.py:114-122 | skills/taste-distillation/scripts/taste/falapi.py:114-122 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 378 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (9 lines × 3) skills/taste-application/scripts/falapi.py:226 — skills/taste-application/scripts/falapi.py:226-234 | skills/taste-application/scripts/taste/falapi.py:226-234 | skills/taste-distillation/scripts/taste/falapi.py:226-234 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 378 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 3) skills/taste-application/scripts/falapi.py:615 — skills/taste-application/scripts/falapi.py:615-623 | skills/taste-application/scripts/taste/falapi.py:615-623 | skills/taste-distillation/scripts/taste/falapi.py:615-623 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 378 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (9 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:171 — .agents/skills/docs-governance/scripts/audit-docs.py:171-179 | pi/core/skills/docs-governance/scripts/audit-docs.py:171-179 | skills/docs-governance/scripts/audit-docs.py:171-179 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (9 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:438 — .agents/skills/docs-governance/scripts/audit-docs.py:438-446 | pi/core/skills/docs-governance/scripts/audit-docs.py:438-446 | skills/docs-governance/scripts/audit-docs.py:438-446 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 3) skills/taste-application/scripts/falapi.py:531 — skills/taste-application/scripts/falapi.py:531-539 | skills/taste-application/scripts/taste/falapi.py:531-539 | skills/taste-distillation/scripts/taste/falapi.py:531-539 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 378 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (9 lines × 3) skills/taste-application/scripts/falapi.py:543 — skills/taste-application/scripts/falapi.py:543-551 | skills/taste-application/scripts/taste/falapi.py:543-551 | skills/taste-distillation/scripts/taste/falapi.py:543-551 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 378 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×10
  • Duplicated block (6 lines × 2) ecc2/src/main.rs:2004 — ecc2/src/main.rs:2004-2009 | ecc2/src/main.rs:2044-2049 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) ecc2/src/main.rs:5775 — ecc2/src/main.rs:5775-5780 | ecc2/src/main.rs:5869-5874 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) ecc2/src/main.rs:7736 — ecc2/src/main.rs:7736-7741 | ecc2/src/main.rs:7974-7979 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) ecc_dashboard.py:416 — ecc_dashboard.py:416-421 | ecc_dashboard.py:527-532 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) skills/taste-application/scripts/distill.py:307 — skills/taste-application/scripts/distill.py:307-312 | skills/taste-distillation/scripts/distill.py:307-312 — before extracting anything, compare `skills/taste-application/scripts/distill.py` and `skills/taste-distillation/scripts/distill.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 396 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (6 lines × 2) skills/taste-application/scripts/taste/grade.py:114 — skills/taste-application/scripts/taste/grade.py:114-119 | skills/taste-distillation/scripts/taste/grade.py:114-119 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 484 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) skills/taste-application/scripts/taste/grade.py:212 — skills/taste-application/scripts/taste/grade.py:212-217 | skills/taste-distillation/scripts/taste/grade.py:212-217 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 484 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) skills/taste-application/scripts/taste/plates.py:104 — skills/taste-application/scripts/taste/plates.py:104-109 | skills/taste-distillation/scripts/taste/plates.py:104-109 — before extracting anything, compare `skills/taste-application/scripts/taste/plates.py` and `skills/taste-distillation/scripts/taste/plates.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `skills/taste-application/scripts/taste/plates.py:104` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) skills/taste-application/scripts/taste/frames.py:99 — skills/taste-application/scripts/taste/frames.py:99-104 | skills/taste-distillation/scripts/taste/frames.py:99-104 — before extracting anything, compare `skills/taste-application/scripts/taste/frames.py` and `skills/taste-distillation/scripts/taste/frames.py` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 233 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (6 lines × 2) skills/taste-application/scripts/taste/frames.py:192 — skills/taste-application/scripts/taste/frames.py:192-197 | skills/taste-distillation/scripts/taste/frames.py:192-197 — before extracting anything, compare `skills/taste-application/scripts/taste/frames.py` and `skills/taste-distillation/scripts/taste/frames.py` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 233 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D1 · Cyclomatic Complexity · ecc_tui · ×9
  • ecc_tui::main (cyclomatic 170) ecc2/src/main.rs:1426 — ecc_tui::main has cyclomatic complexity 170 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • ecc_tui::tui::app::run (cyclomatic 79) ecc2/src/tui/app.rs:15 — ecc_tui::tui::app::run has cyclomatic complexity 79 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • ecc_tui::build_legacy_migration_plan_report (cyclomatic 22) ecc2/src/main.rs:7269 — ecc_tui::build_legacy_migration_plan_report has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • ecc_tui::session::manager::build_agent_command (cyclomatic 22) ecc2/src/session/manager.rs:3071 — ecc_tui::session::manager::build_agent_command has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • ecc_tui::session::manager::build_configured_harness_command (cyclomatic 21) ecc2/src/session/manager.rs:3190 — ecc_tui::session::manager::build_configured_harness_command has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • ecc_tui::build_legacy_remote_add_command (cyclomatic 20) ecc2/src/main.rs:7025 — ecc_tui::build_legacy_remote_add_command has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • ecc_tui::session::manager::render_task_with_profile_projection (cyclomatic 19) ecc2/src/session/manager.rs:3468 — ecc_tui::session::manager::render_task_with_profile_projection has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • ecc_tui::session::manager::enforce_conflict_resolution (cyclomatic 17) ecc2/src/session/manager.rs:1255 — ecc_tui::session::manager::enforce_conflict_resolution has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • ecc_tui::worktree::base_checkout_path (cyclomatic 16) ecc2/src/worktree/mod.rs:1571 — ecc_tui::worktree::base_checkout_path has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D10 · Test Quality · No assertions · ×9
  • No assertions: workflow IDs come from exact-path metadata and unrelated spoof results do not gate tests/ci/release-packed-artifact-workflow.test.js:330 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: stop hook is a no-op when no accumulator exists tests/hooks/stop-format-typecheck.test.js:196 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: REDACTED is valid JSON tests/hooks/hooks.test.js:2697 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: buildOrchestrationPlan exposes shell-safe launcher aliases alongside raw defaults tests/lib/tmux-worktree-orchestrator.test.js:156 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: an eight-request burst caps live workers at two and rejects excess work without queuing tests/lib/control-pane-contention.test.js:303 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: a disconnected HTTP client retains its worker slot until actual exit tests/lib/control-pane-contention.test.js:304 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: fixture has no node_modules anywhere in its ancestor chain tests/scripts/plugin-install-without-node-modules.test.js:86 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: (unnamed test) tests/scripts/plan-canvas.test.js:1005 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: missing owned marker restores safely on reinstall tests/scripts/command-runtime.test.js:141 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
D3 · God Classes · MethodTooLong · ×9
  • MethodTooLong: Dashboard.selected_session_metrics_text ecc2/src/tui/dashboard.rs:6133 — MethodTooLong — selected_session_metrics_text runs 316 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 216 over it, 3.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: StateStore.init_schema REDACTED:218 — MethodTooLong — init_schema runs 292 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 192 over it, 2.92× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: StateStore.ensure_session_columns REDACTED:551 — MethodTooLong — ensure_session_columns runs 210 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 110 over it, 2.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Dashboard.board_text ecc2/src/tui/dashboard.rs:6574 — MethodTooLong — board_text runs 164 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 64 over it, 1.64× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: StateStore.sync_tool_activity_metrics REDACTED:1957 — MethodTooLong — sync_tool_activity_metrics runs 146 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 46 over it, 1.46× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Dashboard.new ecc2/src/tui/dashboard.rs:531 — MethodTooLong — new runs 120 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 20 over it, 1.20× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Dashboard.submit_spawn_prompt ecc2/src/tui/dashboard.rs:3631 — MethodTooLong — submit_spawn_prompt runs 117 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 17 over it, 1.17× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Dashboard.sync_selected_lineage ecc2/src/tui/dashboard.rs:4950 — MethodTooLong — sync_selected_lineage runs 116 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 16 over it, 1.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: StateStore.recall_context_entities REDACTED:3199 — MethodTooLong — recall_context_entities runs 107 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 7 over it, 1.07× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×9
  • Duplicated block (13 lines × 2) ecc2/src/main.rs:4025 — ecc2/src/main.rs:4025-4037 | ecc2/src/main.rs:4102-4114 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) ecc2/src/main.rs:6598 — ecc2/src/main.rs:6598-6610 | ecc2/src/main.rs:6884-6896 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) ecc2/src/main.rs:1989 — ecc2/src/main.rs:1989-2001 | ecc2/src/main.rs:2026-2038 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) ecc2/src/main.rs:2290 — ecc2/src/main.rs:2290-2302 | ecc2/src/main.rs:2380-2392 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) pi/core/skills/agent-self-evaluation/scripts/evaluate.py:137 — pi/core/skills/agent-self-evaluation/scripts/evaluate.py:137-149 | skills/agent-self-evaluation/scripts/evaluate.py:137-149 — before extracting anything, compare `pi/core/skills/agent-self-evaluation/scripts/evaluate.py` and `skills/agent-self-evaluation/scripts/evaluate.py` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 279 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 2) skills/taste-application/scripts/mint.py:143 — skills/taste-application/scripts/mint.py:143-155 | skills/taste-distillation/scripts/mint.py:143-155 — before extracting anything, compare `skills/taste-application/scripts/mint.py` and `skills/taste-distillation/scripts/mint.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) skills/taste-application/scripts/mint.py:157 — skills/taste-application/scripts/mint.py:157-169 | skills/taste-distillation/scripts/mint.py:157-169 — before extracting anything, compare `skills/taste-application/scripts/mint.py` and `skills/taste-distillation/scripts/mint.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `skills/taste-application/scripts/mint.py:157` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) skills/taste-application/scripts/taste/frames.py:28 — skills/taste-application/scripts/taste/frames.py:28-40 | skills/taste-distillation/scripts/taste/frames.py:28-40 — before extracting anything, compare `skills/taste-application/scripts/taste/frames.py` and `skills/taste-distillation/scripts/taste/frames.py` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 233 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (13 lines × 2) skills/taste-application/scripts/taste/grade.py:289 — skills/taste-application/scripts/taste/grade.py:289-301 | skills/taste-distillation/scripts/taste/grade.py:289-301 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 484 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×8
  • Duplicated block (15 lines × 2) ecc2/src/session/manager.rs:218 — ecc2/src/session/manager.rs:218-232 | ecc2/src/session/manager.rs:391-405 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) ecc2/src/session/manager.rs:1777 — ecc2/src/session/manager.rs:1777-1791 | ecc2/src/session/manager.rs:1811-1825 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) pi/core/skills/agent-self-evaluation/scripts/evaluate.py:398 — pi/core/skills/agent-self-evaluation/scripts/evaluate.py:398-412 | skills/agent-self-evaluation/scripts/evaluate.py:398-412 — before extracting anything, compare `pi/core/skills/agent-self-evaluation/scripts/evaluate.py` and `skills/agent-self-evaluation/scripts/evaluate.py` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 279 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) skills/taste-application/scripts/distill.py:188 — skills/taste-application/scripts/distill.py:188-202 | skills/taste-distillation/scripts/distill.py:188-202 — before extracting anything, compare `skills/taste-application/scripts/distill.py` and `skills/taste-distillation/scripts/distill.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 396 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) skills/taste-application/scripts/mint.py:65 — skills/taste-application/scripts/mint.py:65-79 | skills/taste-distillation/scripts/mint.py:65-79 — before extracting anything, compare `skills/taste-application/scripts/mint.py` and `skills/taste-distillation/scripts/mint.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `skills/taste-application/scripts/mint.py:65` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) skills/taste-application/scripts/taste/grade.py:309 — skills/taste-application/scripts/taste/grade.py:309-323 | skills/taste-distillation/scripts/taste/grade.py:309-323 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 484 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) skills/taste-application/scripts/taste/render3d.py:98 — skills/taste-application/scripts/taste/render3d.py:98-112 | skills/taste-distillation/scripts/taste/render3d.py:98-112 — before extracting anything, compare `skills/taste-application/scripts/taste/render3d.py` and `skills/taste-distillation/scripts/taste/render3d.py` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) skills/taste-application/scripts/taste/timeline.py:438 — skills/taste-application/scripts/taste/timeline.py:438-452 | skills/taste-distillation/scripts/taste/timeline.py:438-452 — before extracting anything, compare `skills/taste-application/scripts/taste/timeline.py` and `skills/taste-distillation/scripts/taste/timeline.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 243 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×6
  • Duplicated block (20 lines × 2) ecc2/src/main.rs:4047 — ecc2/src/main.rs:4047-4066 | ecc2/src/main.rs:4124-4143 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20 lines × 2) ecc2/src/main.rs:4081 — ecc2/src/main.rs:4081-4100 | ecc2/src/main.rs:4161-4180 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20 lines × 2) ecc2/src/tui/dashboard.rs:8340 — ecc2/src/tui/dashboard.rs:8340-8359 | ecc2/src/tui/dashboard.rs:8395-8414 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20 lines × 2) skills/taste-application/scripts/taste/frames.py:49 — skills/taste-application/scripts/taste/frames.py:49-68 | skills/taste-distillation/scripts/taste/frames.py:49-68 — before extracting anything, compare `skills/taste-application/scripts/taste/frames.py` and `skills/taste-distillation/scripts/taste/frames.py` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 233 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (20 lines × 2) skills/taste-application/scripts/taste/frames.py:113 — skills/taste-application/scripts/taste/frames.py:113-132 | skills/taste-distillation/scripts/taste/frames.py:113-132 — before extracting anything, compare `skills/taste-application/scripts/taste/frames.py` and `skills/taste-distillation/scripts/taste/frames.py` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 233 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (20 lines × 2) skills/taste-application/scripts/taste/timeline.py:393 — skills/taste-application/scripts/taste/timeline.py:393-412 | skills/taste-distillation/scripts/taste/timeline.py:393-412 — before extracting anything, compare `skills/taste-application/scripts/taste/timeline.py` and `skills/taste-distillation/scripts/taste/timeline.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 243 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×6
  • Duplicated block (5 lines × 3) .agents/skills/docs-governance/scripts/markdown_links.py:198 — .agents/skills/docs-governance/scripts/markdown_links.py:198-202 | pi/core/skills/docs-governance/scripts/markdown_links.py:198-202 | skills/docs-governance/scripts/markdown_links.py:198-202 — before extracting anything, compare `.agents/skills/docs-governance/scripts/markdown_links.py` and `pi/core/skills/docs-governance/scripts/markdown_links.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 3) skills/taste-application/scripts/falapi.py:786 — skills/taste-application/scripts/falapi.py:786-790 | skills/taste-application/scripts/taste/falapi.py:786-790 | skills/taste-distillation/scripts/taste/falapi.py:786-790 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 378 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 3) skills/taste-application/scripts/taste/timeline.py:417 — skills/taste-application/scripts/taste/timeline.py:417-421 | skills/taste-application/scripts/tasteforge/export.py:222-226 | skills/taste-distillation/scripts/taste/timeline.py:417-421 — before extracting anything, compare `skills/taste-application/scripts/taste/timeline.py` and `skills/taste-application/scripts/tasteforge/export.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `skills/taste-application/scripts/taste/timeline.py:417` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (5 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:82 — .agents/skills/docs-governance/scripts/audit-docs.py:82-86 | pi/core/skills/docs-governance/scripts/audit-docs.py:82-86 | skills/docs-governance/scripts/audit-docs.py:82-86 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 3) skills/taste-application/scripts/falapi.py:238 — skills/taste-application/scripts/falapi.py:238-242 | skills/taste-application/scripts/taste/falapi.py:238-242 | skills/taste-distillation/scripts/taste/falapi.py:238-242 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 378 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (5 lines × 3) skills/taste-application/scripts/taste/timeline.py:118 — skills/taste-application/scripts/taste/timeline.py:118-134 | skills/taste-application/scripts/tasteforge/timeline.py:63-67 | skills/taste-distillation/scripts/taste/timeline.py:118-134 — `skills/taste-application/scripts/taste/timeline.py` and `skills/taste-application/scripts/tasteforge/timeline.py` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 73 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×6
  • Duplicated block (6 lines × 3) skills/taste-application/scripts/falapi.py:166 — skills/taste-application/scripts/falapi.py:166-171 | skills/taste-application/scripts/taste/falapi.py:166-171 | skills/taste-distillation/scripts/taste/falapi.py:166-171 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 378 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (6 lines × 3) skills/taste-application/scripts/falapi.py:186 — skills/taste-application/scripts/falapi.py:186-191 | skills/taste-application/scripts/taste/falapi.py:186-191 | skills/taste-distillation/scripts/taste/falapi.py:186-191 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 378 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 3) skills/taste-application/scripts/falapi.py:645 — skills/taste-application/scripts/falapi.py:645-650 | skills/taste-application/scripts/taste/falapi.py:645-650 | skills/taste-distillation/scripts/taste/falapi.py:645-650 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 378 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (6 lines × 3) skills/taste-application/scripts/taste/timeline.py:105 — skills/taste-application/scripts/taste/timeline.py:105-114 | skills/taste-application/scripts/tasteforge/timeline.py:54-59 | skills/taste-distillation/scripts/taste/timeline.py:105-114 — `skills/taste-application/scripts/taste/timeline.py` and `skills/taste-application/scripts/tasteforge/timeline.py` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 73 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (6 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:211 — .agents/skills/docs-governance/scripts/audit-docs.py:211-216 | pi/core/skills/docs-governance/scripts/audit-docs.py:211-216 | skills/docs-governance/scripts/audit-docs.py:211-216 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (6 lines × 3) skills/taste-application/scripts/falapi.py:555 — skills/taste-application/scripts/falapi.py:555-560 | skills/taste-application/scripts/taste/falapi.py:555-560 | skills/taste-distillation/scripts/taste/falapi.py:555-560 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 378 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
X2 · Cancellation propagation · Async function without AbortSignal · ×6
  • Async function without AbortSignal: measure docker/context-profiles/complex-eval/calibrate-stats.js:46 — `measure` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: createPaste docker/context-profiles/complex-eval/cases/sentinel-api/check.cjs:41 — `createPaste` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: waitForStatus docker/context-profiles/complex-eval/cases/webhook-relay/check.cjs:37 — `waitForStatus` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: query docker/context-profiles/complex-eval/cases2/event-stats-api/check.cjs:54 — `query` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: release scripts/discord/ecc-bot.mjs:171 — `release` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: respond scripts/discord/ecc-bot.mjs:181 — `respond` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
D1 · Cyclomatic Complexity · Dashboard · ×5
  • Dashboard::selected_session_metrics_text (cyclomatic 54) ecc2/src/tui/dashboard.rs:6133 — Dashboard::selected_session_metrics_text has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • Dashboard::board_text (cyclomatic 30) ecc2/src/tui/dashboard.rs:6574 — Dashboard::board_text has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • Dashboard::render_output (cyclomatic 18) ecc2/src/tui/dashboard.rs:850 — Dashboard::render_output has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Dashboard::empty_timeline_message (cyclomatic 24) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • Dashboard::sync_session_state_notifications (cyclomatic 16) ecc2/src/tui/dashboard.rs:4210 — Dashboard::sync_session_state_notifications has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Dashboard::empty_timeline_message (cyclomatic 24) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • Dashboard::metrics_line_count_before_delegates (cyclomatic 16) ecc2/src/tui/dashboard.rs:6013 — Dashboard::metrics_line_count_before_delegates has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: Dashboard::empty_timeline_message (cyclomatic 24) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×5
  • Duplicated block (18 lines × 2) ecc2/src/tui/dashboard.rs:1818 — ecc2/src/tui/dashboard.rs:1818-1835 | ecc2/src/tui/dashboard.rs:1855-1872 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) hooks/hermes/check-console-log.py:31 — hooks/hermes/check-console-log.py:31-48 | hooks/hermes/config-protection.py:47-64 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (18 lines × 2) skills/taste-application/scripts/distill.py:388 — skills/taste-application/scripts/distill.py:388-405 | skills/taste-distillation/scripts/distill.py:388-405 — before extracting anything, compare `skills/taste-application/scripts/distill.py` and `skills/taste-distillation/scripts/distill.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 396 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (18 lines × 2) skills/taste-application/scripts/taste/plates.py:208 — skills/taste-application/scripts/taste/plates.py:208-225 | skills/taste-distillation/scripts/taste/plates.py:208-225 — before extracting anything, compare `skills/taste-application/scripts/taste/plates.py` and `skills/taste-distillation/scripts/taste/plates.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (18 lines × 2) skills/taste-application/scripts/taste/render3d.py:114 — skills/taste-application/scripts/taste/render3d.py:114-131 | skills/taste-distillation/scripts/taste/render3d.py:114-131 — before extracting anything, compare `skills/taste-application/scripts/taste/render3d.py` and `skills/taste-distillation/scripts/taste/render3d.py` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×5
  • Duplicated block (14 lines × 2) ecc2/src/main.rs:1717 — ecc2/src/main.rs:1717-1730 | ecc2/src/main.rs:1945-1958 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) pi/core/skills/agent-self-evaluation/scripts/evaluate.py:366 — pi/core/skills/agent-self-evaluation/scripts/evaluate.py:366-379 | skills/agent-self-evaluation/scripts/evaluate.py:366-379 — before extracting anything, compare `pi/core/skills/agent-self-evaluation/scripts/evaluate.py` and `skills/agent-self-evaluation/scripts/evaluate.py` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 279 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) skills/taste-application/scripts/taste/frames.py:69 — skills/taste-application/scripts/taste/frames.py:69-82 | skills/taste-distillation/scripts/taste/frames.py:69-82 — before extracting anything, compare `skills/taste-application/scripts/taste/frames.py` and `skills/taste-distillation/scripts/taste/frames.py` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 233 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) skills/taste-application/scripts/taste/grade.py:473 — skills/taste-application/scripts/taste/grade.py:473-486 | skills/taste-distillation/scripts/taste/grade.py:473-486 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 484 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) skills/videodb/scripts/ws_listener.py:160 — skills/videodb/scripts/ws_listener.py:160-173 | skills/videodb/scripts/ws_listener.py:204-217 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×5
  • Duplicated block (12 lines × 3) ecc2/src/tui/dashboard.rs:2857 — ecc2/src/tui/dashboard.rs:2857-2868 | ecc2/src/tui/dashboard.rs:2905-2916 | ecc2/src/tui/dashboard.rs:2972-2983 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (12 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:674 — .agents/skills/docs-governance/scripts/audit-docs.py:674-685 | pi/core/skills/docs-governance/scripts/audit-docs.py:674-685 | skills/docs-governance/scripts/audit-docs.py:674-685 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 3) skills/taste-application/scripts/falapi.py:739 — skills/taste-application/scripts/falapi.py:739-750 | skills/taste-application/scripts/taste/falapi.py:739-750 | skills/taste-distillation/scripts/taste/falapi.py:739-750 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 378 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (12 lines × 3) skills/taste-application/scripts/falapi.py:754 — skills/taste-application/scripts/falapi.py:754-765 | skills/taste-application/scripts/taste/falapi.py:754-765 | skills/taste-distillation/scripts/taste/falapi.py:754-765 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 378 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 3) skills/taste-application/scripts/falapi.py:195 — skills/taste-application/scripts/falapi.py:195-206 | skills/taste-application/scripts/taste/falapi.py:195-206 | skills/taste-distillation/scripts/taste/falapi.py:195-206 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 378 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 35) · ×4
  • (anonymous) (cyclomatic 35) docker/context-profiles/complex-eval/cases4/production-ready/check.cjs:26 — (anonymous) has cyclomatic complexity 35 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • (anonymous) (cyclomatic 35) docker/context-profiles/complex-eval/cases3/production-ready/check.cjs:26 — (anonymous) has cyclomatic complexity 35 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • (anonymous) (cyclomatic 35) docker/context-profiles/complex-eval/cases3/chained-tickets/steps/01-core/check.cjs:26 — (anonymous) has cyclomatic complexity 35 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • (anonymous) (cyclomatic 35) docker/context-profiles/complex-eval/cases4/chained-tickets/steps/01-core/check.cjs:26 — (anonymous) has cyclomatic complexity 35 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×4
  • Duplicated block (16 lines × 2) ecc2/src/session/manager.rs:919 — ecc2/src/session/manager.rs:919-934 | ecc2/src/session/manager.rs:1122-1137 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (16 lines × 2) ecc2/src/session/manager.rs:1615 — ecc2/src/session/manager.rs:1615-1630 | ecc2/src/session/manager.rs:3825-3840 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (16 lines × 2) ecc2/src/tui/dashboard.rs:2742 — ecc2/src/tui/dashboard.rs:2742-2757 | ecc2/src/tui/dashboard.rs:2796-2811 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (16 lines × 2) skills/taste-application/scripts/taste/assemble.py:178 — skills/taste-application/scripts/taste/assemble.py:178-193 | skills/taste-distillation/scripts/taste/assemble.py:178-193 — before extracting anything, compare `skills/taste-application/scripts/taste/assemble.py` and `skills/taste-distillation/scripts/taste/assemble.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 202 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (14 lines × 3) · ×4
  • Duplicated block (14 lines × 3) ecc2/src/main.rs:3086 — ecc2/src/main.rs:3086-3099 | ecc2/src/main.rs:3239-3252 | ecc2/src/main.rs:3398-3411 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (14 lines × 3) ecc2/src/tui/dashboard.rs:2370 — ecc2/src/tui/dashboard.rs:2370-2383 | ecc2/src/tui/dashboard.rs:2398-2411 | ecc2/src/tui/dashboard.rs:2429-2442 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (14 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:280 — .agents/skills/docs-governance/scripts/audit-docs.py:280-293 | pi/core/skills/docs-governance/scripts/audit-docs.py:280-293 | skills/docs-governance/scripts/audit-docs.py:280-293 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 3) src/llm/providers/astraflow.py:81 — src/llm/providers/astraflow.py:81-94 | src/llm/providers/atlas.py:98-111 | src/llm/providers/openai.py:104-117 — before extracting anything, compare `src/llm/providers/astraflow.py` and `src/llm/providers/atlas.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/llm/providers/astraflow.py:81` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×4
  • Duplicated block (11 lines × 3) ecc2/src/main.rs:6303 — ecc2/src/main.rs:6303-6313 | ecc2/src/main.rs:6536-6546 | ecc2/src/main.rs:6822-6832 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (11 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:362 — .agents/skills/docs-governance/scripts/audit-docs.py:362-372 | pi/core/skills/docs-governance/scripts/audit-docs.py:362-372 | skills/docs-governance/scripts/audit-docs.py:362-372 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:376 — .agents/skills/docs-governance/scripts/audit-docs.py:376-386 | pi/core/skills/docs-governance/scripts/audit-docs.py:376-386 | skills/docs-governance/scripts/audit-docs.py:376-386 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:222 — .agents/skills/docs-governance/scripts/audit-docs.py:222-232 | pi/core/skills/docs-governance/scripts/audit-docs.py:222-232 | skills/docs-governance/scripts/audit-docs.py:222-232 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (28 lines × 2) · ×4
  • Duplicated block (28 lines × 2) skills/taste-application/scripts/distill.py:144 — skills/taste-application/scripts/distill.py:144-171 | skills/taste-distillation/scripts/distill.py:144-171 — before extracting anything, compare `skills/taste-application/scripts/distill.py` and `skills/taste-distillation/scripts/distill.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 396 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (28 lines × 2) skills/taste-application/scripts/taste/assemble.py:41 — skills/taste-application/scripts/taste/assemble.py:41-68 | skills/taste-distillation/scripts/taste/assemble.py:41-68 — before extracting anything, compare `skills/taste-application/scripts/taste/assemble.py` and `skills/taste-distillation/scripts/taste/assemble.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 202 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (28 lines × 2) skills/taste-application/scripts/taste/frames.py:156 — skills/taste-application/scripts/taste/frames.py:156-183 | skills/taste-distillation/scripts/taste/frames.py:156-183 — before extracting anything, compare `skills/taste-application/scripts/taste/frames.py` and `skills/taste-distillation/scripts/taste/frames.py` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 233 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (28 lines × 2) skills/taste-application/scripts/taste/frames.py:251 — skills/taste-application/scripts/taste/frames.py:251-278 | skills/taste-distillation/scripts/taste/frames.py:251-278 — before extracting anything, compare `skills/taste-application/scripts/taste/frames.py` and `skills/taste-distillation/scripts/taste/frames.py` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 233 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (22 lines × 3) · ×4
  • Duplicated block (22 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:483 — .agents/skills/docs-governance/scripts/audit-docs.py:483-504 | pi/core/skills/docs-governance/scripts/audit-docs.py:483-504 | skills/docs-governance/scripts/audit-docs.py:483-504 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (22 lines × 3) .agents/skills/docs-governance/scripts/markdown_links.py:28 — .agents/skills/docs-governance/scripts/markdown_links.py:28-49 | pi/core/skills/docs-governance/scripts/markdown_links.py:28-49 | skills/docs-governance/scripts/markdown_links.py:28-49 — before extracting anything, compare `.agents/skills/docs-governance/scripts/markdown_links.py` and `pi/core/skills/docs-governance/scripts/markdown_links.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (22 lines × 3) .agents/skills/docs-governance/scripts/markdown_links.py:53 — .agents/skills/docs-governance/scripts/markdown_links.py:53-74 | pi/core/skills/docs-governance/scripts/markdown_links.py:53-74 | skills/docs-governance/scripts/markdown_links.py:53-74 — before extracting anything, compare `.agents/skills/docs-governance/scripts/markdown_links.py` and `pi/core/skills/docs-governance/scripts/markdown_links.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (22 lines × 3) skills/taste-application/scripts/falapi.py:252 — skills/taste-application/scripts/falapi.py:252-273 | skills/taste-application/scripts/taste/falapi.py:252-273 | skills/taste-distillation/scripts/taste/falapi.py:252-273 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 378 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
X17 · Uncapped recursion over a caller-supplied document · Recursive walk over a caller-supplied document has no depth cap · ×4
  • Recursive walk over a caller-supplied document has no depth cap skills/taste-application/scripts/falapi.py:357 — `parse_urls` is public, takes a document from its caller (line 339) and hands it to `walk`, which calls itself at line 357 (`walk`) with a piece of `node` (and at line 360) — and nowhere in `walk` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `walk` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap skills/taste-application/scripts/taste/falapi.py:357 — `parse_urls` is public, takes a document from its caller (line 339) and hands it to `walk`, which calls itself at line 357 (`walk`) with a piece of `node` (and at line 360) — and nowhere in `walk` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `walk` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap skills/taste-application/scripts/tasteforge/schema.py:75 — `validate` is public and takes `instance: Any` from its caller, and it calls itself at line 75 (`validate`) with a piece of `instance` (and at line 79, line 90) — and nowhere in `validate` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `validate` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap skills/taste-distillation/scripts/taste/falapi.py:357 — `parse_urls` is public, takes a document from its caller (line 339) and hands it to `walk`, which calls itself at line 357 (`walk`) with a piece of `node` (and at line 360) — and nowhere in `walk` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `walk` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
D1 · Cyclomatic Complexity · StateStore · ×3
  • StateStore::ensure_session_columns (cyclomatic 41) REDACTED:551 — StateStore::ensure_session_columns has cyclomatic complexity 41 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • StateStore::evaluate_promote_and_health_check (cyclomatic 17) REDACTED:5524 — StateStore::evaluate_promote_and_health_check has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • StateStore::verify_harness_audit_entry (cyclomatic 16) REDACTED:5649 — StateStore::verify_harness_audit_entry has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · markdown_links.inline_link_targets (cyclomatic 22) · ×3
  • markdown_links.inline_link_targets (cyclomatic 22) .agents/skills/docs-governance/scripts/markdown_links.py:77 — markdown_links.inline_link_targets has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • markdown_links.inline_link_targets (cyclomatic 22) pi/core/skills/docs-governance/scripts/markdown_links.py:77 — markdown_links.inline_link_targets has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • markdown_links.inline_link_targets (cyclomatic 22) skills/docs-governance/scripts/markdown_links.py:77 — markdown_links.inline_link_targets has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D2 · Cognitive Complexity · markdown_links.inline_link_targets (cognitive 43) · ×3
  • markdown_links.inline_link_targets (cognitive 43) .agents/skills/docs-governance/scripts/markdown_links.py:77 — markdown_links.inline_link_targets has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (37 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • markdown_links.inline_link_targets (cognitive 43) pi/core/skills/docs-governance/scripts/markdown_links.py:77 — markdown_links.inline_link_targets has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (37 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • markdown_links.inline_link_targets (cognitive 43) skills/docs-governance/scripts/markdown_links.py:77 — markdown_links.inline_link_targets has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (37 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StateStore · ×3
  • StateStore::ensure_session_columns (cognitive 40) REDACTED:551 — StateStore::ensure_session_columns has cognitive complexity 40 (threshold 15). Drivers by points: if/else 40. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • StateStore::sync_tool_activity_metrics (cognitive 25) REDACTED:1957 — StateStore::sync_tool_activity_metrics has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 4 (6 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • StateStore::list_file_overlaps (cognitive 18) REDACTED:4290 — StateStore::list_file_overlaps has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · audit-docs.check_adr_lifecycle (cognitive 23) · ×3
  • audit-docs.check_adr_lifecycle (cognitive 23) .agents/skills/docs-governance/scripts/audit-docs.py:519 — audit-docs.check_adr_lifecycle has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • audit-docs.check_adr_lifecycle (cognitive 23) pi/core/skills/docs-governance/scripts/audit-docs.py:519 — audit-docs.check_adr_lifecycle has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • audit-docs.check_adr_lifecycle (cognitive 23) skills/docs-governance/scripts/audit-docs.py:519 — audit-docs.check_adr_lifecycle has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · audit-docs.check_spine_paths (cognitive 18) · ×3
  • audit-docs.check_spine_paths (cognitive 18) .agents/skills/docs-governance/scripts/audit-docs.py:296 — audit-docs.check_spine_paths has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • audit-docs.check_spine_paths (cognitive 18) pi/core/skills/docs-governance/scripts/audit-docs.py:296 — audit-docs.check_spine_paths has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • audit-docs.check_spine_paths (cognitive 18) skills/docs-governance/scripts/audit-docs.py:296 — audit-docs.check_spine_paths has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · falapi._mesh_url (cognitive 18) · ×3
  • falapi._mesh_url (cognitive 18) skills/taste-application/scripts/falapi.py:377 — falapi._mesh_url has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 2 (5 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • falapi._mesh_url (cognitive 18) skills/taste-application/scripts/taste/falapi.py:377 — falapi._mesh_url has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 2 (5 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • falapi._mesh_url (cognitive 18) skills/taste-distillation/scripts/taste/falapi.py:377 — falapi._mesh_url has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 2 (5 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 18) · ×3
  • (anonymous) (cognitive 18) docker/context-profiles/complex-eval/cases/webhook-relay/check.cjs:53 — (anonymous) has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 11, if/else 5, error handling 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • (anonymous) (cognitive 18) docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:42 — (anonymous) has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, error handling 7, ternaries 2, loops 1. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • (anonymous) (cognitive 18) docker/context-profiles/complex-eval/cases4/chained-tickets/steps/02-persistence/check.cjs:42 — (anonymous) has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, error handling 7, ternaries 2, loops 1. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · audit-docs.check_status_resurrection (cognitive 17) · ×3
  • audit-docs.check_status_resurrection (cognitive 17) .agents/skills/docs-governance/scripts/audit-docs.py:329 — audit-docs.check_status_resurrection has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • audit-docs.check_status_resurrection (cognitive 17) pi/core/skills/docs-governance/scripts/audit-docs.py:329 — audit-docs.check_status_resurrection has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • audit-docs.check_status_resurrection (cognitive 17) skills/docs-governance/scripts/audit-docs.py:329 — audit-docs.check_status_resurrection has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · audit-docs.check_markdown_links (cognitive 16) · ×3
  • audit-docs.check_markdown_links (cognitive 16) .agents/skills/docs-governance/scripts/audit-docs.py:245 — audit-docs.check_markdown_links has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • audit-docs.check_markdown_links (cognitive 16) pi/core/skills/docs-governance/scripts/audit-docs.py:245 — audit-docs.check_markdown_links has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • audit-docs.check_markdown_links (cognitive 16) skills/docs-governance/scripts/audit-docs.py:245 — audit-docs.check_markdown_links has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D30 · Dependency Vulnerabilities · Medium CVE · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (38 lines × 2) · ×3
  • Duplicated block (38 lines × 2) pi/core/skills/agent-self-evaluation/scripts/evaluate.py:162 — pi/core/skills/agent-self-evaluation/scripts/evaluate.py:162-199 | skills/agent-self-evaluation/scripts/evaluate.py:162-199 — before extracting anything, compare `pi/core/skills/agent-self-evaluation/scripts/evaluate.py` and `skills/agent-self-evaluation/scripts/evaluate.py` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 279 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (38 lines × 2) skills/taste-application/scripts/mint.py:80 — skills/taste-application/scripts/mint.py:80-117 | skills/taste-distillation/scripts/mint.py:80-117 — before extracting anything, compare `skills/taste-application/scripts/mint.py` and `skills/taste-distillation/scripts/mint.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (38 lines × 2) src/llm/providers/astraflow.py:86 — src/llm/providers/astraflow.py:86-123 | src/llm/providers/atlas.py:103-140 — before extracting anything, compare `src/llm/providers/astraflow.py` and `src/llm/providers/atlas.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (25 lines × 3) · ×3
  • Duplicated block (25 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:119 — .agents/skills/docs-governance/scripts/audit-docs.py:119-143 | pi/core/skills/docs-governance/scripts/audit-docs.py:119-143 | skills/docs-governance/scripts/audit-docs.py:119-143 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (25 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:332 — .agents/skills/docs-governance/scripts/audit-docs.py:332-356 | pi/core/skills/docs-governance/scripts/audit-docs.py:332-356 | skills/docs-governance/scripts/audit-docs.py:332-356 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (25 lines × 3) skills/taste-application/scripts/falapi.py:340 — skills/taste-application/scripts/falapi.py:340-364 | skills/taste-application/scripts/taste/falapi.py:340-364 | skills/taste-distillation/scripts/taste/falapi.py:340-364 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 378 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (25 lines × 2) · ×3
  • Duplicated block (25 lines × 2) skills/taste-application/scripts/distill.py:116 — skills/taste-application/scripts/distill.py:116-140 | skills/taste-distillation/scripts/distill.py:116-140 — before extracting anything, compare `skills/taste-application/scripts/distill.py` and `skills/taste-distillation/scripts/distill.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 396 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (25 lines × 2) skills/taste-application/scripts/distill.py:261 — skills/taste-application/scripts/distill.py:261-285 | skills/taste-distillation/scripts/distill.py:261-285 — before extracting anything, compare `skills/taste-application/scripts/distill.py` and `skills/taste-distillation/scripts/distill.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 396 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (25 lines × 2) skills/taste-application/scripts/taste/cadence.py:72 — skills/taste-application/scripts/taste/cadence.py:72-96 | skills/taste-distillation/scripts/taste/cadence.py:72-96 — before extracting anything, compare `skills/taste-application/scripts/taste/cadence.py` and `skills/taste-distillation/scripts/taste/cadence.py` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 194 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×3
  • Duplicated block (23 lines × 2) skills/taste-application/scripts/mint.py:40 — skills/taste-application/scripts/mint.py:40-62 | skills/taste-distillation/scripts/mint.py:40-62 — before extracting anything, compare `skills/taste-application/scripts/mint.py` and `skills/taste-distillation/scripts/mint.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (23 lines × 2) skills/taste-application/scripts/taste/grade.py:371 — skills/taste-application/scripts/taste/grade.py:371-393 | skills/taste-distillation/scripts/taste/grade.py:371-393 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 484 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (23 lines × 2) skills/taste-application/scripts/taste/grade.py:566 — skills/taste-application/scripts/taste/grade.py:566-588 | skills/taste-distillation/scripts/taste/grade.py:566-588 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 484 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (21 lines × 3) · ×3
  • Duplicated block (21 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:90 — .agents/skills/docs-governance/scripts/audit-docs.py:90-110 | pi/core/skills/docs-governance/scripts/audit-docs.py:90-110 | skills/docs-governance/scripts/audit-docs.py:90-110 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (21 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:147 — .agents/skills/docs-governance/scripts/audit-docs.py:147-167 | pi/core/skills/docs-governance/scripts/audit-docs.py:147-167 | skills/docs-governance/scripts/audit-docs.py:147-167 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (21 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:187 — .agents/skills/docs-governance/scripts/audit-docs.py:187-207 | pi/core/skills/docs-governance/scripts/audit-docs.py:187-207 | skills/docs-governance/scripts/audit-docs.py:187-207 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×3
  • Duplicated block (21 lines × 2) skills/taste-application/scripts/taste/assemble.py:117 — skills/taste-application/scripts/taste/assemble.py:117-137 | skills/taste-distillation/scripts/taste/assemble.py:117-137 — before extracting anything, compare `skills/taste-application/scripts/taste/assemble.py` and `skills/taste-distillation/scripts/taste/assemble.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 202 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (21 lines × 2) skills/taste-application/scripts/taste/cadence.py:220 — skills/taste-application/scripts/taste/cadence.py:220-240 | skills/taste-distillation/scripts/taste/cadence.py:220-240 — before extracting anything, compare `skills/taste-application/scripts/taste/cadence.py` and `skills/taste-distillation/scripts/taste/cadence.py` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 194 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (21 lines × 2) skills/taste-application/scripts/taste/grade.py:513 — skills/taste-application/scripts/taste/grade.py:513-533 | skills/taste-distillation/scripts/taste/grade.py:513-533 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 484 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×3
  • Duplicated block (19 lines × 2) skills/taste-application/scripts/taste/grade.py:342 — skills/taste-application/scripts/taste/grade.py:342-360 | skills/taste-distillation/scripts/taste/grade.py:342-360 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 484 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `skills/taste-application/scripts/taste/grade.py:342` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) skills/taste-application/scripts/taste/render3d.py:54 — skills/taste-application/scripts/taste/render3d.py:54-72 | skills/taste-distillation/scripts/taste/render3d.py:54-72 — before extracting anything, compare `skills/taste-application/scripts/taste/render3d.py` and `skills/taste-distillation/scripts/taste/render3d.py` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (19 lines × 2) skills/taste-application/scripts/taste/render3d.py:236 — skills/taste-application/scripts/taste/render3d.py:236-254 | skills/taste-distillation/scripts/taste/render3d.py:236-254 — before extracting anything, compare `skills/taste-application/scripts/taste/render3d.py` and `skills/taste-distillation/scripts/taste/render3d.py` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×3
  • Duplicated block (10 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:702 — .agents/skills/docs-governance/scripts/audit-docs.py:702-711 | pi/core/skills/docs-governance/scripts/audit-docs.py:702-711 | skills/docs-governance/scripts/audit-docs.py:702-711 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 3) skills/taste-application/scripts/falapi.py:662 — skills/taste-application/scripts/falapi.py:662-671 | skills/taste-application/scripts/taste/falapi.py:662-671 | skills/taste-distillation/scripts/taste/falapi.py:662-671 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 378 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:689 — .agents/skills/docs-governance/scripts/audit-docs.py:689-698 | pi/core/skills/docs-governance/scripts/audit-docs.py:689-698 | skills/docs-governance/scripts/audit-docs.py:689-698 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×3
  • Duplicated block (8 lines × 3) skills/taste-application/scripts/falapi.py:401 — skills/taste-application/scripts/falapi.py:401-408 | skills/taste-application/scripts/taste/falapi.py:401-408 | skills/taste-distillation/scripts/taste/falapi.py:401-408 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 378 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:390 — .agents/skills/docs-governance/scripts/audit-docs.py:390-397 | pi/core/skills/docs-governance/scripts/audit-docs.py:390-397 | skills/docs-governance/scripts/audit-docs.py:390-397 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 3) skills/taste-application/scripts/falapi.py:566 — skills/taste-application/scripts/falapi.py:566-573 | skills/taste-application/scripts/taste/falapi.py:566-573 | skills/taste-distillation/scripts/taste/falapi.py:566-573 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 378 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
IC1 · Incompleteness & stubs · Fake-async · ×3
  • Fake-async — async method never awaits scripts/hooks/evaluate-session.js:44 — `main` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits scripts/hooks/pre-compact.js:113 — `main` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits scripts/hooks/session-end.js:307 — `main` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
R4 · Test Coverage · This test file cannot be loaded · ×3
  • This test file cannot be loaded docker/context-profiles/complex-eval/reference3/idempotent-webhooks/test/webhooks.test.js:5 — docker/context-profiles/complex-eval/reference3/idempotent-webhooks/test/webhooks.test.js:5 imports '../src/store', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded docker/context-profiles/complex-eval/reference4/idempotent-webhooks/test/webhooks.test.js:5 — docker/context-profiles/complex-eval/reference4/idempotent-webhooks/test/webhooks.test.js:5 imports '../src/store', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded docker/context-profiles/complex-eval/reference4/recurring-incident/test/idempotency.test.js:6 — docker/context-profiles/complex-eval/reference4/recurring-incident/test/idempotency.test.js:6 imports '../src/charge.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 47) · ×2
  • (anonymous) (cyclomatic 47) docker/context-profiles/complex-eval/cases3/idempotent-webhooks/check.cjs:27 — (anonymous) has cyclomatic complexity 47 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • (anonymous) (cyclomatic 47) docker/context-profiles/complex-eval/cases4/idempotent-webhooks/check.cjs:27 — (anonymous) has cyclomatic complexity 47 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 20) · ×2
  • (anonymous) (cyclomatic 20) docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:42 — (anonymous) has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • (anonymous) (cyclomatic 20) docker/context-profiles/complex-eval/cases4/chained-tickets/steps/02-persistence/check.cjs:42 — (anonymous) has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · (anonymous) (cognitive 50) · ×2
  • (anonymous) (cognitive 50) docker/context-profiles/complex-eval/cases3/chained-tickets/steps/01-core/check.cjs:26 — (anonymous) has cognitive complexity 50 (threshold 15). Drivers by points: error handling 11 (20 pts), boolean chains 16, if/else 8 (11 pts), loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • (anonymous) (cognitive 50) docker/context-profiles/complex-eval/cases4/chained-tickets/steps/01-core/check.cjs:26 — (anonymous) has cognitive complexity 50 (threshold 15). Drivers by points: error handling 11 (20 pts), boolean chains 16, if/else 8 (11 pts), loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 48) · ×2
  • (anonymous) (cognitive 48) docker/context-profiles/complex-eval/cases3/idempotent-webhooks/check.cjs:27 — (anonymous) has cognitive complexity 48 (threshold 15). Drivers by points: error handling 14 (26 pts), boolean chains 13, loops 4 (7 pts), if/else 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • (anonymous) (cognitive 48) docker/context-profiles/complex-eval/cases4/idempotent-webhooks/check.cjs:27 — (anonymous) has cognitive complexity 48 (threshold 15). Drivers by points: error handling 14 (26 pts), boolean chains 13, loops 4 (7 pts), if/else 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 43) · ×2
  • (anonymous) (cognitive 43) docker/context-profiles/complex-eval/cases4/production-ready/check.cjs:26 — (anonymous) has cognitive complexity 43 (threshold 15). Drivers by points: error handling 15 (25 pts), boolean chains 13, loops 2 (3 pts), if/else 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • (anonymous) (cognitive 43) docker/context-profiles/complex-eval/cases3/production-ready/check.cjs:26 — (anonymous) has cognitive complexity 43 (threshold 15). Drivers by points: error handling 15 (25 pts), boolean chains 13, loops 2 (3 pts), if/else 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · distill.validate_spec (cognitive 24) · ×2
  • distill.validate_spec (cognitive 24) skills/taste-application/scripts/distill.py:143 — distill.validate_spec has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 3, ternaries 1 (3 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • distill.validate_spec (cognitive 24) skills/taste-distillation/scripts/distill.py:143 — distill.validate_spec has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 3, ternaries 1 (3 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · grade.transfer (cognitive 23) · ×2
  • grade.transfer (cognitive 23) skills/taste-application/scripts/taste/grade.py:397 — grade.transfer has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 2 (5 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • grade.transfer (cognitive 23) skills/taste-distillation/scripts/taste/grade.py:397 — grade.transfer has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 2 (5 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · evaluate.format_report (cognitive 19) · ×2
  • evaluate.format_report (cognitive 19) pi/core/skills/agent-self-evaluation/scripts/evaluate.py:304 — evaluate.format_report has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (12 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • evaluate.format_report (cognitive 19) skills/agent-self-evaluation/scripts/evaluate.py:304 — evaluate.format_report has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (12 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · distill.describe (cognitive 18) · ×2
  • distill.describe (cognitive 18) skills/taste-application/scripts/distill.py:327 — distill.describe has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, error handling 1 (2 pts), loops 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • distill.describe (cognitive 18) skills/taste-distillation/scripts/distill.py:327 — distill.describe has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, error handling 1 (2 pts), loops 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · block-no-verify.executableWords · ×2
  • block-no-verify.executableWords::envWrapper (cognitive 18) scripts/hooks/block-no-verify.js:444 — block-no-verify.executableWords::envWrapper has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, ternaries 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (block-no-verify.executableWords::assignment) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • block-no-verify.executableWords::assignment (cognitive 16) scripts/hooks/block-no-verify.js:354 — block-no-verify.executableWords::assignment has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (5 pts), loops 2 (5 pts), ternaries 2 (4 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (block-no-verify.executableWords::envWrapper) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · distill.extract_json (cognitive 16) · ×2
  • distill.extract_json (cognitive 16) skills/taste-application/scripts/distill.py:80 — distill.extract_json has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), error handling 2 (5 pts), loops 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • distill.extract_json (cognitive 16) skills/taste-distillation/scripts/distill.py:80 — distill.extract_json has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), error handling 2 (5 pts), loops 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D3 · God Classes · ClassTooLong · ×2
  • ClassTooLong: Dashboard ecc2/src/tui/dashboard.rs:107 — ClassTooLong — 4883 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 214 methods, 2 blocks, lines 107-7232. The bar is 400 significant lines; this is 4483 over it, 12.21× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: StateStore REDACTED:27 — ClassTooLong — 3669 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 112 methods, 3 blocks, lines 27-5717. The bar is 400 significant lines; this is 3269 over it, 9.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D3 · God Classes · TooManyMethods · ×2
  • TooManyMethods: Dashboard ecc2/src/tui/dashboard.rs:107 — TooManyMethods — 214 methods. The bar is 30 methods; this is 184 over it, 7.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: StateStore REDACTED:27 — TooManyMethods — 112 methods. The bar is 30 methods; this is 82 over it, 3.73× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D3 · God Classes · TooManyFields · ×2
  • TooManyFields: Dashboard ecc2/src/tui/dashboard.rs:107 — TooManyFields — 75 stored fields beside 214 methods. The bar is 30 stored fields; this is 45 over it, 2.50× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: Config ecc2/src/config/mod.rs:220 — TooManyFields — 33 stored fields beside 19 methods. The bar is 30 stored fields; this is 3 over it, 1.10× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
D31 · IaC & Container Security · Medium IaC · ×2
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×2
  • Duplicated block (17 lines × 2) ecc2/src/main.rs:6468 — ecc2/src/main.rs:6468-6484 | ecc2/src/main.rs:6752-6768 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2) ecc2/src/session/manager.rs:1634 — ecc2/src/session/manager.rs:1634-1650 | ecc2/src/session/manager.rs:3851-3867 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (39 lines × 2) · ×2
  • Duplicated block (39 lines × 2) pi/core/skills/agent-self-evaluation/scripts/evaluate.py:95 — pi/core/skills/agent-self-evaluation/scripts/evaluate.py:95-133 | skills/agent-self-evaluation/scripts/evaluate.py:95-133 — before extracting anything, compare `pi/core/skills/agent-self-evaluation/scripts/evaluate.py` and `skills/agent-self-evaluation/scripts/evaluate.py` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 279 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (39 lines × 2) skills/taste-application/scripts/taste/frames.py:282 — skills/taste-application/scripts/taste/frames.py:282-320 | skills/taste-distillation/scripts/taste/frames.py:282-320 — before extracting anything, compare `skills/taste-application/scripts/taste/frames.py` and `skills/taste-distillation/scripts/taste/frames.py` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 233 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `skills/taste-application/scripts/taste/frames.py:282` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (33 lines × 3) · ×2
  • Duplicated block (33 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:610 — .agents/skills/docs-governance/scripts/audit-docs.py:610-642 | pi/core/skills/docs-governance/scripts/audit-docs.py:610-642 | skills/docs-governance/scripts/audit-docs.py:610-642 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (33 lines × 3) skills/taste-application/scripts/falapi.py:290 — skills/taste-application/scripts/falapi.py:290-322 | skills/taste-application/scripts/taste/falapi.py:290-322 | skills/taste-distillation/scripts/taste/falapi.py:290-322 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 378 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (33 lines × 2) · ×2
  • Duplicated block (33 lines × 2) skills/taste-application/scripts/taste/assemble.py:142 — skills/taste-application/scripts/taste/assemble.py:142-174 | skills/taste-distillation/scripts/taste/assemble.py:142-174 — before extracting anything, compare `skills/taste-application/scripts/taste/assemble.py` and `skills/taste-distillation/scripts/taste/assemble.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 202 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `skills/taste-application/scripts/taste/assemble.py:142` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (33 lines × 2) skills/taste-application/scripts/taste/grade.py:165 — skills/taste-application/scripts/taste/grade.py:165-197 | skills/taste-distillation/scripts/taste/grade.py:165-197 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 484 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (32 lines × 3) · ×2
  • Duplicated block (32 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:403 — .agents/skills/docs-governance/scripts/audit-docs.py:403-434 | pi/core/skills/docs-governance/scripts/audit-docs.py:403-434 | skills/docs-governance/scripts/audit-docs.py:403-434 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (32 lines × 3) skills/taste-application/scripts/falapi.py:426 — skills/taste-application/scripts/falapi.py:426-457 | skills/taste-application/scripts/taste/falapi.py:426-457 | skills/taste-distillation/scripts/taste/falapi.py:426-457 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 378 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (32 lines × 2) · ×2
  • Duplicated block (32 lines × 2) skills/taste-application/scripts/distill.py:81 — skills/taste-application/scripts/distill.py:81-112 | skills/taste-distillation/scripts/distill.py:81-112 — before extracting anything, compare `skills/taste-application/scripts/distill.py` and `skills/taste-distillation/scripts/distill.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 396 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (32 lines × 2) skills/taste-application/scripts/taste/assemble.py:83 — skills/taste-application/scripts/taste/assemble.py:83-114 | skills/taste-distillation/scripts/taste/assemble.py:83-114 — before extracting anything, compare `skills/taste-application/scripts/taste/assemble.py` and `skills/taste-distillation/scripts/taste/assemble.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 202 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (31 lines × 2) · ×2
  • Duplicated block (31 lines × 2) skills/taste-application/scripts/distill.py:484 — skills/taste-application/scripts/distill.py:484-514 | skills/taste-distillation/scripts/distill.py:484-514 — before extracting anything, compare `skills/taste-application/scripts/distill.py` and `skills/taste-distillation/scripts/distill.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 396 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (31 lines × 2) skills/taste-application/scripts/taste/grade.py:696 — skills/taste-application/scripts/taste/grade.py:696-726 | skills/taste-distillation/scripts/taste/grade.py:696-726 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 484 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×2
  • Duplicated block (24 lines × 2) pi/core/skills/agent-self-evaluation/scripts/evaluate.py:318 — pi/core/skills/agent-self-evaluation/scripts/evaluate.py:318-341 | skills/agent-self-evaluation/scripts/evaluate.py:318-341 — before extracting anything, compare `pi/core/skills/agent-self-evaluation/scripts/evaluate.py` and `skills/agent-self-evaluation/scripts/evaluate.py` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 279 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (24 lines × 2) skills/taste-application/scripts/taste/frames.py:205 — skills/taste-application/scripts/taste/frames.py:205-228 | skills/taste-distillation/scripts/taste/frames.py:205-228 — before extracting anything, compare `skills/taste-application/scripts/taste/frames.py` and `skills/taste-distillation/scripts/taste/frames.py` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 233 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (20 lines × 3) · ×2
  • Duplicated block (20 lines × 3) .agents/skills/docs-governance/scripts/markdown_links.py:153 — .agents/skills/docs-governance/scripts/markdown_links.py:153-172 | pi/core/skills/docs-governance/scripts/markdown_links.py:153-172 | skills/docs-governance/scripts/markdown_links.py:153-172 — before extracting anything, compare `.agents/skills/docs-governance/scripts/markdown_links.py` and `pi/core/skills/docs-governance/scripts/markdown_links.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (20 lines × 3) skills/taste-application/scripts/falapi.py:378 — skills/taste-application/scripts/falapi.py:378-397 | skills/taste-application/scripts/taste/falapi.py:378-397 | skills/taste-distillation/scripts/taste/falapi.py:378-397 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 378 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (16 lines × 3) · ×2
  • Duplicated block (16 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:246 — .agents/skills/docs-governance/scripts/audit-docs.py:246-261 | pi/core/skills/docs-governance/scripts/audit-docs.py:246-261 | skills/docs-governance/scripts/audit-docs.py:246-261 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (16 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:462 — .agents/skills/docs-governance/scripts/audit-docs.py:462-477 | pi/core/skills/docs-governance/scripts/audit-docs.py:462-477 | skills/docs-governance/scripts/audit-docs.py:462-477 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×2
  • Duplicated block (7 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:72 — .agents/skills/docs-governance/scripts/audit-docs.py:72-78 | pi/core/skills/docs-governance/scripts/audit-docs.py:72-78 | skills/docs-governance/scripts/audit-docs.py:72-78 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:510 — .agents/skills/docs-governance/scripts/audit-docs.py:510-516 | pi/core/skills/docs-governance/scripts/audit-docs.py:510-516 | skills/docs-governance/scripts/audit-docs.py:510-516 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
GD1 · Unfinished & placeholder code · Unfinished stub · ×2
  • Unfinished stub — throws a "not implemented" error docker/context-profiles/complex-eval/cases2/forge-cli/files/src/cli.js:4 — A shipped function's whole body still throws a "not implemented" error — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws a "not implemented" error docker/context-profiles/complex-eval/cases2/keccak-selector/files/src/selector.js:4 — A shipped function's whole body still throws a "not implemented" error — generated scaffolding that was never completed. Implement it or remove the dead surface.
IC1 · Incompleteness & stubs · Unfinished stub · ×2
  • Unfinished stub — throws a "not implemented" exception docker/context-profiles/complex-eval/cases2/forge-cli/files/src/cli.js:4 — `run` throws an exception whose message says it isn't finished — a not-implemented stub wearing an ordinary exception. Implement it or remove it.
  • Unfinished stub — throws a "not implemented" exception docker/context-profiles/complex-eval/cases2/keccak-selector/files/src/selector.js:4 — `functionSelector` throws an exception whose message says it isn't finished — a not-implemented stub wearing an ordinary exception. Implement it or remove it.
R10 · Code Duplication · Wholesale file copy (56 identical lines × 2 files) · ×2
  • Wholesale file copy (56 identical lines × 2 files) docker/context-profiles/complex-eval/reference3/chained-tickets/src/routes.js:2 — docker/context-profiles/complex-eval/reference3/chained-tickets/src/routes.js:2 · docker/context-profiles/complex-eval/reference4/chained-tickets/src/routes.js:2 — these 2 files are line-for-line copies of one another — 56 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
  • Wholesale file copy (56 identical lines × 2 files) docker/context-profiles/complex-eval/reference3/chained-tickets/src/service.js:2 — docker/context-profiles/complex-eval/reference3/chained-tickets/src/service.js:2 · docker/context-profiles/complex-eval/reference4/chained-tickets/src/service.js:2 — these 2 files are line-for-line copies of one another — 56 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Duplicated block (34 lines × 3 locations) · ×2
  • Duplicated block (34 lines × 3 locations) scripts/lib/install-targets/codebuddy-project.js:16 — scripts/lib/install-targets/codebuddy-project.js:16 · scripts/lib/install-targets/joycode-project.js:16 · scripts/lib/install-targets/zed-project.js:16 — the 3 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
  • Duplicated block (34 lines × 3 locations) scripts/lib/session-adapters/claude-history.js:120 — scripts/lib/session-adapters/claude-history.js:120 · scripts/lib/session-adapters/codex-worktree.js:311 · scripts/lib/session-adapters/opencode.js:275 — the 3 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
R11 · Import Boundaries · Boundary violation [package · ×2
  • Boundary violation [package:test-suite-dependency] docker/context-profiles/native-probe.js:71 — docker/context-profiles/native-probe.js:71 imports tests/lib/helpers/context-carrier-fixture.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
  • Boundary violation [package:test-suite-dependency] docker/context-profiles/packed-smoke.js:11 — docker/context-profiles/packed-smoke.js:11 imports tests/lib/helpers/context-carrier-fixture.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 47, cognitive 48) · ×2
  • Complex function (anonymous) (cyclomatic 47, cognitive 48) docker/context-profiles/complex-eval/cases3/idempotent-webhooks/check.cjs:27 — (anonymous) has cyclomatic complexity 47 and cognitive complexity 48; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
  • Complex function (anonymous) (cyclomatic 47, cognitive 48) docker/context-profiles/complex-eval/cases4/idempotent-webhooks/check.cjs:27 — (anonymous) has cyclomatic complexity 47 and cognitive complexity 48; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
AC7 · A11y enforcement · Accessibility enforcement below the top rung · ×1
  • Accessibility enforcement below the top rung — No accessibility enforcement found — no a11y linter (an accessibility check that can read your UI — no component framework was detected and your pages are rendered by server-side templates, which neither the JSX/Vue ESLint plugins nor the HTML-template linters can parse; run axe/pa11y over the rendered pages, or assert the accessibility invariants over that rendered HTML in the test suite you already have) and no axe/pa11y/Lighthouse in tests or CI. Start by running that check over your rendered pages in CI. What was searched, so you can tell an absence from a miss: the 5 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
D1 · Cyclomatic Complexity · block-no-verify.checkCommand (cyclomatic 73) · ×1
  • block-no-verify.checkCommand (cyclomatic 73) scripts/hooks/block-no-verify.js:987 — block-no-verify.checkCommand has cyclomatic complexity 73 (threshold 15). Most of this is not in the body itself: 9 of the 73 points are its own statements and the rest belongs to 11 function items inside it that branch (inspectState, inspectEnvironment, processCommand, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · context-selection.resolveTaskContext (cyclomatic 67) · ×1
  • context-selection.resolveTaskContext (cyclomatic 67) scripts/lib/context-selection.js:333 — context-selection.resolveTaskContext has cyclomatic complexity 67 (threshold 15). Of this number, 64 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · gateguard-fact-force.unwrapLeadWrappers (cyclomatic 63) · ×1
  • gateguard-fact-force.unwrapLeadWrappers (cyclomatic 63) scripts/hooks/gateguard-fact-force.js:729 — gateguard-fact-force.unwrapLeadWrappers has cyclomatic complexity 63 (threshold 15). Most of this is not in the body itself: 9 of the 63 points are its own statements and the rest belongs to 8 function items inside it that branch (skipEnvWrapper, leadWrapperFor, skipExecBuiltin, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · install-state.createFallbackValidator · ×1
  • install-state.createFallbackValidator::validate (cyclomatic 60) scripts/lib/install-state.js:43 — install-state.createFallbackValidator::validate has cyclomatic complexity 60 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · contract.validate_artifact_receipt (cyclomatic 58) · ×1
  • contract.validate_artifact_receipt (cyclomatic 58) skills/taste-application/scripts/tasteforge/contract.py:307 — contract.validate_artifact_receipt has cyclomatic complexity 58 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · block-no-verify.executableWords (cyclomatic 58) · ×1
  • block-no-verify.executableWords (cyclomatic 58) scripts/hooks/block-no-verify.js:338 — block-no-verify.executableWords has cyclomatic complexity 58 (threshold 15). Most of this is not in the body itself: 13 of the 58 points are its own statements and the rest belongs to 7 function items inside it that branch (envWrapper, assignment, envResetFlag, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · context-profile-commands.execute (cyclomatic 58) · ×1
  • context-profile-commands.execute (cyclomatic 58) scripts/lib/context-profile-commands.js:81 — context-profile-commands.execute has cyclomatic complexity 58 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · forge.forge (cyclomatic 54) · ×1
  • forge.forge (cyclomatic 54) skills/taste-application/scripts/forge.py:49 — forge.forge has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · instinct-cli.cmd_import (cyclomatic 51) · ×1
  • instinct-cli.cmd_import (cyclomatic 51) skills/continuous-learning-v2/scripts/instinct-cli.py:887 — instinct-cli.cmd_import has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · validate-install-manifests.validateInstallManifests (cyclomatic 51) · ×1
  • validate-install-manifests.validateInstallManifests (cyclomatic 51) scripts/ci/validate-install-manifests.js:71 — validate-install-manifests.validateInstallManifests has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mcp-health-check.probeCommandServer (cyclomatic 51) · ×1
  • mcp-health-check.probeCommandServer (cyclomatic 51) REDACTED:328 — mcp-health-check.probeCommandServer has cyclomatic complexity 51 (threshold 15). Most of this is not in the body itself: 1 of the 51 points is its own statement and the rest belongs to 11 function literals inside it that branch (lines 395, 329, 492, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · memory-mcp.createMemoryMcpService.handle (cyclomatic 50) · ×1
  • memory-mcp.createMemoryMcpService.handle (cyclomatic 50) scripts/memory-mcp.mjs:365 — memory-mcp.createMemoryMcpService.handle has cyclomatic complexity 50 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index.wrapSqlJsDatabase (cyclomatic 49) · ×1
  • index.wrapSqlJsDatabase (cyclomatic 49) scripts/lib/state-store/index.js:214 — index.wrapSqlJsDatabase has cyclomatic complexity 49 (threshold 15). Most of this is not in the body itself: 4 of the 49 points are its own statements and the rest belongs to 7 function items inside it that branch (reload, withSnapshot::execute, a function literal at line 303, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · server.createPlanCanvasServer.handleApi (cyclomatic 49) · ×1
  • server.createPlanCanvasServer.handleApi (cyclomatic 49) REDACTED:398 — server.createPlanCanvasServer.handleApi has cyclomatic complexity 49 (threshold 15). Of this number, 43 points are the body's own statements and 6 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · apply.applyInstallPlanLocked (cyclomatic 48) · ×1
  • apply.applyInstallPlanLocked (cyclomatic 48) scripts/lib/install/apply.js:771 — apply.applyInstallPlanLocked has cyclomatic complexity 48 (threshold 15). Of this number, 45 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · codex-legacy-sync.uninstallLegacyCodexSync (cyclomatic 47) · ×1
  • codex-legacy-sync.uninstallLegacyCodexSync (cyclomatic 47) scripts/lib/codex-legacy-sync.js:521 — codex-legacy-sync.uninstallLegacyCodexSync has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · merge-mcp-config.main (cyclomatic 47) · ×1
  • merge-mcp-config.main (cyclomatic 47) scripts/codex/merge-mcp-config.js:207 — merge-mcp-config.main has cyclomatic complexity 47 (threshold 15). Of this number, 46 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · context-profile-commands.parse (cyclomatic 46) · ×1
  • context-profile-commands.parse (cyclomatic 46) scripts/lib/context-profile-commands.js:12 — context-profile-commands.parse has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · server.createControlPaneServer.server (cyclomatic 44) · ×1
  • server.createControlPaneServer.server (cyclomatic 44) REDACTED:195 — server.createControlPaneServer.server has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · request.normalizeInstallRequest (cyclomatic 42) · ×1
  • request.normalizeInstallRequest (cyclomatic 42) scripts/lib/install/request.js:101 — request.normalizeInstallRequest has cyclomatic complexity 42 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · run-intent.parseArgs (cyclomatic 41) · ×1
  • run-intent.parseArgs (cyclomatic 41) docker/gateguard-effectiveness/run-intent.js:45 — run-intent.parseArgs has cyclomatic complexity 41 (threshold 15). Of this number, 38 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · shadow-trail.transition (cyclomatic 41) · ×1
  • shadow-trail.transition (cyclomatic 41) scripts/lib/agent-proximity/shadow-trail.js:211 — shadow-trail.transition has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · contract.validate_effect_recipe (cyclomatic 40) · ×1
  • contract.validate_effect_recipe (cyclomatic 40) skills/taste-application/scripts/tasteforge/contract.py:173 — contract.validate_effect_recipe has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · run-intent.main (cyclomatic 40) · ×1
  • run-intent.main (cyclomatic 40) docker/gateguard-effectiveness/run-intent.js:216 — run-intent.main has cyclomatic complexity 40 (threshold 15). Of this number, 33 points are the body's own statements and 7 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · guarded-write.writeFileNoFollow (cyclomatic 40) · ×1
  • guarded-write.writeFileNoFollow (cyclomatic 40) scripts/lib/install/guarded-write.js:32 — guarded-write.writeFileNoFollow has cyclomatic complexity 40 (threshold 15). Of this number, 31 points are the body's own statements and 9 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · hook-input-limits.createHookContextScanner.push (cyclomatic 40) · ×1
  • hook-input-limits.createHookContextScanner.push (cyclomatic 40) scripts/hooks/hook-input-limits.js:33 — hook-input-limits.createHookContextScanner.push has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · apply.apply (cyclomatic 39) · ×1
  • apply.apply (cyclomatic 39) skills/taste-application/scripts/apply.py:284 — apply.apply has cyclomatic complexity 39 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · blender_prop.build (cyclomatic 39) · ×1
  • blender_prop.build (cyclomatic 39) skills/taste-application/scripts/blender_prop.py:151 — blender_prop.build has cyclomatic complexity 39 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · gateguard-turn-scan.scanCurrentTurn (cyclomatic 39) · ×1
  • gateguard-turn-scan.scanCurrentTurn (cyclomatic 39) scripts/lib/gateguard-turn-scan.js:101 — gateguard-turn-scan.scanCurrentTurn has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · context-profile-launch.launchTaskContext (cyclomatic 39) · ×1
  • context-profile-launch.launchTaskContext (cyclomatic 39) scripts/lib/context-profile-launch.js:20 — context-profile-launch.launchTaskContext has cyclomatic complexity 39 (threshold 15). Of this number, 37 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · observability-readiness.buildChecks (cyclomatic 39) · ×1
  • observability-readiness.buildChecks (cyclomatic 39) scripts/observability-readiness.js:113 — observability-readiness.buildChecks has cyclomatic complexity 39 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · loop-status.analyzeTranscript (cyclomatic 36) · ×1
  • loop-status.analyzeTranscript (cyclomatic 36) scripts/loop-status.js:401 — loop-status.analyzeTranscript has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · release-approval-gate.buildReport (cyclomatic 36) · ×1
  • release-approval-gate.buildReport (cyclomatic 36) scripts/release-approval-gate.js:386 — release-approval-gate.buildReport has cyclomatic complexity 36 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · context-profile-native.inputs (cyclomatic 35) · ×1
  • context-profile-native.inputs (cyclomatic 35) REDACTED:72 — context-profile-native.inputs has cyclomatic complexity 35 (threshold 15). Of this number, 32 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · apply.assertOpenCodeHookDeactivationReady (cyclomatic 35) · ×1
  • apply.assertOpenCodeHookDeactivationReady (cyclomatic 35) scripts/lib/install/apply.js:460 — apply.assertOpenCodeHookDeactivationReady has cyclomatic complexity 35 (threshold 15). Of this number, 34 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · workflow.run_workflow (cyclomatic 34) · ×1
  • workflow.run_workflow (cyclomatic 34) skills/taste-application/scripts/tasteforge/workflow.py:523 — workflow.run_workflow has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · request.parseInstallArgs (cyclomatic 34) · ×1
  • request.parseInstallArgs (cyclomatic 34) scripts/lib/install/request.js:19 — request.parseInstallArgs has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · install-guided.main (cyclomatic 34) · ×1
  • install-guided.main (cyclomatic 34) scripts/install-guided.js:248 — install-guided.main has cyclomatic complexity 34 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · pipeline.main (cyclomatic 33) · ×1
  • pipeline.main (cyclomatic 33) skills/taste-application/scripts/pipeline.py:52 — pipeline.main has cyclomatic complexity 33 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · cli.run (cyclomatic 33) · ×1
  • cli.run (cyclomatic 33) docker/context-profiles/complex-eval/reference2/forge-cli/src/cli.js:19 — cli.run has cyclomatic complexity 33 (threshold 15). Of this number, 31 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · install-manifests.resolveInstallPlan (cyclomatic 33) · ×1
  • install-manifests.resolveInstallPlan (cyclomatic 33) scripts/lib/install-manifests.js:557 — install-manifests.resolveInstallPlan has cyclomatic complexity 33 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 33) · ×1
  • (anonymous) (cyclomatic 33) docker/context-profiles/complex-eval/cases/sentinel-api/check.cjs:47 — (anonymous) has cyclomatic complexity 33 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ai-eval.main (cyclomatic 32) · ×1
  • ai-eval.main (cyclomatic 32) docker/context-profiles/ai-eval.js:6 — ai-eval.main has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ownership-guard.prepareUserOwnedFileGuard (cyclomatic 32) · ×1
  • ownership-guard.prepareUserOwnedFileGuard (cyclomatic 32) scripts/lib/install/ownership-guard.js:40 — ownership-guard.prepareUserOwnedFileGuard has cyclomatic complexity 32 (threshold 15). Of this number, 30 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · context-retrieval.searchRetrieval (cyclomatic 32) · ×1
  • context-retrieval.searchRetrieval (cyclomatic 32) scripts/lib/context-retrieval.js:138 — context-retrieval.searchRetrieval has cyclomatic complexity 32 (threshold 15). Of this number, 18 points are the body's own statements and 14 belong to 7 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · release-video-suite.buildReport (cyclomatic 32) · ×1
  • release-video-suite.buildReport (cyclomatic 32) scripts/release-video-suite.js:858 — release-video-suite.buildReport has cyclomatic complexity 32 (threshold 15). Of this number, 30 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · status.renderMarkdown (cyclomatic 31) · ×1
  • status.renderMarkdown (cyclomatic 31) scripts/status.js:287 — status.renderMarkdown has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · schema.validate (cyclomatic 30) · ×1
  • schema.validate (cyclomatic 30) skills/taste-application/scripts/tasteforge/schema.py:36 — schema.validate has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · envelope.validateEnvelope (cyclomatic 30) · ×1
  • envelope.validateEnvelope (cyclomatic 30) scripts/lib/eval-harness/envelope.js:165 — envelope.validateEnvelope has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · auto-update.runAutoUpdate (cyclomatic 30) · ×1
  • auto-update.runAutoUpdate (cyclomatic 30) scripts/auto-update.js:192 — auto-update.runAutoUpdate has cyclomatic complexity 30 (threshold 15). Of this number, 27 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · run-with-flags.main (cyclomatic 30) · ×1
  • run-with-flags.main (cyclomatic 30) scripts/hooks/run-with-flags.js:192 — run-with-flags.main has cyclomatic complexity 30 (threshold 15). Of this number, 28 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ecc_dashboard.load_skills (cyclomatic 29) · ×1
  • ecc_dashboard.load_skills (cyclomatic 29) ecc_dashboard.py:108 — ecc_dashboard.load_skills has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · run.parseArgs (cyclomatic 29) · ×1
  • run.parseArgs (cyclomatic 29) docker/gateguard-effectiveness/run.js:31 — run.parseArgs has cyclomatic complexity 29 (threshold 15). Of this number, 26 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · gate.parseChildResult (cyclomatic 29) · ×1
  • gate.parseChildResult (cyclomatic 29) scripts/lib/eval-harness/gate.js:185 — gate.parseChildResult has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · qwen-adapt-agents.adaptFrontmatter (cyclomatic 29) · ×1
  • qwen-adapt-agents.adaptFrontmatter (cyclomatic 29) scripts/qwen-adapt-agents.js:133 — qwen-adapt-agents.adaptFrontmatter has cyclomatic complexity 29 (threshold 15). Of this number, 28 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · gateguard-search-filters.applyShellFilterArg (cyclomatic 29) · ×1
  • gateguard-search-filters.applyShellFilterArg (cyclomatic 29) scripts/lib/gateguard-search-filters.js:439 — gateguard-search-filters.applyShellFilterArg has cyclomatic complexity 29 (threshold 15). Of this number, 20 points are the body's own statements and 9 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · context-selection.citationFor (cyclomatic 29) · ×1
  • context-selection.citationFor (cyclomatic 29) scripts/lib/context-selection.js:126 — context-selection.citationFor has cyclomatic complexity 29 (threshold 15). Of this number, 19 points are the body's own statements and 10 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · statusline-render.readInstalledPlugins (cyclomatic 29) · ×1
  • statusline-render.readInstalledPlugins (cyclomatic 29) scripts/lib/statusline-render.js:245 — statusline-render.readInstalledPlugins has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 10 of the 29 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 264, applicable, a function literal at line 271, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · quality-gate.maybeRunQualityGate (cyclomatic 29) · ×1
  • quality-gate.maybeRunQualityGate (cyclomatic 29) REDACTED:61 — quality-gate.maybeRunQualityGate has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · session-start.main (cyclomatic 29) · ×1
  • session-start.main (cyclomatic 29) REDACTED:648 — session-start.main has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · install-plan.parseArgs (cyclomatic 29) · ×1
  • install-plan.parseArgs (cyclomatic 29) scripts/install-plan.js:50 — install-plan.parseArgs has cyclomatic complexity 29 (threshold 15). Of this number, 27 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · main (cyclomatic 29) · ×1
  • main (cyclomatic 29) skills/ck/hooks/session-start.mjs:83 — main has cyclomatic complexity 29 (threshold 15). Of this number, 25 points are the body's own statements and 4 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · claude-settings.mergeManagedHooks (cyclomatic 28) · ×1
  • claude-settings.mergeManagedHooks (cyclomatic 28) scripts/lib/install/claude-settings.js:477 — claude-settings.mergeManagedHooks has cyclomatic complexity 28 (threshold 15). Of this number, 27 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · claw.main (cyclomatic 28) · ×1
  • claw.main (cyclomatic 28) scripts/claw.js:331 — claw.main has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 5 of the 28 points are its own statements and the rest belongs to one function literal inside it that branches (line 361). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · policy.loadPolicy (cyclomatic 28) · ×1
  • policy.loadPolicy (cyclomatic 28) scripts/lib/github-coordination/policy.js:50 — policy.loadPolicy has cyclomatic complexity 28 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · gateguard-heredoc.iterateHeredocs (cyclomatic 28) · ×1
  • gateguard-heredoc.iterateHeredocs (cyclomatic 28) scripts/hooks/gateguard-heredoc.js:67 — gateguard-heredoc.iterateHeredocs has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · project-detect.detectProjectType (cyclomatic 28) · ×1
  • project-detect.detectProjectType (cyclomatic 28) scripts/lib/project-detect.js:368 — project-detect.detectProjectType has cyclomatic complexity 28 (threshold 15). Of this number, 27 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · claude-scope-migration.migrateClaudePluginScope (cyclomatic 28) · ×1
  • claude-scope-migration.migrateClaudePluginScope (cyclomatic 28) scripts/lib/claude-scope-migration.js:327 — claude-scope-migration.migrateClaudePluginScope has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · install-apply.printHumanPlan (cyclomatic 28) · ×1
  • install-apply.printHumanPlan (cyclomatic 28) scripts/install-apply.js:87 — install-apply.printHumanPlan has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · platform-audit.parseArgs (cyclomatic 28) · ×1
  • platform-audit.parseArgs (cyclomatic 28) scripts/platform-audit.js:66 — platform-audit.parseArgs has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plan.createManifestInstallPlan (cyclomatic 27) · ×1
  • plan.createManifestInstallPlan (cyclomatic 27) scripts/lib/install/plan.js:258 — plan.createManifestInstallPlan has cyclomatic complexity 27 (threshold 15). Of this number, 23 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · validate-carrier-closure.extractReferences (cyclomatic 27) · ×1
  • validate-carrier-closure.extractReferences (cyclomatic 27) scripts/ci/validate-carrier-closure.js:47 — validate-carrier-closure.extractReferences has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 1 of the 27 points is its own statement and the rest belongs to 6 function items inside it that branch (visit, record, staticJoin, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · validate-commands.validateCommands (cyclomatic 27) · ×1
  • validate-commands.validateCommands (cyclomatic 27) scripts/ci/validate-commands.js:62 — validate-commands.validateCommands has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · codex-legacy-sync.rollbackLegacyCodexSync (cyclomatic 27) · ×1
  • codex-legacy-sync.rollbackLegacyCodexSync (cyclomatic 27) scripts/lib/codex-legacy-sync.js:299 — codex-legacy-sync.rollbackLegacyCodexSync has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · context-selection.validateTask (cyclomatic 27) · ×1
  • context-selection.validateTask (cyclomatic 27) scripts/lib/context-selection.js:179 — context-selection.validateTask has cyclomatic complexity 27 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · context-routing-index.readRoutingIndex (cyclomatic 27) · ×1
  • context-routing-index.readRoutingIndex (cyclomatic 27) scripts/lib/context-routing-index.js:135 — context-routing-index.readRoutingIndex has cyclomatic complexity 27 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · governance-capture.analyzeForGovernanceEvents (cyclomatic 27) · ×1
  • governance-capture.analyzeForGovernanceEvents (cyclomatic 27) scripts/hooks/governance-capture.js:172 — governance-capture.analyzeForGovernanceEvents has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · hookify-runtime.normalizeRule (cyclomatic 27) · ×1
  • hookify-runtime.normalizeRule (cyclomatic 27) REDACTED:164 — hookify-runtime.normalizeRule has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · markdown.renderMarkdown (cyclomatic 27) · ×1
  • markdown.renderMarkdown (cyclomatic 27) scripts/lib/plan-canvas/markdown.js:186 — markdown.renderMarkdown has cyclomatic complexity 27 (threshold 15). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · profile.parseArgs (cyclomatic 27) · ×1
  • profile.parseArgs (cyclomatic 27) scripts/profile.js:56 — profile.parseArgs has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · doUninstall (cyclomatic 27) · ×1
  • doUninstall (cyclomatic 27) .codebuddy/uninstall.js:119 — doUninstall has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · instinct-cli.detect_project (cyclomatic 26) · ×1
  • instinct-cli.detect_project (cyclomatic 26) skills/continuous-learning-v2/scripts/instinct-cli.py:286 — instinct-cli.detect_project has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · app.createApp (cyclomatic 26) · ×1
  • app.createApp (cyclomatic 26) docker/context-profiles/complex-eval/reference/sentinel-api/src/app.js:38 — app.createApp has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 2 of the 26 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 41, 45). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · lib.parseStream (cyclomatic 26) · ×1
  • lib.parseStream (cyclomatic 26) docker/gateguard-effectiveness/lib.js:201 — lib.parseStream has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · run.main (cyclomatic 26) · ×1
  • run.main (cyclomatic 26) docker/gateguard-effectiveness/run.js:137 — run.main has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 2 of the 26 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 144, 169, 182). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · astra-review.parseArgs (cyclomatic 26) · ×1
  • astra-review.parseArgs (cyclomatic 26) scripts/astra-review.js:93 — astra-review.parseArgs has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · antigravity-legacy-migration.cleanupLegacyAntigravityInstall (cyclomatic 26) · ×1
  • antigravity-legacy-migration.cleanupLegacyAntigravityInstall (cyclomatic 26) scripts/lib/install/antigravity-legacy-migration.js:309 — antigravity-legacy-migration.cleanupLegacyAntigravityInstall has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · pre-bash-commit-quality.evaluate (cyclomatic 26) · ×1
  • pre-bash-commit-quality.evaluate (cyclomatic 26) REDACTED:412 — pre-bash-commit-quality.evaluate has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tracker.normalizeExecutionRecord (cyclomatic 26) · ×1
  • tracker.normalizeExecutionRecord (cyclomatic 26) scripts/lib/skill-evolution/tracker.js:45 — tracker.normalizeExecutionRecord has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · shell-split.splitShellSegments (cyclomatic 26) · ×1
  • shell-split.splitShellSegments (cyclomatic 26) scripts/lib/shell-split.js:8 — shell-split.splitShellSegments has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · session-start.selectMatchingSession (cyclomatic 26) · ×1
  • session-start.selectMatchingSession (cyclomatic 26) REDACTED:292 — session-start.selectMatchingSession has cyclomatic complexity 26 (threshold 15). Of this number, 25 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · server.createPlanCanvasServer.server (cyclomatic 26) · ×1
  • server.createPlanCanvasServer.server (cyclomatic 26) REDACTED:662 — server.createPlanCanvasServer.server has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 3 of the 26 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 673, 679, 719). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · release-video-suite.validateVideoArtifact (cyclomatic 26) · ×1
  • release-video-suite.validateVideoArtifact (cyclomatic 26) scripts/release-video-suite.js:676 — release-video-suite.validateVideoArtifact has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · report.generate_report (cyclomatic 25) · ×1
  • report.generate_report (cyclomatic 25) skills/skill-comply/scripts/report.py:13 — report.generate_report has cyclomatic complexity 25 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · claude-settings.validateHookHandler (cyclomatic 25) · ×1
  • claude-settings.validateHookHandler (cyclomatic 25) scripts/lib/install/claude-settings.js:71 — claude-settings.validateHookHandler has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · resolve-ecc-root.resolveEccRoot (cyclomatic 25) · ×1
  • resolve-ecc-root.resolveEccRoot (cyclomatic 25) scripts/lib/resolve-ecc-root.js:56 — resolve-ecc-root.resolveEccRoot has cyclomatic complexity 25 (threshold 15). Of this number, 22 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · preview-pack-smoke.buildReport (cyclomatic 25) · ×1
  • preview-pack-smoke.buildReport (cyclomatic 25) scripts/preview-pack-smoke.js:209 — preview-pack-smoke.buildReport has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 25) · ×1
  • (anonymous) (cyclomatic 25) docker/context-profiles/complex-eval/cases/webhook-relay/check.cjs:53 — (anonymous) has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · instinct-cli.cmd_evolve (cyclomatic 24) · ×1
  • instinct-cli.cmd_evolve (cyclomatic 24) skills/continuous-learning-v2/scripts/instinct-cli.py:1306 — instinct-cli.cmd_evolve has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · apply.apply_local (cyclomatic 24) · ×1
  • apply.apply_local (cyclomatic 24) skills/taste-application/scripts/tasteforge/apply.py:135 — apply.apply_local has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · resolve.apply_placements (cyclomatic 24) · ×1
  • resolve.apply_placements (cyclomatic 24) skills/taste-application/scripts/tasteforge/resolve.py:232 — resolve.apply_placements has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · receipt.verifyReceipt (cyclomatic 24) · ×1
  • receipt.verifyReceipt (cyclomatic 24) scripts/lib/eval-harness/receipt.js:103 — receipt.verifyReceipt has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · agent-convert.main (cyclomatic 24) · ×1
  • agent-convert.main (cyclomatic 24) scripts/agent-convert.js:112 — agent-convert.main has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · merge-codex-config.main (cyclomatic 24) · ×1
  • merge-codex-config.main (cyclomatic 24) scripts/codex/merge-codex-config.js:210 — merge-codex-config.main has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · gateguard-search-filters.wildcardMatch (cyclomatic 24) · ×1
  • gateguard-search-filters.wildcardMatch (cyclomatic 24) scripts/lib/gateguard-search-filters.js:216 — gateguard-search-filters.wildcardMatch has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · insaits-security-wrapper.process.stdin.on("end") (cyclomatic 24) · ×1
  • insaits-security-wrapper.process.stdin.on("end") (cyclomatic 24) scripts/hooks/insaits-security-wrapper.js:32 — insaits-security-wrapper.process.stdin.on("end") has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · mcp-health-check.attemptReconnect (cyclomatic 24) · ×1
  • mcp-health-check.attemptReconnect (cyclomatic 24) REDACTED:637 — mcp-health-check.attemptReconnect has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 10 of the 24 points are its own statements and the rest belongs to one function item inside it that branches (splitReconnectCommand). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · shadow-trail.normalizePayload (cyclomatic 24) · ×1
  • shadow-trail.normalizePayload (cyclomatic 24) scripts/lib/agent-proximity/shadow-trail.js:164 — shadow-trail.normalizePayload has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · memory-mcp.runStdioServer (cyclomatic 24) · ×1
  • memory-mcp.runStdioServer (cyclomatic 24) scripts/memory-mcp.mjs:533 — memory-mcp.runStdioServer has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 5 function items inside it that branch (a function literal at line 610, drainQueue, enqueue, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · platform-audit.renderMarkdown (cyclomatic 24) · ×1
  • platform-audit.renderMarkdown (cyclomatic 24) scripts/platform-audit.js:636 — platform-audit.renderMarkdown has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · work-items.main (cyclomatic 24) · ×1
  • work-items.main (cyclomatic 24) scripts/work-items.js:411 — work-items.main has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · doInstall (cyclomatic 24) · ×1
  • doInstall (cyclomatic 24) .codebuddy/install.js:146 — doInstall has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · config-protection.main (cyclomatic 23) · ×1
  • config-protection.main (cyclomatic 23) hooks/hermes/config-protection.py:46 — config-protection.main has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · contract.validate_genre_specs (cyclomatic 23) · ×1
  • contract.validate_genre_specs (cyclomatic 23) skills/taste-application/scripts/tasteforge/contract.py:117 — contract.validate_genre_specs has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ClaudeProvider.generate (cyclomatic 23) · ×1
  • ClaudeProvider.generate (cyclomatic 23) src/llm/providers/claude.py:64 — ClaudeProvider.generate has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · validate-workflow-security.findViolations (cyclomatic 23) · ×1
  • validate-workflow-security.findViolations (cyclomatic 23) scripts/ci/validate-workflow-security.js:122 — validate-workflow-security.findViolations has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · generate-skill-triggers.main (cyclomatic 23) · ×1
  • generate-skill-triggers.main (cyclomatic 23) scripts/dev/generate-skill-triggers.js:77 — generate-skill-triggers.main has cyclomatic complexity 23 (threshold 15). Of this number, 14 points are the body's own statements and 9 belong to 4 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · claude-plugin-setup.runClaude (cyclomatic 23) · ×1
  • claude-plugin-setup.runClaude (cyclomatic 23) scripts/lib/claude-plugin-setup.js:213 — claude-plugin-setup.runClaude has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · setup.main (cyclomatic 23) · ×1
  • setup.main (cyclomatic 23) scripts/setup.js:396 — setup.main has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · multi-harness-setup.normalizeGuidedInstallRequest (cyclomatic 23) · ×1
  • multi-harness-setup.normalizeGuidedInstallRequest (cyclomatic 23) scripts/lib/multi-harness-setup.js:19 — multi-harness-setup.normalizeGuidedInstallRequest has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · check-evidence.checkEvidence (cyclomatic 23) · ×1
  • check-evidence.checkEvidence (cyclomatic 23) skills/frontend-design-direction/scripts/check-evidence.js:13 — check-evidence.checkEvidence has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 8 of the 23 points are its own statements and the rest belongs to 4 function items inside it that branch (check, a function literal at line 32, a function literal at line 26, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · renderContextMd (cyclomatic 23) · ×1
  • renderContextMd (cyclomatic 23) skills/ck/commands/shared.mjs:198 — renderContextMd has cyclomatic complexity 23 (threshold 15). Of this number, 17 points are the body's own statements and 6 belong to 7 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · quality-gate.main (cyclomatic 22) · ×1
  • quality-gate.main (cyclomatic 22) skills/delivery-gate/hooks/quality-gate.py:129 — quality-gate.main has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app.createApp (cyclomatic 22) · ×1
  • app.createApp (cyclomatic 22) docker/context-profiles/complex-eval/cases/sentinel-api/files/src/app.js:24 — app.createApp has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 25, 29). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · gateguard-eval.validateStep (cyclomatic 22) · ×1
  • gateguard-eval.validateStep (cyclomatic 22) scripts/dev/gateguard-eval.js:58 — gateguard-eval.validateStep has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · powershell-destructive-command.isInvokedAfterContainer (cyclomatic 22) · ×1
  • powershell-destructive-command.isInvokedAfterContainer (cyclomatic 22) REDACTED:415 — powershell-destructive-command.isInvokedAfterContainer has cyclomatic complexity 22 (threshold 15). Of this number, 15 points are the body's own statements and 7 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · gateguard-change-profile.words (cyclomatic 22) · ×1
  • gateguard-change-profile.words (cyclomatic 22) scripts/lib/gateguard-change-profile.js:331 — gateguard-change-profile.words has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ecc-statusline.runStatusline (cyclomatic 22) · ×1
  • ecc-statusline.runStatusline (cyclomatic 22) scripts/hooks/ecc-statusline.js:161 — ecc-statusline.runStatusline has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 170, 165). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · hookify-runtime.run (cyclomatic 22) · ×1
  • hookify-runtime.run (cyclomatic 22) REDACTED:631 — hookify-runtime.run has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · open-terminal.parseArgs (cyclomatic 22) · ×1
  • open-terminal.parseArgs (cyclomatic 22) skills/terminal-opener/scripts/open-terminal.js:88 — open-terminal.parseArgs has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · runExistingHook (cyclomatic 22) · ×1
  • runExistingHook (cyclomatic 22) .cursor/hooks/adapter.js:176 — runExistingHook has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · mint3d.mint3d (cyclomatic 21) · ×1
  • mint3d.mint3d (cyclomatic 21) skills/taste-application/scripts/mint3d.py:87 — mint3d.mint3d has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · integration._read_local (cyclomatic 21) · ×1
  • integration._read_local (cyclomatic 21) skills/taste-application/scripts/tasteforge/integration.py:112 — integration._read_local has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · context-profile-native-executable.resolveExecutable (cyclomatic 21) · ×1
  • context-profile-native-executable.resolveExecutable (cyclomatic 21) scripts/lib/context-profile-native-executable.js:19 — context-profile-native-executable.resolveExecutable has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · validate-skills.inspectFrontmatter (cyclomatic 21) · ×1
  • validate-skills.inspectFrontmatter (cyclomatic 21) scripts/ci/validate-skills.js:104 — validate-skills.inspectFrontmatter has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · state.normalizeWorkItem (cyclomatic 21) · ×1
  • state.normalizeWorkItem (cyclomatic 21) scripts/lib/control-pane/state.js:468 — state.normalizeWorkItem has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · control-plane-view.buildInventoryManifest (cyclomatic 21) · ×1
  • control-plane-view.buildInventoryManifest (cyclomatic 21) scripts/lib/control-pane/control-plane-view.js:90 — control-plane-view.buildInventoryManifest has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 10 of the 21 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 96, 100, 100). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · control-plane-view.advisoryEvents (cyclomatic 21) · ×1
  • control-plane-view.advisoryEvents (cyclomatic 21) scripts/lib/control-pane/control-plane-view.js:159 — control-plane-view.advisoryEvents has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · control-plane-view.buildControlPlaneView (cyclomatic 21) · ×1
  • control-plane-view.buildControlPlaneView (cyclomatic 21) scripts/lib/control-pane/control-plane-view.js:217 — control-plane-view.buildControlPlaneView has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · dashboard-web.loadMcps (cyclomatic 21) · ×1
  • dashboard-web.loadMcps (cyclomatic 21) REDACTED:118 — dashboard-web.loadMcps has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 9 of the 21 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 122, 124). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · gateguard-search-evidence.createSearchEvidence.shellSearchEvidence (cyclomatic 21) · ×1
  • gateguard-search-evidence.createSearchEvidence.shellSearchEvidence (cyclomatic 21) scripts/lib/gateguard-search-evidence.js:419 — gateguard-search-evidence.createSearchEvidence.shellSearchEvidence has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 8 of the 21 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 430, 437). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · gateguard-search-evidence.createSearchEvidence.findClosestMiss (cyclomatic 21) · ×1
  • gateguard-search-evidence.createSearchEvidence.findClosestMiss (cyclomatic 21) scripts/lib/gateguard-search-evidence.js:571 — gateguard-search-evidence.createSearchEvidence.findClosestMiss has cyclomatic complexity 21 (threshold 15). Of this number, 18 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · gateguard-fact-force.quoteAwareSegments (cyclomatic 21) · ×1
  • gateguard-fact-force.quoteAwareSegments (cyclomatic 21) scripts/hooks/gateguard-fact-force.js:372 — gateguard-fact-force.quoteAwareSegments has cyclomatic complexity 21 (threshold 15). Of this number, 16 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · lifecycle-hook-bootstrap.main (cyclomatic 21) · ×1
  • lifecycle-hook-bootstrap.main (cyclomatic 21) scripts/hooks/lifecycle-hook-bootstrap.js:40 — lifecycle-hook-bootstrap.main has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · mcp-health-check.handlePreToolUse (cyclomatic 21) · ×1
  • mcp-health-check.handlePreToolUse (cyclomatic 21) REDACTED:728 — mcp-health-check.handlePreToolUse has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · status.parseArgs (cyclomatic 21) · ×1
  • status.parseArgs (cyclomatic 21) scripts/status.js:25 — status.parseArgs has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ai-eval-lib.validateCorpus (cyclomatic 20) · ×1
  • ai-eval-lib.validateCorpus (cyclomatic 20) docker/context-profiles/ai-eval-lib.js:49 — ai-eval-lib.validateCorpus has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · intent-eval.loadIntentScenarios (cyclomatic 20) · ×1
  • intent-eval.loadIntentScenarios (cyclomatic 20) docker/gateguard-effectiveness/intent-eval.js:24 — intent-eval.loadIntentScenarios has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 3 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 28). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · claw.askClaude (cyclomatic 20) · ×1
  • claw.askClaude (cyclomatic 20) scripts/claw.js:90 — claw.askClaude has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · state.buildControlPaneSnapshot (cyclomatic 20) · ×1
  • state.buildControlPaneSnapshot (cyclomatic 20) scripts/lib/control-pane/state.js:584 — state.buildControlPaneSnapshot has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · gateguard-eval.summarize (cyclomatic 20) · ×1
  • gateguard-eval.summarize (cyclomatic 20) scripts/dev/gateguard-eval.js:435 — gateguard-eval.summarize has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 3 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 464). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · gateguard-file-context.csharpStringEnd (cyclomatic 20) · ×1
  • gateguard-file-context.csharpStringEnd (cyclomatic 20) scripts/lib/gateguard-file-context.js:103 — gateguard-file-context.csharpStringEnd has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · gateguard-file-context.shSubstitutionEnd (cyclomatic 20) · ×1
  • gateguard-file-context.shSubstitutionEnd (cyclomatic 20) scripts/lib/gateguard-file-context.js:539 — gateguard-file-context.shSubstitutionEnd has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · gateguard-fact-force.splitEnvWords (cyclomatic 20) · ×1
  • gateguard-fact-force.splitEnvWords (cyclomatic 20) scripts/hooks/gateguard-fact-force.js:534 — gateguard-fact-force.splitEnvWords has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · hookify-frontmatter.parseRuleFrontmatter (cyclomatic 20) · ×1
  • hookify-frontmatter.parseRuleFrontmatter (cyclomatic 20) scripts/hooks/hookify-frontmatter.js:108 — hookify-frontmatter.parseRuleFrontmatter has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · claude-plugin-setup.setupClaudePlugin (cyclomatic 20) · ×1
  • claude-plugin-setup.setupClaudePlugin (cyclomatic 20) scripts/lib/claude-plugin-setup.js:592 — claude-plugin-setup.setupClaudePlugin has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · setup.parseArgs (cyclomatic 20) · ×1
  • setup.parseArgs (cyclomatic 20) scripts/setup.js:62 — setup.parseArgs has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · codex-plugin-setup.reconcileCodexPlugin (cyclomatic 20) · ×1
  • codex-plugin-setup.reconcileCodexPlugin (cyclomatic 20) scripts/lib/codex-plugin-setup.js:361 — codex-plugin-setup.reconcileCodexPlugin has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · install-guided.parseArgs (cyclomatic 20) · ×1
  • install-guided.parseArgs (cyclomatic 20) scripts/install-guided.js:58 — install-guided.parseArgs has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · work-items.assignOption (cyclomatic 20) · ×1
  • work-items.assignOption (cyclomatic 20) scripts/work-items.js:63 — work-items.assignOption has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · review-with-codex.runReview (cyclomatic 20) · ×1
  • review-with-codex.runReview (cyclomatic 20) REDACTED:181 — review-with-codex.runReview has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ito-baskets.run (cyclomatic 20) · ×1
  • ito-baskets.run (cyclomatic 20) skills/ito-baskets/scripts/ito-baskets.js:124 — ito-baskets.run has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · build-agreement.buildValues (cyclomatic 20) · ×1
  • build-agreement.buildValues (cyclomatic 20) skills/master-agreement-generator/scripts/build-agreement.js:79 — build-agreement.buildValues has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · integration.build_application_bundle (cyclomatic 19) · ×1
  • integration.build_application_bundle (cyclomatic 19) skills/taste-application/scripts/tasteforge/integration.py:338 — integration.build_application_bundle has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · resolve.allocate_placements (cyclomatic 19) · ×1
  • resolve.allocate_placements (cyclomatic 19) skills/taste-application/scripts/tasteforge/resolve.py:88 — resolve.allocate_placements has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AtlasProvider.generate (cyclomatic 19) · ×1
  • AtlasProvider.generate (cyclomatic 19) src/llm/providers/atlas.py:84 — AtlasProvider.generate has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · hooks-config.findMetadataMismatches (cyclomatic 19) · ×1
  • hooks-config.findMetadataMismatches (cyclomatic 19) scripts/lib/hooks-config.js:154 — hooks-config.findMetadataMismatches has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 9 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 176). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · context-profile-native-executable.fingerprintExecutable (cyclomatic 19) · ×1
  • context-profile-native-executable.fingerprintExecutable (cyclomatic 19) scripts/lib/context-profile-native-executable.js:54 — context-profile-native-executable.fingerprintExecutable has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · antigravity-legacy-migration.getVerifiedManagedFile (cyclomatic 19) · ×1
  • antigravity-legacy-migration.getVerifiedManagedFile (cyclomatic 19) scripts/lib/install/antigravity-legacy-migration.js:156 — antigravity-legacy-migration.getVerifiedManagedFile has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · check-hooks-schema-keys.findUnknownKeys (cyclomatic 19) · ×1
  • check-hooks-schema-keys.findUnknownKeys (cyclomatic 19) scripts/ci/check-hooks-schema-keys.js:58 — check-hooks-schema-keys.findUnknownKeys has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 8 of the 19 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 73, 83). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · verify-release-gates.assessExactShaGates (cyclomatic 19) · ×1
  • verify-release-gates.assessExactShaGates (cyclomatic 19) REDACTED:265 — verify-release-gates.assessExactShaGates has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · codex-legacy-sync.openRegularFileNoFollow (cyclomatic 19) · ×1
  • codex-legacy-sync.openRegularFileNoFollow (cyclomatic 19) scripts/lib/codex-legacy-sync.js:17 — codex-legacy-sync.openRegularFileNoFollow has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · discussion-audit.parseArgs (cyclomatic 19) · ×1
  • discussion-audit.parseArgs (cyclomatic 19) scripts/discussion-audit.js:57 — discussion-audit.parseArgs has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · harness-adapter-compliance.validateAdapterRecords (cyclomatic 19) · ×1
  • harness-adapter-compliance.validateAdapterRecords (cyclomatic 19) scripts/lib/harness-adapter-compliance.js:429 — harness-adapter-compliance.validateAdapterRecords has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 433, 467). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · block-no-verify.updateShellState (cyclomatic 19) · ×1
  • block-no-verify.updateShellState (cyclomatic 19) scripts/hooks/block-no-verify.js:878 — block-no-verify.updateShellState has cyclomatic complexity 19 (threshold 15). Of this number, 14 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · shell-substitution.readDollarSubstitution (cyclomatic 19) · ×1
  • shell-substitution.readDollarSubstitution (cyclomatic 19) scripts/lib/shell-substitution.js:23 — shell-substitution.readDollarSubstitution has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · powershell-destructive-command.splitStaticArrayItems (cyclomatic 19) · ×1
  • powershell-destructive-command.splitStaticArrayItems (cyclomatic 19) REDACTED:597 — powershell-destructive-command.splitStaticArrayItems has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · gateguard-file-context.pythonStringEnd (cyclomatic 19) · ×1
  • gateguard-file-context.pythonStringEnd (cyclomatic 19) scripts/lib/gateguard-file-context.js:446 — gateguard-file-context.pythonStringEnd has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · gateguard-change-profile.shellRedirectsFile (cyclomatic 19) · ×1
  • gateguard-change-profile.shellRedirectsFile (cyclomatic 19) scripts/lib/gateguard-change-profile.js:364 — gateguard-change-profile.shellRedirectsFile has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · gateguard-fact-force.isDestructiveQuoteAware (cyclomatic 19) · ×1
  • gateguard-fact-force.isDestructiveQuoteAware (cyclomatic 19) scripts/hooks/gateguard-fact-force.js:921 — gateguard-fact-force.isDestructiveQuoteAware has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · suggest-compact.main (cyclomatic 19) · ×1
  • suggest-compact.main (cyclomatic 19) scripts/hooks/suggest-compact.js:201 — suggest-compact.main has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · context-profile-proposal.proposeTaskContext (cyclomatic 19) · ×1
  • context-profile-proposal.proposeTaskContext (cyclomatic 19) scripts/lib/context-profile-proposal.js:5 — context-profile-proposal.proposeTaskContext has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · loop-status.parseArgs (cyclomatic 19) · ×1
  • loop-status.parseArgs (cyclomatic 19) scripts/loop-status.js:64 — loop-status.parseArgs has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · operator-readiness-dashboard.renderMarkdown (cyclomatic 19) · ×1
  • operator-readiness-dashboard.renderMarkdown (cyclomatic 19) scripts/operator-readiness-dashboard.js:1012 — operator-readiness-dashboard.renderMarkdown has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · release-video-suite.evaluatePrimaryRender (cyclomatic 19) · ×1
  • release-video-suite.evaluatePrimaryRender (cyclomatic 19) scripts/release-video-suite.js:795 — release-video-suite.evaluatePrimaryRender has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · worktree-lifecycle.formatReport (cyclomatic 19) · ×1
  • worktree-lifecycle.formatReport (cyclomatic 19) scripts/worktree-lifecycle.js:70 — worktree-lifecycle.formatReport has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · check-console-log.main (cyclomatic 18) · ×1
  • check-console-log.main (cyclomatic 18) hooks/hermes/check-console-log.py:30 — check-console-log.main has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · instinct-cli.cmd_export (cyclomatic 18) · ×1
  • instinct-cli.cmd_export (cyclomatic 18) skills/continuous-learning-v2/scripts/instinct-cli.py:1076 — instinct-cli.cmd_export has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ws_listener.listen_with_retry (cyclomatic 18) · ×1
  • ws_listener.listen_with_retry (cyclomatic 18) skills/videodb/scripts/ws_listener.py:147 — ws_listener.listen_with_retry has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _AstraflowBaseProvider.generate (cyclomatic 18) · ×1
  • _AstraflowBaseProvider.generate (cyclomatic 18) src/llm/providers/astraflow.py:71 — _AstraflowBaseProvider.generate has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OllamaProvider.generate (cyclomatic 18) · ×1
  • OllamaProvider.generate (cyclomatic 18) REDACTED:141 — OllamaProvider.generate has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OpenAIProvider.generate (cyclomatic 18) · ×1
  • OpenAIProvider.generate (cyclomatic 18) src/llm/providers/openai.py:95 — OpenAIProvider.generate has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · claude-settings.validateManagedHooks (cyclomatic 18) · ×1
  • claude-settings.validateManagedHooks (cyclomatic 18) scripts/lib/install/claude-settings.js:127 — claude-settings.validateManagedHooks has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 147). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · context-profile-store.rootFor (cyclomatic 18) · ×1
  • context-profile-store.rootFor (cyclomatic 18) scripts/lib/context-profile-store.js:21 — context-profile-store.rootFor has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · context-profile-interactive.startInteractiveProfile (cyclomatic 18) · ×1
  • context-profile-interactive.startInteractiveProfile (cyclomatic 18) scripts/lib/context-profile-interactive.js:69 — context-profile-interactive.startInteractiveProfile has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · context-profile-native.loadReceipt (cyclomatic 18) · ×1
  • context-profile-native.loadReceipt (cyclomatic 18) REDACTED:177 — context-profile-native.loadReceipt has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · context-profile-native.verifyNative (cyclomatic 18) · ×1
  • context-profile-native.verifyNative (cyclomatic 18) REDACTED:333 — context-profile-native.verifyNative has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · session.runConversation (cyclomatic 18) · ×1
  • session.runConversation (cyclomatic 18) docker/gateguard-effectiveness/session.js:74 — session.runConversation has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · gate.loadVariant (cyclomatic 18) · ×1
  • gate.loadVariant (cyclomatic 18) scripts/lib/eval-harness/gate.js:109 — gate.loadVariant has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: gate.baselineFailure (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · receipt.validReceiptSchema (cyclomatic 18) · ×1
  • receipt.validReceiptSchema (cyclomatic 18) scripts/lib/eval-harness/receipt.js:65 — receipt.validReceiptSchema has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · scope.defaultRunGit (cyclomatic 18) · ×1
  • scope.defaultRunGit (cyclomatic 18) scripts/lib/astra-review/scope.js:40 — scope.defaultRunGit has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · install-lifecycle.uninstallInstalledStates.results (cyclomatic 18) · ×1
  • install-lifecycle.uninstallInstalledStates.results (cyclomatic 18) scripts/lib/install-lifecycle.js:1916 — install-lifecycle.uninstallInstalledStates.results has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · generate-command-registry.inferCommandType (cyclomatic 18) · ×1
  • generate-command-registry.inferCommandType (cyclomatic 18) scripts/ci/generate-command-registry.js:114 — generate-command-registry.inferCommandType has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · verify-release-gates.createGithubClient.pages (cyclomatic 18) · ×1
  • verify-release-gates.createGithubClient.pages (cyclomatic 18) REDACTED:148 — verify-release-gates.createGithubClient.pages has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · state.normalizeSession (cyclomatic 18) · ×1
  • state.normalizeSession (cyclomatic 18) scripts/lib/control-pane/state.js:157 — state.normalizeSession has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · projection.projectPairs (cyclomatic 18) · ×1
  • projection.projectPairs (cyclomatic 18) scripts/lib/agent-proximity/projection.js:227 — projection.projectPairs has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · gateguard-eval.prepareScenario (cyclomatic 18) · ×1
  • gateguard-eval.prepareScenario (cyclomatic 18) scripts/dev/gateguard-eval.js:180 — gateguard-eval.prepareScenario has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · parsing.renderCoordinationState (cyclomatic 18) · ×1
  • parsing.renderCoordinationState (cyclomatic 18) REDACTED:79 — parsing.renderCoordinationState has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · actions.applyClaim (cyclomatic 18) · ×1
  • actions.applyClaim (cyclomatic 18) scripts/lib/github-coordination/actions.js:46 — actions.applyClaim has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · shell-scan.executionRegion (cyclomatic 18) · ×1
  • shell-scan.executionRegion (cyclomatic 18) scripts/hooks/lib/shell-scan.js:255 — shell-scan.executionRegion has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · block-no-verify.skipSedAddress (cyclomatic 18) · ×1
  • block-no-verify.skipSedAddress (cyclomatic 18) scripts/hooks/block-no-verify.js:561 — block-no-verify.skipSedAddress has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 5 of the 18 points are its own statements and the rest belongs to one function item inside it that branches (one). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · block-no-verify.sedScriptParts (cyclomatic 18) · ×1
  • block-no-verify.sedScriptParts (cyclomatic 18) scripts/hooks/block-no-verify.js:742 — block-no-verify.sedScriptParts has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · powershell-destructive-command.consumeInertChar (cyclomatic 18) · ×1
  • powershell-destructive-command.consumeInertChar (cyclomatic 18) REDACTED:138 — powershell-destructive-command.consumeInertChar has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · powershell-destructive-command.expandStaticDoubleQuotedString (cyclomatic 18) · ×1
  • powershell-destructive-command.expandStaticDoubleQuotedString (cyclomatic 18) REDACTED:492 — powershell-destructive-command.expandStaticDoubleQuotedString has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · powershell-destructive-command.leadingStaticStringResult (cyclomatic 18) · ×1
  • powershell-destructive-command.leadingStaticStringResult (cyclomatic 18) REDACTED:544 — powershell-destructive-command.leadingStaticStringResult has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · gateguard-file-context.stepJs (cyclomatic 18) · ×1
  • gateguard-file-context.stepJs (cyclomatic 18) scripts/lib/gateguard-file-context.js:288 — gateguard-file-context.stepJs has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · cost-tracker.sumUsageFromTranscript (cyclomatic 18) · ×1
  • cost-tracker.sumUsageFromTranscript (cyclomatic 18) scripts/hooks/cost-tracker.js:151 — cost-tracker.sumUsageFromTranscript has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ecc-metrics-bridge.run (cyclomatic 18) · ×1
  • ecc-metrics-bridge.run (cyclomatic 18) scripts/hooks/ecc-metrics-bridge.js:202 — ecc-metrics-bridge.run has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · statusline-render.buildSessionLine (cyclomatic 18) · ×1
  • statusline-render.buildSessionLine (cyclomatic 18) scripts/lib/statusline-render.js:160 — statusline-render.buildSessionLine has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · claude-plugin-setup.readSettings (cyclomatic 18) · ×1
  • claude-plugin-setup.readSettings (cyclomatic 18) scripts/lib/claude-plugin-setup.js:284 — claude-plugin-setup.readSettings has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · observations.createSkillObservation (cyclomatic 18) · ×1
  • observations.createSkillObservation (cyclomatic 18) REDACTED:33 — observations.createSkillObservation has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · release-video-suite.parseArgs (cyclomatic 18) · ×1
  • release-video-suite.parseArgs (cyclomatic 18) scripts/release-video-suite.js:347 — release-video-suite.parseArgs has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · uninstall.printHuman (cyclomatic 18) · ×1
  • uninstall.printHuman (cyclomatic 18) scripts/uninstall.js:58 — uninstall.printHuman has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · uninstall.main (cyclomatic 18) · ×1
  • uninstall.main (cyclomatic 18) scripts/uninstall.js:140 — uninstall.main has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · renderBriefingBox (cyclomatic 18) · ×1
  • renderBriefingBox (cyclomatic 18) skills/ck/commands/shared.mjs:273 — renderBriefingBox has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to 4 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · resolve_ingest.run_resolve (cyclomatic 17) · ×1
  • resolve_ingest.run_resolve (cyclomatic 17) skills/taste-application/scripts/resolve_ingest.py:323 — resolve_ingest.run_resolve has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · verify.verify (cyclomatic 17) · ×1
  • verify.verify (cyclomatic 17) skills/taste-application/scripts/verify.py:99 — verify.verify has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ai-eval-lib.runScoredCheck (cyclomatic 17) · ×1
  • ai-eval-lib.runScoredCheck (cyclomatic 17) docker/context-profiles/ai-eval-lib.js:518 — ai-eval-lib.runScoredCheck has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · helpers.createInstallTargetAdapter (cyclomatic 17) · ×1
  • helpers.createInstallTargetAdapter (cyclomatic 17) scripts/lib/install-targets/helpers.js:319 — helpers.createInstallTargetAdapter has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · interactive-plan.parseArgs (cyclomatic 17) · ×1
  • interactive-plan.parseArgs (cyclomatic 17) docker/plugin-setup/interactive-plan.js:33 — interactive-plan.parseArgs has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · astra-review.runCli (cyclomatic 17) · ×1
  • astra-review.runCli (cyclomatic 17) scripts/astra-review.js:189 — astra-review.runCli has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · antigravity-legacy-migration.getExpectedLegacyDestination (cyclomatic 17) · ×1
  • antigravity-legacy-migration.getExpectedLegacyDestination (cyclomatic 17) scripts/lib/install/antigravity-legacy-migration.js:122 — antigravity-legacy-migration.getExpectedLegacyDestination has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · opencode-legacy-migration.inspectLegacyOpencodeState (cyclomatic 17) · ×1
  • opencode-legacy-migration.inspectLegacyOpencodeState (cyclomatic 17) scripts/lib/install/opencode-legacy-migration.js:63 — opencode-legacy-migration.inspectLegacyOpencodeState has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · supply-chain-advisory-sources.validateSources (cyclomatic 17) · ×1
  • supply-chain-advisory-sources.validateSources (cyclomatic 17) scripts/ci/supply-chain-advisory-sources.js:111 — supply-chain-advisory-sources.validateSources has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · work-item-runner.runWorkItemMutation (cyclomatic 17) · ×1
  • work-item-runner.runWorkItemMutation (cyclomatic 17) scripts/lib/control-pane/work-item-runner.js:10 — work-item-runner.runWorkItemMutation has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 33, 11). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · gateguard-metrics.isMetricsEvent (cyclomatic 17) · ×1
  • gateguard-metrics.isMetricsEvent (cyclomatic 17) scripts/lib/gateguard-metrics.js:74 — gateguard-metrics.isMetricsEvent has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · harness-audit-consumer.walkFiles (cyclomatic 17) · ×1
  • harness-audit-consumer.walkFiles (cyclomatic 17) REDACTED:37 — harness-audit-consumer.walkFiles has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 3 function items inside it that branch (a function literal at line 57, a function literal at line 48, visit). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · block-no-verify.sedExecParts (cyclomatic 17) · ×1
  • block-no-verify.sedExecParts (cyclomatic 17) scripts/hooks/block-no-verify.js:709 — block-no-verify.sedExecParts has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · pre-bash-commit-quality.findFileIssues (cyclomatic 17) · ×1
  • pre-bash-commit-quality.findFileIssues (cyclomatic 17) REDACTED:88 — pre-bash-commit-quality.findFileIssues has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 98). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · shell-substitution.iterateCommandSubstitutions (cyclomatic 17) · ×1
  • shell-substitution.iterateCommandSubstitutions (cyclomatic 17) scripts/lib/shell-substitution.js:56 — shell-substitution.iterateCommandSubstitutions has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · shell-substitution.readBraceBody (cyclomatic 17) · ×1
  • shell-substitution.readBraceBody (cyclomatic 17) scripts/lib/shell-substitution.js:269 — shell-substitution.readBraceBody has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · powershell-destructive-command.aliasArguments (cyclomatic 17) · ×1
  • powershell-destructive-command.aliasArguments (cyclomatic 17) REDACTED:1889 — powershell-destructive-command.aliasArguments has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · gateguard-target-class.classifyTarget (cyclomatic 17) · ×1
  • gateguard-target-class.classifyTarget (cyclomatic 17) scripts/lib/gateguard-target-class.js:54 — gateguard-target-class.classifyTarget has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · gateguard-code-lexer.normalizeCodeLine (cyclomatic 17) · ×1
  • gateguard-code-lexer.normalizeCodeLine (cyclomatic 17) REDACTED:279 — gateguard-code-lexer.normalizeCodeLine has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · gateguard-code-lexer.shDoubleQuoteEnd (cyclomatic 17) · ×1
  • gateguard-code-lexer.shDoubleQuoteEnd (cyclomatic 17) REDACTED:363 — gateguard-code-lexer.shDoubleQuoteEnd has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · gateguard-file-context.psStartsFresh (cyclomatic 17) · ×1
  • gateguard-file-context.psStartsFresh (cyclomatic 17) scripts/lib/gateguard-file-context.js:757 — gateguard-file-context.psStartsFresh has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · gateguard-search-filters.applyLongFilter (cyclomatic 17) · ×1
  • gateguard-search-filters.applyLongFilter (cyclomatic 17) scripts/lib/gateguard-search-filters.js:491 — gateguard-search-filters.applyLongFilter has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · gateguard-search-evidence.parseSearchArgs (cyclomatic 17) · ×1
  • gateguard-search-evidence.parseSearchArgs (cyclomatic 17) scripts/lib/gateguard-search-evidence.js:224 — gateguard-search-evidence.parseSearchArgs has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · gateguard-search-evidence.createSearchEvidence.findCreditingSearch (cyclomatic 17) · ×1
  • gateguard-search-evidence.createSearchEvidence.findCreditingSearch (cyclomatic 17) scripts/lib/gateguard-search-evidence.js:509 — gateguard-search-evidence.createSearchEvidence.findCreditingSearch has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · gateguard-search-evidence.createSearchEvidence.itemMiss (cyclomatic 17) · ×1
  • gateguard-search-evidence.createSearchEvidence.itemMiss (cyclomatic 17) scripts/lib/gateguard-search-evidence.js:542 — gateguard-search-evidence.createSearchEvidence.itemMiss has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · cost-tracker.process.stdin.on("end") (cyclomatic 17) · ×1
  • cost-tracker.process.stdin.on("end") (cyclomatic 17) scripts/hooks/cost-tracker.js:229 — cost-tracker.process.stdin.on("end") has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ecc-context-monitor.run (cyclomatic 17) · ×1
  • ecc-context-monitor.run (cyclomatic 17) scripts/hooks/ecc-context-monitor.js:213 — ecc-context-monitor.run has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · hookify-runtime.isSafeRegexSource (cyclomatic 17) · ×1
  • hookify-runtime.isSafeRegexSource (cyclomatic 17) REDACTED:80 — hookify-runtime.isSafeRegexSource has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: hookify-runtime.fieldValue (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · mcp-health-check.extractMcpTarget (cyclomatic 17) · ×1
  • mcp-health-check.extractMcpTarget (cyclomatic 17) REDACTED:154 — mcp-health-check.extractMcpTarget has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · mcp-health-check.probeServer (cyclomatic 17) · ×1
  • mcp-health-check.probeServer (cyclomatic 17) REDACTED:551 — mcp-health-check.probeServer has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · post-edit-typecheck.process.stdin.on("end") (cyclomatic 17) · ×1
  • post-edit-typecheck.process.stdin.on("end") (cyclomatic 17) scripts/hooks/post-edit-typecheck.js:33 — post-edit-typecheck.process.stdin.on("end") has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · session-start.parseInstinctFile (cyclomatic 17) · ×1
  • session-start.parseInstinctFile (cyclomatic 17) REDACTED:371 — session-start.parseInstinctFile has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · stop-format-typecheck.main (cyclomatic 17) · ×1
  • stop-format-typecheck.main (cyclomatic 17) REDACTED:184 — stop-format-typecheck.main has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · memory-vault.walkMemoryRoot (cyclomatic 17) · ×1
  • memory-vault.walkMemoryRoot (cyclomatic 17) scripts/lib/memory-vault.js:346 — memory-vault.walkMemoryRoot has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to one function item inside it that branches (walk). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · memory-vault.readMemoryFiles (cyclomatic 17) · ×1
  • memory-vault.readMemoryFiles (cyclomatic 17) scripts/lib/memory-vault.js:452 — memory-vault.readMemoryFiles has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · memory-vault.searchMemories (cyclomatic 17) · ×1
  • memory-vault.searchMemories (cyclomatic 17) scripts/lib/memory-vault.js:602 — memory-vault.searchMemories has cyclomatic complexity 17 (threshold 15). Of this number, 9 points are the body's own statements and 8 belong to 6 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · sessions.normalizeFeedbackItem (cyclomatic 17) · ×1
  • sessions.normalizeFeedbackItem (cyclomatic 17) scripts/lib/plan-canvas/sessions.js:68 — sessions.normalizeFeedbackItem has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · canonical-session.validateCanonicalSnapshot (cyclomatic 17) · ×1
  • canonical-session.validateCanonicalSnapshot (cyclomatic 17) scripts/lib/session-adapters/canonical-session.js:162 — canonical-session.validateCanonicalSnapshot has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · canonical-session.normalizeDmuxSnapshot (cyclomatic 17) · ×1
  • canonical-session.normalizeDmuxSnapshot (cyclomatic 17) scripts/lib/session-adapters/canonical-session.js:426 — canonical-session.normalizeDmuxSnapshot has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 427). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · dashboard.renderAmendmentPanel (cyclomatic 17) · ×1
  • dashboard.renderAmendmentPanel (cyclomatic 17) scripts/lib/skill-evolution/dashboard.js:222 — dashboard.renderAmendmentPanel has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · loop-status.extractToolResultIds (cyclomatic 17) · ×1
  • loop-status.extractToolResultIds (cyclomatic 17) scripts/loop-status.js:311 — loop-status.extractToolResultIds has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · memory-mcp.executeMemoryTool (cyclomatic 17) · ×1
  • memory-mcp.executeMemoryTool (cyclomatic 17) scripts/memory-mcp.mjs:273 — memory-mcp.executeMemoryTool has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · nasiko.main (cyclomatic 17) · ×1
  • nasiko.main (cyclomatic 17) scripts/nasiko.js:101 — nasiko.main has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 17) · ×1
  • (anonymous) (cyclomatic 17) docker/context-profiles/complex-eval/cases2/event-stats-api/check.cjs:60 — (anonymous) has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · instinct-cli.parse_instinct_file (cyclomatic 16) · ×1
  • instinct-cli.parse_instinct_file (cyclomatic 16) skills/continuous-learning-v2/scripts/instinct-cli.py:516 — instinct-cli.parse_instinct_file has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · glitch.render (cyclomatic 16) · ×1
  • glitch.render (cyclomatic 16) skills/taste-application/scripts/tasteforge/media/glitch.py:100 — glitch.render has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · generate_icons.swift.top-level code (cyclomatic 16) · ×1
  • generate_icons.swift.top-level code (cyclomatic 16) skills/ios-icon-gen/scripts/generate_icons.swift:173 — generate_icons.swift.top-level code has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ai-eval-lib.parseCodexJsonl (cyclomatic 16) · ×1
  • ai-eval-lib.parseCodexJsonl (cyclomatic 16) docker/context-profiles/ai-eval-lib.js:182 — ai-eval-lib.parseCodexJsonl has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · hooks-config.withRefreshedFingerprints (cyclomatic 16) · ×1
  • hooks-config.withRefreshedFingerprints (cyclomatic 16) scripts/lib/hooks-config.js:226 — hooks-config.withRefreshedFingerprints has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · install-manifests.resolveInstallPlan.resolveModule (cyclomatic 16) · ×1
  • install-manifests.resolveInstallPlan.resolveModule (cyclomatic 16) scripts/lib/install-manifests.js:646 — install-manifests.resolveInstallPlan.resolveModule has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · context-profile-store-fs.read (cyclomatic 16) · ×1
  • context-profile-store-fs.read (cyclomatic 16) scripts/lib/context-profile-store-fs.js:40 — context-profile-store-fs.read has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · context-profile-native.response (cyclomatic 16) · ×1
  • context-profile-native.response (cyclomatic 16) REDACTED:212 — context-profile-native.response has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: context-profile-native.readState (cyclomatic 17) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · context-profile-native.prepareNativeProfile (cyclomatic 16) · ×1
  • context-profile-native.prepareNativeProfile (cyclomatic 16) REDACTED:443 — context-profile-native.prepareNativeProfile has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 450). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest. This is NOT this file's highest cyclomatic complexity: context-profile-native.readState (cyclomatic 17) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · evidence.verifyManifest (cyclomatic 16) · ×1
  • evidence.verifyManifest (cyclomatic 16) docker/gateguard-effectiveness/evidence.js:77 — evidence.verifyManifest has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · capsule.metadataFailure (cyclomatic 16) · ×1
  • capsule.metadataFailure (cyclomatic 16) scripts/lib/eval-harness/capsule.js:49 — capsule.metadataFailure has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · install-state.createInstallState (cyclomatic 16) · ×1
  • install-state.createInstallState (cyclomatic 16) scripts/lib/install-state.js:281 — install-state.createInstallState has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · opencode-legacy-migration.verifyManagedLegacyFile (cyclomatic 16) · ×1
  • opencode-legacy-migration.verifyManagedLegacyFile (cyclomatic 16) scripts/lib/install/opencode-legacy-migration.js:166 — opencode-legacy-migration.verifyManagedLegacyFile has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · link-rewrite.rewriteRelativeLinks (cyclomatic 16) · ×1
  • link-rewrite.rewriteRelativeLinks (cyclomatic 16) scripts/lib/install/link-rewrite.js:101 — link-rewrite.rewriteRelativeLinks has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · opencode-script-boundary.assertScriptBoundary (cyclomatic 16) · ×1
  • opencode-script-boundary.assertScriptBoundary (cyclomatic 16) scripts/lib/install/opencode-script-boundary.js:71 — opencode-script-boundary.assertScriptBoundary has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · validate-commands.validateFrontmatter (cyclomatic 16) · ×1
  • validate-commands.validateFrontmatter (cyclomatic 16) scripts/ci/validate-commands.js:15 — validate-commands.validateFrontmatter has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · codex-legacy-sync.beginLegacySyncState (cyclomatic 16) · ×1
  • codex-legacy-sync.beginLegacySyncState (cyclomatic 16) scripts/lib/codex-legacy-sync.js:231 — codex-legacy-sync.beginLegacySyncState has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ecc.runCommand (cyclomatic 16) · ×1
  • ecc.runCommand (cyclomatic 16) scripts/ecc.js:270 — ecc.runCommand has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · actions.applySync (cyclomatic 16) · ×1
  • actions.applySync (cyclomatic 16) scripts/lib/github-coordination/actions.js:83 — actions.applySync has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · shell-scan.scanOperator (cyclomatic 16) · ×1
  • shell-scan.scanOperator (cyclomatic 16) scripts/hooks/lib/shell-scan.js:465 — shell-scan.scanOperator has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · shell-scan.scanShell (cyclomatic 16) · ×1
  • shell-scan.scanShell (cyclomatic 16) scripts/hooks/lib/shell-scan.js:515 — shell-scan.scanShell has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · gateguard-file-context.pythonFieldStep (cyclomatic 16) · ×1
  • gateguard-file-context.pythonFieldStep (cyclomatic 16) scripts/lib/gateguard-file-context.js:426 — gateguard-file-context.pythonFieldStep has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · gateguard-file-context.shStartsFresh (cyclomatic 16) · ×1
  • gateguard-file-context.shStartsFresh (cyclomatic 16) scripts/lib/gateguard-file-context.js:639 — gateguard-file-context.shStartsFresh has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · gateguard-file-context.trivialInFile (cyclomatic 16) · ×1
  • gateguard-file-context.trivialInFile (cyclomatic 16) scripts/lib/gateguard-file-context.js:830 — gateguard-file-context.trivialInFile has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · gateguard-search-filters.findSearchFilters (cyclomatic 16) · ×1
  • gateguard-search-filters.findSearchFilters (cyclomatic 16) scripts/lib/gateguard-search-filters.js:537 — gateguard-search-filters.findSearchFilters has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · gateguard-search-evidence.flagEffect (cyclomatic 16) · ×1
  • gateguard-search-evidence.flagEffect (cyclomatic 16) scripts/lib/gateguard-search-evidence.js:202 — gateguard-search-evidence.flagEffect has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · hookify-runtime.truncatedEventContext (cyclomatic 16) · ×1
  • hookify-runtime.truncatedEventContext (cyclomatic 16) REDACTED:682 — hookify-runtime.truncatedEventContext has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: hookify-runtime.fieldValue (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · observe-runner.run (cyclomatic 16) · ×1
  • observe-runner.run (cyclomatic 16) scripts/hooks/observe-runner.js:95 — observe-runner.run has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · plugin-hook-bootstrap.main (cyclomatic 16) · ×1
  • plugin-hook-bootstrap.main (cyclomatic 16) scripts/hooks/plugin-hook-bootstrap.js:255 — plugin-hook-bootstrap.main has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · session-activity-tracker.pushFileEvent (cyclomatic 16) · ×1
  • session-activity-tracker.pushFileEvent (cyclomatic 16) scripts/hooks/session-activity-tracker.js:111 — session-activity-tracker.pushFileEvent has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · session-start.summarizeActiveInstincts (cyclomatic 16) · ×1
  • session-start.summarizeActiveInstincts (cyclomatic 16) REDACTED:458 — session-start.summarizeActiveInstincts has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · multi-harness-setup.readOwnedDestinations (cyclomatic 16) · ×1
  • multi-harness-setup.readOwnedDestinations (cyclomatic 16) scripts/lib/multi-harness-setup.js:174 — multi-harness-setup.readOwnedDestinations has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · install-plan.main (cyclomatic 16) · ×1
  • install-plan.main (cyclomatic 16) scripts/install-plan.js:199 — install-plan.main has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · opencode.mapOpencodeServer (cyclomatic 16) · ×1
  • opencode.mapOpencodeServer (cyclomatic 16) scripts/lib/mcp-inventory/readers/opencode.js:15 — opencode.mapOpencodeServer has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · server.createPlanCanvasServer.serveArtifact (cyclomatic 16) · ×1
  • server.createPlanCanvasServer.serveArtifact (cyclomatic 16) REDACTED:605 — server.createPlanCanvasServer.serveArtifact has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · canonical-session.normalizeOpencodeSession (cyclomatic 16) · ×1
  • canonical-session.normalizeOpencodeSession (cyclomatic 16) scripts/lib/session-adapters/canonical-session.js:580 — canonical-session.normalizeOpencodeSession has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · opencode.parseOpencodeSession (cyclomatic 16) · ×1
  • opencode.parseOpencodeSession (cyclomatic 16) scripts/lib/session-adapters/opencode.js:234 — opencode.parseOpencodeSession has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · tmux-worktree-orchestrator.rollbackCreatedResources (cyclomatic 16) · ×1
  • tmux-worktree-orchestrator.rollbackCreatedResources (cyclomatic 16) scripts/lib/tmux-worktree-orchestrator.js:426 — tmux-worktree-orchestrator.rollbackCreatedResources has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · lifecycle.analyzeWorktree (cyclomatic 16) · ×1
  • lifecycle.analyzeWorktree (cyclomatic 16) scripts/lib/worktree-lifecycle/lifecycle.js:63 — lifecycle.analyzeWorktree has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · loop-status.extractToolUses (cyclomatic 16) · ×1
  • loop-status.extractToolUses (cyclomatic 16) scripts/loop-status.js:278 — loop-status.extractToolUses has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · plan-canvas.main (cyclomatic 16) · ×1
  • plan-canvas.main (cyclomatic 16) REDACTED:369 — plan-canvas.main has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ledger.requireHardlinks (cyclomatic 16) · ×1
  • ledger.requireHardlinks (cyclomatic 16) REDACTED:77 — ledger.requireHardlinks has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ledger.replaceTable (cyclomatic 16) · ×1
  • ledger.replaceTable (cyclomatic 16) REDACTED:291 — ledger.replaceTable has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ledger.main (cyclomatic 16) · ×1
  • ledger.main (cyclomatic 16) REDACTED:485 — ledger.main has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · contract.validate_artifact_receipt (cognitive 109) · ×1
  • contract.validate_artifact_receipt (cognitive 109) skills/taste-application/scripts/tasteforge/contract.py:307 — contract.validate_artifact_receipt has cognitive complexity 109 (threshold 15). Drivers by points: if/else 33 (76 pts), boolean chains 13, loops 7 (12 pts), error handling 4 (8 pts) (nesting depth added 52). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · install-state.createFallbackValidator · ×1
  • install-state.createFallbackValidator::validate (cognitive 108) scripts/lib/install-state.js:43 — install-state.createFallbackValidator::validate has cognitive complexity 108 (threshold 15). Drivers by points: if/else 37 (81 pts), boolean chains 16, ternaries 1 (5 pts), error handling 1 (4 pts), loops 1 (2 pts) (nesting depth added 52). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · validate-install-manifests.validateInstallManifests (cognitive 90) · ×1
  • validate-install-manifests.validateInstallManifests (cognitive 90) scripts/ci/validate-install-manifests.js:71 — validate-install-manifests.validateInstallManifests has cognitive complexity 90 (threshold 15). Drivers by points: if/else 26 (58 pts), loops 11 (18 pts), boolean chains 11, ternaries 2, error handling 1 (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · context-profile-commands.execute (cognitive 90) · ×1
  • context-profile-commands.execute (cognitive 90) scripts/lib/context-profile-commands.js:81 — context-profile-commands.execute has cognitive complexity 90 (threshold 15). Drivers by points: if/else 19 (39 pts), ternaries 15 (32 pts), boolean chains 19 (nesting depth added 37). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · forge.forge (cognitive 88) · ×1
  • forge.forge (cognitive 88) skills/taste-application/scripts/forge.py:49 — forge.forge has cognitive complexity 88 (threshold 15). Drivers by points: if/else 21 (34 pts), ternaries 8 (20 pts), boolean chains 16, loops 8 (15 pts), error handling 1 (3 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · codex-legacy-sync.uninstallLegacyCodexSync (cognitive 84) · ×1
  • codex-legacy-sync.uninstallLegacyCodexSync (cognitive 84) scripts/lib/codex-legacy-sync.js:521 — codex-legacy-sync.uninstallLegacyCodexSync has cognitive complexity 84 (threshold 15). Drivers by points: if/else 22 (47 pts), ternaries 9 (20 pts), boolean chains 12, error handling 2 (4 pts), loops 1 (nesting depth added 38). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · server.createPlanCanvasServer.handleApi (cognitive 84) · ×1
  • server.createPlanCanvasServer.handleApi (cognitive 84) REDACTED:398 — server.createPlanCanvasServer.handleApi has cognitive complexity 84 (threshold 15). Drivers by points: if/else 32 (64 pts), boolean chains 13, ternaries 3 (7 pts) (nesting depth added 36). Of this number, 74 points are the body's own statements and 10 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · instinct-cli.cmd_import (cognitive 81) · ×1
  • instinct-cli.cmd_import (cognitive 81) skills/continuous-learning-v2/scripts/instinct-cli.py:887 — instinct-cli.cmd_import has cognitive complexity 81 (threshold 15). Drivers by points: if/else 35 (53 pts), loops 8 (11 pts), boolean chains 7, error handling 3 (6 pts), ternaries 3 (4 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · context-selection.resolveTaskContext (cognitive 81) · ×1
  • context-selection.resolveTaskContext (cognitive 81) scripts/lib/context-selection.js:333 — context-selection.resolveTaskContext has cognitive complexity 81 (threshold 15). Drivers by points: ternaries 18 (49 pts), boolean chains 18, if/else 10 (14 pts) (nesting depth added 35). Of this number, 78 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · merge-mcp-config.main (cognitive 75) · ×1
  • merge-mcp-config.main (cognitive 75) scripts/codex/merge-mcp-config.js:207 — merge-mcp-config.main has cognitive complexity 75 (threshold 15). Drivers by points: if/else 23 (44 pts), boolean chains 13, ternaries 5 (10 pts), loops 4 (7 pts), error handling 1 (nesting depth added 29). Of this number, 74 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · apply.applyInstallPlanLocked (cognitive 70) · ×1
  • apply.applyInstallPlanLocked (cognitive 70) scripts/lib/install/apply.js:771 — apply.applyInstallPlanLocked has cognitive complexity 70 (threshold 15). Drivers by points: if/else 21 (37 pts), ternaries 5 (13 pts), boolean chains 11, error handling 6 (8 pts), loops 1 (nesting depth added 26). Of this number, 63 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-fact-force.unwrapLeadWrappers (cognitive 69) · ×1
  • gateguard-fact-force.unwrapLeadWrappers (cognitive 69) scripts/hooks/gateguard-fact-force.js:729 — gateguard-fact-force.unwrapLeadWrappers has cognitive complexity 69 (threshold 15). Drivers by points: if/else 24 (39 pts), boolean chains 19, loops 6 (7 pts), ternaries 3 (4 pts) (nesting depth added 17). Most of this is not in the body itself: 11 of the 69 points are its own statements and the rest belongs to 8 function items inside it that branch (skipEnvWrapper, leadWrapperFor, skipExecBuiltin, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · hook-input-limits.createHookContextScanner.push (cognitive 67) · ×1
  • hook-input-limits.createHookContextScanner.push (cognitive 67) scripts/hooks/hook-input-limits.js:33 — hook-input-limits.createHookContextScanner.push has cognitive complexity 67 (threshold 15). Drivers by points: if/else 20 (52 pts), boolean chains 14, loops 1 (nesting depth added 32). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · contract.validate_effect_recipe (cognitive 65) · ×1
  • contract.validate_effect_recipe (cognitive 65) skills/taste-application/scripts/tasteforge/contract.py:173 — contract.validate_effect_recipe has cognitive complexity 65 (threshold 15). Drivers by points: if/else 23 (44 pts), boolean chains 10, ternaries 2 (7 pts), loops 4 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · context-profile-commands.parse (cognitive 65) · ×1
  • context-profile-commands.parse (cognitive 65) scripts/lib/context-profile-commands.js:12 — context-profile-commands.parse has cognitive complexity 65 (threshold 15). Drivers by points: if/else 19 (27 pts), ternaries 6 (19 pts), boolean chains 17, loops 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-turn-scan.scanCurrentTurn (cognitive 61) · ×1
  • gateguard-turn-scan.scanCurrentTurn (cognitive 61) scripts/lib/gateguard-turn-scan.js:101 — gateguard-turn-scan.scanCurrentTurn has cognitive complexity 61 (threshold 15). Drivers by points: if/else 17 (36 pts), boolean chains 11, loops 3 (6 pts), ternaries 3 (5 pts), error handling 2 (3 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · contract.validate_genre_specs (cognitive 58) · ×1
  • contract.validate_genre_specs (cognitive 58) skills/taste-application/scripts/tasteforge/contract.py:117 — contract.validate_genre_specs has cognitive complexity 58 (threshold 15). Drivers by points: if/else 14 (34 pts), loops 6 (22 pts), boolean chains 2 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · validate-commands.validateCommands (cognitive 57) · ×1
  • validate-commands.validateCommands (cognitive 57) scripts/ci/validate-commands.js:62 — validate-commands.validateCommands has cognitive complexity 57 (threshold 15). Drivers by points: if/else 13 (30 pts), loops 10 (21 pts), error handling 2 (5 pts), boolean chains 1 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · session-start.main (cognitive 55) · ×1
  • session-start.main (cognitive 55) REDACTED:648 — session-start.main has cognitive complexity 55 (threshold 15). Drivers by points: if/else 24 (41 pts), ternaries 3 (8 pts), boolean chains 5, error handling 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.createControlPaneServer.server (cognitive 54) · ×1
  • server.createControlPaneServer.server (cognitive 54) REDACTED:195 — server.createControlPaneServer.server has cognitive complexity 54 (threshold 15). Drivers by points: if/else 19 (25 pts), boolean chains 20, ternaries 3 (6 pts), error handling 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · status.renderMarkdown (cognitive 54) · ×1
  • status.renderMarkdown (cognitive 54) scripts/status.js:287 — status.renderMarkdown has cognitive complexity 54 (threshold 15). Drivers by points: if/else 16 (22 pts), loops 8 (18 pts), boolean chains 11, ternaries 1 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.wrapSqlJsDatabase (cognitive 53) · ×1
  • index.wrapSqlJsDatabase (cognitive 53) scripts/lib/state-store/index.js:214 — index.wrapSqlJsDatabase has cognitive complexity 53 (threshold 15). Drivers by points: if/else 19 (20 pts), error handling 7 (12 pts), boolean chains 11, ternaries 7 (9 pts), loops 1 (nesting depth added 8). Most of this is not in the body itself: 3 of the 53 points are its own statements and the rest belongs to 7 function items inside it that branch (reload, withSnapshot::execute, transact, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · workflow.run_workflow (cognitive 52) · ×1
  • workflow.run_workflow (cognitive 52) skills/taste-application/scripts/tasteforge/workflow.py:523 — workflow.run_workflow has cognitive complexity 52 (threshold 15). Drivers by points: if/else 13 (24 pts), loops 8 (13 pts), ternaries 6 (12 pts), boolean chains 3 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · quality-gate.maybeRunQualityGate (cognitive 51) · ×1
  • quality-gate.maybeRunQualityGate (cognitive 51) REDACTED:61 — quality-gate.maybeRunQualityGate has cognitive complexity 51 (threshold 15). Drivers by points: if/else 19 (40 pts), boolean chains 8, ternaries 1 (3 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cli.run (cognitive 50) · ×1
  • cli.run (cognitive 50) docker/context-profiles/complex-eval/reference2/forge-cli/src/cli.js:19 — cli.run has cognitive complexity 50 (threshold 15). Drivers by points: if/else 16 (27 pts), boolean chains 8, ternaries 4 (8 pts), loops 2 (4 pts), error handling 2 (3 pts) (nesting depth added 18). Of this number, 48 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · claude-settings.mergeManagedHooks (cognitive 50) · ×1
  • claude-settings.mergeManagedHooks (cognitive 50) scripts/lib/install/claude-settings.js:477 — claude-settings.mergeManagedHooks has cognitive complexity 50 (threshold 15). Drivers by points: if/else 9 (25 pts), ternaries 6 (12 pts), loops 4 (8 pts), boolean chains 5 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · pre-bash-commit-quality.evaluate (cognitive 50) · ×1
  • pre-bash-commit-quality.evaluate (cognitive 50) REDACTED:412 — pre-bash-commit-quality.evaluate has cognitive complexity 50 (threshold 15). Drivers by points: if/else 16 (29 pts), ternaries 2 (9 pts), loops 3 (6 pts), boolean chains 5, error handling 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · doInstall (cognitive 50) · ×1
  • doInstall (cognitive 50) .codebuddy/install.js:146 — doInstall has cognitive complexity 50 (threshold 15). Drivers by points: if/else 17 (36 pts), loops 7 (13 pts), boolean chains 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · platform-audit.parseArgs (cognitive 49) · ×1
  • platform-audit.parseArgs (cognitive 49) scripts/platform-audit.js:66 — platform-audit.parseArgs has cognitive complexity 49 (threshold 15). Drivers by points: if/else 24 (46 pts), boolean chains 2, loops 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main (cognitive 48) · ×1
  • main (cognitive 48) docker/gateguard-effectiveness/run-intent.js:216 — main has cognitive complexity 48 (threshold 15). Drivers by points: if/else 18 (29 pts), boolean chains 9, loops 4 (5 pts), ternaries 3 (5 pts) (nesting depth added 14). Of this number, 39 points are the body's own statements and 9 belong to 7 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · report.generate_report (cognitive 47) · ×1
  • report.generate_report (cognitive 47) skills/skill-comply/scripts/report.py:13 — report.generate_report has cognitive complexity 47 (threshold 15). Drivers by points: loops 10 (22 pts), if/else 7 (11 pts), ternaries 4 (10 pts), boolean chains 4 (nesting depth added 22). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · blender_prop.build (cognitive 47) · ×1
  • blender_prop.build (cognitive 47) skills/taste-application/scripts/blender_prop.py:151 — blender_prop.build has cognitive complexity 47 (threshold 15). Drivers by points: if/else 18 (23 pts), ternaries 6 (9 pts), loops 6 (7 pts), boolean chains 6, error handling 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · codex-legacy-sync.rollbackLegacyCodexSync (cognitive 47) · ×1
  • codex-legacy-sync.rollbackLegacyCodexSync (cognitive 47) scripts/lib/codex-legacy-sync.js:299 — codex-legacy-sync.rollbackLegacyCodexSync has cognitive complexity 47 (threshold 15). Drivers by points: if/else 17 (34 pts), boolean chains 8, error handling 1 (2 pts), ternaries 2, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · shell-split.splitShellSegments (cognitive 47) · ×1
  • shell-split.splitShellSegments (cognitive 47) scripts/lib/shell-split.js:8 — shell-split.splitShellSegments has cognitive complexity 47 (threshold 15). Drivers by points: if/else 15 (36 pts), boolean chains 8, ternaries 1 (2 pts), loops 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ecc_dashboard.load_skills (cognitive 46) · ×1
  • ecc_dashboard.load_skills (cognitive 46) ecc_dashboard.py:108 — ecc_dashboard.load_skills has cognitive complexity 46 (threshold 15). Drivers by points: if/else 7 (25 pts), boolean chains 9, loops 2 (7 pts), error handling 1 (5 pts) (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · apply.apply (cognitive 46) · ×1
  • apply.apply (cognitive 46) skills/taste-application/scripts/apply.py:284 — apply.apply has cognitive complexity 46 (threshold 15). Drivers by points: if/else 19 (23 pts), boolean chains 7, loops 6 (7 pts), ternaries 6 (7 pts), error handling 1 (2 pts) (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · agent-convert.main (cognitive 46) · ×1
  • agent-convert.main (cognitive 46) scripts/agent-convert.js:112 — agent-convert.main has cognitive complexity 46 (threshold 15). Drivers by points: if/else 18 (31 pts), loops 4 (10 pts), boolean chains 2, error handling 2, ternaries 1 (nesting depth added 19). Of this number, 44 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · markdown.renderMarkdown (cognitive 46) · ×1
  • markdown.renderMarkdown (cognitive 46) scripts/lib/plan-canvas/markdown.js:186 — markdown.renderMarkdown has cognitive complexity 46 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 6 (15 pts), boolean chains 6, ternaries 1 (3 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · loop-status.analyzeTranscript (cognitive 46) · ×1
  • loop-status.analyzeTranscript (cognitive 46) scripts/loop-status.js:401 — loop-status.analyzeTranscript has cognitive complexity 46 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 14, ternaries 4 (9 pts), loops 4 (6 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · schema.validate (cognitive 45) · ×1
  • schema.validate (cognitive 45) skills/taste-application/scripts/tasteforge/schema.py:36 — schema.validate has cognitive complexity 45 (threshold 15). Drivers by points: if/else 16 (27 pts), loops 4 (9 pts), boolean chains 7, ternaries 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ws_listener.listen_with_retry (cognitive 45) · ×1
  • ws_listener.listen_with_retry (cognitive 45) skills/videodb/scripts/ws_listener.py:147 — ws_listener.listen_with_retry has cognitive complexity 45 (threshold 15). Drivers by points: if/else 9 (28 pts), error handling 5 (13 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · qwen-adapt-agents.adaptFrontmatter (cognitive 45) · ×1
  • qwen-adapt-agents.adaptFrontmatter (cognitive 45) scripts/qwen-adapt-agents.js:133 — qwen-adapt-agents.adaptFrontmatter has cognitive complexity 45 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 8, loops 3 (7 pts), ternaries 4 (5 pts), error handling 1 (nesting depth added 17). Of this number, 44 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-fact-force.isDestructiveQuoteAware (cognitive 44) · ×1
  • gateguard-fact-force.isDestructiveQuoteAware (cognitive 44) scripts/hooks/gateguard-fact-force.js:921 — gateguard-fact-force.isDestructiveQuoteAware has cognitive complexity 44 (threshold 15). Drivers by points: if/else 11 (34 pts), loops 3 (7 pts), boolean chains 2, ternaries 1 (nesting depth added 27). Of this number, 43 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · config-protection.main (cognitive 43) · ×1
  • config-protection.main (cognitive 43) hooks/hermes/config-protection.py:46 — config-protection.main has cognitive complexity 43 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 5 (11 pts), boolean chains 4, error handling 2 (4 pts), ternaries 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · apply.assertOpenCodeHookDeactivationReady (cognitive 43) · ×1
  • apply.assertOpenCodeHookDeactivationReady (cognitive 43) scripts/lib/install/apply.js:460 — apply.assertOpenCodeHookDeactivationReady has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 14, ternaries 2 (4 pts), loops 1 (nesting depth added 14). Of this number, 42 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-search-filters.applyShellFilterArg (cognitive 43) · ×1
  • gateguard-search-filters.applyShellFilterArg (cognitive 43) scripts/lib/gateguard-search-filters.js:439 — gateguard-search-filters.applyShellFilterArg has cognitive complexity 43 (threshold 15). Drivers by points: ternaries 9 (20 pts), if/else 10 (14 pts), boolean chains 7, loops 2 (nesting depth added 15). Of this number, 31 points are the body's own statements and 12 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · context-profile-launch.launchTaskContext (cognitive 43) · ×1
  • context-profile-launch.launchTaskContext (cognitive 43) scripts/lib/context-profile-launch.js:20 — context-profile-launch.launchTaskContext has cognitive complexity 43 (threshold 15). Drivers by points: ternaries 12 (16 pts), if/else 10 (14 pts), boolean chains 13 (nesting depth added 8). Of this number, 41 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · memory-mcp.createMemoryMcpService.handle (cognitive 43) · ×1
  • memory-mcp.createMemoryMcpService.handle (cognitive 43) scripts/memory-mcp.mjs:365 — memory-mcp.createMemoryMcpService.handle has cognitive complexity 43 (threshold 15). Drivers by points: if/else 15 (23 pts), boolean chains 14, ternaries 2 (4 pts), error handling 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main (cognitive 43) · ×1
  • main (cognitive 43) skills/ck/hooks/session-start.mjs:83 — main has cognitive complexity 43 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 12, ternaries 5 (11 pts), error handling 1, other 1 (nesting depth added 16). Of this number, 39 points are the body's own statements and 4 belong to 4 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · gateguard-heredoc.iterateHeredocs (cognitive 42) · ×1
  • gateguard-heredoc.iterateHeredocs (cognitive 42) scripts/hooks/gateguard-heredoc.js:67 — gateguard-heredoc.iterateHeredocs has cognitive complexity 42 (threshold 15). Drivers by points: if/else 15 (31 pts), boolean chains 10, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-fact-force.splitEnvWords (cognitive 42) · ×1
  • gateguard-fact-force.splitEnvWords (cognitive 42) scripts/hooks/gateguard-fact-force.js:534 — gateguard-fact-force.splitEnvWords has cognitive complexity 42 (threshold 15). Drivers by points: if/else 19 (38 pts), boolean chains 3, loops 1 (nesting depth added 19). Of this number, 41 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · hookify-frontmatter.parseRuleFrontmatter (cognitive 42) · ×1
  • hookify-frontmatter.parseRuleFrontmatter (cognitive 42) scripts/hooks/hookify-frontmatter.js:108 — hookify-frontmatter.parseRuleFrontmatter has cognitive complexity 42 (threshold 15). Drivers by points: if/else 16 (39 pts), boolean chains 2, loops 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · profile.parseArgs (cognitive 42) · ×1
  • profile.parseArgs (cognitive 42) scripts/profile.js:56 — profile.parseArgs has cognitive complexity 42 (threshold 15). Drivers by points: if/else 18 (32 pts), boolean chains 5, ternaries 2 (3 pts), loops 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · doUninstall (cognitive 42) · ×1
  • doUninstall (cognitive 42) .codebuddy/uninstall.js:119 — doUninstall has cognitive complexity 42 (threshold 15). Drivers by points: if/else 18 (26 pts), error handling 5 (10 pts), boolean chains 4, loops 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · lib.parseStream (cognitive 41) · ×1
  • lib.parseStream (cognitive 41) docker/gateguard-effectiveness/lib.js:201 — lib.parseStream has cognitive complexity 41 (threshold 15). Drivers by points: if/else 8 (24 pts), boolean chains 7, loops 3 (6 pts), error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · pipeline.main (cognitive 40) · ×1
  • pipeline.main (cognitive 40) skills/taste-application/scripts/pipeline.py:52 — pipeline.main has cognitive complexity 40 (threshold 15). Drivers by points: if/else 21 (26 pts), boolean chains 11, loops 1 (2 pts), ternaries 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · request.parseInstallArgs (cognitive 40) · ×1
  • request.parseInstallArgs (cognitive 40) scripts/lib/install/request.js:19 — request.parseInstallArgs has cognitive complexity 40 (threshold 15). Drivers by points: if/else 19 (26 pts), boolean chains 13, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · block-no-verify.sedScriptParts (cognitive 40) · ×1
  • block-no-verify.sedScriptParts (cognitive 40) scripts/hooks/block-no-verify.js:742 — block-no-verify.sedScriptParts has cognitive complexity 40 (threshold 15). Drivers by points: if/else 14 (35 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · work-items.main (cognitive 40) · ×1
  • work-items.main (cognitive 40) scripts/work-items.js:411 — work-items.main has cognitive complexity 40 (threshold 15). Drivers by points: if/else 25 (35 pts), boolean chains 2, ternaries 1 (2 pts), error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · run-intent.parseArgs (cognitive 39) · ×1
  • run-intent.parseArgs (cognitive 39) docker/gateguard-effectiveness/run-intent.js:45 — run-intent.parseArgs has cognitive complexity 39 (threshold 15). Drivers by points: if/else 28 (32 pts), boolean chains 6, loops 1 (nesting depth added 4). Of this number, 35 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · claw.main (cognitive 39) · ×1
  • claw.main (cognitive 39) scripts/claw.js:331 — claw.main has cognitive complexity 39 (threshold 15). Drivers by points: if/else 25 (33 pts), boolean chains 2, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 10). Most of this is not in the body itself: 4 of the 39 points are its own statements and the rest belongs to one function literal inside it that branches (line 361). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · memory-mcp.runStdioServer (cognitive 39) · ×1
  • memory-mcp.runStdioServer (cognitive 39) scripts/memory-mcp.mjs:533 — memory-mcp.runStdioServer has cognitive complexity 39 (threshold 15). Drivers by points: if/else 17 (26 pts), ternaries 2 (6 pts), error handling 1 (3 pts), boolean chains 2, loops 2 (nesting depth added 15). None of this is in the body itself: all 39 points belong to 5 function items inside it that branch (a function literal at line 610, drainQueue, enqueue, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · instinct-cli.parse_instinct_file (cognitive 38) · ×1
  • instinct-cli.parse_instinct_file (cognitive 38) skills/continuous-learning-v2/scripts/instinct-cli.py:516 — instinct-cli.parse_instinct_file has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (25 pts), error handling 1 (5 pts), ternaries 1 (5 pts), boolean chains 2, loops 1 (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · resolve-ecc-root.resolveEccRoot (cognitive 38) · ×1
  • resolve-ecc-root.resolveEccRoot (cognitive 38) scripts/lib/resolve-ecc-root.js:56 — resolve-ecc-root.resolveEccRoot has cognitive complexity 38 (threshold 15). Drivers by points: if/else 7 (17 pts), ternaries 7 (8 pts), loops 4 (7 pts), boolean chains 5, error handling 1 (nesting depth added 14). Of this number, 34 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mcp-health-check.probeCommandServer (cognitive 38) · ×1
  • mcp-health-check.probeCommandServer (cognitive 38) REDACTED:328 — mcp-health-check.probeCommandServer has cognitive complexity 38 (threshold 15). Drivers by points: boolean chains 18, if/else 13 (15 pts), ternaries 3, error handling 1, loops 1 (nesting depth added 2). None of this is in the body itself: all 38 points belong to 11 function literals inside it that branch (lines 395, 329, 472, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · install-guided.main (cognitive 38) · ×1
  • install-guided.main (cognitive 38) scripts/install-guided.js:248 — install-guided.main has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 14, ternaries 4, error handling 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ai-eval.main (cognitive 37) · ×1
  • ai-eval.main (cognitive 37) docker/context-profiles/ai-eval.js:6 — ai-eval.main has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 11 (14 pts), if/else 10 (13 pts), boolean chains 9, loops 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · validate-skills.inspectFrontmatter (cognitive 37) · ×1
  • validate-skills.inspectFrontmatter (cognitive 37) scripts/ci/validate-skills.js:104 — validate-skills.inspectFrontmatter has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (28 pts), boolean chains 5, loops 2 (3 pts), error handling 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · quality-gate.check_stale_libs (cognitive 36) · ×1
  • quality-gate.check_stale_libs (cognitive 36) skills/delivery-gate/hooks/quality-gate.py:80 — quality-gate.check_stale_libs has cognitive complexity 36 (threshold 15). Drivers by points: if/else 6 (18 pts), error handling 3 (10 pts), loops 3 (8 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-eval.summarize (cognitive 36) · ×1
  • gateguard-eval.summarize (cognitive 36) scripts/dev/gateguard-eval.js:435 — gateguard-eval.summarize has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (19 pts), ternaries 6 (12 pts), boolean chains 4, loops 1 (nesting depth added 16). Most of this is not in the body itself: 3 of the 36 points are its own statements and the rest belongs to one function literal inside it that branches (line 464). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · claude-scope-migration.migrateClaudePluginScope (cognitive 36) · ×1
  • claude-scope-migration.migrateClaudePluginScope (cognitive 36) scripts/lib/claude-scope-migration.js:327 — claude-scope-migration.migrateClaudePluginScope has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 10 (18 pts), if/else 11 (13 pts), boolean chains 5 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · shadow-trail.transition (cognitive 36) · ×1
  • shadow-trail.transition (cognitive 36) scripts/lib/agent-proximity/shadow-trail.js:211 — shadow-trail.transition has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (25 pts), boolean chains 9, loops 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · install-manifests.resolveInstallPlan (cognitive 35) · ×1
  • install-manifests.resolveInstallPlan (cognitive 35) scripts/lib/install-manifests.js:557 — install-manifests.resolveInstallPlan has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 10, if/else 7 (10 pts), ternaries 10, loops 4 (5 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · validate-workflow-security.findViolations (cognitive 35) · ×1
  • validate-workflow-security.findViolations (cognitive 35) scripts/ci/validate-workflow-security.js:122 — validate-workflow-security.findViolations has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 6 (11 pts), boolean chains 5, ternaries 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · context-retrieval.searchRetrieval (cognitive 35) · ×1
  • context-retrieval.searchRetrieval (cognitive 35) scripts/lib/context-retrieval.js:138 — context-retrieval.searchRetrieval has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 14, if/else 8 (14 pts), loops 5 (6 pts), ternaries 1 (nesting depth added 7). Of this number, 24 points are the body's own statements and 11 belong to 7 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · post-edit-typecheck.process.stdin.on("end") (cognitive 35) · ×1
  • post-edit-typecheck.process.stdin.on("end") (cognitive 35) scripts/hooks/post-edit-typecheck.js:33 — post-edit-typecheck.process.stdin.on("end") has cognitive complexity 35 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 2 (6 pts), boolean chains 4, error handling 2 (4 pts), ternaries 1 (3 pts) (nesting depth added 19). Of this number, 26 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · install-apply.printHumanPlan (cognitive 35) · ×1
  • install-apply.printHumanPlan (cognitive 35) scripts/install-apply.js:87 — install-apply.printHumanPlan has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 9, loops 5 (9 pts), ternaries 3 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · main (cognitive 35) · ×1
  • main (cognitive 35) docker/gateguard-effectiveness/run.js:137 — main has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (16 pts), ternaries 5 (8 pts), loops 4 (6 pts), boolean chains 5 (nesting depth added 11). Most of this is not in the body itself: 1 of the 35 points is its own statement and the rest belongs to 5 function items inside it that branch (a function literal at line 144, a function literal at line 169, (anonymous)::execute, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · ecc_dashboard.load_rules (cognitive 34) · ×1
  • ecc_dashboard.load_rules (cognitive 34) ecc_dashboard.py:237 — ecc_dashboard.load_rules has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (22 pts), loops 3 (12 pts) (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · instinct-cli.detect_project (cognitive 34) · ×1
  • instinct-cli.detect_project (cognitive 34) skills/continuous-learning-v2/scripts/instinct-cli.py:286 — instinct-cli.detect_project has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (17 pts), error handling 2 (5 pts), ternaries 5, boolean chains 4, loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · instinct-cli.cmd_evolve (cognitive 34) · ×1
  • instinct-cli.cmd_evolve (cognitive 34) skills/continuous-learning-v2/scripts/instinct-cli.py:1306 — instinct-cli.cmd_evolve has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (15 pts), loops 7 (14 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · app.createApp (cognitive 34) · ×1
  • app.createApp (cognitive 34) docker/context-profiles/complex-eval/reference/sentinel-api/src/app.js:38 — app.createApp has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 10, error handling 2 (4 pts) (nesting depth added 9). Most of this is not in the body itself: 1 of the 34 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 41, 45). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · envelope.validateEnvelope (cognitive 34) · ×1
  • envelope.validateEnvelope (cognitive 34) scripts/lib/eval-harness/envelope.js:165 — envelope.validateEnvelope has cognitive complexity 34 (threshold 15). Drivers by points: if/else 20 (23 pts), boolean chains 8, loops 2 (3 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · request.normalizeInstallRequest (cognitive 34) · ×1
  • request.normalizeInstallRequest (cognitive 34) scripts/lib/install/request.js:101 — request.normalizeInstallRequest has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 21, ternaries 7 (8 pts), if/else 5 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · powershell-destructive-command.isInvokedAfterContainer (cognitive 34) · ×1
  • powershell-destructive-command.isInvokedAfterContainer (cognitive 34) REDACTED:415 — powershell-destructive-command.isInvokedAfterContainer has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 5, loops 3 (4 pts), ternaries 1 (2 pts) (nesting depth added 13). Of this number, 26 points are the body's own statements and 8 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-file-context.csharpStringEnd (cognitive 34) · ×1
  • gateguard-file-context.csharpStringEnd (cognitive 34) scripts/lib/gateguard-file-context.js:103 — gateguard-file-context.csharpStringEnd has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 6, loops 3 (5 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-fact-force.quoteAwareSegments (cognitive 34) · ×1
  • gateguard-fact-force.quoteAwareSegments (cognitive 34) scripts/hooks/gateguard-fact-force.js:372 — gateguard-fact-force.quoteAwareSegments has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (28 pts), boolean chains 5, loops 1 (nesting depth added 14). Of this number, 27 points are the body's own statements and 7 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · run-with-flags.main (cognitive 34) · ×1
  • run-with-flags.main (cognitive 34) scripts/hooks/run-with-flags.js:192 — run-with-flags.main has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12, ternaries 8 (12 pts), boolean chains 6, error handling 2 (4 pts) (nesting depth added 6). Of this number, 32 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · session-start.selectMatchingSession (cognitive 34) · ×1
  • session-start.selectMatchingSession (cognitive 34) REDACTED:292 — session-start.selectMatchingSession has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (18 pts), ternaries 4 (8 pts), boolean chains 7, loops 1 (nesting depth added 12). Of this number, 33 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · install-plan.parseArgs (cognitive 34) · ×1
  • install-plan.parseArgs (cognitive 34) scripts/install-plan.js:50 — install-plan.parseArgs has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 11, loops 1, ternaries 1 (nesting depth added 5). Of this number, 32 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · guarded-write.writeFileNoFollow (cognitive 33) · ×1
  • guarded-write.writeFileNoFollow (cognitive 33) scripts/lib/install/guarded-write.js:32 — guarded-write.writeFileNoFollow has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 10, error handling 3, loops 1, ternaries 1 (nesting depth added 4). Of this number, 27 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · json-ops.deepRemoveJsonSubset (cognitive 33) · ×1
  • json-ops.deepRemoveJsonSubset (cognitive 33) scripts/lib/install/json-ops.js:121 — json-ops.deepRemoveJsonSubset has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (25 pts), ternaries 3 (5 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · auto-update.runAutoUpdate (cognitive 33) · ×1
  • auto-update.runAutoUpdate (cognitive 33) scripts/auto-update.js:192 — auto-update.runAutoUpdate has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 13, if/else 8 (12 pts), ternaries 3 (4 pts), error handling 1 (2 pts), loops 2 (nesting depth added 6). Of this number, 30 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · powershell-destructive-command.expandStaticDoubleQuotedString (cognitive 33) · ×1
  • powershell-destructive-command.expandStaticDoubleQuotedString (cognitive 33) REDACTED:492 — powershell-destructive-command.expandStaticDoubleQuotedString has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (19 pts), ternaries 3 (8 pts), boolean chains 5, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · memory-vault.readMemoryFiles (cognitive 33) · ×1
  • memory-vault.readMemoryFiles (cognitive 33) scripts/lib/memory-vault.js:452 — memory-vault.readMemoryFiles has cognitive complexity 33 (threshold 15). Drivers by points: if/else 6 (18 pts), boolean chains 5, error handling 2 (5 pts), loops 3 (5 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · worktree-lifecycle.formatReport (cognitive 33) · ×1
  • worktree-lifecycle.formatReport (cognitive 33) scripts/worktree-lifecycle.js:70 — worktree-lifecycle.formatReport has cognitive complexity 33 (threshold 15). Drivers by points: loops 6 (13 pts), if/else 7 (9 pts), ternaries 2 (6 pts), boolean chains 5 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · run.parseArgs (cognitive 32) · ×1
  • run.parseArgs (cognitive 32) docker/gateguard-effectiveness/run.js:31 — run.parseArgs has cognitive complexity 32 (threshold 15). Drivers by points: if/else 23 (27 pts), boolean chains 4, loops 1 (nesting depth added 4). Of this number, 28 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · astra-review.parseArgs (cognitive 32) · ×1
  • astra-review.parseArgs (cognitive 32) scripts/astra-review.js:93 — astra-review.parseArgs has cognitive complexity 32 (threshold 15). Drivers by points: if/else 18 (23 pts), boolean chains 5, loops 2 (4 pts) (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · platform-audit.renderMarkdown (cognitive 32) · ×1
  • platform-audit.renderMarkdown (cognitive 32) scripts/platform-audit.js:636 — platform-audit.renderMarkdown has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 13 (18 pts), loops 5 (8 pts), if/else 4, boolean chains 2 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · release-video-suite.buildReport (cognitive 32) · ×1
  • release-video-suite.buildReport (cognitive 32) scripts/release-video-suite.js:858 — release-video-suite.buildReport has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 15 (16 pts), boolean chains 11, if/else 3 (4 pts), loops 1 (nesting depth added 2). Of this number, 29 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · apply.apply_local (cognitive 31) · ×1
  • apply.apply_local (cognitive 31) skills/taste-application/scripts/tasteforge/apply.py:135 — apply.apply_local has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 10 (16 pts), if/else 6 (8 pts), boolean chains 5, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · resolve.apply_placements (cognitive 31) · ×1
  • resolve.apply_placements (cognitive 31) skills/taste-application/scripts/tasteforge/resolve.py:232 — resolve.apply_placements has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (19 pts), loops 6 (7 pts), boolean chains 5 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · discussion-audit.parseArgs (cognitive 31) · ×1
  • discussion-audit.parseArgs (cognitive 31) scripts/discussion-audit.js:57 — discussion-audit.parseArgs has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15 (28 pts), boolean chains 2, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · release-approval-gate.buildReport (cognitive 31) · ×1
  • release-approval-gate.buildReport (cognitive 31) scripts/release-approval-gate.js:386 — release-approval-gate.buildReport has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 14, boolean chains 13, if/else 2 (3 pts), loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · quality-gate.main (cognitive 30) · ×1
  • quality-gate.main (cognitive 30) skills/delivery-gate/hooks/quality-gate.py:129 — quality-gate.main has cognitive complexity 30 (threshold 15). Drivers by points: if/else 18 (25 pts), ternaries 1 (2 pts), boolean chains 1, error handling 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · context-profile-native.inputs (cognitive 30) · ×1
  • context-profile-native.inputs (cognitive 30) REDACTED:72 — context-profile-native.inputs has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 14, if/else 10 (12 pts), loops 2, ternaries 2 (nesting depth added 2). Of this number, 28 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · gate.parseChildResult (cognitive 30) · ×1
  • gate.parseChildResult (cognitive 30) scripts/lib/eval-harness/gate.js:185 — gate.parseChildResult has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 8, ternaries 2 (3 pts), loops 1 (2 pts), error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ownership-guard.prepareUserOwnedFileGuard (cognitive 30) · ×1
  • ownership-guard.prepareUserOwnedFileGuard (cognitive 30) scripts/lib/install/ownership-guard.js:40 — ownership-guard.prepareUserOwnedFileGuard has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 17, ternaries 5 (8 pts), if/else 3 (4 pts), loops 1 (nesting depth added 4). Of this number, 29 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · merge-codex-config.main (cognitive 30) · ×1
  • merge-codex-config.main (cognitive 30) scripts/codex/merge-codex-config.js:210 — merge-codex-config.main has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 5 (6 pts), boolean chains 3, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · projection.symmetricEigen (cognitive 30) · ×1
  • projection.symmetricEigen (cognitive 30) scripts/lib/agent-proximity/projection.js:132 — projection.symmetricEigen has cognitive complexity 30 (threshold 15). Drivers by points: loops 8 (23 pts), if/else 2 (6 pts), boolean chains 1 (nesting depth added 19). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · control-plane-view.advisoryEvents (cognitive 30) · ×1
  • control-plane-view.advisoryEvents (cognitive 30) scripts/lib/control-pane/control-plane-view.js:159 — control-plane-view.advisoryEvents has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 10 (20 pts), boolean chains 7, if/else 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · harness-audit.findPluginInstallFromManifest (cognitive 30) · ×1
  • harness-audit.findPluginInstallFromManifest (cognitive 30) scripts/harness-audit.js:288 — harness-audit.findPluginInstallFromManifest has cognitive complexity 30 (threshold 15). Drivers by points: if/else 5 (15 pts), ternaries 2 (7 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · shell-scan.executionRegion (cognitive 30) · ×1
  • shell-scan.executionRegion (cognitive 30) scripts/hooks/lib/shell-scan.js:255 — shell-scan.executionRegion has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 4, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · context-selection.citationFor (cognitive 30) · ×1
  • context-selection.citationFor (cognitive 30) scripts/lib/context-selection.js:126 — context-selection.citationFor has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 11, loops 2 (3 pts) (nesting depth added 9). Of this number, 24 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · governance-capture.analyzeForGovernanceEvents (cognitive 30) · ×1
  • governance-capture.analyzeForGovernanceEvents (cognitive 30) scripts/hooks/governance-capture.js:172 — governance-capture.analyzeForGovernanceEvents has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 11, ternaries 7 (11 pts), if/else 6 (8 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · hookify-runtime.run (cognitive 30) · ×1
  • hookify-runtime.run (cognitive 30) REDACTED:631 — hookify-runtime.run has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 10, error handling 1 (2 pts), loops 1, ternaries 1 (nesting depth added 9). Of this number, 29 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · session-start.parseInstinctFile (cognitive 30) · ×1
  • session-start.parseInstinctFile (cognitive 30) REDACTED:371 — session-start.parseInstinctFile has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (24 pts), boolean chains 5, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · setup.main (cognitive 30) · ×1
  • setup.main (cognitive 30) scripts/setup.js:396 — setup.main has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 8, ternaries 3 (6 pts), error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · instinct-cli.cmd_export (cognitive 29) · ×1
  • instinct-cli.cmd_export (cognitive 29) skills/continuous-learning-v2/scripts/instinct-cli.py:1076 — instinct-cli.cmd_export has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (24 pts), loops 2 (3 pts), error handling 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mint3d.mint3d (cognitive 29) · ×1
  • mint3d.mint3d (cognitive 29) skills/taste-application/scripts/mint3d.py:87 — mint3d.mint3d has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 6, error handling 2 (4 pts), ternaries 2 (3 pts), loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · resolve.allocate_placements (cognitive 29) · ×1
  • resolve.allocate_placements (cognitive 29) skills/taste-application/scripts/tasteforge/resolve.py:88 — resolve.allocate_placements has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 4, loops 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ClaudeProvider.generate (cognitive 29) · ×1
  • ClaudeProvider.generate (cognitive 29) src/llm/providers/claude.py:64 — ClaudeProvider.generate has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 6, ternaries 2 (4 pts), error handling 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app.createApp (cognitive 29) · ×1
  • app.createApp (cognitive 29) docker/context-profiles/complex-eval/cases/sentinel-api/files/src/app.js:24 — app.createApp has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 7, error handling 2 (4 pts) (nesting depth added 8). None of this is in the body itself: all 29 points belong to 2 function literals inside it that branch (lines 25, 29). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · gateguard-readonly-shell.passesCharacterScreen (cognitive 29) · ×1
  • gateguard-readonly-shell.passesCharacterScreen (cognitive 29) scripts/lib/gateguard-readonly-shell.js:25 — gateguard-readonly-shell.passesCharacterScreen has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (27 pts), boolean chains 1, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dashboard.renderAmendmentPanel (cognitive 29) · ×1
  • dashboard.renderAmendmentPanel (cognitive 29) scripts/lib/skill-evolution/dashboard.js:222 — dashboard.renderAmendmentPanel has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 6 (13 pts), if/else 4 (7 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 12). Of this number, 27 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · nasiko.main (cognitive 29) · ×1
  • nasiko.main (cognitive 29) scripts/nasiko.js:101 — nasiko.main has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (15 pts), ternaries 4 (13 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · release-video-suite.parseArgs (cognitive 29) · ×1
  • release-video-suite.parseArgs (cognitive 29) scripts/release-video-suite.js:347 — release-video-suite.parseArgs has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 3, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ecc_dashboard.load_agents (cognitive 28) · ×1
  • ecc_dashboard.load_agents (cognitive 28) ecc_dashboard.py:44 — ecc_dashboard.load_agents has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 2 (7 pts), error handling 1 (3 pts) (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · instinct-cli._parse_created_date (cognitive 28) · ×1
  • instinct-cli._parse_created_date (cognitive 28) skills/continuous-learning-v2/scripts/instinct-cli.py:2082 — instinct-cli._parse_created_date has cognitive complexity 28 (threshold 15). Drivers by points: if/else 5 (15 pts), error handling 3 (7 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · claude-settings.validateHookHandler (cognitive 28) · ×1
  • claude-settings.validateHookHandler (cognitive 28) scripts/lib/install/claude-settings.js:71 — claude-settings.validateHookHandler has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 10 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · hooks-config.findMetadataMismatches (cognitive 28) · ×1
  • hooks-config.findMetadataMismatches (cognitive 28) scripts/lib/hooks-config.js:154 — hooks-config.findMetadataMismatches has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 6, loops 2 (nesting depth added 9). Most of this is not in the body itself: 12 of the 28 points are its own statements and the rest belongs to one function literal inside it that branches (line 176). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · receipt.verifyReceipt (cognitive 28) · ×1
  • receipt.verifyReceipt (cognitive 28) scripts/lib/eval-harness/receipt.js:103 — receipt.verifyReceipt has cognitive complexity 28 (threshold 15). Drivers by points: if/else 17 (20 pts), boolean chains 3, ternaries 2 (3 pts), error handling 1 (2 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · dashboard-web.loadMcps (cognitive 28) · ×1
  • dashboard-web.loadMcps (cognitive 28) REDACTED:118 — dashboard-web.loadMcps has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 4 (10 pts), boolean chains 9, error handling 2 (5 pts), if/else 2, loops 1 (2 pts) (nesting depth added 10). Most of this is not in the body itself: 12 of the 28 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 122, 124). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · server.createPlanCanvasServer.server (cognitive 28) · ×1
  • server.createPlanCanvasServer.server (cognitive 28) REDACTED:662 — server.createPlanCanvasServer.server has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (18 pts), boolean chains 10 (nesting depth added 2). Most of this is not in the body itself: 2 of the 28 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 673, 719, 679). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · session-manager.getSessionCandidates (cognitive 28) · ×1
  • session-manager.getSessionCandidates (cognitive 28) scripts/lib/session-manager.js:84 — session-manager.getSessionCandidates has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (16 pts), error handling 2 (5 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · resolve_ingest.run_resolve (cognitive 27) · ×1
  • resolve_ingest.run_resolve (cognitive 27) skills/taste-application/scripts/resolve_ingest.py:323 — resolve_ingest.run_resolve has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (13 pts), error handling 2 (5 pts), loops 2 (5 pts), boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · workflow_graphs.validate_graph (cognitive 27) · ×1
  • workflow_graphs.validate_graph (cognitive 27) skills/taste-application/scripts/workflow_graphs.py:73 — workflow_graphs.validate_graph has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 5 (7 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plan.createManifestInstallPlan (cognitive 27) · ×1
  • plan.createManifestInstallPlan (cognitive 27) scripts/lib/install/plan.js:258 — plan.createManifestInstallPlan has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 11 (14 pts), boolean chains 12, if/else 1 (nesting depth added 3). Of this number, 25 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · antigravity-legacy-migration.cleanupLegacyAntigravityInstall (cognitive 27) · ×1
  • antigravity-legacy-migration.cleanupLegacyAntigravityInstall (cognitive 27) scripts/lib/install/antigravity-legacy-migration.js:309 — antigravity-legacy-migration.cleanupLegacyAntigravityInstall has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (14 pts), error handling 4 (6 pts), boolean chains 5, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · block-no-verify.updateShellState (cognitive 27) · ×1
  • block-no-verify.updateShellState (cognitive 27) scripts/hooks/block-no-verify.js:878 — block-no-verify.updateShellState has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 6 (9 pts), ternaries 2 (5 pts), boolean chains 3 (nesting depth added 9). Of this number, 19 points are the body's own statements and 8 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-code-lexer.normalizeCodeLine (cognitive 27) · ×1
  • gateguard-code-lexer.normalizeCodeLine (cognitive 27) REDACTED:279 — gateguard-code-lexer.normalizeCodeLine has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 3, loops 1, ternaries 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-file-context.pythonStringEnd (cognitive 27) · ×1
  • gateguard-file-context.pythonStringEnd (cognitive 27) scripts/lib/gateguard-file-context.js:446 — gateguard-file-context.pythonStringEnd has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 8, loops 1, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · hookify-runtime.isSafeRegexSource (cognitive 27) · ×1
  • hookify-runtime.isSafeRegexSource (cognitive 27) REDACTED:80 — hookify-runtime.isSafeRegexSource has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dashboard.renderDashboard (cognitive 27) · ×1
  • dashboard.renderDashboard (cognitive 27) scripts/lib/skill-evolution/dashboard.js:343 — dashboard.renderDashboard has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 5 (17 pts), if/else 5, boolean chains 3, loops 1 (2 pts) (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · shared.renderContextMd (cognitive 27) · ×1
  • shared.renderContextMd (cognitive 27) skills/ck/commands/shared.mjs:198 — shared.renderContextMd has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 12, ternaries 1 (nesting depth added 2). Of this number, 19 points are the body's own statements and 8 belong to 3 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · instinct-cli.cmd_prune (cognitive 26) · ×1
  • instinct-cli.cmd_prune (cognitive 26) skills/continuous-learning-v2/scripts/instinct-cli.py:2158 — instinct-cli.cmd_prune has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 3 (8 pts), error handling 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · check-hooks-schema-keys.findUnknownKeys (cognitive 26) · ×1
  • check-hooks-schema-keys.findUnknownKeys (cognitive 26) scripts/ci/check-hooks-schema-keys.js:58 — check-hooks-schema-keys.findUnknownKeys has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 4 (6 pts), boolean chains 3, ternaries 1 (nesting depth added 11). Most of this is not in the body itself: 8 of the 26 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 73, 83). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · block-no-verify.pipelineSources (cognitive 26) · ×1
  • block-no-verify.pipelineSources (cognitive 26) scripts/hooks/block-no-verify.js:820 — block-no-verify.pipelineSources has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (5 pts), boolean chains 4, ternaries 1 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-code-lexer.shDoubleQuoteEnd (cognitive 26) · ×1
  • gateguard-code-lexer.shDoubleQuoteEnd (cognitive 26) REDACTED:363 — gateguard-code-lexer.shDoubleQuoteEnd has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-change-profile.shellRedirectsFile (cognitive 26) · ×1
  • gateguard-change-profile.shellRedirectsFile (cognitive 26) scripts/lib/gateguard-change-profile.js:364 — gateguard-change-profile.shellRedirectsFile has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (21 pts), boolean chains 4, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · context-selection.validateTask (cognitive 26) · ×1
  • context-selection.validateTask (cognitive 26) scripts/lib/context-selection.js:179 — context-selection.validateTask has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 12, if/else 8 (11 pts), loops 3 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · statusline-render.readInstalledPlugins (cognitive 26) · ×1
  • statusline-render.readInstalledPlugins (cognitive 26) scripts/lib/statusline-render.js:245 — statusline-render.readInstalledPlugins has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 14, ternaries 4 (6 pts), if/else 2 (4 pts), error handling 1, loops 1 (nesting depth added 4). Most of this is not in the body itself: 11 of the 26 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 264, applicable, a function literal at line 271, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · hookify-runtime.normalizeRule (cognitive 26) · ×1
  • hookify-runtime.normalizeRule (cognitive 26) REDACTED:164 — hookify-runtime.normalizeRule has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 11, if/else 11, ternaries 4. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · mcp-health-check.handlePreToolUse (cognitive 26) · ×1
  • mcp-health-check.handlePreToolUse (cognitive 26) REDACTED:728 — mcp-health-check.handlePreToolUse has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 8, ternaries 4 (6 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · post-edit-format.run (cognitive 26) · ×1
  • post-edit-format.run (cognitive 26) REDACTED:37 — post-edit-format.run has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 4, error handling 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · project-detect.detectProjectType (cognitive 26) · ×1
  • project-detect.detectProjectType (cognitive 26) scripts/lib/project-detect.js:368 — project-detect.detectProjectType has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 7, match/switch 1 (3 pts), loops 2, ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · claude-plugin-setup.runClaude (cognitive 26) · ×1
  • claude-plugin-setup.runClaude (cognitive 26) scripts/lib/claude-plugin-setup.js:213 — claude-plugin-setup.runClaude has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 13, if/else 6 (8 pts), error handling 1 (3 pts), ternaries 1 (2 pts) (nesting depth added 5). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · release-video-suite.validateVideoArtifact (cognitive 26) · ×1
  • release-video-suite.validateVideoArtifact (cognitive 26) scripts/release-video-suite.js:676 — release-video-suite.validateVideoArtifact has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 14, if/else 11 (12 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · uninstall.printHuman (cognitive 26) · ×1
  • uninstall.printHuman (cognitive 26) scripts/uninstall.js:58 — uninstall.printHuman has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 8 (12 pts), if/else 5 (8 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · runner._parse_stream_json (cognitive 25) · ×1
  • runner._parse_stream_json (cognitive 25) skills/skill-comply/scripts/runner.py:210 — runner._parse_stream_json has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (14 pts), loops 4 (9 pts), error handling 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · claude-settings.validateManagedHooks (cognitive 25) · ×1
  • claude-settings.validateManagedHooks (cognitive 25) scripts/lib/install/claude-settings.js:127 — claude-settings.validateManagedHooks has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 4, loops 1 (nesting depth added 9). Most of this is not in the body itself: 9 of the 25 points are its own statements and the rest belongs to one function literal inside it that branches (line 147). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · coordination-inventory.proximityWarnings (cognitive 25) · ×1
  • coordination-inventory.proximityWarnings (cognitive 25) scripts/lib/coordination-inventory.js:142 — coordination-inventory.proximityWarnings has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 3 (6 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 15). Of this number, 22 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · build-pi-core.scanTextFile (cognitive 25) · ×1
  • build-pi-core.scanTextFile (cognitive 25) scripts/build-pi-core.js:313 — build-pi-core.scanTextFile has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 5 (9 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · shell-scan.scanShell (cognitive 25) · ×1
  • shell-scan.scanShell (cognitive 25) scripts/hooks/lib/shell-scan.js:515 — shell-scan.scanShell has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 4, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · powershell-destructive-command.consumeInertChar (cognitive 25) · ×1
  • powershell-destructive-command.consumeInertChar (cognitive 25) REDACTED:138 — powershell-destructive-command.consumeInertChar has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · powershell-destructive-command.aliasArguments (cognitive 25) · ×1
  • powershell-destructive-command.aliasArguments (cognitive 25) REDACTED:1889 — powershell-destructive-command.aliasArguments has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 6, loops 2 (4 pts), ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-search-filters.wildcardMatch (cognitive 25) · ×1
  • gateguard-search-filters.wildcardMatch (cognitive 25) scripts/lib/gateguard-search-filters.js:216 — gateguard-search-filters.wildcardMatch has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 9, loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-search-filters.findSearchFilters (cognitive 25) · ×1
  • gateguard-search-filters.findSearchFilters (cognitive 25) scripts/lib/gateguard-search-filters.js:537 — gateguard-search-filters.findSearchFilters has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 4, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-search-evidence.parseSearchArgs (cognitive 25) · ×1
  • gateguard-search-evidence.parseSearchArgs (cognitive 25) scripts/lib/gateguard-search-evidence.js:224 — gateguard-search-evidence.parseSearchArgs has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 6, loops 1, ternaries 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cost-tracker.sumUsageFromTranscript (cognitive 25) · ×1
  • cost-tracker.sumUsageFromTranscript (cognitive 25) scripts/hooks/cost-tracker.js:151 — cost-tracker.sumUsageFromTranscript has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 6, ternaries 3 (6 pts), error handling 2 (3 pts), loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ecc-statusline.runStatusline (cognitive 25) · ×1
  • ecc-statusline.runStatusline (cognitive 25) scripts/hooks/ecc-statusline.js:161 — ecc-statusline.runStatusline has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 4, error handling 2 (3 pts), ternaries 2 (nesting depth added 6). None of this is in the body itself: all 25 points belong to 2 function literals inside it that branch (lines 170, 165). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · insaits-security-wrapper.process.stdin.on("end") (cognitive 25) · ×1
  • insaits-security-wrapper.process.stdin.on("end") (cognitive 25) scripts/hooks/insaits-security-wrapper.js:32 — insaits-security-wrapper.process.stdin.on("end") has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 9, ternaries 2 (3 pts), loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · llm-summary.extractConversationText (cognitive 25) · ×1
  • llm-summary.extractConversationText (cognitive 25) scripts/lib/llm-summary.js:37 — llm-summary.extractConversationText has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 3 (8 pts), error handling 2 (3 pts), boolean chains 2, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · stop-format-typecheck.main (cognitive 25) · ×1
  • stop-format-typecheck.main (cognitive 25) REDACTED:184 — stop-format-typecheck.main has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 4, error handling 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dashboard.renderVersionTimelinePanel (cognitive 25) · ×1
  • dashboard.renderVersionTimelinePanel (cognitive 25) scripts/lib/skill-evolution/dashboard.js:277 — dashboard.renderVersionTimelinePanel has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 4 (8 pts), boolean chains 4, ternaries 1 (4 pts) (nesting depth added 11). Of this number, 24 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ledger.recover (cognitive 25) · ×1
  • ledger.recover (cognitive 25) REDACTED:230 — ledger.recover has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · instinct-cli.cmd_status (cognitive 24) · ×1
  • instinct-cli.cmd_status (cognitive 24) skills/continuous-learning-v2/scripts/instinct-cli.py:745 — instinct-cli.cmd_status has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · glitch.transform_stream (cognitive 24) · ×1
  • glitch.transform_stream (cognitive 24) skills/taste-application/scripts/tasteforge/media/glitch.py:13 — glitch.transform_stream has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (15 pts), ternaries 1 (5 pts), loops 2 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · glitch.render (cognitive 24) · ×1
  • glitch.render (cognitive 24) skills/taste-application/scripts/tasteforge/media/glitch.py:100 — glitch.render has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · helpers.createFlatFileOperations (cognitive 24) · ×1
  • helpers.createFlatFileOperations (cognitive 24) scripts/lib/install-targets/helpers.js:254 — helpers.createFlatFileOperations has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 2 (7 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · verify-release-gates.createGithubClient.pages (cognitive 24) · ×1
  • verify-release-gates.createGithubClient.pages (cognitive 24) REDACTED:148 — verify-release-gates.createGithubClient.pages has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 10). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · generate-skill-triggers.main (cognitive 24) · ×1
  • generate-skill-triggers.main (cognitive 24) scripts/dev/generate-skill-triggers.js:77 — generate-skill-triggers.main has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 6, ternaries 3, loops 2, error handling 1 (nesting depth added 3). Of this number, 12 points are the body's own statements and 12 belong to 4 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · generate-hooks-config.generateConfig (cognitive 24) · ×1
  • generate-hooks-config.generateConfig (cognitive 24) scripts/dsh/generate-hooks-config.js:105 — generate-hooks-config.generateConfig has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · file-lock.acquireLock (cognitive 24) · ×1
  • file-lock.acquireLock (cognitive 24) scripts/lib/state-store/file-lock.js:79 — file-lock.acquireLock has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (14 pts), error handling 3 (7 pts), boolean chains 2, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · powershell-destructive-command.normalizeHereStrings (cognitive 24) · ×1
  • powershell-destructive-command.normalizeHereStrings (cognitive 24) REDACTED:253 — powershell-destructive-command.normalizeHereStrings has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (17 pts), ternaries 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · skills-health.parseArgs (cognitive 24) · ×1
  • skills-health.parseArgs (cognitive 24) scripts/skills-health.js:35 — skills-health.parseArgs has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OllamaProvider.generate (cognitive 23) · ×1
  • OllamaProvider.generate (cognitive 23) REDACTED:141 — OllamaProvider.generate has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 6, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · claw.askClaude (cognitive 23) · ×1
  • claw.askClaude (cognitive 23) scripts/claw.js:90 — claw.askClaude has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5, error handling 1 (3 pts), loops 1 (2 pts), ternaries 2 (nesting depth added 6). Of this number, 21 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · proximity.decodeGitPath (cognitive 23) · ×1
  • proximity.decodeGitPath (cognitive 23) scripts/lib/control-pane/proximity.js:19 — proximity.decodeGitPath has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-eval.prepareScenario (cognitive 23) · ×1
  • gateguard-eval.prepareScenario (cognitive 23) scripts/dev/gateguard-eval.js:180 — gateguard-eval.prepareScenario has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 9, loops 4 (8 pts), error handling 2 (4 pts), if/else 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · harness-audit.findPluginInstallMarketplaceCache (cognitive 23) · ×1
  • harness-audit.findPluginInstallMarketplaceCache (cognitive 23) scripts/harness-audit.js:337 — harness-audit.findPluginInstallMarketplaceCache has cognitive complexity 23 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 2 (9 pts), error handling 1 (4 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · block-no-verify.gitEnvironmentOverride (cognitive 23) · ×1
  • block-no-verify.gitEnvironmentOverride (cognitive 23) scripts/hooks/block-no-verify.js:186 — block-no-verify.gitEnvironmentOverride has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (7 pts), boolean chains 4, ternaries 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · block-no-verify.skipSedAddress · ×1
  • block-no-verify.skipSedAddress::one (cognitive 23) scripts/hooks/block-no-verify.js:563 — block-no-verify.skipSedAddress::one has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 3 (5 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · shell-substitution.readBraceBody (cognitive 23) · ×1
  • shell-substitution.readBraceBody (cognitive 23) scripts/lib/shell-substitution.js:269 — shell-substitution.readBraceBody has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 7, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-file-context.shSubstitutionEnd (cognitive 23) · ×1
  • gateguard-file-context.shSubstitutionEnd (cognitive 23) scripts/lib/gateguard-file-context.js:539 — gateguard-file-context.shSubstitutionEnd has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 5, ternaries 1 (3 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-search-evidence.createSearchEvidence.findClosestMiss (cognitive 23) · ×1
  • gateguard-search-evidence.createSearchEvidence.findClosestMiss (cognitive 23) scripts/lib/gateguard-search-evidence.js:571 — gateguard-search-evidence.createSearchEvidence.findClosestMiss has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 7, loops 3 (5 pts), error handling 1, ternaries 1 (nesting depth added 5). Of this number, 20 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-fact-force.tokenizeAllowlistedShellWords (cognitive 23) · ×1
  • gateguard-fact-force.tokenizeAllowlistedShellWords (cognitive 23) scripts/hooks/gateguard-fact-force.js:306 — gateguard-fact-force.tokenizeAllowlistedShellWords has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-fact-force.saveState (cognitive 23) · ×1
  • gateguard-fact-force.saveState (cognitive 23) scripts/hooks/gateguard-fact-force.js:1533 — gateguard-fact-force.saveState has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (10 pts), error handling 5 (9 pts), boolean chains 2, ternaries 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · setup.parseArgs (cognitive 23) · ×1
  • setup.parseArgs (cognitive 23) scripts/setup.js:62 — setup.parseArgs has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 7, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · codex-plugin-setup.reconcileCodexPlugin (cognitive 23) · ×1
  • codex-plugin-setup.reconcileCodexPlugin (cognitive 23) scripts/lib/codex-plugin-setup.js:361 — codex-plugin-setup.reconcileCodexPlugin has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 9 (13 pts), boolean chains 5, if/else 5 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · install-guided.parseArgs (cognitive 23) · ×1
  • install-guided.parseArgs (cognitive 23) scripts/install-guided.js:58 — install-guided.parseArgs has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 6, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · install-plan.main (cognitive 23) · ×1
  • install-plan.main (cognitive 23) scripts/install-plan.js:199 — install-plan.main has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (16 pts), ternaries 3 (4 pts), boolean chains 2, error handling 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · tmux-worktree-orchestrator.rollbackCreatedResources (cognitive 23) · ×1
  • tmux-worktree-orchestrator.rollbackCreatedResources (cognitive 23) scripts/lib/tmux-worktree-orchestrator.js:426 — tmux-worktree-orchestrator.rollbackCreatedResources has cognitive complexity 23 (threshold 15). Drivers by points: error handling 4 (10 pts), if/else 6 (8 pts), boolean chains 4, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · preview-pack-smoke.buildReport (cognitive 23) · ×1
  • preview-pack-smoke.buildReport (cognitive 23) scripts/preview-pack-smoke.js:209 — preview-pack-smoke.buildReport has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 13, ternaries 10. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · open-terminal.parseArgs (cognitive 23) · ×1
  • open-terminal.parseArgs (cognitive 23) skills/terminal-opener/scripts/open-terminal.js:88 — open-terminal.parseArgs has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 8, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · integration._read_local (cognitive 22) · ×1
  • integration._read_local (cognitive 22) skills/taste-application/scripts/tasteforge/integration.py:112 — integration._read_local has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 5, error handling 1, loops 1, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · integration.build_application_bundle (cognitive 22) · ×1
  • integration.build_application_bundle (cognitive 22) skills/taste-application/scripts/tasteforge/integration.py:338 — integration.build_application_bundle has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 4, loops 2, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · generate_icons.swift.top-level code (cognitive 22) · ×1
  • generate_icons.swift.top-level code (cognitive 22) skills/ios-icon-gen/scripts/generate_icons.swift:173 — generate_icons.swift.top-level code has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 4, ternaries 1 (3 pts), match/switch 1 (2 pts), error handling 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · session.runConversation (cognitive 22) · ×1
  • session.runConversation (cognitive 22) docker/gateguard-effectiveness/session.js:74 — session.runConversation has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (8 pts), loops 3 (5 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · codex-legacy-sync.openRegularFileNoFollow (cognitive 22) · ×1
  • codex-legacy-sync.openRegularFileNoFollow (cognitive 22) scripts/lib/codex-legacy-sync.js:17 — codex-legacy-sync.openRegularFileNoFollow has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (14 pts), error handling 3 (5 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-eval.validateStep (cognitive 22) · ×1
  • gateguard-eval.validateStep (cognitive 22) scripts/dev/gateguard-eval.js:58 — gateguard-eval.validateStep has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 8 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · harness-adapter-compliance.validateAdapterRecords (cognitive 22) · ×1
  • harness-adapter-compliance.validateAdapterRecords (cognitive 22) scripts/lib/harness-adapter-compliance.js:429 — harness-adapter-compliance.validateAdapterRecords has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 7, loops 2 (nesting depth added 3). None of this is in the body itself: all 22 points belong to 2 function literals inside it that branch (lines 433, 467). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · harness-audit.parseArgs (cognitive 22) · ×1
  • harness-audit.parseArgs (cognitive 22) scripts/harness-audit.js:75 — harness-audit.parseArgs has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 4, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · shell-scan.readDelimiterWord (cognitive 22) · ×1
  • shell-scan.readDelimiterWord (cognitive 22) scripts/hooks/lib/shell-scan.js:53 — shell-scan.readDelimiterWord has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 3, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · shell-substitution.iterateCommandSubstitutions (cognitive 22) · ×1
  • shell-substitution.iterateCommandSubstitutions (cognitive 22) scripts/lib/shell-substitution.js:56 — shell-substitution.iterateCommandSubstitutions has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 5, ternaries 2 (4 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · powershell-destructive-command.leadingStaticStringResult (cognitive 22) · ×1
  • powershell-destructive-command.leadingStaticStringResult (cognitive 22) REDACTED:544 — powershell-destructive-command.leadingStaticStringResult has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 7, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · powershell-destructive-command.maskQuotedStrings (cognitive 22) · ×1
  • powershell-destructive-command.maskQuotedStrings (cognitive 22) REDACTED:1189 — powershell-destructive-command.maskQuotedStrings has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-code-lexer.normalizeShellLine (cognitive 22) · ×1
  • gateguard-code-lexer.normalizeShellLine (cognitive 22) REDACTED:578 — gateguard-code-lexer.normalizeShellLine has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 2 (7 pts), boolean chains 3, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · session-cost-snapshot.maybePruneSessionCostSnapshots (cognitive 22) · ×1
  • session-cost-snapshot.maybePruneSessionCostSnapshots (cognitive 22) scripts/lib/session-cost-snapshot.js:426 — session-cost-snapshot.maybePruneSessionCostSnapshots has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 2 (4 pts), boolean chains 3, ternaries 3, loops 1 (nesting depth added 8). Of this number, 20 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · hookify-runtime.ruleMatches (cognitive 22) · ×1
  • hookify-runtime.ruleMatches (cognitive 22) REDACTED:564 — hookify-runtime.ruleMatches has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (5 pts), boolean chains 1, ternaries 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · pre-bash-dev-server-block.getLeadingCommandWord (cognitive 22) · ×1
  • pre-bash-dev-server-block.getLeadingCommandWord (cognitive 22) scripts/hooks/pre-bash-dev-server-block.js:107 — pre-bash-dev-server-block.getLeadingCommandWord has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · multi-harness-setup.normalizeGuidedInstallRequest (cognitive 22) · ×1
  • multi-harness-setup.normalizeGuidedInstallRequest (cognitive 22) scripts/lib/multi-harness-setup.js:19 — multi-harness-setup.normalizeGuidedInstallRequest has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 10, if/else 6, ternaries 6. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · status.parseArgs (cognitive 22) · ×1
  • status.parseArgs (cognitive 22) scripts/status.js:25 — status.parseArgs has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 8, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · review-with-codex.runReview (cognitive 22) · ×1
  • review-with-codex.runReview (cognitive 22) REDACTED:181 — review-with-codex.runReview has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 8, ternaries 1 (2 pts), error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · ledger.acquireLock (cognitive 22) · ×1
  • ledger.acquireLock (cognitive 22) REDACTED:203 — ledger.acquireLock has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 2 (6 pts), boolean chains 4, error handling 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 22) · ×1
  • (anonymous) (cognitive 22) docker/context-profiles/complex-eval/cases/sentinel-api/check.cjs:47 — (anonymous) has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 12, ternaries 6, error handling 3, if/else 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · ecc_dashboard.load_commands (cognitive 21) · ×1
  • ecc_dashboard.load_commands (cognitive 21) ecc_dashboard.py:188 — ecc_dashboard.load_commands has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (6 pts), error handling 1 (4 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · workflow.parse_feature_output (cognitive 21) · ×1
  • workflow.parse_feature_output (cognitive 21) skills/taste-application/scripts/tasteforge/workflow.py:304 — workflow.parse_feature_output has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), error handling 1 (3 pts), boolean chains 2, loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AtlasProvider.generate (cognitive 21) · ×1
  • AtlasProvider.generate (cognitive 21) src/llm/providers/atlas.py:84 — AtlasProvider.generate has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 8, error handling 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OpenAIProvider.generate (cognitive 21) · ×1
  • OpenAIProvider.generate (cognitive 21) src/llm/providers/openai.py:95 — OpenAIProvider.generate has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 7, ternaries 1 (2 pts), error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · claude-settings-lock.acquireSettingsLock (cognitive 21) · ×1
  • claude-settings-lock.acquireSettingsLock (cognitive 21) scripts/lib/install/claude-settings-lock.js:153 — claude-settings-lock.acquireSettingsLock has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 5, error handling 2 (4 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · evidence.verifyManifest (cognitive 21) · ×1
  • evidence.verifyManifest (cognitive 21) docker/gateguard-effectiveness/evidence.js:77 — evidence.verifyManifest has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · distance.graphDistance (cognitive 21) · ×1
  • distance.graphDistance (cognitive 21) scripts/lib/agent-proximity/distance.js:179 — distance.graphDistance has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (6 pts), boolean chains 3, ternaries 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · capsule.releaseOwnedLock (cognitive 21) · ×1
  • capsule.releaseOwnedLock (cognitive 21) scripts/lib/eval-harness/capsule.js:71 — capsule.releaseOwnedLock has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (16 pts), error handling 2 (4 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · scan-supply-chain-iocs.scanFile (cognitive 21) · ×1
  • scan-supply-chain-iocs.scanFile (cognitive 21) scripts/ci/scan-supply-chain-iocs.js:622 — scan-supply-chain-iocs.scanFile has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 4 (6 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · validate-agents.extractFrontmatter (cognitive 21) · ×1
  • validate-agents.extractFrontmatter (cognitive 21) scripts/ci/validate-agents.js:13 — validate-agents.extractFrontmatter has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · validate-agents.validateAgents (cognitive 21) · ×1
  • validate-agents.validateAgents (cognitive 21) scripts/ci/validate-agents.js:63 — validate-agents.validateAgents has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3, loops 2 (3 pts), error handling 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · check-plugin-cache.checkCache (cognitive 21) · ×1
  • check-plugin-cache.checkCache (cognitive 21) scripts/codex/check-plugin-cache.js:173 — check-plugin-cache.checkCache has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · control-plane-view.buildControlPlaneView (cognitive 21) · ×1
  • control-plane-view.buildControlPlaneView (cognitive 21) scripts/lib/control-pane/control-plane-view.js:217 — control-plane-view.buildControlPlaneView has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 12, ternaries 6, loops 1 (2 pts), if/else 1 (nesting depth added 1). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · policy.loadPolicy (cognitive 21) · ×1
  • policy.loadPolicy (cognitive 21) scripts/lib/github-coordination/policy.js:50 — policy.loadPolicy has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 8 (9 pts), boolean chains 8, if/else 3, error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · harness-audit-consumer.globToRegex (cognitive 21) · ×1
  • harness-audit-consumer.globToRegex (cognitive 21) REDACTED:349 — harness-audit-consumer.globToRegex has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · powershell-destructive-command.splitStaticArrayItems (cognitive 21) · ×1
  • powershell-destructive-command.splitStaticArrayItems (cognitive 21) REDACTED:597 — powershell-destructive-command.splitStaticArrayItems has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 6, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · powershell-destructive-command.scanScriptBlockConsumer (cognitive 21) · ×1
  • powershell-destructive-command.scanScriptBlockConsumer (cognitive 21) REDACTED:1821 — powershell-destructive-command.scanScriptBlockConsumer has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 2, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-file-context.psSubexpressionEnd (cognitive 21) · ×1
  • gateguard-file-context.psSubexpressionEnd (cognitive 21) scripts/lib/gateguard-file-context.js:679 — gateguard-file-context.psSubexpressionEnd has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4, ternaries 1 (3 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-search-filters.expandBraces (cognitive 21) · ×1
  • gateguard-search-filters.expandBraces (cognitive 21) scripts/lib/gateguard-search-filters.js:144 — gateguard-search-filters.expandBraces has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (4 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-search-evidence.flagEffect (cognitive 21) · ×1
  • gateguard-search-evidence.flagEffect (cognitive 21) scripts/lib/gateguard-search-evidence.js:202 — gateguard-search-evidence.flagEffect has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 4 (10 pts), boolean chains 6, if/else 3 (4 pts), loops 1 (nesting depth added 7). Of this number, 17 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-fact-force.isDestructiveBash (cognitive 21) · ×1
  • gateguard-fact-force.isDestructiveBash (cognitive 21) scripts/hooks/gateguard-fact-force.js:1356 — gateguard-fact-force.isDestructiveBash has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · context-retrieval.denseVector (cognitive 21) · ×1
  • context-retrieval.denseVector (cognitive 21) scripts/lib/context-retrieval.js:52 — context-retrieval.denseVector has cognitive complexity 21 (threshold 15). Drivers by points: loops 6 (15 pts), boolean chains 3, if/else 1 (3 pts) (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · statusline-render.buildSessionLine (cognitive 21) · ×1
  • statusline-render.buildSessionLine (cognitive 21) scripts/lib/statusline-render.js:160 — statusline-render.buildSessionLine has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9, ternaries 3 (7 pts), boolean chains 5 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · lifecycle-hook-bootstrap.main (cognitive 21) · ×1
  • lifecycle-hook-bootstrap.main (cognitive 21) scripts/hooks/lifecycle-hook-bootstrap.js:40 — lifecycle-hook-bootstrap.main has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 6 (9 pts), boolean chains 7, if/else 5 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · pre-bash-dev-server-block.readToken (cognitive 21) · ×1
  • pre-bash-dev-server-block.readToken (cognitive 21) scripts/hooks/pre-bash-dev-server-block.js:41 — pre-bash-dev-server-block.readToken has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 4, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · session-start-bootstrap.main (cognitive 21) · ×1
  • session-start-bootstrap.main (cognitive 21) scripts/hooks/session-start-bootstrap.js:36 — session-start-bootstrap.main has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 6 (15 pts), if/else 3 (4 pts), boolean chains 2 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · session-start.pruneExpiredSessions (cognitive 21) · ×1
  • session-start.pruneExpiredSessions (cognitive 21) REDACTED:218 — session-start.pruneExpiredSessions has cognitive complexity 21 (threshold 15). Drivers by points: error handling 3 (8 pts), if/else 3 (8 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 11). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sessions.normalizeFeedbackItem (cognitive 21) · ×1
  • sessions.normalizeFeedbackItem (cognitive 21) scripts/lib/plan-canvas/sessions.js:68 — sessions.normalizeFeedbackItem has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 5, ternaries 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · session-manager.getMatchingSessionCandidates (cognitive 21) · ×1
  • session-manager.getMatchingSessionCandidates (cognitive 21) scripts/lib/session-manager.js:179 — session-manager.getMatchingSessionCandidates has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (3 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ito-baskets.run (cognitive 21) · ×1
  • ito-baskets.run (cognitive 21) skills/ito-baskets/scripts/ito-baskets.js:124 — ito-baskets.run has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 4 (5 pts), boolean chains 2, error handling 2, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ledger.requireHardlinks (cognitive 21) · ×1
  • ledger.requireHardlinks (cognitive 21) REDACTED:77 — ledger.requireHardlinks has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 3, error handling 2 (3 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · parseCodexJsonl (cognitive 21) · ×1
  • parseCodexJsonl (cognitive 21) docker/context-profiles/ai-eval-lib.js:182 — parseCodexJsonl has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 6, error handling 1, loops 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · loadIntentScenarios (cognitive 21) · ×1
  • loadIntentScenarios (cognitive 21) docker/gateguard-effectiveness/intent-eval.js:24 — loadIntentScenarios has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 6, loops 2 (nesting depth added 2). Most of this is not in the body itself: 2 of the 21 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 28, 27, 46, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · instinct-cli._promote_auto (cognitive 20) · ×1
  • instinct-cli._promote_auto (cognitive 20) skills/continuous-learning-v2/scripts/instinct-cli.py:1662 — instinct-cli._promote_auto has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · verify.verify (cognitive 20) · ×1
  • verify.verify (cognitive 20) skills/taste-application/scripts/verify.py:99 — verify.verify has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6 (9 pts), if/else 6 (7 pts), boolean chains 2, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _AstraflowBaseProvider.generate (cognitive 20) · ×1
  • _AstraflowBaseProvider.generate (cognitive 20) src/llm/providers/astraflow.py:71 — _AstraflowBaseProvider.generate has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 7, error handling 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · selector.keccakF (cognitive 20) · ×1
  • selector.keccakF (cognitive 20) docker/context-profiles/complex-eval/reference2/keccak-selector/src/selector.js:15 — selector.keccakF has cognitive complexity 20 (threshold 15). Drivers by points: loops 9 (20 pts) (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · install-manifests.resolveInstallPlan.resolveModule (cognitive 20) · ×1
  • install-manifests.resolveInstallPlan.resolveModule (cognitive 20) scripts/lib/install-manifests.js:646 — install-manifests.resolveInstallPlan.resolveModule has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5, ternaries 1 (3 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · context-profile-native-executable.resolveExecutable (cognitive 20) · ×1
  • context-profile-native-executable.resolveExecutable (cognitive 20) scripts/lib/context-profile-native-executable.js:19 — context-profile-native-executable.resolveExecutable has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 6, ternaries 2 (3 pts), error handling 1 (2 pts) (nesting depth added 4). Of this number, 18 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · interactive-plan.parseArgs (cognitive 20) · ×1
  • interactive-plan.parseArgs (cognitive 20) docker/plugin-setup/interactive-plan.js:33 — interactive-plan.parseArgs has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 5, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · coordination-inventory.collectTaskFiles (cognitive 20) · ×1
  • coordination-inventory.collectTaskFiles (cognitive 20) scripts/lib/coordination-inventory.js:238 — coordination-inventory.collectTaskFiles has cognitive complexity 20 (threshold 15). Drivers by points: error handling 3 (7 pts), if/else 3 (6 pts), loops 2 (3 pts), boolean chains 2, ternaries 2 (nesting depth added 8). Of this number, 18 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · stale-operations-reconciliation.inspectDestinationPath (cognitive 20) · ×1
  • stale-operations-reconciliation.inspectDestinationPath (cognitive 20) scripts/lib/install/stale-operations-reconciliation.js:144 — stale-operations-reconciliation.inspectDestinationPath has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3, ternaries 1 (3 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · agent-tools.splitTopLevelToolList (cognitive 20) · ×1
  • agent-tools.splitTopLevelToolList (cognitive 20) scripts/lib/agent-tools.js:12 — agent-tools.splitTopLevelToolList has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 4, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · opencode-script-boundary.assertScriptBoundary (cognitive 20) · ×1
  • opencode-script-boundary.assertScriptBoundary (cognitive 20) scripts/lib/install/opencode-script-boundary.js:71 — opencode-script-boundary.assertScriptBoundary has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 4 (6 pts), boolean chains 5, loops 1 (nesting depth added 6). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · validate-carrier-closure.extractReferences · ×1
  • validate-carrier-closure.extractReferences::visit (cognitive 20) scripts/ci/validate-carrier-closure.js:68 — validate-carrier-closure.extractReferences::visit has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 1 (4 pts), boolean chains 3 (nesting depth added 9). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · verify-release-gates.assessExactShaGates (cognitive 20) · ×1
  • verify-release-gates.assessExactShaGates (cognitive 20) REDACTED:265 — verify-release-gates.assessExactShaGates has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · verify-release-gates.waitForExactShaGates (cognitive 20) · ×1
  • verify-release-gates.waitForExactShaGates (cognitive 20) REDACTED:305 — verify-release-gates.waitForExactShaGates has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 1, error handling 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · proximity.parseDiffRanges (cognitive 20) · ×1
  • proximity.parseDiffRanges (cognitive 20) scripts/lib/control-pane/proximity.js:55 — proximity.parseDiffRanges has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 4, ternaries 1 (3 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-report.summarizeGroup (cognitive 20) · ×1
  • gateguard-report.summarizeGroup (cognitive 20) scripts/gateguard-report.js:97 — gateguard-report.summarizeGroup has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 5, loops 2 (4 pts), ternaries 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · state.getCoordinationState (cognitive 20) · ×1
  • state.getCoordinationState (cognitive 20) scripts/lib/github-coordination/state.js:37 — state.getCoordinationState has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 5 (12 pts), boolean chains 6, error handling 1, if/else 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · block-no-verify.sedExecParts (cognitive 20) · ×1
  • block-no-verify.sedExecParts (cognitive 20) scripts/hooks/block-no-verify.js:709 — block-no-verify.sedExecParts has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · block-no-verify.commandRole (cognitive 20) · ×1
  • block-no-verify.commandRole (cognitive 20) scripts/hooks/block-no-verify.js:787 — block-no-verify.commandRole has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 2 (4 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-code-lexer.batchCodeLines (cognitive 20) · ×1
  • gateguard-code-lexer.batchCodeLines (cognitive 20) REDACTED:558 — gateguard-code-lexer.batchCodeLines has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (5 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-file-context.shStartsFresh (cognitive 20) · ×1
  • gateguard-file-context.shStartsFresh (cognitive 20) scripts/lib/gateguard-file-context.js:639 — gateguard-file-context.shStartsFresh has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-file-context.trivialInFile (cognitive 20) · ×1
  • gateguard-file-context.trivialInFile (cognitive 20) scripts/lib/gateguard-file-context.js:830 — gateguard-file-context.trivialInFile has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 5, ternaries 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tracker.normalizeExecutionRecord (cognitive 20) · ×1
  • tracker.normalizeExecutionRecord (cognitive 20) scripts/lib/skill-evolution/tracker.js:45 — tracker.normalizeExecutionRecord has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 12, if/else 8. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · posttooluse-dispatcher.runHooks (cognitive 20) · ×1
  • posttooluse-dispatcher.runHooks (cognitive 20) scripts/hooks/posttooluse-dispatcher.js:233 — posttooluse-dispatcher.runHooks has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4, error handling 1 (2 pts), loops 1, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · pre-compact.selectActiveSessionPath (cognitive 20) · ×1
  • pre-compact.selectActiveSessionPath (cognitive 20) scripts/hooks/pre-compact.js:59 — pre-compact.selectActiveSessionPath has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 2 (5 pts), boolean chains 4, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · claude-plugin-setup.setupClaudePlugin (cognitive 20) · ×1
  • claude-plugin-setup.setupClaudePlugin (cognitive 20) scripts/lib/claude-plugin-setup.js:592 — claude-plugin-setup.setupClaudePlugin has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 8, ternaries 5 (7 pts), if/else 5 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · memory-vault.walkMemoryRoot · ×1
  • memory-vault.walkMemoryRoot::walk (cognitive 20) scripts/lib/memory-vault.js:363 — memory-vault.walkMemoryRoot::walk has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 3, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · nasiko-release.acquireLifecycleLock (cognitive 20) · ×1
  • nasiko-release.acquireLifecycleLock (cognitive 20) scripts/lib/nasiko-release.js:361 — nasiko-release.acquireLifecycleLock has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 4 (6 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mcp-inventory.formatHumanReport (cognitive 20) · ×1
  • mcp-inventory.formatHumanReport (cognitive 20) scripts/mcp-inventory.js:39 — mcp-inventory.formatHumanReport has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 4 (12 pts), loops 2 (4 pts), if/else 3, boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · work-items.assignOption (cognitive 20) · ×1
  • work-items.assignOption (cognitive 20) scripts/work-items.js:63 — work-items.assignOption has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17, boolean chains 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · prepareEnvironments (cognitive 20) · ×1
  • prepareEnvironments (cognitive 20) docker/context-profiles/ai-eval-lib.js:367 — prepareEnvironments has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (5 pts), error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 10). Most of this is not in the body itself: 3 of the 20 points are its own statements and the rest belongs to 5 function items inside it that branch (restore, verify, listing, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · runExistingHook (cognitive 20) · ×1
  • runExistingHook (cognitive 20) .cursor/hooks/adapter.js:176 — runExistingHook has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 7, ternaries 5 (7 pts), if/else 4, error handling 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · instinct-cli._cluster_by_keyword_overlap (cognitive 19) · ×1
  • instinct-cli._cluster_by_keyword_overlap (cognitive 19) skills/continuous-learning-v2/scripts/instinct-cli.py:1264 — instinct-cli._cluster_by_keyword_overlap has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 4 (6 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · contract.validate_provenance (cognitive 19) · ×1
  • contract.validate_provenance (cognitive 19) skills/taste-application/scripts/tasteforge/contract.py:258 — contract.validate_provenance has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (6 pts), boolean chains 4 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ai-eval-lib.steppedTrial (cognitive 19) · ×1
  • ai-eval-lib.steppedTrial (cognitive 19) docker/context-profiles/ai-eval-lib.js:712 — ai-eval-lib.steppedTrial has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 4 (9 pts), if/else 2 (4 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · context-profile-interactive.startInteractiveProfile (cognitive 19) · ×1
  • context-profile-interactive.startInteractiveProfile (cognitive 19) scripts/lib/context-profile-interactive.js:69 — context-profile-interactive.startInteractiveProfile has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 6 (7 pts), if/else 5 (6 pts), boolean chains 5, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · sandbox-smoke.smoke (cognitive 19) · ×1
  • sandbox-smoke.smoke (cognitive 19) docker/context-profiles/sandbox-smoke.js:37 — sandbox-smoke.smoke has cognitive complexity 19 (threshold 15). Drivers by points: loops 5 (11 pts), ternaries 2 (4 pts), if/else 1 (3 pts), boolean chains 1 (nesting depth added 10). Of this number, 16 points are the body's own statements and 3 belong to 3 function items inside it that branch. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · install-lifecycle.uninstallInstalledStates.results (cognitive 19) · ×1
  • install-lifecycle.uninstallInstalledStates.results (cognitive 19) scripts/lib/install-lifecycle.js:1916 — install-lifecycle.uninstallInstalledStates.results has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 4, loops 2, ternaries 2, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · scan-supply-chain-iocs.walkNodeModules (cognitive 19) · ×1
  • scan-supply-chain-iocs.walkNodeModules (cognitive 19) scripts/ci/scan-supply-chain-iocs.js:462 — scan-supply-chain-iocs.walkNodeModules has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (5 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · validate-skills.stripUnquotedYamlComment (cognitive 19) · ×1
  • validate-skills.stripUnquotedYamlComment (cognitive 19) scripts/ci/validate-skills.js:72 — validate-skills.stripUnquotedYamlComment has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 6, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · state.normalizeSession (cognitive 19) · ×1
  • state.normalizeSession (cognitive 19) scripts/lib/control-pane/state.js:157 — state.normalizeSession has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 13, ternaries 4 (6 pts) (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · projection.projectPairs (cognitive 19) · ×1
  • projection.projectPairs (cognitive 19) scripts/lib/agent-proximity/projection.js:227 — projection.projectPairs has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 7, loops 3 (5 pts), ternaries 4 (5 pts), if/else 2 (nesting depth added 3). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · actions.applySync (cognitive 19) · ×1
  • actions.applySync (cognitive 19) scripts/lib/github-coordination/actions.js:83 — actions.applySync has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 11, if/else 2 (5 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 4). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · actions.applyUnblock (cognitive 19) · ×1
  • actions.applyUnblock (cognitive 19) scripts/lib/github-coordination/actions.js:310 — actions.applyUnblock has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 3 (7 pts), if/else 3 (6 pts), boolean chains 5, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · harness-audit-consumer.toxInvokesPytest (cognitive 19) · ×1
  • harness-audit-consumer.toxInvokesPytest (cognitive 19) REDACTED:311 — harness-audit-consumer.toxInvokesPytest has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-file-context.psStartsFresh (cognitive 19) · ×1
  • gateguard-file-context.psStartsFresh (cognitive 19) scripts/lib/gateguard-file-context.js:757 — gateguard-file-context.psStartsFresh has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 4, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-change-profile.words (cognitive 19) · ×1
  • gateguard-change-profile.words (cognitive 19) scripts/lib/gateguard-change-profile.js:331 — gateguard-change-profile.words has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 12, if/else 3 (6 pts), loops 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · gateguard-readonly-shell.isReadOnlyGit (cognitive 19) · ×1
  • gateguard-readonly-shell.isReadOnlyGit (cognitive 19) scripts/lib/gateguard-readonly-shell.js:132 — gateguard-readonly-shell.isReadOnlyGit has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-search-filters.applyLongFilter (cognitive 19) · ×1
  • gateguard-search-filters.applyLongFilter (cognitive 19) scripts/lib/gateguard-search-filters.js:491 — gateguard-search-filters.applyLongFilter has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 9 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · gateguard-search-evidence.createSearchEvidence.shellSearchEvidence (cognitive 19) · ×1
  • gateguard-search-evidence.createSearchEvidence.shellSearchEvidence (cognitive 19) scripts/lib/gateguard-search-evidence.js:419 — gateguard-search-evidence.createSearchEvidence.shellSearchEvidence has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8, boolean chains 6, ternaries 5. Most of this is not in the body itself: 6 of the 19 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 430, 437). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · gateguard-search-evidence.createSearchEvidence.findCreditingSearch (cognitive 19) · ×1
  • gateguard-search-evidence.createSearchEvidence.findCreditingSearch (cognitive 19) scripts/lib/gateguard-search-evidence.js:509 — gateguard-search-evidence.createSearchEvidence.findCreditingSearch has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5, error handling 1, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-fact-force.pushTargetsSharedBranch (cognitive 19) · ×1
  • gateguard-fact-force.pushTargetsSharedBranch (cognitive 19) scripts/hooks/gateguard-fact-force.js:1069 — gateguard-fact-force.pushTargetsSharedBranch has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 4 (7 pts), loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · bash-hook-dispatcher.runHooks (cognitive 19) · ×1
  • bash-hook-dispatcher.runHooks (cognitive 19) scripts/hooks/bash-hook-dispatcher.js:123 — bash-hook-dispatcher.runHooks has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 3 (6 pts), error handling 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ecc-metrics-bridge.run (cognitive 19) · ×1
  • ecc-metrics-bridge.run (cognitive 19) scripts/hooks/ecc-metrics-bridge.js:202 — ecc-metrics-bridge.run has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 8, if/else 5 (7 pts), loops 1 (2 pts), error handling 1, ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mcp-health-check.attemptReconnect · ×1
  • mcp-health-check.attemptReconnect::splitReconnectCommand (cognitive 19) REDACTED:648 — mcp-health-check.attemptReconnect::splitReconnectCommand has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · agent-compress.extractSummary (cognitive 19) · ×1
  • agent-compress.extractSummary (cognitive 19) scripts/lib/agent-compress.js:53 — agent-compress.extractSummary has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.createPlanCanvasServer.serveArtifact (cognitive 19) · ×1
  • server.createPlanCanvasServer.serveArtifact (cognitive 19) REDACTED:605 — server.createPlanCanvasServer.serveArtifact has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 4, error handling 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · loop-status.parseArgs (cognitive 19) · ×1
  • loop-status.parseArgs (cognitive 19) scripts/loop-status.js:64 — loop-status.parseArgs has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 2, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · operator-readiness-dashboard.renderMarkdown (cognitive 19) · ×1
  • operator-readiness-dashboard.renderMarkdown (cognitive 19) scripts/operator-readiness-dashboard.js:1012 — operator-readiness-dashboard.renderMarkdown has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 10, boolean chains 4, loops 2 (3 pts), if/else 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · uninstall.main (cognitive 19) · ×1
  • uninstall.main (cognitive 19) scripts/uninstall.js:140 — uninstall.main has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 6, error handling 1, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · build-agreement.buildValues (cognitive 19) · ×1
  • build-agreement.buildValues (cognitive 19) skills/master-agreement-generator/scripts/build-agreement.js:79 — build-agreement.buildValues has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 12, if/else 4 (5 pts), loops 1, ternaries 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · check-console-log.main (cognitive 18) · ×1
  • check-console-log.main (cognitive 18) hooks/hermes/check-console-log.py:30 — check-console-log.main has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 5, error handling 2, loops 1, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · grader._check_temporal_order (cognitive 18) · ×1
  • grader._check_temporal_order (cognitive 18) skills/skill-comply/scripts/grader.py:28 — grader._check_temporal_order has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (18 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · workflow._build_effect_recipe (cognitive 18) · ×1
  • workflow._build_effect_recipe (cognitive 18) skills/taste-application/scripts/tasteforge/workflow.py:426 — workflow._build_effect_recipe has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 4, ternaries 2 (4 pts), loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · claude-settings.inspectManagedHooks (cognitive 18) · ×1
  • claude-settings.inspectManagedHooks (cognitive 18) scripts/lib/install/claude-settings.js:572 — claude-settings.inspectManagedHooks has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 3, loops 2 (3 pts), ternaries 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · context-profile-native.response (cognitive 18) · ×1
  • context-profile-native.response (cognitive 18) REDACTED:212 — context-profile-native.response has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 5 (8 pts), boolean chains 4, if/else 3 (4 pts), error handling 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · scope.defaultRunGit (cognitive 18) · ×1
  • scope.defaultRunGit (cognitive 18) scripts/lib/astra-review/scope.js:40 — scope.defaultRunGit has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 10, if/else 5 (6 pts), ternaries 1 (2 pts) (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · excluded-paths-reconciliation.completeExcludedPathsReconciliation (cognitive 18) · ×1
  • excluded-paths-reconciliation.completeExcludedPathsReconciliation (cognitive 18) scripts/lib/install/excluded-paths-reconciliation.js:161 — excluded-paths-reconciliation.completeExcludedPathsReconciliation has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 2 (4 pts), boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · apply.openCodeActivationCandidates (cognitive 18) · ×1
  • apply.openCodeActivationCandidates (cognitive 18) scripts/lib/install/apply.js:420 — apply.openCodeActivationCandidates has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 3 (4 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · catalog.parseArgs (cognitive 18) · ×1
  • catalog.parseArgs (cognitive 18) scripts/catalog.js:52 — catalog.parseArgs has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · scan-supply-chain-iocs.jsonReferencesPackageVersion (cognitive 18) · ×1
  • scan-supply-chain-iocs.jsonReferencesPackageVersion (cognitive 18) scripts/ci/scan-supply-chain-iocs.js:534 — scan-supply-chain-iocs.jsonReferencesPackageVersion has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 5, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · supply-chain-advisory-sources.buildAdvisorySourceReport (cognitive 18) · ×1
  • supply-chain-advisory-sources.buildAdvisorySourceReport (cognitive 18) scripts/ci/supply-chain-advisory-sources.js:304 — supply-chain-advisory-sources.buildAdvisorySourceReport has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 5, ternaries 3 (5 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · supply-chain-advisory-sources.parseArgs (cognitive 18) · ×1
  • supply-chain-advisory-sources.parseArgs (cognitive 18) scripts/ci/supply-chain-advisory-sources.js:369 — supply-chain-advisory-sources.parseArgs has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · validate-hooks.validateHarnessCompatibility (cognitive 18) · ×1
  • validate-hooks.validateHarnessCompatibility (cognitive 18) scripts/ci/validate-hooks.js:221 — validate-hooks.validateHarnessCompatibility has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (4 pts), boolean chains 3, ternaries 1 (nesting depth added 6). Of this number, 10 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · validate-skill-host-compat.validateSkillHostCompat (cognitive 18) · ×1
  • validate-skill-host-compat.validateSkillHostCompat (cognitive 18) scripts/ci/validate-skill-host-compat.js:319 — validate-skill-host-compat.validateSkillHostCompat has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 4, boolean chains 2, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · state.summarizeWorkItems (cognitive 18) · ×1
  • state.summarizeWorkItems (cognitive 18) scripts/lib/control-pane/state.js:510 — state.summarizeWorkItems has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 7, loops 1 (nesting depth added 5). Of this number, 16 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils.findFiles · ×1
  • utils.findFiles::searchDir (cognitive 18) REDACTED:304 — utils.findFiles::searchDir has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · block-no-verify.shellRole (cognitive 18) · ×1
  • block-no-verify.shellRole (cognitive 18) scripts/hooks/block-no-verify.js:524 — block-no-verify.shellRole has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-file-context.regexEnd (cognitive 18) · ×1
  • gateguard-file-context.regexEnd (cognitive 18) scripts/lib/gateguard-file-context.js:41 — gateguard-file-context.regexEnd has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-search-evidence.createSearchEvidence.segmentPipeFlags (cognitive 18) · ×1
  • gateguard-search-evidence.createSearchEvidence.segmentPipeFlags (cognitive 18) scripts/lib/gateguard-search-evidence.js:371 — gateguard-search-evidence.createSearchEvidence.segmentPipeFlags has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-fact-force.collectExecutableBodies (cognitive 18) · ×1
  • gateguard-fact-force.collectExecutableBodies (cognitive 18) scripts/hooks/gateguard-fact-force.js:1255 — gateguard-fact-force.collectExecutableBodies has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 4 (7 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · bash-hook-dispatcher.normalizeHookResult (cognitive 18) · ×1
  • bash-hook-dispatcher.normalizeHookResult (cognitive 18) scripts/hooks/bash-hook-dispatcher.js:90 — bash-hook-dispatcher.normalizeHookResult has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 5 (13 pts), boolean chains 3, if/else 2 (nesting depth added 8). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · session-start.summarizeActiveInstincts (cognitive 18) · ×1
  • session-start.summarizeActiveInstincts (cognitive 18) REDACTED:458 — session-start.summarizeActiveInstincts has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 5 (6 pts), boolean chains 4, loops 1 (nesting depth added 3). Of this number, 12 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · multi-harness-setup.readOwnedDestinations (cognitive 18) · ×1
  • multi-harness-setup.readOwnedDestinations (cognitive 18) scripts/lib/multi-harness-setup.js:174 — multi-harness-setup.readOwnedDestinations has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, error handling 1, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · install-apply.main (cognitive 18) · ×1
  • install-apply.main (cognitive 18) scripts/install-apply.js:157 — install-apply.main has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 4 (6 pts), boolean chains 4, error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · memory-mcp.executeMemoryTool (cognitive 18) · ×1
  • memory-mcp.executeMemoryTool (cognitive 18) scripts/memory-mcp.mjs:273 — memory-mcp.executeMemoryTool has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (6 pts), ternaries 1 (2 pts), error handling 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · status.main (cognitive 18) · ×1
  • status.main (cognitive 18) scripts/status.js:454 — status.main has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, ternaries 2, error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ledger.apply (cognitive 18) · ×1
  • ledger.apply (cognitive 18) REDACTED:422 — ledger.apply has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3, loops 2 (nesting depth added 6). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · renderBriefingBox (cognitive 18) · ×1
  • renderBriefingBox (cognitive 18) skills/ck/commands/shared.mjs:273 — renderBriefingBox has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 5, ternaries 3, other 1. Of this number, 16 points are the body's own statements and 2 belong to 4 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · instinct-cli._generate_evolved (cognitive 17) · ×1
  • instinct-cli._generate_evolved (cognitive 17) skills/continuous-learning-v2/scripts/instinct-cli.py:1956 — instinct-cli._generate_evolved has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (7 pts), if/else 3 (6 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · grader.grade (cognitive 17) · ×1
  • grader.grade (cognitive 17) skills/skill-comply/scripts/grader.py:119 — grader.grade has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 2 (3 pts), ternaries 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · resolve_ingest.detect_resolution (cognitive 17) · ×1
  • resolve_ingest.detect_resolution (cognitive 17) skills/taste-application/scripts/resolve_ingest.py:250 — resolve_ingest.detect_resolution has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · integration._snapshot (cognitive 17) · ×1
  • integration._snapshot (cognitive 17) skills/taste-application/scripts/tasteforge/integration.py:187 — integration._snapshot has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 3 (4 pts), boolean chains 2, error handling 1, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · workflow_graphs.main (cognitive 17) · ×1
  • workflow_graphs.main (cognitive 17) skills/taste-application/scripts/workflow_graphs.py:120 — workflow_graphs.main has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 2 (4 pts), error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · helpers.createInstallTargetAdapter (cognitive 17) · ×1
  • helpers.createInstallTargetAdapter (cognitive 17) scripts/lib/install-targets/helpers.js:319 — helpers.createInstallTargetAdapter has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, if/else 7, ternaries 2 (3 pts) (nesting depth added 1). Of this number, 13 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · context-carriers.validateEntryResources (cognitive 17) · ×1
  • context-carriers.validateEntryResources (cognitive 17) scripts/lib/context-carriers.js:38 — context-carriers.validateEntryResources has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · context-profile-native-discovery.discover (cognitive 17) · ×1
  • context-profile-native-discovery.discover (cognitive 17) scripts/lib/context-profile-native-discovery.js:14 — context-profile-native-discovery.discover has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), error handling 1 (2 pts), loops 2, boolean chains 1 (nesting depth added 6). None of this is in the body itself: all 17 points belong to 3 function items inside it that branch (a function literal at line 30, fail, a function literal at line 28). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · coverage.renderHoles (cognitive 17) · ×1
  • coverage.renderHoles (cognitive 17) docker/gateguard-effectiveness/coverage.js:182 — coverage.renderHoles has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (7 pts), loops 4 (5 pts), ternaries 4 (5 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · orchestration-session.parseWorkerStatus (cognitive 17) · ×1
  • orchestration-session.parseWorkerStatus (cognitive 17) scripts/lib/orchestration-session.js:58 — orchestration-session.parseWorkerStatus has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · auto-update.buildInstallApplyArgs (cognitive 17) · ×1
  • auto-update.buildInstallApplyArgs (cognitive 17) scripts/auto-update.js:84 — auto-update.buildInstallApplyArgs has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 3 (6 pts), if/else 5, boolean chains 3, loops 3 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · scan-supply-chain-iocs.walkFiles (cognitive 17) · ×1
  • scan-supply-chain-iocs.walkFiles (cognitive 17) scripts/ci/scan-supply-chain-iocs.js:436 — scan-supply-chain-iocs.walkFiles has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · validate-carrier-closure.inspectProjection (cognitive 17) · ×1
  • validate-carrier-closure.inspectProjection (cognitive 17) scripts/ci/validate-carrier-closure.js:119 — validate-carrier-closure.inspectProjection has cognitive complexity 17 (threshold 15). Drivers by points: loops 4 (7 pts), if/else 3 (5 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · validate-commands.validateFrontmatter (cognitive 17) · ×1
  • validate-commands.validateFrontmatter (cognitive 17) scripts/ci/validate-commands.js:15 — validate-commands.validateFrontmatter has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 6, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · codex-legacy-sync.beginLegacySyncState (cognitive 17) · ×1
  • codex-legacy-sync.beginLegacySyncState (cognitive 17) scripts/lib/codex-legacy-sync.js:231 — codex-legacy-sync.beginLegacySyncState has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 7 (9 pts), if/else 3 (4 pts), boolean chains 3, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · legacy-sync-state.main (cognitive 17) · ×1
  • legacy-sync-state.main (cognitive 17) scripts/codex/legacy-sync-state.js:19 — legacy-sync-state.main has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · consult.parseArgs (cognitive 17) · ×1
  • consult.parseArgs (cognitive 17) scripts/consult.js:192 — consult.parseArgs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · state.normalizeWorkItem (cognitive 17) · ×1
  • state.normalizeWorkItem (cognitive 17) scripts/lib/control-pane/state.js:468 — state.normalizeWorkItem has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, ternaries 8. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · state.buildControlPaneSnapshot (cognitive 17) · ×1
  • state.buildControlPaneSnapshot (cognitive 17) scripts/lib/control-pane/state.js:584 — state.buildControlPaneSnapshot has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 14, if/else 2, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · control-plane-view.buildInventoryManifest (cognitive 17) · ×1
  • control-plane-view.buildInventoryManifest (cognitive 17) scripts/lib/control-pane/control-plane-view.js:90 — control-plane-view.buildInventoryManifest has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, ternaries 8. Of this number, 9 points are the body's own statements and 8 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · utils.readStdinJson (cognitive 17) · ×1
  • utils.readStdinJson (cognitive 17) REDACTED:351 — utils.readStdinJson has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), error handling 2 (3 pts), ternaries 2 (3 pts) (nesting depth added 4). None of this is in the body itself: all 17 points belong to 4 function literals inside it that branch (lines 359, 400, 382, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · gateguard-eval.parseArgs (cognitive 17) · ×1
  • gateguard-eval.parseArgs (cognitive 17) scripts/dev/gateguard-eval.js:706 — gateguard-eval.parseArgs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 3, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ito-environment.createSafeItoEnvironment (cognitive 17) · ×1
  • ito-environment.createSafeItoEnvironment (cognitive 17) scripts/lib/ito-environment.js:56 — ito-environment.createSafeItoEnvironment has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 5 (8 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gemini-adapt-agents.adaptFrontmatter (cognitive 17) · ×1
  • gemini-adapt-agents.adaptFrontmatter (cognitive 17) scripts/gemini-adapt-agents.js:87 — gemini-adapt-agents.adaptFrontmatter has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · github-coordination.dispatchCommand (cognitive 17) · ×1
  • github-coordination.dispatchCommand (cognitive 17) scripts/github-coordination.js:118 — github-coordination.dispatchCommand has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (17 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · harness-adapter-compliance.parseArgs (cognitive 17) · ×1
  • harness-adapter-compliance.parseArgs (cognitive 17) scripts/harness-adapter-compliance.js:12 — harness-adapter-compliance.parseArgs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · block-no-verify.findGitBypassFlag (cognitive 17) · ×1
  • block-no-verify.findGitBypassFlag (cognitive 17) scripts/hooks/block-no-verify.js:250 — block-no-verify.findGitBypassFlag has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · pre-bash-commit-quality.runLinter (cognitive 17) · ×1
  • pre-bash-commit-quality.runLinter (cognitive 17) REDACTED:344 — pre-bash-commit-quality.runLinter has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), error handling 2 (4 pts), ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · powershell-destructive-command.startProcessPositionalArguments (cognitive 17) · ×1
  • powershell-destructive-command.startProcessPositionalArguments (cognitive 17) REDACTED:1688 — powershell-destructive-command.startProcessPositionalArguments has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-code-lexer.psQuoteEnd (cognitive 17) · ×1
  • gateguard-code-lexer.psQuoteEnd (cognitive 17) REDACTED:486 — gateguard-code-lexer.psQuoteEnd has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-file-context.cFamilyStartsFresh (cognitive 17) · ×1
  • gateguard-file-context.cFamilyStartsFresh (cognitive 17) scripts/lib/gateguard-file-context.js:393 — gateguard-file-context.cFamilyStartsFresh has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-file-context.shDoubleQuoteScan (cognitive 17) · ×1
  • gateguard-file-context.shDoubleQuoteScan (cognitive 17) scripts/lib/gateguard-file-context.js:564 — gateguard-file-context.shDoubleQuoteScan has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-change-profile.containerTouchesSurface (cognitive 17) · ×1
  • gateguard-change-profile.containerTouchesSurface (cognitive 17) scripts/lib/gateguard-change-profile.js:286 — gateguard-change-profile.containerTouchesSurface has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-change-profile.textTouchesData (cognitive 17) · ×1
  • gateguard-change-profile.textTouchesData (cognitive 17) scripts/lib/gateguard-change-profile.js:383 — gateguard-change-profile.textTouchesData has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 7, loops 1 (nesting depth added 4). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-search-filters.powershellSearchFilters (cognitive 17) · ×1
  • gateguard-search-filters.powershellSearchFilters (cognitive 17) scripts/lib/gateguard-search-filters.js:600 — gateguard-search-filters.powershellSearchFilters has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mcp-health-check.probeServer (cognitive 17) · ×1
  • mcp-health-check.probeServer (cognitive 17) REDACTED:551 — mcp-health-check.probeServer has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, if/else 4 (5 pts), ternaries 2 (4 pts), error handling 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · windows-bash.resolveWindowsBashCandidates (cognitive 17) · ×1
  • windows-bash.resolveWindowsBashCandidates (cognitive 17) scripts/lib/windows-bash.js:64 — windows-bash.resolveWindowsBashCandidates has cognitive complexity 17 (threshold 15). Drivers by points: loops 3 (6 pts), if/else 2 (5 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · observe-runner.run (cognitive 17) · ×1
  • observe-runner.run (cognitive 17) scripts/hooks/observe-runner.js:95 — observe-runner.run has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (7 pts), if/else 6, boolean chains 3, error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · session-activity-tracker.summarizeInput (cognitive 17) · ×1
  • session-activity-tracker.summarizeInput (cognitive 17) scripts/hooks/session-activity-tracker.js:522 — session-activity-tracker.summarizeInput has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 4, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · transcript-context.readLatestContextTokens (cognitive 17) · ×1
  • transcript-context.readLatestContextTokens (cognitive 17) scripts/lib/transcript-context.js:90 — transcript-context.readLatestContextTokens has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (6 pts), ternaries 3 (5 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · suggest-compact.main (cognitive 17) · ×1
  • suggest-compact.main (cognitive 17) scripts/hooks/suggest-compact.js:201 — suggest-compact.main has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, if/else 4, ternaries 3, loops 1 (2 pts), error handling 1 (nesting depth added 1). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · opencode.mapOpencodeServer (cognitive 17) · ×1
  • opencode.mapOpencodeServer (cognitive 17) scripts/lib/mcp-inventory/readers/opencode.js:15 — opencode.mapOpencodeServer has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 9 (12 pts), boolean chains 4, if/else 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · observations.createSkillObservation (cognitive 17) · ×1
  • observations.createSkillObservation (cognitive 17) REDACTED:33 — observations.createSkillObservation has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 10, ternaries 7. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · tmux-worktree-orchestrator.executePlan (cognitive 17) · ×1
  • tmux-worktree-orchestrator.executePlan (cognitive 17) scripts/lib/tmux-worktree-orchestrator.js:482 — tmux-worktree-orchestrator.executePlan has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 6, if/else 4 (6 pts), error handling 2 (3 pts), loops 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · git.createGitRunner.listWorktrees (cognitive 17) · ×1
  • git.createGitRunner.listWorktrees (cognitive 17) scripts/lib/worktree-lifecycle/git.js:64 — git.createGitRunner.listWorktrees has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · loop-status.extractToolResultIds (cognitive 17) · ×1
  • loop-status.extractToolResultIds (cognitive 17) scripts/loop-status.js:311 — loop-status.extractToolResultIds has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 5, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · memory.readBoundedStdin (cognitive 17) · ×1
  • memory.readBoundedStdin (cognitive 17) scripts/memory.js:151 — memory.readBoundedStdin has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 3, boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · memory.sanitizeTerminalText (cognitive 17) · ×1
  • memory.sanitizeTerminalText (cognitive 17) scripts/memory.js:269 — memory.sanitizeTerminalText has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · operator-readiness-dashboard.parseArgs (cognitive 17) · ×1
  • operator-readiness-dashboard.parseArgs (cognitive 17) scripts/operator-readiness-dashboard.js:96 — operator-readiness-dashboard.parseArgs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 2 (5 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · worktree-lifecycle.parseArgs (cognitive 17) · ×1
  • worktree-lifecycle.parseArgs (cognitive 17) scripts/worktree-lifecycle.js:6 — worktree-lifecycle.parseArgs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 4, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ito-baskets.buildRequest (cognitive 17) · ×1
  • ito-baskets.buildRequest (cognitive 17) skills/ito-baskets/scripts/ito-baskets.js:80 — ito-baskets.buildRequest has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 4, ternaries 3 (4 pts), loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · extract-pptx.extract_pptx (cognitive 16) · ×1
  • extract-pptx.extract_pptx (cognitive 16) skills/frontend-slides/scripts/extract-pptx.py:18 — extract-pptx.extract_pptx has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · apply._strict_assign (cognitive 16) · ×1
  • apply._strict_assign (cognitive 16) skills/taste-application/scripts/tasteforge/apply.py:55 — apply._strict_assign has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · integration._candidates (cognitive 16) · ×1
  • integration._candidates (cognitive 16) skills/taste-application/scripts/tasteforge/integration.py:281 — integration._candidates has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · workflow._stable_probe (cognitive 16) · ×1
  • workflow._stable_probe (cognitive 16) skills/taste-application/scripts/tasteforge/workflow.py:59 — workflow._stable_probe has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ollama._messages_payload (cognitive 16) · ×1
  • ollama._messages_payload (cognitive 16) REDACTED:34 — ollama._messages_payload has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 2 (3 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · claude-settings.uninstallManagedHooks (cognitive 16) · ×1
  • claude-settings.uninstallManagedHooks (cognitive 16) scripts/lib/install/claude-settings.js:624 — claude-settings.uninstallManagedHooks has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (6 pts), loops 4 (6 pts), boolean chains 3, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · hooks-config.withRefreshedFingerprints (cognitive 16) · ×1
  • hooks-config.withRefreshedFingerprints (cognitive 16) scripts/lib/hooks-config.js:226 — hooks-config.withRefreshedFingerprints has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (6 pts), boolean chains 5, loops 3, ternaries 1 (2 pts) (nesting depth added 4). Of this number, 12 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · context-profile-native.verifyNative (cognitive 16) · ×1
  • context-profile-native.verifyNative (cognitive 16) REDACTED:333 — context-profile-native.verifyNative has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · capsule.metadataFailure (cognitive 16) · ×1
  • capsule.metadataFailure (cognitive 16) scripts/lib/eval-harness/capsule.js:49 — capsule.metadataFailure has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 4, loops 3, ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · capsule.readJournal (cognitive 16) · ×1
  • capsule.readJournal (cognitive 16) scripts/lib/eval-harness/capsule.js:248 — capsule.readJournal has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 2 (3 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · astra-review.runCli (cognitive 16) · ×1
  • astra-review.runCli (cognitive 16) scripts/astra-review.js:189 — astra-review.runCli has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 6, ternaries 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · auto-update.printHuman (cognitive 16) · ×1
  • auto-update.printHuman (cognitive 16) scripts/auto-update.js:331 — auto-update.printHuman has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (7 pts), if/else 3 (4 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · catalog.main (cognitive 16) · ×1
  • catalog.main (cognitive 16) scripts/catalog.js:135 — catalog.main has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (15 pts), error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · supply-chain-advisory-sources.validateSources (cognitive 16) · ×1
  • supply-chain-advisory-sources.validateSources (cognitive 16) scripts/ci/supply-chain-advisory-sources.js:111 — supply-chain-advisory-sources.validateSources has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 7, boolean chains 4, if/else 2 (4 pts), loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · validate-skills.validateSkills (cognitive 16) · ×1
  • validate-skills.validateSkills (cognitive 16) scripts/ci/validate-skills.js:325 — validate-skills.validateSkills has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 4). Of this number, 13 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · codex-legacy-sync.stripMarkerBlock (cognitive 16) · ×1
  • codex-legacy-sync.stripMarkerBlock (cognitive 16) scripts/lib/codex-legacy-sync.js:404 — codex-legacy-sync.stripMarkerBlock has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 5, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dashboard-web.parseFrontmatter (cognitive 16) · ×1
  • dashboard-web.parseFrontmatter (cognitive 16) REDACTED:57 — dashboard-web.parseFrontmatter has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 4, error handling 1 (3 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-eval.measureColdLatency (cognitive 16) · ×1
  • gateguard-eval.measureColdLatency (cognitive 16) scripts/dev/gateguard-eval.js:339 — gateguard-eval.measureColdLatency has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (5 pts), error handling 1 (3 pts), loops 2 (3 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · parsing.renderCoordinationState (cognitive 16) · ×1
  • parsing.renderCoordinationState (cognitive 16) REDACTED:79 — parsing.renderCoordinationState has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 13, ternaries 3. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · file-lock.releaseOwnedLock (cognitive 16) · ×1
  • file-lock.releaseOwnedLock (cognitive 16) scripts/lib/state-store/file-lock.js:43 — file-lock.releaseOwnedLock has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), error handling 3 (4 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · harness-audit-consumer.getActivePytestConfig (cognitive 16) · ×1
  • harness-audit-consumer.getActivePytestConfig (cognitive 16) REDACTED:137 — harness-audit-consumer.getActivePytestConfig has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), error handling 2 (4 pts), boolean chains 3, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · block-no-verify.applyDeclarationFlag (cognitive 16) · ×1
  • block-no-verify.applyDeclarationFlag (cognitive 16) scripts/hooks/block-no-verify.js:934 — block-no-verify.applyDeclarationFlag has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 6 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · block-no-verify.checkCommand · ×1
  • block-no-verify.checkCommand::inspectState (cognitive 16) scripts/hooks/block-no-verify.js:1081 — block-no-verify.checkCommand::inspectState has cognitive complexity 16 (threshold 15). Drivers by points: loops 3 (6 pts), if/else 4 (5 pts), boolean chains 4, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · shell-substitution.readDollarSubstitution (cognitive 16) · ×1
  • shell-substitution.readDollarSubstitution (cognitive 16) scripts/lib/shell-substitution.js:23 — shell-substitution.readDollarSubstitution has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 6, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · powershell-destructive-command.collectStaticScalarAssignments (cognitive 16) · ×1
  • powershell-destructive-command.collectStaticScalarAssignments (cognitive 16) REDACTED:1257 — powershell-destructive-command.collectStaticScalarAssignments has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 4, boolean chains 2, ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · powershell-destructive-command.scanDeleteSegment (cognitive 16) · ×1
  • powershell-destructive-command.scanDeleteSegment (cognitive 16) REDACTED:1583 — powershell-destructive-command.scanDeleteSegment has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 5, loops 1 (nesting depth added 4). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · powershell-destructive-command.startProcessNamedTarget (cognitive 16) · ×1
  • powershell-destructive-command.startProcessNamedTarget (cognitive 16) REDACTED:1665 — powershell-destructive-command.startProcessNamedTarget has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-file-context.stepJs (cognitive 16) · ×1
  • gateguard-file-context.stepJs (cognitive 16) scripts/lib/gateguard-file-context.js:288 — gateguard-file-context.stepJs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 7 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · gateguard-file-context.pythonFieldStep (cognitive 16) · ×1
  • gateguard-file-context.pythonFieldStep (cognitive 16) scripts/lib/gateguard-file-context.js:426 — gateguard-file-context.pythonFieldStep has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-search-filters.applyShortFilter (cognitive 16) · ×1
  • gateguard-search-filters.applyShortFilter (cognitive 16) scripts/lib/gateguard-search-filters.js:520 — gateguard-search-filters.applyShortFilter has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · gateguard-search-evidence.createSearchEvidence.itemMiss (cognitive 16) · ×1
  • gateguard-search-evidence.createSearchEvidence.itemMiss (cognitive 16) scripts/lib/gateguard-search-evidence.js:542 — gateguard-search-evidence.createSearchEvidence.itemMiss has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, if/else 5, ternaries 2 (4 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · gateguard-fact-force.ddLauncherCommandIndex (cognitive 16) · ×1
  • gateguard-fact-force.ddLauncherCommandIndex (cognitive 16) scripts/hooks/gateguard-fact-force.js:655 — gateguard-fact-force.ddLauncherCommandIndex has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 3 (4 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateguard-fact-force.firstTouchSingleEdit (cognitive 16) · ×1
  • gateguard-fact-force.firstTouchSingleEdit (cognitive 16) scripts/hooks/gateguard-fact-force.js:2417 — gateguard-fact-force.firstTouchSingleEdit has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 3, boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · context-routing-index.readRoutingIndex (cognitive 16) · ×1
  • context-routing-index.readRoutingIndex (cognitive 16) scripts/lib/context-routing-index.js:135 — context-routing-index.readRoutingIndex has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 6. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ecc-context-monitor.run (cognitive 16) · ×1
  • ecc-context-monitor.run (cognitive 16) scripts/hooks/ecc-context-monitor.js:213 — ecc-context-monitor.run has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, if/else 5 (6 pts), ternaries 3, error handling 1 (nesting depth added 1). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · session-activity-tracker.collectFileEvents (cognitive 16) · ×1
  • session-activity-tracker.collectFileEvents (cognitive 16) scripts/hooks/session-activity-tracker.js:471 — session-activity-tracker.collectFileEvents has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · project-detect.getPythonDeps (cognitive 16) · ×1
  • project-detect.getPythonDeps (cognitive 16) scripts/lib/project-detect.js:198 — project-detect.getPythonDeps has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, error handling 2 (nesting depth added 6). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 206, 232). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · stop-format-typecheck.typecheckBatch (cognitive 16) · ×1
  • stop-format-typecheck.typecheckBatch (cognitive 16) REDACTED:139 — stop-format-typecheck.typecheckBatch has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 4, error handling 1, loops 1, ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · harness-capabilities.normalizeHarnessSelection (cognitive 16) · ×1
  • harness-capabilities.normalizeHarnessSelection (cognitive 16) scripts/lib/harness-capabilities.js:345 — harness-capabilities.normalizeHarnessSelection has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 2 (4 pts), boolean chains 3, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · agent-compress.parseFrontmatter (cognitive 16) · ×1
  • agent-compress.parseFrontmatter (cognitive 16) scripts/lib/agent-compress.js:11 — agent-compress.parseFrontmatter has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 3, error handling 1 (3 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · canonical-session.validateCanonicalSnapshot (cognitive 16) · ×1
  • canonical-session.validateCanonicalSnapshot (cognitive 16) scripts/lib/session-adapters/canonical-session.js:162 — canonical-session.validateCanonicalSnapshot has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, loops 2. Of this number, 11 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · canonical-session.normalizeDmuxSnapshot (cognitive 16) · ×1
  • canonical-session.normalizeDmuxSnapshot (cognitive 16) scripts/lib/session-adapters/canonical-session.js:426 — canonical-session.normalizeDmuxSnapshot has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, ternaries 8. Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 427). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · session-manager.parseSessionMetadata (cognitive 16) · ×1
  • session-manager.parseSessionMetadata (cognitive 16) scripts/lib/session-manager.js:237 — session-manager.parseSessionMetadata has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14 (16 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · plan-canvas.main (cognitive 16) · ×1
  • plan-canvas.main (cognitive 16) REDACTED:369 — plan-canvas.main has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 4, error handling 1, ternaries 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · welcome.parseArgs (cognitive 16) · ×1
  • welcome.parseArgs (cognitive 16) scripts/welcome.js:18 — welcome.parseArgs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · check-evidence.checkEvidence (cognitive 16) · ×1
  • check-evidence.checkEvidence (cognitive 16) skills/frontend-design-direction/scripts/check-evidence.js:13 — check-evidence.checkEvidence has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 8, boolean chains 5, if/else 3. Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 4 function items inside it that branch (check, a function literal at line 26, a function literal at line 32, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · ledger.replaceTable (cognitive 16) · ×1
  • ledger.replaceTable (cognitive 16) REDACTED:291 — ledger.replaceTable has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (6 pts), boolean chains 4, loops 2 (3 pts), ternaries 3 (nesting depth added 4). Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ledger.allocate (cognitive 16) · ×1
  • ledger.allocate (cognitive 16) REDACTED:362 — ledger.allocate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 4, error handling 1 (2 pts), loops 1 (nesting depth added 4). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D22 · Internal API Consistency · Inconsistent parameter naming in the `generate` method across provider implementations. The interface and some providers (Ollama, OpenAI, Claude) use the parameter name `input`, while others (Astraflow, Atlas) use `llm_input`. · ×1
  • Inconsistent parameter naming in the `generate` method across provider implementations. The interface and some providers (Ollama, OpenAI, Claude) use the parameter name `input`, while others (Astraflow, Atlas) use `llm_input`. — Standardize the parameter name to `llm_input` across all providers to match the type hint and improve clarity, or strictly adhere to `input` if preferred, but ensure all implementations match the interface signature exactly. (signatures: LLMProvider.generate(self, input: LLMInput): LLMOutput | OllamaProvider.generate(self, input: LLMInput): LLMOutput | OpenAIProvider.generate(self, input: LLMInput): LLMOutput | ClaudeProvider.generate(self, input: LLMInput): LLMOutput | _AstraflowBaseProvider.generate(self, llm_input: LLMInput): LLMOutput | AtlasProvider.generate(self, llm_input: LLMInput): LLMOutput)
D30 · Dependency Vulnerabilities · Medium advisory (unsound) · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Medium vulnerability · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member family (4 members, 7 shared lines) · ×1
  • Near-duplicate member family (4 members, 7 shared lines) skills/taste-application/scripts/taste/grade.py:212 — skills/taste-application/scripts/taste/grade.py:212-237 | skills/taste-application/scripts/taste/grade.py:607-639 | skills/taste-distillation/scripts/taste/grade.py:212-237 | skills/taste-distillation/scripts/taste/grade.py:607-639 — These 4 members are variants of one another: a block of 7 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member family (3 members, 18 shared lines) · ×1
  • Near-duplicate member family (3 members, 18 shared lines) skills/taste-application/scripts/taste/timeline.py:393 — skills/taste-application/scripts/taste/timeline.py:393-421 | skills/taste-application/scripts/tasteforge/export.py:206-226 | skills/taste-distillation/scripts/taste/timeline.py:393-421 — These 3 members are variants of one another: a block of 18 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times.
D4 · Code Duplication · Near-duplicate member pair (86 shared lines) · ×1
  • Near-duplicate member pair (86 shared lines) skills/taste-application/scripts/taste/assemble.py:83 — skills/taste-application/scripts/taste/assemble.py:83-174 | skills/taste-distillation/scripts/taste/assemble.py:83-174 — These two members are variants of one another: 86 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (69 shared lines) · ×1
  • Near-duplicate member pair (69 shared lines) skills/taste-application/scripts/taste/grade.py:411 — skills/taste-application/scripts/taste/grade.py:411-486 | skills/taste-distillation/scripts/taste/grade.py:411-486 — These two members are variants of one another: 69 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (56 shared lines) · ×1
  • Near-duplicate member pair (56 shared lines) pi/core/skills/agent-self-evaluation/scripts/evaluate.py:305 — pi/core/skills/agent-self-evaluation/scripts/evaluate.py:305-362 | skills/agent-self-evaluation/scripts/evaluate.py:305-362 — These two members are variants of one another: 56 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (52 shared lines) · ×1
  • Near-duplicate member pair (52 shared lines) ecc2/src/session/manager.rs:1559 — ecc2/src/session/manager.rs:1559-1694 | ecc2/src/session/manager.rs:3786-3892 — These two members are variants of one another: 52 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (49 shared lines) · ×1
  • Near-duplicate member pair (49 shared lines) ecc2/src/main.rs:6535 — ecc2/src/main.rs:6535-6635 | ecc2/src/main.rs:6821-6926 — These two members are variants of one another: 49 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (38 shared lines) · ×1
  • Near-duplicate member pair (38 shared lines) skills/taste-application/scripts/taste/render3d.py:92 — skills/taste-application/scripts/taste/render3d.py:92-131 | skills/taste-distillation/scripts/taste/render3d.py:92-131 — These two members are variants of one another: 38 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (28 shared lines) · ×1
  • Near-duplicate member pair (28 shared lines) skills/taste-application/scripts/taste/plates.py:208 — skills/taste-application/scripts/taste/plates.py:208-237 | skills/taste-distillation/scripts/taste/plates.py:208-237 — These two members are variants of one another: 28 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Edited copy of a member (35 corresponding lines) · ×1
  • Edited copy of a member (35 corresponding lines) skills/taste-application/scripts/taste/grade.py:499 — skills/taste-application/scripts/taste/grade.py:499-533 | skills/taste-distillation/scripts/taste/grade.py:499-533 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (111 corresponding lines) · ×1
  • Edited copy of a member (111 corresponding lines) skills/taste-application/scripts/taste/timeline.py:269 — skills/taste-application/scripts/taste/timeline.py:269-379 | skills/taste-distillation/scripts/taste/timeline.py:269-379 — These two members are one piece of code written twice and then edited apart: 111 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (14 corresponding lines) · ×1
  • Edited copy of a member (14 corresponding lines) skills/taste-application/scripts/mint.py:180 — skills/taste-application/scripts/mint.py:180-193 | skills/taste-distillation/scripts/mint.py:180-193 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (6 members, 50+ identical tokens) .agents/skills/docs-governance/scripts/audit-docs.py:246 — .agents/skills/docs-governance/scripts/audit-docs.py:246-264 | .agents/skills/docs-governance/scripts/audit-docs.py:297-326 | pi/core/skills/docs-governance/scripts/audit-docs.py:246-264 | pi/core/skills/docs-governance/scripts/audit-docs.py:297-326 | skills/docs-governance/scripts/audit-docs.py:246-264 | skills/docs-governance/scripts/audit-docs.py:297-326 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (4 members, 50+ identical tokens) pi/core/skills/agent-self-evaluation/scripts/evaluate.py:49 — pi/core/skills/agent-self-evaluation/scripts/evaluate.py:49-91 | pi/core/skills/agent-self-evaluation/scripts/evaluate.py:203-243 | skills/agent-self-evaluation/scripts/evaluate.py:49-91 | skills/agent-self-evaluation/scripts/evaluate.py:203-243 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×1
  • Duplicated block (22 lines × 2) ecc2/src/main.rs:3133 — ecc2/src/main.rs:3133-3154 | ecc2/src/main.rs:3286-3307 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (18–19 lines × 2) · ×1
  • Duplicated block (18–19 lines × 2) ecc2/src/main.rs:3162 — ecc2/src/main.rs:3162-3180 | ecc2/src/main.rs:3314-3331 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (18 lines × 3) · ×1
  • Duplicated block (18 lines × 3) ecc2/src/main.rs:5989 — ecc2/src/main.rs:5989-6006 | ecc2/src/main.rs:7046-7063 | ecc2/src/main.rs:7089-7106 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×1
  • Duplicated block (14–15 lines × 2) ecc2/src/tui/dashboard.rs:7026 — ecc2/src/tui/dashboard.rs:7026-7040 | ecc2/src/tui/dashboard.rs:7059-7072 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (11–14 lines × 2) · ×1
  • Duplicated block (11–14 lines × 2) ecc2/src/main.rs:6809 — ecc2/src/main.rs:6809-6819 | ecc2/src/main.rs:7010-7023 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (9–13 lines × 2) · ×1
  • Duplicated block (9–13 lines × 2) ecc2/src/tui/dashboard.rs:2905 — ecc2/src/tui/dashboard.rs:2905-2913 | ecc2/src/tui/dashboard.rs:2968-2980 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×1
  • Duplicated block (11–12 lines × 2) ecc2/src/main.rs:7758 — ecc2/src/main.rs:7758-7769 | ecc2/src/main.rs:7802-7812 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (8–11 lines × 2) · ×1
  • Duplicated block (8–11 lines × 2) ecc2/src/main.rs:7887 — ecc2/src/main.rs:7887-7894 | ecc2/src/main.rs:7915-7925 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (7–11 lines × 2) · ×1
  • Duplicated block (7–11 lines × 2) ecc2/src/session/manager.rs:1083 — ecc2/src/session/manager.rs:1083-1089 | ecc2/src/session/manager.rs:1104-1114 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (8–10 lines × 2) · ×1
  • Duplicated block (8–10 lines × 2) ecc2/src/worktree/mod.rs:1591 — ecc2/src/worktree/mod.rs:1591-1600 | ecc2/src/worktree/mod.rs:1612-1619 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (7–8 lines × 3) · ×1
  • Duplicated block (7–8 lines × 3) ecc2/src/comms/mod.rs:149 — ecc2/src/comms/mod.rs:149-156 | ecc2/src/main.rs:3838-3844 | ecc2/src/tui/dashboard.rs:8065-8072 — before extracting anything, compare `ecc2/src/main.rs` and `ecc2/src/tui/dashboard.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (6–7 lines × 3) · ×1
  • Duplicated block (6–7 lines × 3) REDACTED:948 — REDACTED:948-954 | REDACTED:1149-1154 | REDACTED:1824-1830 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (11 lines × 4) · ×1
  • Duplicated block (11 lines × 4) ecc2/src/worktree/mod.rs:1015 — ecc2/src/worktree/mod.rs:1015-1025 | ecc2/src/worktree/mod.rs:1040-1050 | ecc2/src/worktree/mod.rs:1110-1120 | ecc2/src/worktree/mod.rs:1450-1460 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (79–80 lines × 3) · ×1
  • Duplicated block (79–80 lines × 3) skills/taste-application/scripts/taste/timeline.py:295 — skills/taste-application/scripts/taste/timeline.py:295-374 | skills/taste-application/scripts/tasteforge/export.py:108-186 | skills/taste-distillation/scripts/taste/timeline.py:295-374 — before extracting anything, compare `skills/taste-application/scripts/taste/timeline.py` and `skills/taste-application/scripts/tasteforge/export.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (79 lines × 2) · ×1
  • Duplicated block (79 lines × 2) skills/taste-application/scripts/taste/grade.py:740 — skills/taste-application/scripts/taste/grade.py:740-818 | skills/taste-distillation/scripts/taste/grade.py:740-818 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 484 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (67 lines × 3) · ×1
  • Duplicated block (67 lines × 3) .agents/skills/docs-governance/scripts/markdown_links.py:78 — .agents/skills/docs-governance/scripts/markdown_links.py:78-144 | pi/core/skills/docs-governance/scripts/markdown_links.py:78-144 | skills/docs-governance/scripts/markdown_links.py:78-144 — before extracting anything, compare `.agents/skills/docs-governance/scripts/markdown_links.py` and `pi/core/skills/docs-governance/scripts/markdown_links.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (57 lines × 2) · ×1
  • Duplicated block (57 lines × 2) skills/taste-application/scripts/distill.py:328 — skills/taste-application/scripts/distill.py:328-384 | skills/taste-distillation/scripts/distill.py:328-384 — before extracting anything, compare `skills/taste-application/scripts/distill.py` and `skills/taste-distillation/scripts/distill.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 396 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (55 lines × 2) · ×1
  • Duplicated block (55 lines × 2) skills/taste-application/scripts/taste/plates.py:150 — skills/taste-application/scripts/taste/plates.py:150-204 | skills/taste-distillation/scripts/taste/plates.py:150-204 — before extracting anything, compare `skills/taste-application/scripts/taste/plates.py` and `skills/taste-distillation/scripts/taste/plates.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (53 lines × 2) · ×1
  • Duplicated block (53 lines × 2) skills/taste-application/scripts/distill.py:414 — skills/taste-application/scripts/distill.py:414-466 | skills/taste-distillation/scripts/distill.py:414-466 — before extracting anything, compare `skills/taste-application/scripts/distill.py` and `skills/taste-distillation/scripts/distill.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 396 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (51 lines × 3) · ×1
  • Duplicated block (51 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:522 — .agents/skills/docs-governance/scripts/audit-docs.py:522-572 | pi/core/skills/docs-governance/scripts/audit-docs.py:522-572 | skills/docs-governance/scripts/audit-docs.py:522-572 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (49 lines × 2) · ×1
  • Duplicated block (49 lines × 2) skills/taste-application/scripts/taste/cadence.py:280 — skills/taste-application/scripts/taste/cadence.py:280-328 | skills/taste-distillation/scripts/taste/cadence.py:280-328 — before extracting anything, compare `skills/taste-application/scripts/taste/cadence.py` and `skills/taste-distillation/scripts/taste/cadence.py` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 194 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (48 lines × 2) · ×1
  • Duplicated block (48 lines × 2) skills/taste-application/scripts/taste/cadence.py:144 — skills/taste-application/scripts/taste/cadence.py:144-191 | skills/taste-distillation/scripts/taste/cadence.py:144-191 — before extracting anything, compare `skills/taste-application/scripts/taste/cadence.py` and `skills/taste-distillation/scripts/taste/cadence.py` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 194 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (46 lines × 2) · ×1
  • Duplicated block (46 lines × 2) skills/taste-application/scripts/taste/assemble.py:205 — skills/taste-application/scripts/taste/assemble.py:205-250 | skills/taste-distillation/scripts/taste/assemble.py:205-250 — before extracting anything, compare `skills/taste-application/scripts/taste/assemble.py` and `skills/taste-distillation/scripts/taste/assemble.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 202 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (45 lines × 3) · ×1
  • Duplicated block (45 lines × 3) skills/taste-application/scripts/falapi.py:681 — skills/taste-application/scripts/falapi.py:681-725 | skills/taste-application/scripts/taste/falapi.py:681-725 | skills/taste-distillation/scripts/taste/falapi.py:681-725 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 378 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (44 lines × 2) · ×1
  • Duplicated block (44 lines × 2) pi/core/skills/agent-self-evaluation/scripts/evaluate.py:247 — pi/core/skills/agent-self-evaluation/scripts/evaluate.py:247-290 | skills/agent-self-evaluation/scripts/evaluate.py:247-290 — before extracting anything, compare `pi/core/skills/agent-self-evaluation/scripts/evaluate.py` and `skills/agent-self-evaluation/scripts/evaluate.py` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 279 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (41–43 lines × 4) · ×1
  • Duplicated block (41–43 lines × 4) pi/core/skills/agent-self-evaluation/scripts/evaluate.py:49 — pi/core/skills/agent-self-evaluation/scripts/evaluate.py:49-91 | pi/core/skills/agent-self-evaluation/scripts/evaluate.py:203-243 | skills/agent-self-evaluation/scripts/evaluate.py:49-91 | skills/agent-self-evaluation/scripts/evaluate.py:203-243 — before extracting anything, compare `pi/core/skills/agent-self-evaluation/scripts/evaluate.py` and `skills/agent-self-evaluation/scripts/evaluate.py` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 279 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (41 lines × 3) · ×1
  • Duplicated block (41 lines × 3) skills/taste-application/scripts/falapi.py:487 — skills/taste-application/scripts/falapi.py:487-527 | skills/taste-application/scripts/taste/falapi.py:487-527 | skills/taste-distillation/scripts/taste/falapi.py:487-527 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 378 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (36 lines × 3) · ×1
  • Duplicated block (36 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:715 — .agents/skills/docs-governance/scripts/audit-docs.py:715-750 | pi/core/skills/docs-governance/scripts/audit-docs.py:715-750 | skills/docs-governance/scripts/audit-docs.py:715-750 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (36 lines × 2) · ×1
  • Duplicated block (36 lines × 2) skills/taste-application/scripts/taste/grade.py:649 — skills/taste-application/scripts/taste/grade.py:649-684 | skills/taste-distillation/scripts/taste/grade.py:649-684 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 484 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (35 lines × 2) · ×1
  • Duplicated block (35 lines × 2) skills/taste-application/scripts/taste/grade.py:423 — skills/taste-application/scripts/taste/grade.py:423-457 | skills/taste-distillation/scripts/taste/grade.py:423-457 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 484 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (28–30 lines × 3) · ×1
  • Duplicated block (28–30 lines × 3) skills/taste-application/scripts/taste/timeline.py:207 — skills/taste-application/scripts/taste/timeline.py:207-236 | skills/taste-application/scripts/tasteforge/export.py:45-72 | skills/taste-distillation/scripts/taste/timeline.py:207-236 — before extracting anything, compare `skills/taste-application/scripts/taste/timeline.py` and `skills/taste-application/scripts/tasteforge/export.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (30 lines × 2) · ×1
  • Duplicated block (30 lines × 2) skills/taste-application/scripts/distill.py:224 — skills/taste-application/scripts/distill.py:224-253 | skills/taste-distillation/scripts/distill.py:224-253 — before extracting anything, compare `skills/taste-application/scripts/distill.py` and `skills/taste-distillation/scripts/distill.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 396 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (29 lines × 3) · ×1
  • Duplicated block (29 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:576 — .agents/skills/docs-governance/scripts/audit-docs.py:576-604 | pi/core/skills/docs-governance/scripts/audit-docs.py:576-604 | skills/docs-governance/scripts/audit-docs.py:576-604 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (29 lines × 2) · ×1
  • Duplicated block (29 lines × 2) skills/taste-application/scripts/taste/cadence.py:104 — skills/taste-application/scripts/taste/cadence.py:104-132 | skills/taste-distillation/scripts/taste/cadence.py:104-132 — before extracting anything, compare `skills/taste-application/scripts/taste/cadence.py` and `skills/taste-distillation/scripts/taste/cadence.py` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 194 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (15–28 lines × 3) · ×1
  • Duplicated block (15–28 lines × 3) skills/taste-application/scripts/taste/timeline.py:161 — skills/taste-application/scripts/taste/timeline.py:161-188 | skills/taste-application/scripts/tasteforge/timeline.py:83-97 | skills/taste-distillation/scripts/taste/timeline.py:161-188 — `skills/taste-application/scripts/taste/timeline.py` and `skills/taste-application/scripts/tasteforge/timeline.py` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 73 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `skills/taste-application/scripts/taste/timeline.py:161` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (27 lines × 3) · ×1
  • Duplicated block (27 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:297 — .agents/skills/docs-governance/scripts/audit-docs.py:297-323 | pi/core/skills/docs-governance/scripts/audit-docs.py:297-323 | skills/docs-governance/scripts/audit-docs.py:297-323 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (26 lines × 2) · ×1
  • Duplicated block (26 lines × 2) skills/taste-application/scripts/taste/assemble.py:254 — skills/taste-application/scripts/taste/assemble.py:254-279 | skills/taste-distillation/scripts/taste/assemble.py:254-279 — before extracting anything, compare `skills/taste-application/scripts/taste/assemble.py` and `skills/taste-distillation/scripts/taste/assemble.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 202 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (23 lines × 3) · ×1
  • Duplicated block (23 lines × 3) .agents/skills/docs-governance/scripts/audit-docs.py:646 — .agents/skills/docs-governance/scripts/audit-docs.py:646-668 | pi/core/skills/docs-governance/scripts/audit-docs.py:646-668 | skills/docs-governance/scripts/audit-docs.py:646-668 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (17–19 lines × 3) · ×1
  • Duplicated block (17–19 lines × 3) skills/taste-application/scripts/apply.py:591 — skills/taste-application/scripts/apply.py:591-609 | skills/taste-application/scripts/distill.py:495-511 | skills/taste-distillation/scripts/distill.py:495-511 — before extracting anything, compare `skills/taste-application/scripts/distill.py` and `skills/taste-distillation/scripts/distill.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 396 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `skills/taste-application/scripts/apply.py:591` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (19 lines × 3) · ×1
  • Duplicated block (19 lines × 3) skills/taste-application/scripts/falapi.py:766 — skills/taste-application/scripts/falapi.py:766-784 | skills/taste-application/scripts/taste/falapi.py:766-784 | skills/taste-distillation/scripts/taste/falapi.py:766-784 — before extracting anything, compare `skills/taste-application/scripts/falapi.py` and `skills/taste-application/scripts/taste/falapi.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 378 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (12–18 lines × 3) · ×1
  • Duplicated block (12–18 lines × 3) skills/taste-application/scripts/taste/timeline.py:79 — skills/taste-application/scripts/taste/timeline.py:79-96 | skills/taste-application/scripts/tasteforge/timeline.py:34-45 | skills/taste-distillation/scripts/taste/timeline.py:79-96 — `skills/taste-application/scripts/taste/timeline.py` and `skills/taste-application/scripts/tasteforge/timeline.py` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 73 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (15–18 lines × 2) · ×1
  • Duplicated block (15–18 lines × 2) skills/skill-comply/scripts/classifier.py:41 — skills/skill-comply/scripts/classifier.py:41-58 | skills/skill-comply/scripts/scenario_generator.py:36-50 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `skills/skill-comply/scripts/classifier.py:41` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (17 lines × 3) · ×1
  • Duplicated block (17 lines × 3) .agents/skills/docs-governance/scripts/markdown_links.py:181 — .agents/skills/docs-governance/scripts/markdown_links.py:181-197 | pi/core/skills/docs-governance/scripts/markdown_links.py:181-197 | skills/docs-governance/scripts/markdown_links.py:181-197 — before extracting anything, compare `.agents/skills/docs-governance/scripts/markdown_links.py` and `pi/core/skills/docs-governance/scripts/markdown_links.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 153 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `.agents/skills/docs-governance/scripts/markdown_links.py:181` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11–13 lines × 3) · ×1
  • Duplicated block (11–13 lines × 3) skills/taste-application/scripts/distill.py:249 — skills/taste-application/scripts/distill.py:249-259 | skills/taste-application/scripts/tasteforge/distill.py:135-147 | skills/taste-distillation/scripts/distill.py:249-259 — before extracting anything, compare `skills/taste-application/scripts/distill.py` and `skills/taste-distillation/scripts/distill.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 396 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `skills/taste-application/scripts/distill.py:260` calls `max` and `skills/taste-application/scripts/tasteforge/distill.py:149` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (13 lines × 3) · ×1
  • Duplicated block (13 lines × 3) skills/taste-application/scripts/taste/timeline.py:403 — skills/taste-application/scripts/taste/timeline.py:403-415 | skills/taste-application/scripts/tasteforge/export.py:208-220 | skills/taste-distillation/scripts/taste/timeline.py:403-415 — before extracting anything, compare `skills/taste-application/scripts/taste/timeline.py` and `skills/taste-application/scripts/tasteforge/export.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `skills/taste-application/scripts/taste/timeline.py:403` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6–10 lines × 3) · ×1
  • Duplicated block (6–10 lines × 3) skills/taste-application/scripts/distill.py:264 — skills/taste-application/scripts/distill.py:264-269 | skills/taste-application/scripts/tasteforge/distill.py:149-158 | skills/taste-distillation/scripts/distill.py:264-269 — before extracting anything, compare `skills/taste-application/scripts/distill.py` and `skills/taste-distillation/scripts/distill.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 396 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `skills/taste-application/scripts/distill.py:264` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `skills/taste-application/scripts/distill.py:260` calls `max` and `skills/taste-application/scripts/tasteforge/distill.py:147` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (9 lines × 6) · ×1
  • Duplicated block (9 lines × 6) .agents/skills/docs-governance/scripts/audit-docs.py:256 — .agents/skills/docs-governance/scripts/audit-docs.py:256-264 | .agents/skills/docs-governance/scripts/audit-docs.py:318-326 | pi/core/skills/docs-governance/scripts/audit-docs.py:256-264 | pi/core/skills/docs-governance/scripts/audit-docs.py:318-326 | skills/docs-governance/scripts/audit-docs.py:256-264 | skills/docs-governance/scripts/audit-docs.py:318-326 — before extracting anything, compare `.agents/skills/docs-governance/scripts/audit-docs.py` and `pi/core/skills/docs-governance/scripts/audit-docs.py` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 546 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (2–7 lines × 4) · ×1
  • Duplicated block (2–7 lines × 4) skills/taste-application/scripts/taste/grade.py:223 — skills/taste-application/scripts/taste/grade.py:223-224 | skills/taste-application/scripts/taste/grade.py:619-625 | skills/taste-distillation/scripts/taste/grade.py:223-224 | skills/taste-distillation/scripts/taste/grade.py:619-625 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 484 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `skills/taste-application/scripts/taste/grade.py:619` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (5 lines × 4) · ×1
  • Duplicated block (5 lines × 4) skills/taste-application/scripts/taste/grade.py:228 — skills/taste-application/scripts/taste/grade.py:228-232 | skills/taste-application/scripts/taste/grade.py:630-634 | skills/taste-distillation/scripts/taste/grade.py:228-232 | skills/taste-distillation/scripts/taste/grade.py:630-634 — before extracting anything, compare `skills/taste-application/scripts/taste/grade.py` and `skills/taste-distillation/scripts/taste/grade.py` as WHOLE FILES: this scan already matched 30 separate duplicated blocks between them, totalling at least 484 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D44 · Platform End-of-Life · End-of-life runtime · ×1
  • End-of-life runtime: Node.js 20 .tool-versions:1 — .tool-versions declares Node.js 20 as this project's version file, and Node.js 20, support ended 2026-04-30. An unsupported runtime receives no security patches, so every vulnerability disclosed in it since 2026-04-30 is present and unfixable without moving off it. This is a migration rather than an upgrade: there is no newer release of a runtime that has ended.
D6 · Cohesion (LCOM4) · Low cohesion · ×1
  • Low cohesion: Config (LCOM4 4) ecc2/src/config/mod.rs:220 — Config's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
R1 · Type Safety · Type Safety · ×1
  • Type Safety — 4 typed · 979 plain JS — the untyped files are docker/context-profiles/ai-eval-lib.js, docker/context-profiles/ai-eval.js, docker/context-profiles/complex-eval/build-corpus.js, docker/context-profiles/complex-eval/calibrate-stats.js, docker/context-profiles/complex-eval/cases/incident-triage/check.cjs, docker/context-profiles/complex-eval/cases/incident-triage/files/src/inventory-client.js (+973 more).
R10 · Code Duplication · Forked directory tree (31 identical files, ~848 lines × 2 trees) · ×1
  • Forked directory tree (31 identical files, ~848 lines × 2 trees) docker/context-profiles/complex-eval/cases3/idempotent-webhooks/check.cjs:1 — docker/context-profiles/complex-eval/cases3/ and docker/context-profiles/complex-eval/cases4/ are near-verbatim copies of each other: 31 files are byte-identical under the same relative paths (~848 lines; the trees hold 32 and 48 files). That is one structural fact, not 31 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place.
R10 · Code Duplication · Forked directory tree (15 identical files, ~674 lines × 2 trees) · ×1
  • Forked directory tree (15 identical files, ~674 lines × 2 trees) docker/context-profiles/complex-eval/reference3/chained-tickets/test/links.test.js:1 — docker/context-profiles/complex-eval/reference3/ and docker/context-profiles/complex-eval/reference4/ are near-verbatim copies of each other: 15 files are byte-identical under the same relative paths (~674 lines; the trees hold 15 and 21 files). That is one structural fact, not 15 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place.
R10 · Code Duplication · Duplication concentrated across 8 sibling directories (24 clone groups) · ×1
  • Duplication concentrated across 8 sibling directories (24 clone groups) docker/context-profiles/complex-eval/cases3/production-ready/check.cjs:4 — 24 duplicated blocks under docker/context-profiles/complex-eval/ have copies in at least two of the sibling directories cases, cases2, cases3, cases4, reference, reference2 (+2 more sibling(s) not listed) — 23 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 24 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 24 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 24 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 3 sibling directories (22 clone groups) · ×1
  • Duplication concentrated across 3 sibling directories (22 clone groups) docker/gateguard-effectiveness/run-intent.js:375 — 22 duplicated blocks under the repository root have copies in at least two of the sibling directories docker, scripts, skills — 19 of them are reported below, and 3 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 22 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 22 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 22 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 4 sibling directories (18 clone groups) · ×1
  • Duplication concentrated across 4 sibling directories (18 clone groups) scripts/hooks/ecc-context-monitor.js:64 — 18 duplicated blocks under scripts/ have copies in at least two of the sibling directories ci, codemaps, hooks, lib — 13 of them are reported below, and 5 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 18 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 18 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 18 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 5 sibling directories (6 clone groups) · ×1
  • Duplication concentrated across 5 sibling directories (6 clone groups) scripts/lib/install-targets/cursor-project.js:20 — 6 duplicated blocks under scripts/lib/ have copies in at least two of the sibling directories control-pane, eval-harness, install, install-targets, skill-evolution — 4 of them are reported below, and 2 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 6 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 6 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 6 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplicated block with local edits (200 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (200 matched lines × 2 locations) scripts/preview-pack-smoke.js:91 — scripts/preview-pack-smoke.js:91 · scripts/release-approval-gate.js:104 — the two spans are one implementation copied and then locally edited — 1146 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (192 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (192 matched lines × 2 locations) scripts/lib/session-adapters/codex-worktree.js:12 — scripts/lib/session-adapters/codex-worktree.js:12 · scripts/lib/session-adapters/opencode.js:12 — the two spans are one implementation copied and then locally edited — 1189 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (128 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (128 matched lines × 2 locations) docker/context-profiles/complex-eval/cases4/recurring-incident/steps/01-refund-retry/check.cjs:20 — docker/context-profiles/complex-eval/cases4/recurring-incident/steps/01-refund-retry/check.cjs:20 · docker/context-profiles/complex-eval/cases4/recurring-incident/steps/02-payout-storm/check.cjs:17 — the two spans are one implementation copied and then locally edited — 1314 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (122 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (122 matched lines × 2 locations) docker/gateguard-effectiveness/run-intent.js:51 — docker/gateguard-effectiveness/run-intent.js:51 · docker/gateguard-effectiveness/run.js:36 — the two spans are one implementation copied and then locally edited — 1310 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (109 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (109 matched lines × 2 locations) scripts/discussion-audit.js:217 — scripts/discussion-audit.js:217 · scripts/operator-readiness-dashboard.js:965 — the two spans are one implementation copied and then locally edited — 607 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Wholesale file copy (93 identical lines × 2 files) · ×1
  • Wholesale file copy (93 identical lines × 2 files) docker/context-profiles/complex-eval/cases3/production-ready/check.cjs:4 — docker/context-profiles/complex-eval/cases3/production-ready/check.cjs:4 · docker/context-profiles/complex-eval/cases4/production-ready/check.cjs:4 — these 2 files are line-for-line copies of one another — 93 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Duplicated block with local edits (91 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (91 matched lines × 2 locations) scripts/gemini-adapt-agents.js:37 — scripts/gemini-adapt-agents.js:37 · scripts/qwen-adapt-agents.js:74 — the two spans are one implementation copied and then locally edited — 553 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Wholesale file copy (88 identical lines × 2 files) · ×1
  • Wholesale file copy (88 identical lines × 2 files) docker/context-profiles/complex-eval/cases3/idempotent-webhooks/check.cjs:5 — docker/context-profiles/complex-eval/cases3/idempotent-webhooks/check.cjs:5 · docker/context-profiles/complex-eval/cases4/idempotent-webhooks/check.cjs:5 — these 2 files are line-for-line copies of one another — 88 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Wholesale file copy (79 identical lines × 2 files) · ×1
  • Wholesale file copy (79 identical lines × 2 files) docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:4 — docker/context-profiles/complex-eval/cases3/chained-tickets/steps/02-persistence/check.cjs:4 · docker/context-profiles/complex-eval/cases4/chained-tickets/steps/02-persistence/check.cjs:4 — these 2 files are line-for-line copies of one another — 79 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Wholesale file copy (77 identical lines × 2 files) · ×1
  • Wholesale file copy (77 identical lines × 2 files) docker/context-profiles/complex-eval/cases3/chained-tickets/steps/01-core/check.cjs:3 — docker/context-profiles/complex-eval/cases3/chained-tickets/steps/01-core/check.cjs:3 · docker/context-profiles/complex-eval/cases4/chained-tickets/steps/01-core/check.cjs:3 — these 2 files are line-for-line copies of one another — 77 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Wholesale file copy (69 identical lines × 2 files) · ×1
  • Wholesale file copy (69 identical lines × 2 files) docker/context-profiles/complex-eval/reference3/production-ready/src/app.js:2 — docker/context-profiles/complex-eval/reference3/production-ready/src/app.js:2 · docker/context-profiles/complex-eval/reference4/production-ready/src/app.js:2 — these 2 files are line-for-line copies of one another — 69 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Duplicated block with local edits (69 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (69 matched lines × 2 locations) scripts/discussion-audit.js:65 — scripts/discussion-audit.js:65 · scripts/platform-audit.js:77 — the two spans are one implementation copied and then locally edited — 428 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Wholesale file copy (67 identical lines × 2 files) · ×1
  • Wholesale file copy (67 identical lines × 2 files) docker/context-profiles/complex-eval/cases3/chained-tickets/steps/04-analytics/check.cjs:4 — docker/context-profiles/complex-eval/cases3/chained-tickets/steps/04-analytics/check.cjs:4 · docker/context-profiles/complex-eval/cases4/chained-tickets/steps/04-analytics/check.cjs:4 — these 2 files are line-for-line copies of one another — 67 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Duplicated block with local edits (64 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (64 matched lines × 2 locations) docker/context-profiles/complex-eval/cases/sentinel-api/files/src/app.js:29 — docker/context-profiles/complex-eval/cases/sentinel-api/files/src/app.js:29 · docker/context-profiles/complex-eval/reference/sentinel-api/src/app.js:45 — the two spans are one implementation copied and then locally edited — 538 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Wholesale file copy (62 identical lines × 2 files) · ×1
  • Wholesale file copy (62 identical lines × 2 files) REDACTED:4 — REDACTED:4 · REDACTED:4 — these 2 files are line-for-line copies of one another — 62 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Wholesale file copy (59 identical lines × 2 files) · ×1
  • Wholesale file copy (59 identical lines × 2 files) docker/context-profiles/complex-eval/reference3/idempotent-webhooks/src/app.js:2 — docker/context-profiles/complex-eval/reference3/idempotent-webhooks/src/app.js:2 · docker/context-profiles/complex-eval/reference4/idempotent-webhooks/src/app.js:2 — these 2 files are line-for-line copies of one another — 59 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Duplicated block with local edits (56 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (56 matched lines × 2 locations) scripts/repair.js:20 — scripts/repair.js:20 · scripts/uninstall.js:30 — the two spans are one implementation copied and then locally edited — 407 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (54 lines × 2 locations) · ×1
  • Duplicated block (54 lines × 2 locations) REDACTED:251 — REDACTED:251 · REDACTED:346 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Wholesale file copy (53 identical lines × 2 files) · ×1
  • Wholesale file copy (53 identical lines × 2 files) scripts/lib/install-targets/claude-home.js:1 — scripts/lib/install-targets/claude-home.js:1 · scripts/lib/install-targets/claude-project.js:1 — these 2 files are line-for-line copies of one another — 53 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Duplicated block (45 lines × 2 locations) · ×1
  • Duplicated block (45 lines × 2 locations) docker/context-profiles/complex-eval/cases3/idempotent-webhooks/files/src/app.js:8 — docker/context-profiles/complex-eval/cases3/idempotent-webhooks/files/src/app.js:8 · docker/context-profiles/complex-eval/cases4/idempotent-webhooks/files/src/app.js:8 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block with local edits (43 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (43 matched lines × 2 locations) scripts/orchestration-status.js:11 — scripts/orchestration-status.js:11 · scripts/session-inspect.js:30 — the two spans are one implementation copied and then locally edited — 249 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (42 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (42 matched lines × 2 locations) scripts/lib/install/excluded-paths-reconciliation.js:116 — scripts/lib/install/excluded-paths-reconciliation.js:116 · scripts/lib/install/opencode-legacy-migration.js:113 — the two spans are one implementation copied and then locally edited — 300 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (41 lines × 2 locations) · ×1
  • Duplicated block (41 lines × 2 locations) docker/context-profiles/complex-eval/cases3/production-ready/files/src/app.js:8 — docker/context-profiles/complex-eval/cases3/production-ready/files/src/app.js:8 · docker/context-profiles/complex-eval/cases4/production-ready/files/src/app.js:8 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block with local edits (37 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (37 matched lines × 2 locations) docker/context-profiles/complex-eval/cases/webhook-relay/files/src/app.js:14 — docker/context-profiles/complex-eval/cases/webhook-relay/files/src/app.js:14 · docker/context-profiles/complex-eval/reference/webhook-relay/src/app.js:34 — the two spans are one implementation copied and then locally edited — 328 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (34 lines × 2 locations) · ×1
  • Duplicated block (34 lines × 2 locations) scripts/hooks/pre-bash-git-push-reminder.js:17 — scripts/hooks/pre-bash-git-push-reminder.js:17 · scripts/hooks/pre-bash-tmux-reminder.js:22 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (34 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (34 matched lines × 2 locations) scripts/lib/shell-substitution.js:174 — scripts/lib/shell-substitution.js:174 · scripts/lib/shell-substitution.js:262 — the two spans are one implementation copied and then locally edited — 226 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (33 lines × 2 locations) · ×1
  • Duplicated block (33 lines × 2 locations) scripts/lib/github-discussions.js:15 — scripts/lib/github-discussions.js:15 · scripts/platform-audit.js:222 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (30 lines × 2 locations) · ×1
  • Duplicated block (30 lines × 2 locations) REDACTED:495 — REDACTED:495 · REDACTED:584 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block with local edits (28 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (28 matched lines × 2 locations) scripts/harness-audit.js:129 — scripts/harness-audit.js:129 · scripts/observability-readiness.js:68 — the two spans are one implementation copied and then locally edited — 146 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (28 lines × 2 locations) · ×1
  • Duplicated block (28 lines × 2 locations) scripts/operator-readiness-dashboard.js:29 — scripts/operator-readiness-dashboard.js:29 · scripts/platform-audit.js:37 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R2 · Cyclomatic Complexity · Complex function runTests (cyclomatic 279, cognitive 537) · ×1
  • Complex function runTests (cyclomatic 279, cognitive 537) tests/hooks/gateguard-fact-force.test.js:738 — runTests has cyclomatic complexity 279 and cognitive complexity 537; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function runTests (cyclomatic 268, cognitive 525) · ×1
  • Complex function runTests (cyclomatic 268, cognitive 525) tests/hooks/hooks.test.js:374 — runTests has cyclomatic complexity 268 and cognitive complexity 525; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function runTests (cyclomatic 197, cognitive 391) · ×1
  • Complex function runTests (cyclomatic 197, cognitive 391) tests/lib/utils.test.js:30 — runTests has cyclomatic complexity 197 and cognitive complexity 391; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function runTests (cyclomatic 180, cognitive 352) · ×1
  • Complex function runTests (cyclomatic 180, cognitive 352) tests/lib/session-manager.test.js:42 — runTests has cyclomatic complexity 180 and cognitive complexity 352; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function runTests (cyclomatic 118, cognitive 233) · ×1
  • Complex function runTests (cyclomatic 118, cognitive 233) tests/lib/package-manager.test.js:68 — runTests has cyclomatic complexity 118 and cognitive complexity 233; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function runTests (cyclomatic 116, cognitive 228) · ×1
  • Complex function runTests (cyclomatic 116, cognitive 228) tests/lib/session-aliases.test.js:52 — runTests has cyclomatic complexity 116 and cognitive complexity 228; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function runTests (cyclomatic 75, cognitive 147) · ×1
  • Complex function runTests (cyclomatic 75, cognitive 147) tests/lib/install-lifecycle.test.js:333 — runTests has cyclomatic complexity 75 and cognitive complexity 147; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function runTests (cyclomatic 65, cognitive 127) · ×1
  • Complex function runTests (cyclomatic 65, cognitive 127) tests/hooks/hook-flags.test.js:64 — runTests has cyclomatic complexity 65 and cognitive complexity 127; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function resolveTaskContext (cyclomatic 64, cognitive 46) · ×1
  • Complex function resolveTaskContext (cyclomatic 64, cognitive 46) scripts/lib/context-selection.js:333 — resolveTaskContext has cyclomatic complexity 64 and cognitive complexity 46; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function runTests (cyclomatic 62, cognitive 121) · ×1
  • Complex function runTests (cyclomatic 62, cognitive 121) tests/lib/plan-canvas-markdown.test.js:26 — runTests has cyclomatic complexity 62 and cognitive complexity 121; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function validate (cyclomatic 60, cognitive 114) · ×1
  • Complex function validate (cyclomatic 60, cognitive 114) scripts/lib/install-state.js:43 — validate has cyclomatic complexity 60 and cognitive complexity 114; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function runTests (cyclomatic 55, cognitive 107) · ×1
  • Complex function runTests (cyclomatic 55, cognitive 107) tests/lib/install-targets.test.js:35 — runTests has cyclomatic complexity 55 and cognitive complexity 107; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function execute (cyclomatic 52, cognitive 73) · ×1
  • Complex function execute (cyclomatic 52, cognitive 73) scripts/lib/context-profile-commands.js:81 — execute has cyclomatic complexity 52 and cognitive complexity 73; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function handle (cyclomatic 52, cognitive 55) · ×1
  • Complex function handle (cyclomatic 52, cognitive 55) scripts/memory-mcp.mjs:365 — handle has cyclomatic complexity 52 and cognitive complexity 55; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function runTests (cyclomatic 51, cognitive 100) · ×1
  • Complex function runTests (cyclomatic 51, cognitive 100) tests/scripts/install-apply.test.js:104 — runTests has cyclomatic complexity 51 and cognitive complexity 100; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function validateInstallManifests (cyclomatic 51, cognitive 90) · ×1
  • Complex function validateInstallManifests (cyclomatic 51, cognitive 90) scripts/ci/validate-install-manifests.js:71 — validateInstallManifests has cyclomatic complexity 51 and cognitive complexity 90; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function runTests (cyclomatic 48, cognitive 93) · ×1
  • Complex function runTests (cyclomatic 48, cognitive 93) tests/lib/selective-install.test.js:46 — runTests has cyclomatic complexity 48 and cognitive complexity 93; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function uninstallLegacyCodexSync (cyclomatic 47, cognitive 78) · ×1
  • Complex function uninstallLegacyCodexSync (cyclomatic 47, cognitive 78) scripts/lib/codex-legacy-sync.js:521 — uninstallLegacyCodexSync has cyclomatic complexity 47 and cognitive complexity 78; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files · docker/context-profiles/ai-eval-lib.js · ×1
  • docker/context-profiles/ai-eval-lib.js: 895 lines of code docker/context-profiles/ai-eval-lib.js:1 — docker/context-profiles/ai-eval-lib.js has 895 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · docker/gateguard-effectiveness/lib.js · ×1
  • docker/gateguard-effectiveness/lib.js: 447 lines of code docker/gateguard-effectiveness/lib.js:1 — docker/gateguard-effectiveness/lib.js has 447 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R6 · Tooling · The declared test suite includes a file that cannot be loaded · ×1
  • The declared test suite includes a file that cannot be loaded docker/context-profiles/complex-eval/reference3/idempotent-webhooks/test/webhooks.test.js:5 — This repository declares test tooling, and the ✓ above records that declaration — but docker/context-profiles/complex-eval/reference3/idempotent-webhooks/test/webhooks.test.js and 2 other test file(s) in this workspace cannot be loaded at all: it imports a module that names no file in this repository, so the runner throws while collecting it and none of its cases execute. The wiring is present and the suite it points at does not run as written, which is why the tooling tick must not be read as a statement that the tests pass. Fix the unloadable file(s) — each one is reported with its failing import under Test Coverage — then the declared script exercises what it claims to.
X29 · Per-element action decided by a fixed element · Per-element action decided by a fixed element · ×1
  • Per-element action decided by a fixed element scripts/hooks/block-no-verify.js:924 — This loop runs once per element of `words`, and the statement it guards acts on the element it is on — `words[i]`. The test deciding whether that statement runs does not: `name !== 'unset' && equals >= 0` reads `words[0]`, a subscript that does not move, so whatever it answers for that one element it answers for ALL of them. One `if` names the same collection at two different subscripts — the fixed one at line 910, which is the contradiction: either the test was meant to be per-element, in which case every element that differs from the fixed one is handled wrongly and all in the same direction, or it really is one answer for the whole collection, in which case it is being re-asked on every pass and belongs above the loop. The `if` is in the wrong place under both readings. Give the test the loop variable, or hoist it out.
Minor — 167 finding(s)
M4 · Documentation accuracy · README/code drift · ×40
  • README/code drift README.md:437 — README.md names `.github/skills/`, but no file or folder `.github/skills` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift README.md:437 — README.md names `.github/agents/`, but no file or folder `.github/agents` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift README.md:1478 — README.md names `.cursor/commands/`, but no file or folder `.cursor/commands` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift README.md:1479 — README.md names `.cursor/mcp.json`, but no file or folder `.cursor/mcp.json` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift README.md:1493 — README.md names `.cursor/ecc-agent-data.json`, but no file or folder `.cursor/ecc-agent-data.json` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift README.md:1494 — README.md names `.cursor/rules/ecc-agent-data-home.mdc`, but no file or folder `.cursor/rules/ecc-agent-data-home.mdc` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift README.md:1793 — README.md names `.github/ecc-install-state.json`, but no file or folder `.github/ecc-install-state.json` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift README.md:1874 — README.md documents the environment variable `CLAUDE_CODE_EFFORT_LEVEL`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift README.md:1880 — README.md documents the environment variable `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift .hermes/README.md:7 — .hermes/README.md names `rules/ecc/`, but no file or folder `rules/ecc` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift .hermes/README.md:8 — .hermes/README.md names `skills/ecc/`, but no file or folder `skills/ecc` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift .openclaw/README.md:7 — .openclaw/README.md names `rules/ecc/`, but no file or folder `rules/ecc` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift .openclaw/README.md:8 — .openclaw/README.md names `skills/ecc/`, but no file or folder `skills/ecc` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/ANTIGRAVITY-GUIDE.md:51 — docs/ANTIGRAVITY-GUIDE.md names `.agents/rules/`, but no file or folder `.agents/rules` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/ANTIGRAVITY-GUIDE.md:52 — docs/ANTIGRAVITY-GUIDE.md names `.agents/workflows/`, but no file or folder `.agents/workflows` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/ANTIGRAVITY-GUIDE.md:113 — docs/ANTIGRAVITY-GUIDE.md names `.agents/ecc-install-state.json`, but no file or folder `.agents/ecc-install-state.json` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/HERMES-HOOKS.md:47 — docs/HERMES-HOOKS.md documents the environment variable `HOOK_DIR`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/ITO-DESK.md:24 — docs/ITO-DESK.md names `docs/PLAN.md`, but no file or folder `docs/PLAN.md` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/ITO-DESK.md:25 — docs/ITO-DESK.md names `docs/spec/`, but no file or folder `docs/spec` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/SELECTIVE-INSTALL-ARCHITECTURE.md:669 — docs/SELECTIVE-INSTALL-ARCHITECTURE.md names `./.cursor/ecc-install-state.json`, but no file or folder `.cursor/ecc-install-state.json` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/SELECTIVE-INSTALL-ARCHITECTURE.md:671 — docs/SELECTIVE-INSTALL-ARCHITECTURE.md names `./.agents/ecc-install-state.json`, but no file or folder `.agents/ecc-install-state.json` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/TROUBLESHOOTING.md:31 — docs/TROUBLESHOOTING.md documents the environment variable `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/TROUBLESHOOTING.md:65 — docs/TROUBLESHOOTING.md documents the environment variable `MAX_THINKING_TOKENS`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/hook-bug-workarounds.md:40 — docs/hook-bug-workarounds.md documents the environment variable `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/hook-bug-workarounds.md:64 — docs/hook-bug-workarounds.md documents the environment variable `MAX_THINKING_TOKENS`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • + 15 more in this group — see findings.md.
X4 · Structured logging · Interpolated log message defeats structured logging · ×40
  • Interpolated log message defeats structured logging skills/delivery-gate/hooks/quality-gate.py:209 — `warning` at line 209 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging ecc2/src/notifications.rs:268 — `warn!` at line 268 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging ecc2/src/notifications.rs:305 — `warn!` at line 305 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging ecc2/src/notifications.rs:333 — `warn!` at line 333 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging ecc2/src/main.rs:4003 — `warn!` at line 4003 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging ecc2/src/session/manager.rs:1526 — `warn!` at line 1526 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging ecc2/src/session/manager.rs:2396 — `info!` at line 2396 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging ecc2/src/session/manager.rs:2436 — `error!` at line 2436 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging ecc2/src/session/manager.rs:2485 — `warn!` at line 2485 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging ecc2/src/session/manager.rs:2516 — `warn!` at line 2516 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging ecc2/src/session/daemon.rs:27 — `error!` at line 27 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging ecc2/src/session/daemon.rs:31 — `error!` at line 31 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging ecc2/src/session/daemon.rs:35 — `error!` at line 35 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging ecc2/src/session/daemon.rs:39 — `error!` at line 39 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging ecc2/src/session/daemon.rs:43 — `error!` at line 43 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging ecc2/src/session/daemon.rs:47 — `error!` at line 47 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging ecc2/src/session/daemon.rs:51 — `error!` at line 51 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging ecc2/src/session/daemon.rs:61 — `warn!` at line 61 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging ecc2/src/session/daemon.rs:83 — `warn!` at line 83 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging ecc2/src/session/daemon.rs:103 — `info!` at line 103 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging ecc2/src/session/daemon.rs:122 — `info!` at line 122 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging ecc2/src/session/daemon.rs:215 — `info!` at line 215 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging ecc2/src/session/daemon.rs:235 — `info!` at line 235 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging ecc2/src/session/daemon.rs:299 — `info!` at line 299 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging ecc2/src/session/daemon.rs:305 — `warn!` at line 305 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • + 15 more in this group — see findings.md.
X7 · Silent fallback defaults · Silent fallback default in catch · ×34
  • Silent fallback default in catch docker/context-profiles/complex-eval/cases4/recurring-incident/files/src/charge.js:44 — `readLedger` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch docker/context-profiles/complex-eval/cases4/recurring-incident/files/src/store.js:11 — `load` swallows every exception into `return {}` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch docker/context-profiles/complex-eval/cases4/recurring-incident/steps/01-refund-retry/check.cjs:71 — `readLedger` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch docker/context-profiles/complex-eval/cases4/recurring-incident/steps/02-payout-storm/check.cjs:67 — `readLedger` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch REDACTED:92 — `resolveSandboxCli` swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch scripts/lib/eval-harness/receipt.js:92 — `projectionMatches` swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch scripts/lib/install/plan.js:42 — `getManifestVersion` swallows every exception into `return 1` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch scripts/ci/scan-supply-chain-iocs.js:500 — `readText` swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch scripts/ci/scan-supply-chain-iocs.js:508 — `sha256File` swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch scripts/ci/scan-supply-chain-iocs.js:595 — `claudePermissionDenyRanges` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch scripts/claw.js:44 — `loadHistory` swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch scripts/codemaps/generate.ts:157 — `buildTree` swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch scripts/codex/check-plugin-cache.js:134 — `listInstalledVersions` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch scripts/codex/check-plugin-cache.js:168 — `pathExists` swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch scripts/lib/codex-legacy-sync.js:444 — `defaultGetHooksPath` swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch scripts/lib/control-pane/proximity.js:96 — `untrackedFiles` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch scripts/lib/control-pane/proximity.js:137 — `defaultChangedFilesFor` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch REDACTED:77 — `readFrontmatter` swallows every exception into `return {}` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch REDACTED:98 — `loadSkills` swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch REDACTED:116 — `loadRules` swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch REDACTED:950 — `loadActivity` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch scripts/gateguard-report.js:60 — `loadMetrics.files` swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch REDACTED:32 — `safeRead` swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch REDACTED:44 — `visit` (in `walkFiles`) swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch REDACTED:80 — `walkFiles` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • + 9 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×25
  • Duplicated predicate scripts/hooks/bash-hook-dispatcher.js:104 — `!Number.isInteger(output.exitCode) || output.exitCode === 0` appears character-identically in 2 files — scripts/hooks/bash-hook-dispatcher.js, scripts/hooks/observe-runner.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate docker/context-profiles/complex-eval/reference3/chained-tickets/src/service.js:31 — `!Number.isInteger(ttlSeconds) || ttlSeconds < 1 || ttlSeconds > MAX_TTL_SECONDS` appears character-identically in 2 files — docker/context-profiles/complex-eval/reference3/chained-tickets/src/service.js, docker/context-profiles/complex-eval/reference4/chained-tickets/src/service.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate scripts/hooks/hook-input.js:12 — `!Number.isSafeInteger(parsed) || parsed <= 0` appears character-identically in 2 files — scripts/hooks/hook-input.js, scripts/hooks/lifecycle-hook-bootstrap.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate docker/context-profiles/complex-eval/cases2/event-stats-api/check.cjs:145 — `!bareImport && !pkg.dependencies && !pkg.devDependencies` appears character-identically in 2 files — docker/context-profiles/complex-eval/cases2/event-stats-api/check.cjs, docker/context-profiles/complex-eval/cases2/keccak-selector/check.cjs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate scripts/lib/install/hook-consent.js:55 — `!config || typeof config !== 'object' || Array.isArray(config)` appears character-identically in 2 files — scripts/lib/install/hook-consent.js, scripts/lib/mcp-config.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate scripts/lib/context-profile-commands.js:151 — `!current.configured || current.recoveryRequired` appears character-identically in 2 files — scripts/lib/context-profile-commands.js, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate scripts/ci/check-hooks-schema-keys.js:117 — `!data || typeof data !== 'object' || Array.isArray(data)` appears character-identically in 2 files — scripts/ci/check-hooks-schema-keys.js, scripts/ci/validate-hooks.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate scripts/gemini-adapt-agents.js:143 — `!entry.isFile() || !entry.name.endsWith('.md')` appears character-identically in 2 files — scripts/gemini-adapt-agents.js, scripts/qwen-adapt-agents.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate .codebuddy/install.js:127 — `!extension || entry.name.endsWith(extension)` appears character-identically in 2 files — .codebuddy/install.js, scripts/harness-audit.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate scripts/lib/install/antigravity-agent.js:30 — `!frontmatter || typeof frontmatter !== 'object' || Array.isArray(frontmatter)` appears character-identically in 2 files — scripts/lib/install/antigravity-agent.js, scripts/lib/install/copilot-agent.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate docker/gateguard-effectiveness/evidence.js:86 — `!fs.existsSync(file) || !fs.statSync(file).isFile()` appears character-identically in 2 files — docker/gateguard-effectiveness/evidence.js, scripts/lib/context-pack-registry.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate scripts/lib/install-targets/cursor-project.js:40 — `!fs.existsSync(sourcePath) || !fs.statSync(sourcePath).isFile()` appears character-identically in 2 files — scripts/lib/install-targets/cursor-project.js, scripts/lib/install-targets/kimi-project.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate docker/context-profiles/complex-eval/reference3/production-ready/src/app.js:53 — `!input || typeof input.title !== 'string' || !input.title.trim()` appears character-identically in 2 files — docker/context-profiles/complex-eval/reference3/production-ready/src/app.js, docker/context-profiles/complex-eval/reference4/production-ready/src/app.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate scripts/lib/install/apply.js:198 — `!isPlainObject(baseValue) || !isPlainObject(patchValue)` appears character-identically in 2 files — scripts/lib/install/apply.js, scripts/lib/install/json-ops.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate scripts/lib/install/apply.js:307 — `!operation || operation.kind !== 'copy-file'` appears character-identically in 2 files — scripts/lib/install/apply.js, scripts/lib/install/claude-skill-migration.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate scripts/lib/context-carriers.js:24 — `!options || typeof options !== 'object' || Array.isArray(options)` appears character-identically in 3 files — scripts/lib/context-carriers.js, REDACTED, scripts/lib/context-profile-store.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate .cursor/hooks/adapter.js:135 — `!parsed || typeof parsed !== 'object' || Array.isArray(parsed)` appears character-identically in 11 files — .cursor/hooks/adapter.js, scripts/lib/agent-data-home.js, scripts/lib/astra-review/fix.js, scripts/lib/astra-review/prompt.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate docker/context-profiles/complex-eval/reference3/idempotent-webhooks/src/app.js:40 — `!parsed || typeof parsed.eventId !== 'string' || !parsed.eventId || typeof parsed.orderId !== 'string' || !parsed.orderId || !Number.isInteg…` appears character-identically in 2 files — docker/context-profiles/complex-eval/reference3/idempotent-webhooks/src/app.js, docker/context-profiles/complex-eval/reference4/idempotent-webhooks/src/app.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate docker/context-profiles/complex-eval/cases2/forge-cli/check.cjs:114 — `!pkg.dependencies && !pkg.devDependencies` appears character-identically in 5 files — docker/context-profiles/complex-eval/cases2/forge-cli/check.cjs, docker/context-profiles/complex-eval/cases3/idempotent-webhooks/check.cjs, docker/context-profiles/complex-eval/cases3/production-ready/check.cjs, docker/context-profiles/complex-eval/cases4/idempotent-webhooks/check.cjs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate scripts/lib/install/antigravity-legacy-migration.js:69 — `!rootStat.isDirectory() || rootStat.isSymbolicLink() || !stateStat.isFile() || stateStat.isSymbolicLink()` appears character-identically in 2 files — scripts/lib/install/antigravity-legacy-migration.js, scripts/lib/install/opencode-legacy-migration.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate docker/gateguard-effectiveness/evidence.js:43 — `!row.providerError && !row.timedOut && !row.judgeFailed` appears character-identically in 2 files — docker/gateguard-effectiveness/evidence.js, docker/gateguard-effectiveness/lib.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate scripts/lib/gateguard-search-evidence.js:511 — `!scan || !Array.isArray(scan.searches) || scan.searches.length === 0` appears character-identically in 2 files — scripts/lib/gateguard-search-evidence.js, scripts/lib/gateguard-turn-scan.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate scripts/lib/skill-evolution/provenance.js:30 — `!skillPath || typeof skillPath !== 'string'` appears character-identically in 2 files — scripts/lib/skill-evolution/provenance.js, scripts/lib/skill-evolution/versioning.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate scripts/lib/install/antigravity-legacy-migration.js:257 — `!stat.isDirectory() || stat.isSymbolicLink() || fs.readdirSync(safePath).length > 0` appears character-identically in 3 files — scripts/lib/install/antigravity-legacy-migration.js, scripts/lib/install/excluded-paths-reconciliation.js, scripts/lib/install/opencode-legacy-migration.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:105 — `!state || typeof state !== 'object' || Array.isArray(state)` appears character-identically in 2 files — REDACTED, scripts/lib/install-state.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
X7 · Silent fallback defaults · Silent fallback default on Err · ×4
  • Silent fallback default on Err ecc2/src/tui/dashboard.rs:5410 — `session_graph_metrics_lines` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err ecc2/src/tui/dashboard.rs:5454 — `session_graph_recall_lines` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err ecc2/src/session/manager.rs:2862 — `graph_context_matched_terms` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err ecc2/src/tui/dashboard.rs:8869 — `extract_tool_command` turns every `Err` into `String::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
D29 · Static Analysis (SAST) · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
IC1 · Incompleteness & stubs · Disabled test · ×3
  • Disabled test tests/lib/context-pack-registry.test.js:132 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test tests/lib/context-profile-native.test.js:258 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test tests/lib/context-profile-store.test.js:92 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
D19 · Documentation Quality · Documentation · ×2
  • Documentation: written for insiders .trae/README.md — The quick-install sections install to `.trae-cn/` but do not explain what the .trae folder or CN environment directories contain. Add an overview of the Trae plugin installation model and what each directory (`.trae`, `.trae-cn`) serves.
  • Documentation: written for insiders ecc2/README.md — The run-it section launches `cargo run` but does not explain what dashboard output is or how to interpret it. Add an overview of the dashboard and its role in session state, risk scoring, and worktree tracking.
X6 · Hand-rolled structured-format parsing · Hand-rolled JSON/XML parsing via regex · ×2
  • Hand-rolled JSON/XML parsing via regex scripts/hooks/evaluate-session.js:87 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex skills/delivery-gate/hooks/quality-gate.py:126 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Python code already uses a real parser in the same package; use it here too.
X7 · Silent fallback defaults · Silent fallback default on parse failure · ×2
  • Silent fallback default on parse failure skills/continuous-learning-v2/scripts/instinct-cli.py:484 — `load_registry` returns `{}` when `(FileNotFoundError, json.JSONDecodeError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default on parse failure skills/continuous-learning-v2/scripts/instinct-cli.py:681 — `_append_observations` returns `0` when `(OSError, UnicodeDecodeError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
D16 · Bus Factor · Off-boarding risk · ×1
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 14 significant file(s) lose their only recent owner: ecc2/src/tui/dashboard.rs, ecc2/src/main.rs, REDACTED, ecc2/src/session/manager.rs, ecc2/src/worktree/mod.rs, ecc2/src/session/daemon.rs, ecc2/src/session/mod.rs, ecc2/src/notifications.rs (+6 more). Pair on, review, or document these before any departure.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 5 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (20 single-owned of 105 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 105 of the 132 production source files in this repository met that bar). They are anonymized user #2 (2 file(s)), anonymized user #3 (1 file(s)), anonymized user #4 (1 file(s)), anonymized user #5 (1 file(s)), anonymized user #6 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: hooks/hermes/config-protection.py, hooks/hermes/check-console-log.py, skills/docs-governance/scripts/audit-docs.py, skills/ios-icon-gen/scripts/generate_icons.swift, skills/delivery-gate/hooks/quality-gate.py, src/llm/providers/openai_compat.py.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 2 of 28 project(s) overshoot their size bounds, lowering Project Cohesion to 8.6/10. The most over is `(repository root)` (109242 LoC, 559 module-visible types across 133 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 2/10 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `docker/context-profiles/complex-eval/cases/sentinel-api/files`, `docker/context-profiles/complex-eval/cases/webhook-relay/files`, `docker/context-profiles/complex-eval/cases2/event-stats-api/files`, `docker/context-profiles/complex-eval/cases3/idempotent-webhooks/files` and 3 more.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST — No static application security testing detected. For this repository's stack, add cargo-audit / cargo-deny (or clippy) (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 68296 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P4 · Deployment & Rollback · No release approval gate · ×1
  • No release approval gate — Deployment is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever reaches the release trigger goes to production unreviewed, so a mistaken merge or tag is live before anyone can stop it.
R7 · Dead Code · Unused module-local declaration '_test' · ×1
  • Unused module-local declaration '_test' tests/integration/hooks.test.js:19 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
X2 · Cancellation propagation · Not all async functions that make a request accept an AbortSignal · ×1
  • Not all async functions that make a request accept an AbortSignal — Only 2/8 async functions that make a cancellable request (fetch, axios, ky, ofetch) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
Minor — 21 finding(s)
D10 · Test Quality · Skipped (documented) · ×14
  • Skipped (documented): (unnamed test) tests/ci/run-all.test.js:276 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) tests/ci/context-profiles.test.js:37 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) tests/ci/agent-payment-x402-doc.test.js:192 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) tests/docs/story-lifecycle-table-projection.test.js:174 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) tests/docs/story-lifecycle-errors.test.js:112 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): permission changes during reading invalidate the pinned rule snapshot tests/hooks/hookify-file-race.test.js:210 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): replacement of the rule directory cannot read outside-project rule data tests/hooks/hookify-file-race.test.js:233 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): platforms without O_NOFOLLOW reject a raced leaf symlink before any read tests/hooks/hookify-file-race.test.js:249 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): a FIFO is opened nonblocking and rejected without consuming bytes tests/hooks/hookify-file-race.test.js:312 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): (unnamed test) tests/hooks/ecc-statusline-project-plugins.test.js:53 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): managed ${corruption} files block status, apply, and rollback tests/lib/context-profile-store.test.js:81 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): native executable FIFO is rejected without opening a blocking descriptor tests/lib/context-profile-native.test.js:257 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): real file symlink resources fail closed when host privileges permit tests/lib/context-pack-registry.test.js:127 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): (unnamed test) tests/scripts/profile.test.js:198 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
D12 · Dependency Hygiene · Outdated · ×7
  • Outdated: libc — `libc` is locked at 0.2.189 but 0.2.191 is the current stable release on crates.io, and it already satisfies the `"0.2"` requirement declared in ecc2/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p libc` and commit the updated REDACTED.
  • Outdated: serde_json — `serde_json` is locked at 1.0.151 but 1.0.154 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in ecc2/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p serde_json` and commit the updated REDACTED.
  • Outdated: sha2 — `sha2` is locked at 0.11.0 but 0.11.1 is the current stable release on crates.io, and it already satisfies the `"0.11"` requirement declared in ecc2/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p sha2` and commit the updated REDACTED.
  • Outdated: tokio — `tokio` is locked at 1.53.1 but 1.54.1 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in ecc2/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tokio` and commit the updated REDACTED.
  • Outdated: toml — `toml` is locked at 1.1.6+spec-1.1.0 but 1.1.8+spec-1.1.0 is the current stable release on crates.io, and it already satisfies the `"1.1"` requirement declared in ecc2/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p toml` and commit the updated REDACTED.
  • Outdated: ureq — `ureq` is locked at 3.4.2 but 3.5.0 is the current stable release on crates.io, and it already satisfies the `"3"` requirement declared in ecc2/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p ureq` and commit the updated REDACTED.
  • Outdated: uuid — `uuid` is locked at 1.26.1 but 1.29.0 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in ecc2/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p uuid` and commit the updated REDACTED.

Appendix B — Reproduction & audit trail

Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-8040d489a4c04ec99f35e8e201fcbfc9/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-8040d489a4c04ec99f35e8e201fcbfc9/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off .76artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update9artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .3artifacts/raw/trivy-config.json
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update0artifacts/raw/trivy-fs.json

Run 01a16d71-8969-741a-9ef2-ec39fc580b06 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md