Public report of davide-desio-eleva/kirograph, published 16 November 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.11.4). Assert 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, 16 November 2026, 19:27 UTC · Survey ID cd_b1b18d2ad4dd4bc29d960a342abcff44

davide-desio-eleva/kirograph

Measured 16 November 2026, 19:26 UTC, at code version dc61015

First survey, so nothing to compare with yet
CAI score 40.8out of 100 Weak
CriticalWeakAdequateStrongExemplary

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 medium codebase: 53,196 lines of product code in 5 projects, tests not counted · Estimated rebuild effort: about 0.3 person-years · Weakest lens: Production Readiness, 33.2

Findings by how serious they are

8 critical 772 serious 122 minor

8 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look 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

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
16 November 2026, 19:26 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 the Canine Code Analyzer. It is open to any tool that implements it, and today the Canine Code Analyzer is the only one that does.

The score is deterministic, which means the same code always gets the same score. We work 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 ▸

71of 71 dimensions measured by tools.
891of 902 findings point to an exact file and line, so you can open each one in the code. The other 11 concern the repository as a whole, such as missing documentation.
71dimensions across 6 lenses, read from 53,196 lines of product code in 5 projects.
Chapters

Executive summary

davide-desio-eleva/kirograph falls short of our standard for production because we found no working pipeline that builds or tests changes to the code and no automated security scanning of the code, its secrets or its dependencies. It scores 40.8 out of 100 and is rated Weak, and seven of its eight critical findings are security problems in its code and in the build pipeline.

Production Readiness, at 33.2, is the weakest lens and counts most in the score. The best first steps are adding an automated build and test pipeline and adding automated security scanning, each worth about 3.0 points. Raising Production Readiness to 70 would lift the score to about 47.4.

Five weaknesses in the code could be used by an attacker. One place in the code runs text as code, which an attacker could use, and one secret can leak from the build pipeline. Fixing the weaknesses the scanner points to, replacing text run as code with direct calls and limiting the secret to its own step would close these risks. The loop of files that import each other needs breaking.

The product code is 53,196 lines, about €49,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.
Production Readiness 33.2 · counts for 46%Code Health 33.3 · counts for 25%Security and Compliance 52.3 · counts for 14%Performance 60.0 · counts for 8%Maturity 67.1 · counts for 4%Architecture 92.7 · counts for 2%

If Production Readiness rose from 33.2 to 70, the lowest score rated Strong, the score would rise from 40.8 to about 47.4.

Code composition: what the lines of code are
Product code 92%Tests 8%
Rebuild cost: about €49,000 · Estimate
Cost to rebuild€16,000 to €82,000, for 272 to 864 hours of work, about 0.3 person-years for one engineer
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 41. 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.
SizeMedium: 53,196 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

How the estimate is made: We price 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
Add a CI workflow that builds and runs the test suite on every push/PR.
Raises the score by about 3.0 points · Medium effort · CI/CD gates
2
Run what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
Raises the score by about 3.0 points · Medium effort · Security & performance tooling
3
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
Raises the score by about 2.6 points · Medium effort · Dead Code

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 €49,000 to build again, about 0.3 person-years of work. Its weakest lens is Production Readiness, at 33.2 (Weak). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Add a CI workflow that builds and runs the test suite on every push/PR. Of all the actions in this report, it raises the score most for the work it takes: about 3.0 points for medium effort. 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 6.0 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 5% to 11% on every change. The history of the code shows how much it changes: about 19,297 lines over the last 90 days, which is about 78,260 lines a year. At that pace, the extra work comes to an estimated 9.8 to 58.8 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 our 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, never less than 2% to 5% and never more than 40% to 60% in all; 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 — module dependency graph

Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.

arch kirograph kirograph turbovec-node (npm) turbovec-node (npm) kirograph->turbovec-node (npm) mock mock mock-app (Maven) mock-app (Maven) turbovec-node (Cargo) turbovec-node (Cargo)

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.

205 modules, with 198 dependencies between them. Every module uses only modules listed above it, so there are no loops.

The table shows the 40 modules with the most connections; 165 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 architecture.manifest2 architecture.types3 bin.commands4 bin.installer.common5 config6 data7 docs.types8 jev.types9 memory.types10 security.types11 types12 bin.installer.targets13 extraction.extractor14 jev15 memory.database16 security17 security.manifest.adapter18 sync19 wiki20 bin.installer21 db.database22 extraction23 frameworks.types24 memory.vectors25 watchmen26 architecture27 graph28 graph.traversal29 memory30 resolution.bridges31 security.manifest.parser32 security.pipeline33 security.reachability34 security.vuln.client35 vectors36 graph.queries37 resolution38 context39 core.pipeline40 src
1 architecture.manifest
2 architecture.types
3 bin.commands
4 bin.installer.common
5 config
6 data
7 docs.types
8 jev.types
9 memory.types
10 security.types
11 types
12 bin.installer.targets30
13 extraction.extractor1
14 jev1
15 memory.database7
16 security111
17 security.manifest.adapter11
18 sync1
19 wiki1
20 bin.installer21
21 db.database361
22 extraction42
23 frameworks.types12
24 memory.vectors111
25 watchmen21
26 architecture1221
27 graph4
28 graph.traversal11
29 memory111011
30 resolution.bridges18
31 security.manifest.parser1111
32 security.pipeline111
33 security.reachability121
34 security.vuln.client21
35 vectors111
36 graph.queries312
37 resolution12213
38 context3111
39 core.pipeline121111
40 src3511111111
Uses a module listed above itPart of a loopThe module itself
1 architecture.manifest2 architecture.types3 bin.commands4 bin.installer.common5 config6 data7 docs.types8 jev.types9 memory.types10 security.types11 types12 bin.installer.targets13 extraction.extractor14 jev15 memory.database16 security17 security.manifest.adapter18 sync19 wiki20 bin.installer21 db.database22 extraction23 frameworks.types24 memory.vectors25 watchmen26 architecture27 graph28 graph.traversal29 memory30 resolution.bridges31 security.manifest.parser32 security.pipeline33 security.reachability34 security.vuln.client35 vectors36 graph.queries37 resolution38 context39 core.pipeline40 srcarchitecture.manifest1architecture.types2bin.commands3bin.installer.common4config5data6docs.types7jev.types8memory.types9security.types10types11bin.installer.targets12extraction.extractor13jev14memory.database15security16security.manifest.adapter17sync18wiki19bin.installer20db.database21extraction22frameworks.types23memory.vectors24watchmen25architecture26graph27graph.traversal28memory29resolution.bridges30security.manifest.parser31security.pipeline32security.reachability33security.vuln.client34vectors35graph.queries36resolution37context38core.pipeline39src40301171111111213614212111211221411111011181111111121211113121221331111211113511111111+165 more modules (most-connected shown)

At a glance — Code Health · 33.3 · Weak · gated by D1, D2, R10, R2, R7 ·

At a glance — Architecture · 92.7 · Exemplary ·

At a glance — Maturity · 67.1 · Adequate · gated by M2 ·

At a glance — Readiness · 33.2 · Weak · gated by P1, P3, P7 ·

At a glance — Security · 52.3 · Adequate · gated by D29, C2 ·

At a glance — Domain Modelling · — · — ·

At a glance — Performance · 60.0 · 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 — Injection21High / Critical
A03:2025 — Software Supply Chain Failures2Medium

Roadmap

Top priorities: Add a CI workflow that builds and runs the test suite on every push/PR; Run what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing; Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.

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

Do thisHelpsEffortDimension
Add a CI workflow that builds and runs the test suite on every push/PR.+3.0 ptsMediumCI/CD gates
Run what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.+3.0 ptsMediumSecurity & performance tooling
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.+2.6 ptsMediumDead Code
Resolve the 40 finding(s) in Cyclomatic Complexity.+2.4 ptsMediumCyclomatic Complexity
Name the access rules — roles/permissions declared once (a @Roles/@Permissions decorator with its guard, a CASL ability, a casbin model, or Supabase CREATE POLICY) and consulted where access is checked, so the rule set is reviewable and testable on its own.+2.4 ptsMediumAccess Controls
Bring the 102 bodies over 30 down to 30 or less in Cognitive Complexity — start with core.handleCore (cognitive 445), security.handleSecurity (cognitive 439), pattern.register (cognitive 257).+2.3 ptsHighCognitive Complexity
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.+1.8 ptsMediumAsync & latency hygiene
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.+1.7 ptsMediumCode Duplication

File quality

Per-file score 0–10 — a quality signature. Of 178 files carrying findings, judged against the Production bar: 1% slop · 70% mixed · 29% near-clean.

FileScoreBandWorst signal
REDACTED3.5SlopStatic Analysis (SAST): High: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.2MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.3MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.8MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.0MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.0MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.2MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.7MixedStatic Analysis (SAST): Medium: REDACTED
src/security/integrator.ts6.3MixedCyclomatic Complexity: DependencyGraphIntegrator.resolveTransitives (cyclomatic 28)
src/core/pipeline.ts6.5MixedCyclomatic Complexity: IndexPipeline.syncNow (cyclomatic 66)
src/vectors/index.ts6.5MixedCyclomatic Complexity: VectorManager.embedAll (cyclomatic 52)
src/resolution/index.ts6.5MixedCyclomatic Complexity: ReferenceResolver.resolveUnresolvedRefs (cyclomatic 32)
src/compression/filters/aws.ts6.6MixedCyclomatic Complexity: aws.filterCfnEvents (cyclomatic 21)
src/security/manifest/plugins/nuget.ts6.6MixedCognitive Complexity: nuget.extractFromPackagesLock (cognitive 21)
src/resolution/bridges/native-events.ts6.7MixedCyclomatic Complexity: native-events.findEventEmitters (cyclomatic 31)
REDACTED6.9MixedDependency Vulnerabilities: Medium vulnerability: REDACTED
src/mcp/handlers/core.ts6.9MixedCyclomatic Complexity: core.handleCore (cyclomatic 158)

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 — 8

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 — 772

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 — 122

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

Could not be resolved — 8

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

This survey 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. All 71 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.

Every figure here is one of two 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. 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.

What we checked — 71 dimensions across the health lenses
D1D2D3D4D5D6D10D12D13D14D15D17D19D21D22D24D27D28D29D30D34D35D37D43D44AX10AX3AX4AX6AX8AX9C2DM9GD1M1M2M3M4P1P10P2P3P6P7PF3R1R10R11R2R3R4R5R6R7R8R9S1X1X12X13X16X17X2X21X23X25X28X29X3X30X5

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, 891 of 902 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 or a scanner, 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
Canine Code Analyzer 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 · trivySecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3✓ deterministic

Every finding is locatable in findings.md. Run 01a1e5d3-99d5-7b52-a05c-73ef87edb404.

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 — We 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: the .NET half could not be measured — no coverage produced (collector absent, or test run exceeded the inline budget); the JavaScript/TypeScript half could not be measured — the dependency install for test/security/mock/ failed in the analyzer sandbox (npm error code EINTEGRITY), so the suite never ran. This repository's production source spans both ecosystems, and no partial figure is published as if it were the whole: coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo.
  • D11 Test Reliability — not measured this run — We 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. Test reliability NOT MEASURED: this repository's test suite spans .NET and JavaScript/TypeScript, and the JavaScript/TypeScript half could not be re-run — other: measured (0 flaky); JavaScript/TypeScript (vitest via `npm install --ignore-scripts` (no lockfile) in the repository root; jest via `npm ci --ignore-scripts` in test/security/mock/): not included — the dependency install for the repository root failed in the analyzer sandbox (npm error Cannot read properties of null (reading 'edgesOut')), so the suite never ran. No partial figure is published as if it were the whole: reliability is excluded from the score rather than counted as a near-zero.
  • D11 Test Reliability — not measured this run — We 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. Test reliability for the vitest suite in the repository root was NOT MEASURED: the dependency install for the repository root failed in the analyzer sandbox (npm error Cannot read properties of null (reading 'edgesOut')), so the suite never ran. 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 — not measured this run — We 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. Test reliability for the jest suite in test/security/mock/ was NOT MEASURED: the dependency install for test/security/mock/ failed in the analyzer sandbox (npm error code EINTEGRITY), so the suite never ran. 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 — We measured this, but not all of it. What we 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 NuGet package 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.
  • D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Single-maintainer repository — bus factor is not applicable (8 contributor(s) across 355 commit(s) sampled, automation and bot accounts excluded). One of them holds 94% of the history; the other 7 hold 0.9% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
  • D17 Explicit Debt — measured, with a gap in what it reached — We measured this, but not all of it. What we 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 0 deducted marker(s) and the 0.0/KLoC density on this row were taken over this repository's .NET projects ALONE: .ts (49,401 lines, 100% of production source) went unread, because every marker collector on this path is reached through a C# workspace. A read-only sweep of that source finds at least 1 task marker(s) (TODO/FIXME/HACK/XXX) across 1 file(s) that this score does not count — a floor, since only line comments are read there and D17's other eight marker kinds (suppressions, NoWarn, editorconfig severities, empty catches, commented-out code, Obsolete, dead code, preprocessor branches) need a compiler we do not have for that language. The debt in that source is UNMEASURED — its absence from the score above is a gap in this analyzer's language coverage, not a finding that the code carries none.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we 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 kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
  • D32 Data Compliance (PII/GDPR) — not measured this run — We 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. `src/bin/commands/files.ts`, `src/bin/commands/security-export.ts`, `src/bin/commands/sync.ts`, `REDACTED`, `src/mcp/handlers/core.ts`, … (+3 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • AX1 Captive dependencies — not measured this run — We 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 reads Microsoft.Extensions.DependencyInjection registrations in C# and Spring beans in Java/Kotlin only, and this repository defines its own container in src/extraction/extractor.ts, whose lifetimes are not modelled yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • AXB2 Runtime readiness — not measured this run — We 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. A program the dev server needs is not installed in our sandbox image. This is a limit of our sandbox, not of your repository. (rule: missing-tool). The renderer reported: the dev server (`npm run dev`) exited before it served a page. Likely cause (our sandbox): a program the dev server needs is not installed in our sandbox image. This is a limit of our sandbox, not of your repository. Last output: "> kirograph@1.5.0 dev / > tsx scripts/build.ts --watch / sh: 1: tsx: not found" No runtime evidence was gathered.
  • AXR1 Runtime accessibility — not measured this run — We 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 DevServer (dev). the dev server (`npm run dev`) exited before it served a page. Likely cause (our sandbox): a program the dev server needs is not installed in our sandbox image. This is a limit of our sandbox, not of your repository. Last output: "> kirograph@1.5.0 dev / > tsx scripts/build.ts --watch / sh: 1: tsx: not found" No runtime evidence was gathered.
  • DM9 Scattered domain decisions — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. Arm two tells a construction that PRODUCES a measurement from one that merely passes it along, and this repository's frontend does not compute that fact. A measurement built independently in two places would not appear above.
  • DM9 Scattered domain decisions — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. Some of this repository's production types come from a frontend that does not bind comparison operands to the members they read, which arm one needs, and those types were not walked for this dimension. The counts above speak for the languages that declare it.
  • M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and none applies: this repository publishes a library and deploys nothing (no container, IaC or deployment manifest), so it holds no runtime state of its own. Any data-access dependency it declares is the store it is a CLIENT for, not one it operates. The DR control belongs to whoever runs that data.
  • PF3 Async & latency hygiene — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. 160 further occurrence(s) are not listed individually; the score already reflects all 200.
  • R10 Code Duplication — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. 282 further occurrence(s) are not listed individually; the score already reflects all 322.
  • R2 Cyclomatic Complexity — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. 198 further occurrence(s) are not listed individually; the score already reflects all 238.
  • R4 Test Coverage — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. 46 further occurrence(s) are not listed individually; the score already reflects all 86.
  • R7 Dead Code — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. 54 further occurrence(s) are not listed individually; the score already reflects all 94.
  • X3 Exception handling — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. 128 further occurrence(s) are not listed individually; the score already reflects all 168.
  • X4 Structured logging — not measured this run — We 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 reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala, Rust, Go, Swift, Erlang, F# and Visual Basic source only, and no C# was loaded, and this repository's JavaScript/TypeScript, Python and PHP log through no library that carries a message's values as fields (pino, winston, bunyan, tslog, LogTape, roarr; Python's logging, structlog; PHP's PSR-3 loggers), so its log calls cannot be judged, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.

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

Limitations & what we did not check

We assess the repository exactly as committed, and only the repository. By design we do 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.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • 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.
  • 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 publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
  • D22 Internal API Consistency: API consistency compares the call shapes of members that play the same role on the exposed C# surface: whether the API suits its callers is not measured, and surfaces in other languages are not measured.
  • D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
  • D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
  • 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.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • 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 Dockerfile (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.
  • 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: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • 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.

Dimensions

D1 · Cyclomatic Complexity2.0 / 10Critical✓ 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.0 / 10 · rule-coverage 100% · ceiling Prevented

149 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was config.validateConfig at 191. A further 3 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 kubernetes.mapK8sKind 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: src/frameworks/kubernetes.ts (kubernetes.mapK8sKind at 24), src/search/query-utils.ts (query-utils.kindBonus at 21). 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.

config.validateConfig (cyclomatic 191)src/config.ts:449
security.handleSecurity (cyclomatic 190)src/mcp/handlers/security.ts:4
core.handleCore (cyclomatic 158)src/mcp/handlers/core.ts:6
memory.register (cyclomatic 142)src/bin/commands/memory.ts:19
pattern.register (cyclomatic 120)src/bin/commands/pattern.ts:45

+ 144 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 Cyclomatic Complexity — start with config.validateConfig (cyclomatic 191), security.handleSecurity (cyclomatic 190), core.handleCore (cyclomatic 158). — 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 Cyclomatic Complexity from 2.0 to about 3.7/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

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

268 method(s) exceeded the cognitive complexity threshold of 15; the worst was core.handleCore at 445.

infra.scanJson::ws (cognitive 23) · ×3src/extraction/infra.ts:587
core.handleCore (cognitive 445)src/mcp/handlers/core.ts:6
security.handleSecurity (cognitive 439)src/mcp/handlers/security.ts:4
pattern.register (cognitive 257)src/bin/commands/pattern.ts:45
security-export.generateHtml (cognitive 253)src/bin/commands/security-export.ts:60

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

What to do

  1. Bring the 102 bodies over 30 down to 30 or less in Cognitive Complexity — start with core.handleCore (cognitive 445), security.handleSecurity (cognitive 439), pattern.register (cognitive 257). — 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 102 together lifts Cognitive Complexity from 2.0 to about 5.6/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.

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

D3 · God Classes8.0 / 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.0 / 10 · rule-coverage 100% · ceiling Prevented

30 god class(es) detected.

FunctionTooLong: security.handleSecurity · ×13src/mcp/handlers/security.ts:4
MethodTooLong: IndexPipeline.indexAllNow · ×7src/core/pipeline.ts:126
FileTooLong: extraction/extractor.ts · ×5src/extraction/extractor.ts
TooManyMethods: GraphDatabase · ×3REDACTED:24
ClassTooLong: GraphDatabase · ×2REDACTED:24

What to do

  1. Resolve the 13 FunctionTooLong finding(s) in God Classes — start with security.ts, config.ts, code-health.ts. — One of this dimension's main actionable groups (13 warning-level).
  2. Resolve the 7 MethodTooLong finding(s) in God Classes — start with index.ts (3), pipeline.ts (2), REDACTED. — One of this dimension's main actionable groups (7 warning-level).
  3. Resolve the 5 FileTooLong finding(s) in God Classes — start with extractor.ts, REDACTED, config.ts. — One of this dimension's main actionable groups (5 warning-level).

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

D4 · Code Duplication10.0 / 10Stronggated by 1 serious finding✓ Tool-verified

What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.

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

1 duplicated block group(s) detected. 0.0 % of the production lines (14 of 53,196) are in a reported copy. Measured on part of this repository only: .ts (100% 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 (7 lines × 2)native/turbovec-node/src/lib.rs:111

What to do

  1. Resolve the 1 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with lib.rs. — One of this dimension's main actionable groups (1 warning-level).

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 (Gradle+Maven+Cargo+npm), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; edges a convention plugin adds from buildSrc or build-logic are not visible there; 0 module(s) off the main sequence, with abstractness counted on 2 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)10.0 / 10Exemplary✓ 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 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 of 69 classes have LCOM4 above 3.

✓ On the Gold path — maintain.

Detailed fixes: d6_recommendation.md.

D10 · Test Quality10.0 / 10Exemplary✓ 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

6 skipped (6 with a documented reason), 0 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 176 tests.

Skipped (documented): (unnamed test) · ×6test/sync/remote.test.ts:59

✓ On the Gold path — maintain.

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

D12 · Dependency Hygiene10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.

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

1 outdated direct gem(s), 0 pinning defect(s). 3 declaration(s) graded against rubygems.org, 1 of them against a version resolved in a committed Gemfile.lock. 2 declaration(s) carry a requirement that EXCLUDES the current release; that is a deliberate constraint (a supported-version ceiling or a held-back CI pin) and is counted, not charged. Whether any of these gems is DEPRECATED or YANKED is not graded — rubygems.org publishes no deprecation marker, and a yank removes a version rather than flagging it. Whether any is UNMAINTAINED is not graded either: no registry publishes a maintenance status, and release age does not stand in for one. Whether any is UNUSED is a source question, not a registry one. Known CVEs in this dependency graph are D30's question, read from the manifest there.

Outdated: pg

✓ On the Gold path — maintain.

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

D13 · Secret Scanning10.0 / 10Exemplary○ Nothing flagged

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 10.0 / 10 · rule-coverage 100% · ceiling Prevented

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.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 98 packages use a banned license. ★ DEPTH: this repository's MSBuild projects declare 3 direct `PackageReference`(s), and 95 further package(s) were reached beyond them by closing the graph over the committed `packages.lock.json` and nuget.org's own nuspec dependency graph — so a banned licence pulled in only by a dependency's OWN dependencies is inside this verdict. A package whose licence nuget.org could not be asked for is not graded, and version ranges are taken at their lower bound, so this is the closure as that graph states it rather than a restored consumer's exact resolution. ★ COVERAGE OF THIS VERDICT: it grades this repository's NuGet package dependencies and nothing else. The repository also declares package.json, and the licences of those dependencies 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 Hotspots8.1 / 10Strong✓ 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 8.1 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: src/core/pipeline.ts (18×66=1188); src/config.ts (6×191=1146); src/bin/commands/memory.ts (7×142=994) Repeated repair below the complexity floor: REDACTED (6 of 9 changes were fixes); REDACTED (5 of 6 changes were fixes); src/db/db-lock.ts (3 of 5 changes were fixes)

Hotspot: src/core/pipeline.ts · ×21src/core/pipeline.ts:505
Repeated repair: REDACTED · ×6REDACTED:168

What to do

  1. Resolve the 21 Hotspot finding(s) in Churn × Complexity Hotspots — start with index.ts (3), pipeline.ts (2), memory.ts (2). — One of this dimension's main actionable groups (21 warning-level).
  2. Resolve the 6 Repeated repair finding(s) in Churn × Complexity Hotspots — start with REDACTED, REDACTED, db-lock.ts. — One of this dimension's main actionable groups (6 warning-level).

Detailed fixes: d15_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 debt markers + 0 dead symbols across 0 LoC in the .NET projects (0.0/KLoC) → score 10.0. Measured on the .NET source only: .ts (100% of production source) was not read, and carries at least 1 uncounted task marker(s) in 1 file(s).

✓ On the Gold path — maintain.

Detailed fixes: d17_recommendation.md.

D19 · Documentation Quality10.0 / 10Exemplary○ Nothing flagged

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

Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.

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

1 of 1 documentation facets pass in full. 14 document(s) read across 2 unit(s).

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D21 · Naming Consistency5.4 / 10Adequate✓ Tool-verified

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

Method: Seven vocabulary-free rules (N1-N7) mine each naming convention from the repository and flag a name that breaks a convention its structural peers in the same unit follow; production C# and TypeScript, each its own population. Deterministic, no model, no sample. Advisory.

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

2 naming inconsistencies among 43 declarations measured against a convention their peers follow.

`filterDynamoDB` spells `DB` where 41 names in the project spell it `Db`src/compression/filters/aws.ts:221
`LanceDBIndex` spells `DB` where 41 names in the project spell it `Db`src/vectors/lancedb-index.ts:31

What to do

  1. Resolve the 1 `filterDynamoDB` spells `DB` where 41 names in the project spell it `Db` finding(s) in Naming Consistency — start with aws.ts. — One of this dimension's main actionable groups (1 recommendation-level).
  2. Resolve the 1 `LanceDBIndex` spells `DB` where 41 names in the project spell it `Db` finding(s) in Naming Consistency — start with lancedb-index.ts. — One of this dimension's main actionable groups (1 recommendation-level).

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

D22 · Internal API Consistency10.0 / 10Exemplary○ Nothing flagged

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

Method: Call-shape rules (A1-A9) over the structured code model of the intentionally exposed C# surface: members of one type, overloads of one name and the same slot across sibling types are compared, and a member that makes a caller use a different convention for the same kind of operation is flagged. Deterministic, no model. Advisory.

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

0 API inconsistencies among 34 exposed members measured against a convention their peers follow.

✓ On the Gold path — maintain.

Detailed fixes: d22_recommendation.md.

D24 · Comment Value8.3 8.0 / 10Strong✓ Tool-verified

What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).

Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.

Maturity: Documented → Verified → Prevented · effective 8.0 / 10 · rule-coverage 95% · ceiling Documented

30 of 1794 judged comments only repeat the code they sit on (1.7 %). 131 comment(s) in another language or script were not judged.

redundant comment · ×30src/compression/filters/test.ts:24

What to do

  1. Resolve the 30 redundant comment finding(s) in Comment Value — start with index.ts (3), core.ts (3), REDACTED (2). — One of this dimension's main actionable groups (30 recommendation-level).

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

D27 · Navigability9.6 / 10Exemplary✓ Tool-verified

What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.

Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.

Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.

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

13 % of calls cross a namespace and 1 % go through an interface, but 49 % of collaborators are co-located — so following a call takes several hops. Baseline: small — navigation cost is tolerated.

✓ On the Gold path — maintain.

Detailed fixes: d27_recommendation.md.

D28 · Secrets (history)10.0 / 10Exemplary○ Nothing flagged

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 10.0 / 10 · rule-coverage 100% · ceiling Documented

gitleaks scanned the full history AND the current working tree and found no secrets.

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

D29 · Static Analysis (SAST)1.4 / 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 1.4 / 10 · rule-coverage 100% · ceiling Documented

21 finding(s): 0 critical, 7 high, 14 medium, 0 low. semgrep hit a parse error in 8 file(s) — `src/bin/commands/files.ts` (line 5, line 19, line 29, …), `src/bin/commands/security-export.ts` (line 1286), `src/bin/commands/sync.ts` (line 76), `REDACTED` (line 1006, line 1015), `src/mcp/handlers/core.ts` (line 560, line 574, line 575, …), … (+3 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.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

  1. Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 issue-level).
  2. Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2). — One of this dimension's main actionable groups (2 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 Vulnerabilities9.6 / 10Stronggated by 2 serious findings✓ 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. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

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

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

REDACTED
REDACTED

What to do

  1. Resolve the 1 Medium vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 Medium advisory (unmaintained) 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.

D34 · Knowledge Freshness10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.

Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.

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

Every significant source file has living knowledge — recently and meaningfully worked. Counted over 206 of the 249 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

✓ On the Gold path — maintain.

Detailed fixes: d34_recommendation.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.

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. Reported 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. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

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-Life10.0 / 10Exemplary✓ 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 10.0 / 10 · rule-coverage 100% · ceiling Documented

0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 2 platform declaration(s) and 17 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.

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

AX10 · Code composition9.2 / 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.

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.

AX6 · Interface segregation10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').

Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.

AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.

Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. 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.

C2 · Access Controls1.7 / 10Critical✓ Tool-verified

Other · Security — Whether access is authorized by default — a framework authorization attribute/decorator or policy, or imperative guard methods (throw-on-violation) called from handlers.

Method: Roslyn scan: [Authorize] usage and authorization policies, plus imperative throw-on-violation guard methods detected via syntax. Deterministic.

  • Authorization IS enforced here (by route guards, auth middleware or checks that refuse a caller) — this is NOT a claim that endpoints are unprotected. What's missing is a NAMED rule set: who may do what is encoded inline where it is checked, so the rules can't be listed, reviewed or tested apart from the code that applies them. Recommendation, not a defect. — src/security/auth-detection-jev.ts:32
  • Only 1 place(s) refuse an unauthorized caller — too few to demonstrate default-deny across handlers.

What to do

  • Name the access rules — roles/permissions declared once (a @Roles/@Permissions decorator with its guard, a CASL ability, a casbin model, or Supabase CREATE POLICY) and consulted where access is checked, so the rule set is reviewable and testable on its own.
  • Enforce authorization at every handler — a guard on each route, or a global authentication guard/middleware with explicit public opt-outs, so protected-by-default is demonstrable.
DM9 · Scattered domain decisions8.8 / 10Strong✓ Tool-verified

Other · Domain Modelling — Whether one domain rule is decided — or one measurement produced — in more than one place, rather than living on the type that owns it.

Method: Neutral body surface plus Roslyn (DDD-gated), two arms. DECISION (Roslyn only): a predicate over a domain type's members judged in two or more types, where none of those decisions live on the owning type — operands of comparisons and relational property patterns only, so a member merely passed as an argument is not judged. DERIVATION: a plain all-numeric carrier of ≥2 members, with no base type and exactly one constructor, CONSTRUCTED as the result of a method (returned or assigned, never inline as an argument) in two or more types other than its own — the same measurement produced twice, which centralising the judgement does not fix. DERIVATION runs on every language whose frontend declares the produced-or-passed fact per construction (Roslyn and the Java sidecar today); a target with only the derivation arm carries an engine gap naming the decision arm as not assessed, and a frontend that declares nothing keeps the dimension not measured rather than clean. Single-member rules, test code and generated code are out of population for both. Advisory.

  • src.sync.ChangedFiles's [added, modified, removed] are judged in src.KiroGraph, src.core.pipeline.IndexPipeline — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • src.types.Node's [endLine, kind, startLine] are judged in src.resolution.bridges.android-rn, src.resolution.bridges.expo-modules, src.resolution.bridges.flutter-channel, src.resolution.bridges.native-events, src.resolution.bridges.react-native, src.resolution.bridges.turbomodules — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • src.types.Node's [kind, name] are judged in src.frameworks.amplify, src.frameworks.angular, src.frameworks.cloudformation, src.frameworks.csharp, src.frameworks.docker, src.frameworks.elixir, src.frameworks.express, src.frameworks.go, src.frameworks.iac, src.frameworks.java, src.frameworks.laravel, src.frameworks.python, src.frameworks.react, src.frameworks.ruby, src.frameworks.rust, src.frameworks.scala, src.frameworks.solidity, src.frameworks.svelte, src.frameworks.swift, src.resolution.ReferenceResolver, src.resolution.bridges.android-rn, src.resolution.bridges.native-views, src.resolution.bridges.react-native, src.resolution.bridges.turbomodules — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.

What to do

  • Move each repeated judgement onto the type that owns the members it reads, so the rule has one home and cannot drift.
GD1 · Unfinished & placeholder code10.0 / 10Exemplary○ Nothing flagged

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.

M1 · Documentation (README)8.0 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.

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

M2 · Architecture documentation2.0 / 10Critical✓ 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.

  • No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.

What to do

  • Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.

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

M4 · Documentation accuracy10.0 / 10Exemplary○ Nothing flagged

Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.

Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.

P1 · CI/CD gates0.0 / 10Critical✓ Tool-verified

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.

  • No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, …) — changes aren't gated by an automated build/test.

What to do

  • Add a CI workflow that builds and runs the test suite on every push/PR.
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's code 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 · Observability7.0 / 10Strong✓ 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.

  • `src/errors.ts` reports through `console.*` at line 17 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/errors.ts:17
  • `src/errors.ts` reports through `console.*` at line 21 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/errors.ts:21
  • `src/errors.ts` reports through `console.*` at line 24 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/errors.ts:24
  • `src/errors.ts` reports through `console.*` at line 27 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/errors.ts:27
  • `src/hooks/import-prompt.ts` reports through `console.*` at line 62 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/hooks/import-prompt.ts:62
  • `src/hooks/import-prompt.ts` reports through `console.*` at line 65 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/hooks/import-prompt.ts:65
  • `src/hooks/prompt.ts` reports through `console.*` at line 162 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/hooks/prompt.ts:162
  • `src/hooks/prompt.ts` reports through `console.*` at line 272 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/hooks/prompt.ts:272

What to do

  • Route service-code `console.*` output through the module's structured logger (with named fields), so delivery outcomes and failures reach the log pipeline with a level.
  • Add a health-check endpoint (@godaddy/terminus or a /health route) so orchestrators and load balancers can probe liveness/readiness.
P3 · Security & performance tooling0.0 / 10Critical✓ 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 CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 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.
  • `test/security/mock/Mock.csproj` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — test/security/mock/Mock.csproj:8

What to do

  • Run what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
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. — src/security/dep-confusion.ts:90

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.
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 each language's code 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.readFileSync` in `parse` 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) — src/architecture/manifest/npm.ts:21, src/architecture/manifest/ocaml.ts:22
  • `fs.existsSync` in `parse` 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. — src/architecture/manifest/npm.ts:52
  • `fs.readFileSync` in `callback to action` 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. (×6) — src/bin/commands/affected.ts:27, src/bin/commands/benchmark.ts:65, src/bin/commands/caveman.ts:111, …
  • `fs.statSync` in `callback to action` 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. (×3) — src/bin/commands/bench.ts:32, src/bin/commands/doctor.ts:56, src/bin/commands/doctor.ts:101
  • `fs.existsSync` in `callback to action` 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) — src/bin/commands/benchmark.ts:60, src/bin/commands/caveman.ts:89, src/bin/commands/caveman.ts:100, …
  • `fs.mkdirSync` in `callback to action` 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. — src/bin/commands/benchmark.ts:67
  • `fs.writeFileSync` in `callback to action` 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) — src/bin/commands/benchmark.ts:89, src/bin/commands/caveman.ts:107
  • `fs.existsSync` in `runRepoBenchmark` 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. — src/bin/commands/benchmark.ts:103
  • `fs.mkdirSync` in `runRepoBenchmark` 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. — src/bin/commands/benchmark.ts:105
  • `execSync` in `runRepoBenchmark` 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) — src/bin/commands/benchmark.ts:106, src/bin/commands/benchmark.ts:109
  • `fs.statSync` in `runRepoBenchmark` 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. — src/bin/commands/benchmark.ts:140
  • `fs.unlinkSync` in `startQdrant` 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. — src/bin/commands/dashboard.ts:94
  • `fs.unlinkSync` 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. — src/bin/commands/doctor.ts:65
  • `fs.accessSync` in `callback to action` 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. — src/bin/commands/doctor.ts:84
  • `fs.chmodSync` 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. — src/bin/commands/doctor.ts:88
  • `fs.readdirSync` in `callback to action` 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. — src/bin/commands/doctor.ts:112

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 Safety9.9 / 10Exemplary✓ 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.

R10 · Code Duplication2.3 / 10Critical✓ Tool-verified

React / JS · Code Health — The share of the scored frontend lines inside a near-exact copy-pasted block of substantial extent (the D4 clone algorithm over JS/TS tokens, D-386; each line once, 10 at none and 0 at a quarter of the lines, as D4): 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. Scored on the share of the scored frontend lines inside a reported copy, on the same curve as D4. Deterministic.

  • 27 duplicated blocks under src/ have copies in at least two of the sibling directories architecture, data, db, frameworks, graph, mcp (+8 more sibling(s) not listed) — 14 of them are reported below, and 13 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 27 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 27 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 27 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. — src/architecture/layers/index.ts:23
  • src/vectors/qdrant-index.ts:59 · REDACTED:103 — the two spans are one implementation copied and then locally edited — 1114 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. — src/vectors/qdrant-index.ts:59
  • src/vectors/turboquant-index.ts:88 · src/vectors/turbovec-index.ts:38 — the two spans are one implementation copied and then locally edited — 688 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. — src/vectors/turboquant-index.ts:88
  • src/resolution/bridges/native-events.ts:15 · src/resolution/bridges/react-native.ts:14 — the two spans are one implementation copied and then locally edited — 617 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. — src/resolution/bridges/native-events.ts:15
  • src/vectors/lancedb-index.ts:33 · src/vectors/pglite-index.ts:36 — the two spans are one implementation copied and then locally edited — 464 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. — src/vectors/lancedb-index.ts:33
  • src/security/manifest/plugins/pubspec.ts:72 · src/security/manifest/plugins/rubygems.ts:95 — the two spans are one implementation copied and then locally edited — 345 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. — src/security/manifest/plugins/pubspec.ts:72
  • src/jev/client.ts:12 · src/jev/strands-client.ts:22 — the two spans are one implementation copied and then locally edited — 378 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. — src/jev/client.ts:12
  • src/security/manifest/plugins/composer.ts:50 · src/security/manifest/plugins/pubspec.ts:44 — the two spans are one implementation copied and then locally edited — 315 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. — src/security/manifest/plugins/composer.ts:50
  • src/extraction/extractor.ts:888 · src/extraction/notebook.ts:310 — the two spans are one implementation copied and then locally edited — 405 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. — src/extraction/extractor.ts:888
  • src/hooks/prompt.ts:125 · src/hooks/prompt.ts:238 — the two spans are one implementation copied and then locally edited — 381 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. — src/hooks/prompt.ts:125
  • src/extraction/extractor.ts:1065 · src/extraction/notebook.ts:351 — the two spans are one implementation copied and then locally edited — 352 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. — src/extraction/extractor.ts:1065
  • REDACTED:231 · src/resolution/bridges/flutter-channel.ts:123 — the two spans are one implementation copied and then locally edited — 292 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. — REDACTED:231
  • src/config.ts:567 · src/config.ts:642 — the two spans are one implementation copied and then locally edited — 362 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. — src/config.ts:567
  • src/resolution/bridges/flutter-channel.ts:407 · src/resolution/bridges/flutter-channel.ts:453 — 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. — src/resolution/bridges/flutter-channel.ts:407
  • src/frameworks/python.ts:85 · src/frameworks/swift.ts:79 — the two spans are one implementation copied and then locally edited — 331 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. — src/frameworks/python.ts:85
  • src/sync/git-head.ts:17 · src/sync/state.ts:92 — the two spans are one implementation copied and then locally edited — 242 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. — src/sync/git-head.ts:17
  • src/architecture/layers/csharp.ts:34 · src/architecture/layers/elixir.ts:50 · src/architecture/layers/go.ts:55 · src/architecture/layers/java.ts:57 · +7 more site(s) not listed — the 11 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 11 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. — src/architecture/layers/csharp.ts:34
  • REDACTED:343 · src/resolution/bridges/react-native.ts:166 — the two spans are one implementation copied and then locally edited — 184 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. — REDACTED:343
  • src/core/pipeline.ts:403 · src/core/pipeline.ts:775 — all 2 copies are in the same file, 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. — src/core/pipeline.ts:403
  • src/frameworks/csharp.ts:34 · src/frameworks/java.ts:36 — the two spans are one implementation copied and then locally edited — 295 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. — src/frameworks/csharp.ts:34
  • src/security/staleness.ts:28 · src/security/supply-chain.ts:31 — the two spans are one implementation copied and then locally edited — 242 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. — src/security/staleness.ts:28
  • src/frameworks/go.ts:37 · src/frameworks/rust.ts:34 — 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. — src/frameworks/go.ts:37
  • src/core/pipeline.ts:266 · src/core/pipeline.ts:677 — all 2 copies are in the same file, 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. — src/core/pipeline.ts:266
  • src/security/manifest/plugins/hex.ts:73 · src/security/manifest/plugins/nuget.ts:105 — the 2 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. — src/security/manifest/plugins/hex.ts:73
  • src/security/export/serialization.ts:160 · src/security/export/serialization.ts:186 — 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. — src/security/export/serialization.ts:160
  • src/security/manifest/plugins/composer.ts:93 · REDACTED:83 — 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. — src/security/manifest/plugins/composer.ts:93
  • src/architecture/layers/dart.ts:63 · src/architecture/layers/typescript.ts:91 — the 2 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. — src/architecture/layers/dart.ts:63
  • src/data/parsers/json-array.ts:43 · src/data/parsers/jsonl.ts:32 — the 2 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. — src/data/parsers/json-array.ts:43
  • src/mcp/read-modes.ts:272 · src/mcp/read-modes.ts:313 — all 2 copies are in the same file, 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. — src/mcp/read-modes.ts:272
  • src/resolution/bridges/flutter-channel.ts:304 · src/resolution/bridges/flutter-channel.ts:328 — 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. — src/resolution/bridges/flutter-channel.ts:304
  • src/frameworks/flutter.ts:63 · src/frameworks/flutter.ts:88 — 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. — src/frameworks/flutter.ts:63
  • src/resolution/bridges/flutter-channel.ts:262 · src/resolution/bridges/flutter-channel.ts:347 — all 2 copies are in the same file, 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. — src/resolution/bridges/flutter-channel.ts:262
  • src/security/manifest/plugins/cargo.ts:279 · src/security/manifest/plugins/pubspec.ts:244 · src/security/manifest/plugins/rubygems.ts:199 — the 3 copies are spread across 3 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. — src/security/manifest/plugins/cargo.ts:279
  • src/compression/filters/aws.ts:146 · src/compression/filters/generic.ts:33 — the two spans are one implementation copied and then locally edited — 77 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. — src/compression/filters/aws.ts:146
  • src/compression/filters/files.ts:105 · src/compression/filters/misc.ts:53 — the 2 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. — src/compression/filters/files.ts:105
  • src/frameworks/cloudformation.ts:73 · src/frameworks/docker.ts:52 · src/frameworks/docker.ts:72 — the 3 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. — src/frameworks/cloudformation.ts:73
  • src/frameworks/index.ts:166 · src/frameworks/index.ts:195 — the two spans are one implementation copied and then locally edited — 191 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. — src/frameworks/index.ts:166
  • src/mcp/read-modes.ts:90 · src/mcp/read-modes.ts:148 — all 2 copies are in the same file, 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. — src/mcp/read-modes.ts:90
  • src/resolution/bridges/flutter-channel.ts:147 · src/resolution/bridges/flutter-channel.ts:172 — all 2 copies are in the same file, 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. — src/resolution/bridges/flutter-channel.ts:147
  • src/resolution/bridges/native-events.ts:225 · src/resolution/bridges/native-views.ts:285 — 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. — src/resolution/bridges/native-events.ts:225

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.7 / 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.

  • src/extraction/grammars.ts:136 imports tree-sitter-wasms/out/, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — src/extraction/grammars.ts:136

What to do

  • Fix the listed violations: import through public entries (package exports / slice index), never reach into another layer or package's internals.
R2 · Cyclomatic Complexity1.0 / 10Critical✓ 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.

  • handleSecurity has cyclomatic complexity 210 and cognitive complexity 448; 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. — src/mcp/handlers/security.ts:4
  • validateConfig has cyclomatic complexity 190 and cognitive complexity 205; 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. — src/config.ts:449
  • handleCore has cyclomatic complexity 164 and cognitive complexity 365; 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. — src/mcp/handlers/core.ts:6
  • handleCodeHealth has cyclomatic complexity 123 and cognitive complexity 215; 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. — src/mcp/handlers/code-health.ts:4
  • getLanguageSpecificKind has cyclomatic complexity 113 and cognitive complexity 162; 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. — src/extraction/extractor.ts:607
  • handleArchitecture has cyclomatic complexity 100 and cognitive complexity 230; 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. — src/mcp/handlers/architecture.ts:7
  • handleMemory has cyclomatic complexity 88 and cognitive complexity 124; 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. — src/mcp/handlers/memory.ts:5
  • dispatch has cyclomatic complexity 86 and cognitive complexity 137; 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. — REDACTED:154
  • handleData has cyclomatic complexity 78 and cognitive complexity 138; 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. — src/mcp/handlers/data.ts:38
  • handleGitContext has cyclomatic complexity 77 and cognitive complexity 172; 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. — src/mcp/handlers/git-context.ts:12
  • handleComplexity has cyclomatic complexity 76 and cognitive complexity 133; 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. — src/mcp/handlers/complexity.ts:4
  • analyze has cyclomatic complexity 66 and cognitive complexity 116; 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. — src/architecture/index.ts:56
  • syncNow has cyclomatic complexity 66 and cognitive complexity 113; 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. — src/core/pipeline.ts:505
  • handleWiki has cyclomatic complexity 66 and cognitive complexity 104; 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. — src/mcp/handlers/wiki.ts:3
  • extractYaml has cyclomatic complexity 63 and cognitive complexity 153; 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. — src/extraction/infra.ts:352
  • handlePatterns has cyclomatic complexity 63 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. — src/mcp/handlers/patterns.ts:6
  • embedAll has cyclomatic complexity 56 and cognitive complexity 82; 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. — src/vectors/index.ts:375
  • indexAllNow has cyclomatic complexity 54 and cognitive complexity 96; 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. — src/core/pipeline.ts:126
  • handleEditPrimitives has cyclomatic complexity 47 and cognitive complexity 110; 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. — src/mcp/handlers/edit-primitives.ts:22
  • extractImportSource has cyclomatic complexity 44 and cognitive complexity 89; 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. — src/extraction/extractor.ts:797
  • estimateNaiveCost has cyclomatic complexity 43 and cognitive complexity 9; 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. — src/compression/naive-cost.ts:37
  • resolve has cyclomatic complexity 41 and cognitive complexity 87; 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. — src/resolution/bridges/swift-objc.ts:122
  • initialize has cyclomatic complexity 41 and cognitive complexity 68; 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. — src/vectors/index.ts:136
  • resolveUnresolvedRefs has cyclomatic complexity 39 and cognitive complexity 106; 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. — src/resolution/index.ts:163
  • detectCommunities has cyclomatic complexity 38 and cognitive complexity 69; 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. — src/graph/communities.ts:352
  • filterGitStatus has cyclomatic complexity 36 and cognitive complexity 56; 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. — src/compression/filters/git.ts:38
  • validateAgainstSchema has cyclomatic complexity 35 and cognitive complexity 56; 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. — REDACTED:51
  • findNativeViewManagers has cyclomatic complexity 34 and cognitive complexity 76; 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. — src/resolution/bridges/native-views.ts:117
  • extractHcl has cyclomatic complexity 34 and cognitive complexity 74; 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. — src/extraction/infra.ts:154
  • findNativeImpls has cyclomatic complexity 33 and cognitive complexity 68; 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. — REDACTED:80
  • extractFile has cyclomatic complexity 31 and cognitive complexity 40; 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. — src/extraction/extractor.ts:76
  • handleBranch has cyclomatic complexity 30 and cognitive complexity 63; 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. — src/mcp/handlers/branch.ts:9
  • handleDocs has cyclomatic complexity 29 and cognitive complexity 56; 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. — src/mcp/handlers/docs.ts:3
  • extractName has cyclomatic complexity 29 and cognitive complexity 54; 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. — src/extraction/extractor.ts:914
  • resolveTransitives has cyclomatic complexity 28 and cognitive complexity 79; 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. — src/security/integrator.ts:447
  • refinementPhase has cyclomatic complexity 28 and cognitive complexity 69; 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. — src/graph/communities.ts:185
  • parseNpmManifest has cyclomatic complexity 28 and cognitive complexity 51; 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. — src/security/manifest/plugins/npm.ts:39
  • sampleHints has cyclomatic complexity 28 and cognitive complexity 49; 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. — src/data/queries.ts:614
  • quality has cyclomatic complexity 26 and cognitive complexity 35; 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. — src/data/queries.ts:459
  • run has cyclomatic complexity 26 and cognitive complexity 27; 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. — src/security/pipeline.ts:46
R3 · Large Files6.2 / 10Adequate✓ 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.

  • src/extraction/extractor.ts has 1397 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/extraction/extractor.ts:1
  • REDACTED has 1231 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • src/config.ts has 1051 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/config.ts:1
  • src/core/pipeline.ts has 769 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/core/pipeline.ts:1
  • src/mcp/handlers/security.ts has 759 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/mcp/handlers/security.ts:1
  • src/resolution/index.ts has 682 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/resolution/index.ts:1
  • src/extraction/infra.ts has 635 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/extraction/infra.ts:1
  • src/memory/database.ts has 613 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/memory/database.ts:1
  • src/mcp/handlers/core.ts has 608 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/mcp/handlers/core.ts:1
  • src/security/integrator.ts has 603 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/security/integrator.ts:1
  • src/vectors/index.ts has 575 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/vectors/index.ts:1
  • src/data/queries.ts has 565 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/data/queries.ts:1
  • src/security/manifest/plugins/npm.ts has 516 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/security/manifest/plugins/npm.ts:1
  • src/security/vuln/osv-adapter.ts has 513 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/security/vuln/osv-adapter.ts:1
  • src/mcp/handlers/code-health.ts has 511 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/mcp/handlers/code-health.ts:1
  • src/resolution/bridges/flutter-channel.ts has 497 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/resolution/bridges/flutter-channel.ts:1
  • src/security/vuln/client.ts has 497 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/security/vuln/client.ts:1
  • src/watchmen/synthesize.ts has 496 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/watchmen/synthesize.ts:1
  • src/memory/index.ts has 460 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/memory/index.ts:1
  • src/security/manifest/parser.ts 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. — src/security/manifest/parser.ts:1
  • REDACTED has 426 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • src/graph/communities.ts has 424 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/graph/communities.ts:1
  • REDACTED has 408 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1

What to do

  • Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R4 · Test Coverage6.3 / 10Adequate✓ 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.

  • 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. (×40) — src/mcp/tools.ts:1, src/mcp/handlers/security.ts:1, src/data/queries.ts:1, …

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R5 · Dependency Freshness9.8 / 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.

R6 · Tooling6.7 / 10Adequate✓ 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.

  • test ✓ · lint ✗ · typecheck ✓ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.

What to do

  • Add eslint as package.json scripts and run them in CI.
R7 · Dead Code0.7 / 10Critical✓ 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.

  • 2 file(s) (~7 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package. — test/agent/mock
  • 2 file(s) (~5 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package. — test/branch/mock
  • 5 file(s) (~62 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package. — test/graph/mock
  • 1 file(s) (~6 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package. (×2) — test/jev/mock, test/strands/mock
  • 6 file(s) (~43 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package. — test/routes/mock
  • 2 file(s) (~25 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package. — test/security/mock
  • 8 file(s) (~229 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package. — test/turboquant/mock
  • 8 file(s) (~225 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package. — test/turbovec/mock
  • 2 file(s) (~84 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package. — test/wiki/mock
  • Unreachable from the 49 application, 7 tooling and 102 test entry point(s) detected in this repo. Gate removals on `npm run build` — an undetected custom entry would make these reachable.
  • no import path from any entry point (49 application, 7 tooling, 102 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (src/mcp/server.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — src/mcp/tools.ts
  • no import path from any entry point (49 application, 7 tooling, 102 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (REDACTED) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it (×13) — src/mcp/handlers/security.ts, src/mcp/handlers/code-health.ts, src/mcp/handlers/data.ts, …
  • no import path from any entry point (49 application, 7 tooling, 102 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (src/mcp/handlers/architecture.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — src/graph/communities.ts
  • no import path from any entry point (49 application, 7 tooling, 102 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (src/mcp/tools.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — REDACTED
  • no import path from any entry point (49 application, 7 tooling, 102 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (src/mcp/handlers/security.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it (×6) — src/security/supply-chain.ts, src/security/data-flows.ts, src/security/dep-confusion.ts, …
  • no import path from any entry point (49 application, 7 tooling, 102 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (src/mcp/server.ts, src/mcp/tools.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — src/mcp/tool-names.ts
  • no import path from any entry point (49 application, 7 tooling, 102 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (src/mcp/handlers/security.ts, src/security/index.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it (×2) — src/security/export/sbom.ts, src/security/export/vex.ts
  • no import path from any entry point (49 application, 7 tooling, 102 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×2) — src/mcp/server.ts, src/security/export/serialization.ts
  • no import path from any entry point (49 application, 7 tooling, 102 test roots considered), but 3 in-repo import(s) from 2 other file(s) do name it (REDACTED, src/mcp/read-modes.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — src/mcp/cache.ts
  • no import path from any entry point (49 application, 7 tooling, 102 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (src/mcp/handlers/git-context.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — src/graph/flows.ts

What to do

  • Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
R8 · Dependency Hygiene5.0 / 10Adequate✓ 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.

  • Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×2) — package.json:72, package.json:74
  • Declared in test/architecture/mock/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×2) — test/architecture/mock/package.json:7, test/architecture/mock/package.json:6
  • Declared in test/jev/mock/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. — test/jev/mock/package.json:6
  • Declared in test/security/mock/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×2) — test/security/mock/package.json:7, test/security/mock/package.json:8
  • Declared in test/strands/mock/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. — test/strands/mock/package.json:6
  • Only test files import it (first: test/db/unlock.test.ts:5) — move it to devDependencies. — package.json:71

What to do

  • Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
R9 · Circular Imports8.2 / 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.

  • src/extraction/extractor.ts → src/extraction/infra.ts → src/extraction/extractor.ts (one verified cycle inside a mutually-dependent group of 3 files) — src/extraction/extractor.ts:15

What to do

  • Break each cycle by extracting the shared piece into a module both sides can import.
S1 · Web-Security Posture8.0 / 10Strong✓ Tool-verified

Other · Security — Read from this repository's JavaScript/TypeScript source: cryptographic hygiene (weak hash or cipher, key material fixed in the source) and outbound TLS (certificate validation, protocol version) — facts about code that hold whether or not it serves anything itself. Of the server controls, two are read where the source shows them: every session or sign-in cookie the code sets is read for HttpOnly, Secure and SameSite at the line that sets it (a raw `Set-Cookie` header, Express, Fastify, Hono, Koa, Next.js, `cookie.serialize`, express-session and cookie-session), and every Node listener for HTTPS enforcement. HSTS, security response headers and input validation are NOT assessed for JavaScript/TypeScript: each is scored as an absence, an absence is only reportable over the production HTTP server, and in this ecosystem the file that opens the port is build output or a framework launcher rather than a file in the source tree. Their absence here is not a finding about this repository.

Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.

  • MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call. (×5) — src/architecture/incremental.ts:41, src/security/incremental.ts:56, src/sync/remote.ts:39, …

What to do

  • Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key. This repository constructs a collision-broken hash (MD5/SHA1) at 5 sites, not one: `src/architecture/incremental.ts:41` (createHash("sha1")), `src/security/incremental.ts:56` (createHash("sha1")), `src/sync/remote.ts:39` (createHash("sha1")), `src/sync/state.ts:107` (createHash("sha1")), `src/vectors/qdrant-index.ts:47` (createHash("md5")). Each is a separate decision — fixing only the line this row cites leaves the others in place.
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.

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 document1.8 / 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.

  • `validateAgainstSchema` is exported and takes `data: unknown` from its caller, and it calls itself at line 110 (`validateAgainstSchema`) with a piece of `data` (and at line 116) — and nowhere in `validateAgainstSchema` 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. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `validateAgainstSchema` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — REDACTED:110
  • `handleDocs` is exported, takes a document from its caller (line 3) and hands it to `renderEntry`, which calls itself at line 26 (`renderEntry`) with a piece of `entry` — and nowhere in `renderEntry` 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. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `renderEntry` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — src/mcp/handlers/docs.ts:26
  • `augmentBash` is exported, takes a document from its caller (line 505) and hands it to `visit`, which calls itself at line 149 (`visit`) with a piece of `n` — and nowhere in `visit` 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. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `visit` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — src/extraction/infra.ts:149
  • `augmentBash` is exported, takes a document from its caller (line 505) and hands it to `visit`, which calls itself at line 549 (`visit`) with a piece of `n` — and nowhere in `visit` 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. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `visit` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — src/extraction/infra.ts:549
  • `extractRoutes` is exported, takes a document from its caller (line 68) and hands it to `walk`, which calls itself at line 94 (`walk`) with a piece of `node` — 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. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `walk` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — src/extraction/routes.ts:94

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.
X2 · Cancellation propagation9.5 / 10Exemplary✓ 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 11/12 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) 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.
  • `indexAllNow` holds an AbortSignal but calls `indexAll(…)` without it, so its caller's cancellation never reaches that call and it runs to its end after whatever wanted it has given up. Hand the signal on: `indexAll(…, { signal })`. — src/core/pipeline.ts:126

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.

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.

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.

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 element10.0 / 10Exemplary○ Nothing flagged

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.

X3 · Exception handling4.3 / 10Weak✓ 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.

  • `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included. (×8) — src/config.ts:1002, src/utils.ts:76, src/wiki/schema.ts:95, …
  • 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. (×32) — src/index.ts:45, src/utils.ts:110, src/wiki/rename.ts:103, …

What to do

  • Swallowed exception (caught, then discarded)
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.

X5 · Nullable reference types8.3 / 10Strong✓ Tool-verified

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.

  • ~4.3 `!` null assertions per 1k TypeScript source lines — 251 assertion(s) across the 58671 source line(s) of the 264 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: src/graph/communities.ts (22), src/frameworks/iac.ts (19), src/security/dep-confusion.ts (11). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.

What to do

  • The findings name the configuration each number was taken from and, for the assertions, the files that hold them. Turn null checking on where it is off — `"strict": true` in the base tsconfig that the others extend switches `strictNullChecks` on with the rest of the family — and then resolve the assertions rather than adding to them. A `!` on a value the checker could show to be null is a promise the author cannot check from where they are standing, and each one is a `TypeError: Cannot read properties of null` waiting for the path that makes it true; where the value genuinely cannot be null, say something the checker can see instead (narrow it with a test, make the property required, drop the `?`).

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 Health33.3Weak — gated by D1, D2, R10, R2, R7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture92.7ExemplaryStrongest area.
Maturity67.1Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness33.2Weak — gated by P1, P3, P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security52.3Adequate — gated by D29, C2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance60.0AdequateAcceptable, 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.

  • SC1 Supply-chain hygiene — 6 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X10 Duplicated predicate — 35 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 29 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 2 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.

  • P4 Deployment & Rollback — not evidenced — no deploy/rollback/approval signal in the repo; absence of evidence is not evidence of a manual release
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 61 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 web markup found — accessibility is not applicable to this repository.
  • AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
  • AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
  • AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
  • AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
  • AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
  • AX1 Captive dependencies — not analysed — these correctness checks read a source model 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
  • 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
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — the dev server (`npm run dev`) exited before it served a page. Likely cause (our sandbox): a program the dev server needs is not installed in our sandbox image. This is a limit of our sandbox, not of your repository. Last output: "> kirograph@1.5.0 dev / > tsx scripts/build.ts --watch / sh: 1: tsx: not found" No runtime evidence was gathered. 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 — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no data at rest for these controls to protect. If it does persist personal data (through a hosted backend configured outside this repository, for instance), the controls belong to wherever that data is stored.
  • C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a hosted backend configured outside this repository, for instance), the trail belongs to wherever that data is stored.
  • C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound. If it does (through a hosted backend configured outside this repository, for instance), the limit belongs wherever that data is stored.
  • C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over. If it does (through a hosted backend configured outside this repository, for instance), the rights are served wherever that data is stored.
  • D11 Test Reliability — Test reliability not measured — polyglot suite, one half not re-run
  • D16 Bus Factor — single-maintainer repository — bus factor is not applicable
  • D18 Solution Shape — D18 scores the shape of a .NET solution, but this repository's production source is mostly .rs, .ts — the .NET project files present are an immaterial minority — so the dimension does not apply.
  • D20 ADR Quality — N/A — ADRs are expected on deployable products with a user-facing host, not consumed libraries; no ADR log is required here.
  • D23 Boundary Type-Coupling — single shared-core project — no cross-context coupling to assess
  • D25 ADR Conformance — no ADRs to check
  • D26 Project Cohesion — This repository is one project, `Mock` (0 LoC, 0 public types across 0 namespaces), within the size bounds. Not scored: a single unit of this size gives project cohesion nothing to grade.
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
  • D32 Data Compliance (PII/GDPR) — 8 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D36 Supply-chain Provenance & Signing — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.
  • 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.
  • D7 Architectural Integrity — no checkable ADRs and no dependency cycles — architectural integrity not assessed
  • D8 Code Coverage — Coverage not measured — .NET and JavaScript/TypeScript suite
  • DM1 Aggregate boundaries — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
  • DM10 One transaction, one aggregate — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
  • DM2 Strongly-typed ids — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
  • DM3 Integration-event coupling — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
  • DM4 Rich vs anemic model — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
  • DM5 Encapsulated state — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
  • DM6 Domain ↔ infrastructure boundary — this TypeScript/JavaScript repository maps no type to a persistence framework (TypeORM/Prisma/MikroORM/Sequelize/Mongoose), so DM6's domain↔infrastructure fusion read has no population to be taken over
  • DM7 Repository granularity — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
  • 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
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • IC1 Incompleteness & stubs — reported, not scored — this repository's C# declares no analysable method bodies (a constants, record or DTO assembly), and this score is a density of unfinished work per method, which has no denominator here. The file-level signals below were still collected and are shown in full
  • P12 CI test-gate honesty — no CI workflow found
  • P8 Schema migrations — no EF Core usage detected
  • P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • 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 scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X20 Mistyped argument guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X26 Unsynchronised callback handoff — Not applicable: this check looks for a collection written by a callback on one thread while the body waiting on it touches it on another, and in this repository's languages no collection is reachable from two threads at once. Rust's compiler refuses the unsynchronised version: a collection shared between a callback's thread and the waiting body must be `Sync`, which a `Vec`, `VecDeque` or `HashMap` is only behind a `Mutex`/`RwLock`, so the race this check looks for cannot be written in safe Rust. TypeScript/JavaScript runs every callback on the one thread that owns its objects: a callback runs only when the body waiting on it has yielded, never alongside it, and a worker thread receives a COPY of what it is sent. A SharedArrayBuffer carries raw bytes, never an Array, Map or Set, so no collection is reachable from two threads at once. Not a gap in the analyzer and not a finding about your code.
  • X27 Collection changed while being enumerated — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • 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.
  • X4 Structured logging — not analysed — these correctness checks read a source model 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
  • 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 — 8 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
R9 · Circular Imports · Import cycle (2 files) · ×1
  • Import cycle (2 files) src/extraction/extractor.ts:15 — src/extraction/extractor.ts → src/extraction/infra.ts → src/extraction/extractor.ts (one verified cycle inside a mutually-dependent group of 3 files)
Serious — 772 finding(s)
PF3 · Async & latency hygiene · Sync-over-async blocking · ×40
  • Sync-over-async blocking src/architecture/manifest/npm.ts:21 — `fs.readFileSync` in `parse` 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 src/architecture/manifest/npm.ts:52 — `fs.existsSync` in `parse` 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 src/architecture/manifest/ocaml.ts:22 — `fs.readFileSync` in `parse` 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 src/bin/commands/affected.ts:27 — `fs.readFileSync` in `callback to action` 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 src/bin/commands/bench.ts:32 — `fs.statSync` in `callback to action` 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 src/bin/commands/benchmark.ts:60 — `fs.existsSync` in `callback to action` 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 src/bin/commands/benchmark.ts:65 — `fs.readFileSync` in `callback to action` 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 src/bin/commands/benchmark.ts:67 — `fs.mkdirSync` in `callback to action` 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 src/bin/commands/benchmark.ts:89 — `fs.writeFileSync` in `callback to action` 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 src/bin/commands/benchmark.ts:103 — `fs.existsSync` in `runRepoBenchmark` 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 src/bin/commands/benchmark.ts:105 — `fs.mkdirSync` in `runRepoBenchmark` 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 src/bin/commands/benchmark.ts:106 — `execSync` in `runRepoBenchmark` 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 src/bin/commands/benchmark.ts:109 — `execSync` in `runRepoBenchmark` 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 src/bin/commands/benchmark.ts:140 — `fs.statSync` in `runRepoBenchmark` 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 src/bin/commands/caveman.ts:89 — `fs.existsSync` in `callback to action` 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 src/bin/commands/caveman.ts:100 — `fs.existsSync` in `callback to action` 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 src/bin/commands/caveman.ts:106 — `fs.existsSync` in `callback to action` 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 src/bin/commands/caveman.ts:107 — `fs.writeFileSync` in `callback to action` 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 src/bin/commands/caveman.ts:111 — `fs.existsSync` in `callback to action` 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 src/bin/commands/caveman.ts:111 — `fs.readFileSync` in `callback to action` 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 src/bin/commands/compression.ts:72 — `fs.existsSync` in `callback to action` 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 src/bin/commands/compression.ts:78 — `fs.existsSync` in `callback to action` 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 src/bin/commands/dashboard.ts:94 — `fs.unlinkSync` in `startQdrant` 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 src/bin/commands/data.ts:678 — `fs.existsSync` in `callback to action` 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 src/bin/commands/data.ts:696 — `fs.readFileSync` in `callback to action` 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.
R4 · Test Coverage · No test reaches this file · ×40
  • No test reaches this file src/mcp/tools.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 src/mcp/handlers/security.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 src/data/queries.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 src/mcp/handlers/core.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 src/watchmen/synthesize.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 src/mcp/handlers/code-health.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 src/memory/index.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 src/graph/communities.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 src/compression/filters/aws.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 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 src/compression/tracker.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 src/security/supply-chain.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 src/mcp/handlers/data.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 src/mcp/handlers/memory.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 src/security/data-flows.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 src/mcp/read-modes.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 src/compression/filters/lint.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 src/hooks/prompt.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 src/security/attack-surface.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 src/mcp/handlers/patterns.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 src/mcp/handlers/architecture.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 src/compression/filters/test.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 src/security/dep-confusion.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 src/security/staleness.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 src/security/export/sbom.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.
  • + 15 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (empty catch) · ×32
  • Swallowed exception (empty catch) src/index.ts:45 — 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) src/utils.ts:110 — 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) src/wiki/rename.ts:103 — 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) src/watchmen/synthesize.ts:360 — 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) src/vectors/index.ts:196 — 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) src/vectors/qdrant-index.ts:110 — 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) src/vectors/qdrant-index.ts:113 — 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) src/vectors/qdrant-index.ts:180 — 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) src/vectors/turboquant-index.ts:74 — 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) src/vectors/turboquant-index.ts:206 — 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) src/vectors/turboquant-index.ts:235 — 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) src/vectors/turboquant-index.ts:246 — 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) src/vectors/turbovec-index.ts:156 — 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) src/vectors/turbovec-index.ts:189 — 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:118 — 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:177 — 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:181 — 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:252 — 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:268 — 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:327 — 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:457 — 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) src/vectors/vec-index.ts:101 — 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) src/vectors/vec-index.ts:209 — 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) src/sync/git-head.ts:115 — 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) src/sync/git-head.ts:119 — 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.
  • + 7 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×21
  • Hotspot: src/core/pipeline.ts src/core/pipeline.ts:505 — src/core/pipeline.ts changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 66 in IndexPipeline.syncNow at line 505. 6 of those changes were fix/bug commits, and the other 12 changed it for other reasons — this file is under both repair and feature pressure. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 10:19:40 +01:00' --until='2026-11-13 10:19:40 +01:00' --full-history --no-merges -- src/core/pipeline.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: src/config.ts src/config.ts:449 — src/config.ts changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 191 in config.validateConfig at line 449. 1 of those changes was a fix/bug commit, and the other 5 changed it for other reasons — this file is under both repair and feature pressure. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 10:19:40 +01:00' --until='2026-11-13 10:19:40 +01:00' --full-history --no-merges -- src/config.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: src/bin/commands/memory.ts src/bin/commands/memory.ts:19 — src/bin/commands/memory.ts changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 142 in memory.register at line 19. 3 of those changes were fix/bug commits, and the other 4 changed it for other reasons — this file is under both repair and feature pressure. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 10:19:40 +01:00' --until='2026-11-13 10:19:40 +01:00' --full-history --no-merges -- src/bin/commands/memory.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: src/mcp/handlers/security.ts src/mcp/handlers/security.ts:4 — src/mcp/handlers/security.ts changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 190 in security.handleSecurity at line 4. 2 of those changes were fix/bug commits, and the other 3 changed it for other reasons — this file is under both repair and feature pressure. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 10:19:40 +01:00' --until='2026-11-13 10:19:40 +01:00' --full-history --no-merges -- src/mcp/handlers/security.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: src/mcp/handlers/memory.ts src/mcp/handlers/memory.ts:5 — src/mcp/handlers/memory.ts changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 77 in memory.handleMemory at line 5. 2 of those changes were fix/bug commits, and the other 4 changed it for other reasons — this file is under both repair and feature pressure. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 10:19:40 +01:00' --until='2026-11-13 10:19:40 +01:00' --full-history --no-merges -- src/mcp/handlers/memory.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: src/bin/commands/vulns.ts src/bin/commands/vulns.ts:31 — src/bin/commands/vulns.ts changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 93 in vulns.register at line 31. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 10:19:40 +01:00' --until='2026-11-13 10:19:40 +01:00' --full-history --no-merges -- src/bin/commands/vulns.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: src/bin/installer/index.ts src/bin/installer/index.ts:124 — src/bin/installer/index.ts changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 80 in index.runInstaller at line 124. 1 of those changes was a fix/bug commit, and the other 2 changed it for other reasons — this file is under both repair and feature pressure. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 10:19:40 +01:00' --until='2026-11-13 10:19:40 +01:00' --full-history --no-merges -- src/bin/installer/index.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: src/bin/commands/wiki.ts src/bin/commands/wiki.ts:62 — src/bin/commands/wiki.ts changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 56 in wiki.register at line 62. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 10:19:40 +01:00' --until='2026-11-13 10:19:40 +01:00' --full-history --no-merges -- src/bin/commands/wiki.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: src/bin/commands/sync.ts src/bin/commands/sync.ts:7 — src/bin/commands/sync.ts changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in sync.register at line 7. 1 of those changes was a fix/bug commit, and the other 5 changed it for other reasons — this file is under both repair and feature pressure. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 10:19:40 +01:00' --until='2026-11-13 10:19:40 +01:00' --full-history --no-merges -- src/bin/commands/sync.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: src/extraction/extractor.ts src/extraction/extractor.ts:76 — src/extraction/extractor.ts changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in extractor.extractFile at line 76. 5 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 10:19:40 +01:00' --until='2026-11-13 10:19:40 +01:00' --full-history --no-merges -- src/extraction/extractor.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: src/resolution/index.ts src/resolution/index.ts:163 — src/resolution/index.ts changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in ReferenceResolver.resolveUnresolvedRefs at line 163. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 10:19:40 +01:00' --until='2026-11-13 10:19:40 +01:00' --full-history --no-merges -- src/resolution/index.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: src/mcp/handlers/wiki.ts src/mcp/handlers/wiki.ts:3 — src/mcp/handlers/wiki.ts changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 53 in wiki.handleWiki at line 3. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 10:19:40 +01:00' --until='2026-11-13 10:19:40 +01:00' --full-history --no-merges -- src/mcp/handlers/wiki.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: src/security/manifest/plugins/npm.ts src/security/manifest/plugins/npm.ts:39 — src/security/manifest/plugins/npm.ts changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in npm.parseNpmManifest at line 39. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 10:19:40 +01:00' --until='2026-11-13 10:19:40 +01:00' --full-history --no-merges -- src/security/manifest/plugins/npm.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:62 — REDACTED changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in maven.parseMavenManifest at line 62. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 10:19:40 +01:00' --until='2026-11-13 10:19:40 +01: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: src/bin/installer/steering.ts src/bin/installer/steering.ts:976 — src/bin/installer/steering.ts changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 49 in steering.writeWorkflowSteering at line 976. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 10:19:40 +01:00' --until='2026-11-13 10:19:40 +01:00' --full-history --no-merges -- src/bin/installer/steering.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: src/security/pipeline.ts src/security/pipeline.ts:46 — src/security/pipeline.ts changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in SecurityPipeline.run at line 46. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 10:19:40 +01:00' --until='2026-11-13 10:19:40 +01:00' --full-history --no-merges -- src/security/pipeline.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: src/wiki/lint.ts src/wiki/lint.ts:29 — src/wiki/lint.ts changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in lint.lintWiki at line 29. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 10:19:40 +01:00' --until='2026-11-13 10:19:40 +01:00' --full-history --no-merges -- src/wiki/lint.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: src/sync/state.ts src/sync/state.ts:106 — src/sync/state.ts changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in state.workspaceFingerprint at line 106. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 10:19:40 +01:00' --until='2026-11-13 10:19:40 +01:00' --full-history --no-merges -- src/sync/state.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: src/sync/index.ts src/sync/index.ts:258 — src/sync/index.ts changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in index.getChangedFiles 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 10:19:40 +01:00' --until='2026-11-13 10:19:40 +01:00' --full-history --no-merges -- src/sync/index.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: src/security/attack-surface.ts src/security/attack-surface.ts:87 — src/security/attack-surface.ts changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in AttackSurfaceAnalyzer.analyze 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 10:19:40 +01:00' --until='2026-11-13 10:19:40 +01:00' --full-history --no-merges -- src/security/attack-surface.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: src/bin/commands/attack-surface.ts src/bin/commands/attack-surface.ts:10 — src/bin/commands/attack-surface.ts changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in attack-surface.register at line 10. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 10:19:40 +01:00' --until='2026-11-13 10:19:40 +01:00' --full-history --no-merges -- src/bin/commands/attack-surface.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.
D3 · God Classes · FunctionTooLong · ×13
  • FunctionTooLong: security.handleSecurity src/mcp/handlers/security.ts:4 — FunctionTooLong — handleSecurity runs 628 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 528 over it, 6.28× 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: config.validateConfig src/config.ts:449 — FunctionTooLong — validateConfig runs 424 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 324 over it, 4.24× 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: code-health.handleCodeHealth src/mcp/handlers/code-health.ts:4 — FunctionTooLong — handleCodeHealth runs 415 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 315 over it, 4.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: memory.handleMemory src/mcp/handlers/memory.ts:5 — FunctionTooLong — handleMemory runs 290 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 190 over it, 2.90× 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: data.handleData src/mcp/handlers/data.ts:38 — FunctionTooLong — handleData runs 234 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 134 over it, 2.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: architecture.handleArchitecture src/mcp/handlers/architecture.ts:7 — FunctionTooLong — handleArchitecture 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: patterns.handlePatterns src/mcp/handlers/patterns.ts:6 — FunctionTooLong — handlePatterns runs 205 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 105 over it, 2.05× 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: wiki.handleWiki src/mcp/handlers/wiki.ts:3 — FunctionTooLong — handleWiki runs 200 significant lines (blank, comment-only and punctuation-only lines excluded) 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: complexity.handleComplexity src/mcp/handlers/complexity.ts:4 — FunctionTooLong — handleComplexity runs 198 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 98 over it, 1.98× 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: git-context.handleGitContext src/mcp/handlers/git-context.ts:12 — FunctionTooLong — handleGitContext runs 186 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 86 over it, 1.86× 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: edit-primitives.handleEditPrimitives src/mcp/handlers/edit-primitives.ts:22 — FunctionTooLong — handleEditPrimitives 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: docs.handleDocs src/mcp/handlers/docs.ts:3 — FunctionTooLong — handleDocs runs 110 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 10 over it, 1.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.
  • FunctionTooLong: branch.handleBranch src/mcp/handlers/branch.ts:9 — FunctionTooLong — handleBranch runs 106 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 6 over it, 1.06× 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.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×8
  • Swallowed exception (caught, then discarded) src/config.ts:1002 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
  • Swallowed exception (caught, then discarded) src/utils.ts:76 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
  • Swallowed exception (caught, then discarded) src/wiki/schema.ts:95 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
  • Swallowed exception (caught, then discarded) src/wiki/schema.ts:128 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
  • Swallowed exception (caught, then discarded) src/sync/files.ts:62 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
  • Swallowed exception (caught, then discarded) src/sync/index.ts:109 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
  • Swallowed exception (caught, then discarded) src/sync/index.ts:118 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
  • Swallowed exception (caught, then discarded) src/sync/index.ts:158 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
D3 · God Classes · MethodTooLong · ×7
  • MethodTooLong: IndexPipeline.indexAllNow src/core/pipeline.ts:126 — MethodTooLong — indexAllNow runs 229 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 129 over it, 2.29× 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: IndexPipeline.syncNow src/core/pipeline.ts:505 — MethodTooLong — syncNow runs 226 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 126 over it, 2.26× 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: ToolHandler.dispatch REDACTED:154 — MethodTooLong — dispatch runs 178 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 78 over it, 1.78× 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: AttackSurfaceAnalyzer.analyze src/security/attack-surface.ts:87 — MethodTooLong — analyze runs 168 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 68 over it, 1.68× 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: ArchitectureAnalyzer.analyze src/architecture/index.ts:56 — MethodTooLong — analyze runs 137 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 37 over it, 1.37× 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: VectorManager.embedAll src/vectors/index.ts:375 — MethodTooLong — embedAll 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.
  • MethodTooLong: VectorManager.initialize src/vectors/index.ts:136 — MethodTooLong — initialize 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.
D15 · Churn × Complexity Hotspots · Repeated repair · ×6
  • Repeated repair: REDACTED REDACTED:168 — REDACTED 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 13 (its worst body is GraphDatabase.runMigrations at line 168), AT OR 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: runtime lock recovery, background sync hooks, engines outside the project, multi-repo git tools, mem fixes”; “fix(db): replay a hot journal before opening, make edges unique, unlock respects live writers, pin the driver”; “fix(db): remove full-text entries and edges when nodes are deleted by the other paths”; “fix(db): wait for a live writer with the busy timeout, not 8 seconds (#70)”. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 10:19:40 +01:00' --until='2026-11-13 10:19:40 +01: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: REDACTED REDACTED:187 — REDACTED changed 6 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 15 (its worst body is ReachabilityAnalyzer.getImpactSummary at line 187), AT OR 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(security): 1.1.1 — transitive dep scanning, Maven BOM resolution, reachability fixes”; “fix(security): report under_investigation for dependencies with no call-graph signal”; “fix(security): persist reachability verdict on the no-entry-point/no-dependency early exits”; “fix(security): preserve under_investigation verdict in reverse-BFS reachability”. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 10:19:40 +01:00' --until='2026-11-13 10:19:40 +01: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: src/db/db-lock.ts src/db/db-lock.ts:283 — src/db/db-lock.ts 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 9 (its worst body is BusyRetryDatabase.op at line 283), AT OR 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: runtime lock recovery, background sync hooks, engines outside the project, multi-repo git tools, mem fixes”; “fix(db): replay a hot journal before opening, make edges unique, unlock respects live writers, pin the driver”; “fix(db): wait for a live writer with the busy timeout, not 8 seconds (#70)”. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 10:19:40 +01:00' --until='2026-11-13 10:19:40 +01:00' --full-history --no-merges -- src/db/db-lock.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.
  • Repeated repair: src/extraction/grammars.ts src/extraction/grammars.ts:149 — src/extraction/grammars.ts 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 6 (its worst body is grammars.loadGrammarsForLanguages at line 149), AT OR 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(extraction): parse Lua the same way every time”; “fix(extraction): parse bash and yaml, which failed on every index and sync”; “fix: bundle mainstream WASM parsers and handle crashes gracefully”. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 10:19:40 +01:00' --until='2026-11-13 10:19:40 +01:00' --full-history --no-merges -- src/extraction/grammars.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.
  • Repeated repair: src/security/manifest/adapter.ts src/security/manifest/adapter.ts:148 — src/security/manifest/adapter.ts 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 15 (its worst body is SecurityManifestAdapter.extractAll at line 148), AT OR 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(security): 1.1.1 — transitive dep scanning, Maven BOM resolution, reachability fixes”; “fix(security): extend transitive-dependency scanning to all lock-based ecosystems”; “fix: bundle mainstream WASM parsers and handle crashes gracefully”. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 10:19:40 +01:00' --until='2026-11-13 10:19:40 +01:00' --full-history --no-merges -- src/security/manifest/adapter.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.
  • Repeated repair: src/security/vuln/client.ts src/security/vuln/client.ts:290 — src/security/vuln/client.ts 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 11 (its worst body is VulnerabilityDatabaseClient.enrichDuplicateVersions at line 290), AT OR 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: clear stale vuln flag on success; stop mutex leak on lock contention”; “fix(security): 1.1.1 — transitive dep scanning, Maven BOM resolution, reachability fixes”; “fix(security): check every distinct resolved version of a duplicated npm package”. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 10:19:40 +01:00' --until='2026-11-13 10:19:40 +01:00' --full-history --no-merges -- src/security/vuln/client.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.
SC1 · Supply-chain hygiene · JavaScript dependencies are not locked · ×6
  • JavaScript dependencies are not locked native/turbovec-node/package.json:21 — native/turbovec-node/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked package.json:69 — package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked test/architecture/mock/package.json:5 — test/architecture/mock/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked test/jev/mock/package.json:5 — test/jev/mock/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked test/routes/mock/package.json:1 — test/routes/mock/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
  • JavaScript dependencies are not locked test/strands/mock/package.json:5 — test/strands/mock/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
D3 · God Classes · FileTooLong · ×5
  • FileTooLong: extraction/extractor.ts src/extraction/extractor.ts — FileTooLong — 981 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 481 over it, 1.96× 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 — 853 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: GraphDatabase (24-1375). The bar is 500 significant lines; this is 353 over it, 1.71× 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/config.ts src/config.ts — FileTooLong — 769 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 269 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: handlers/security.ts src/mcp/handlers/security.ts — FileTooLong — 630 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: handleSecurity (4-910). The bar is 500 significant lines; this is 130 over it, 1.26× 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: core/pipeline.ts src/core/pipeline.ts — FileTooLong — 542 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: IndexPipeline (39-851). The bar is 500 significant lines; this is 42 over it, 1.08× 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.
S1 · Web-Security Posture · Weak hash algorithm · ×5
  • Weak hash algorithm src/architecture/incremental.ts:41 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm src/security/incremental.ts:56 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm src/sync/remote.ts:39 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm src/sync/state.ts:107 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm src/vectors/qdrant-index.ts:47 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
X17 · Uncapped recursion over a caller-supplied document · Recursive walk over a caller-supplied document has no depth cap · ×5
  • Recursive walk over a caller-supplied document has no depth cap REDACTED:110 — `validateAgainstSchema` is exported and takes `data: unknown` from its caller, and it calls itself at line 110 (`validateAgainstSchema`) with a piece of `data` (and at line 116) — and nowhere in `validateAgainstSchema` 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. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `validateAgainstSchema` 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 src/mcp/handlers/docs.ts:26 — `handleDocs` is exported, takes a document from its caller (line 3) and hands it to `renderEntry`, which calls itself at line 26 (`renderEntry`) with a piece of `entry` — and nowhere in `renderEntry` 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. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `renderEntry` 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 src/extraction/infra.ts:149 — `augmentBash` is exported, takes a document from its caller (line 505) and hands it to `visit`, which calls itself at line 149 (`visit`) with a piece of `n` — and nowhere in `visit` 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. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `visit` 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 src/extraction/infra.ts:549 — `augmentBash` is exported, takes a document from its caller (line 505) and hands it to `visit`, which calls itself at line 549 (`visit`) with a piece of `n` — and nowhere in `visit` 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. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `visit` 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 src/extraction/routes.ts:94 — `extractRoutes` is exported, takes a document from its caller (line 68) and hands it to `walk`, which calls itself at line 94 (`walk`) with a piece of `node` — 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. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `walk` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
R10 · Code Duplication · Duplicated block (20 lines × 2 locations) · ×4
  • Duplicated block (20 lines × 2 locations) src/architecture/layers/dart.ts:63 — src/architecture/layers/dart.ts:63 · src/architecture/layers/typescript.ts:91 — the 2 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.
  • Duplicated block (20 lines × 2 locations) src/data/parsers/json-array.ts:43 — src/data/parsers/json-array.ts:43 · src/data/parsers/jsonl.ts:32 — the 2 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.
  • Duplicated block (20 lines × 2 locations) src/mcp/read-modes.ts:272 — src/mcp/read-modes.ts:272 · src/mcp/read-modes.ts:313 — all 2 copies are in the same file, 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.
  • Duplicated block (20 lines × 2 locations) src/resolution/bridges/flutter-channel.ts:304 — src/resolution/bridges/flutter-channel.ts:304 · src/resolution/bridges/flutter-channel.ts:328 — 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 (18 lines × 2 locations) · ×4
  • Duplicated block (18 lines × 2 locations) src/compression/filters/files.ts:105 — src/compression/filters/files.ts:105 · src/compression/filters/misc.ts:53 — the 2 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.
  • Duplicated block (18 lines × 2 locations) src/mcp/read-modes.ts:90 — src/mcp/read-modes.ts:90 · src/mcp/read-modes.ts:148 — all 2 copies are in the same file, 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.
  • Duplicated block (18 lines × 2 locations) src/resolution/bridges/flutter-channel.ts:147 — src/resolution/bridges/flutter-channel.ts:147 · src/resolution/bridges/flutter-channel.ts:172 — all 2 copies are in the same file, 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.
  • Duplicated block (18 lines × 2 locations) src/resolution/bridges/native-events.ts:225 — src/resolution/bridges/native-events.ts:225 · src/resolution/bridges/native-views.ts:285 — 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.
R8 · Dependency Hygiene · Unused dependency 'express' · ×4
  • Unused dependency 'express' test/architecture/mock/package.json:7 — Declared in test/architecture/mock/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
  • Unused dependency 'express' test/jev/mock/package.json:6 — Declared in test/jev/mock/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
  • Unused dependency 'express' test/security/mock/package.json:7 — Declared in test/security/mock/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
  • Unused dependency 'express' test/strands/mock/package.json:6 — Declared in test/strands/mock/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
D2 · Cognitive Complexity · infra.scanJson · ×3
  • infra.scanJson::ws (cognitive 23) src/extraction/infra.ts:587 — infra.scanJson::ws has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 3 (7 pts), boolean chains 6 (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. This shape REPEATS in the file: 2 other methods here (infra.scanJson::value, infra.scanJson::object) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 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.
  • infra.scanJson::object (cognitive 17) src/extraction/infra.ts:630 — infra.scanJson::object has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 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. This shape REPEATS in the file: 2 other methods here (infra.scanJson::ws, infra.scanJson::value) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 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.
  • infra.scanJson::value (cognitive 16) src/extraction/infra.ts:611 — infra.scanJson::value has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (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. This shape REPEATS in the file: 2 other methods here (infra.scanJson::ws, infra.scanJson::object) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 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.
D29 · Static Analysis (SAST) · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D3 · God Classes · TooManyMethods · ×3
  • TooManyMethods: GraphDatabase REDACTED:24 — TooManyMethods — 82 methods. The bar is 30 methods; this is 52 over it, 2.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.
  • TooManyMethods: MemoryDatabase src/memory/database.ts:60 — TooManyMethods — 46 methods. The bar is 30 methods; this is 16 over it, 1.53× 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: KiroGraph src/index.ts:49 — TooManyMethods — 42 methods. The bar is 30 methods; this is 12 over it, 1.40× 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 · ClassTooLong · ×2
  • ClassTooLong: GraphDatabase REDACTED:24 — ClassTooLong — 842 significant lines (blank, comment-only and punctuation-only lines excluded), 82 methods. The bar is 400 significant lines; this is 442 over it, 2.11× 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: IndexPipeline src/core/pipeline.ts:39 — ClassTooLong — 520 significant lines (blank, comment-only and punctuation-only lines excluded), 16 methods. The bar is 400 significant lines; this is 120 over it, 1.30× 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.
R10 · Code Duplication · Duplicated block with local edits (45 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (45 matched lines × 2 locations) src/extraction/extractor.ts:888 — src/extraction/extractor.ts:888 · src/extraction/notebook.ts:310 — the two spans are one implementation copied and then locally edited — 405 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.
  • Duplicated block with local edits (45 matched lines × 2 locations) src/hooks/prompt.ts:125 — src/hooks/prompt.ts:125 · src/hooks/prompt.ts:238 — the two spans are one implementation copied and then locally edited — 381 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 with local edits (31 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (31 matched lines × 2 locations) src/frameworks/csharp.ts:34 — src/frameworks/csharp.ts:34 · src/frameworks/java.ts:36 — the two spans are one implementation copied and then locally edited — 295 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.
  • Duplicated block with local edits (31 matched lines × 2 locations) src/security/staleness.ts:28 — src/security/staleness.ts:28 · src/security/supply-chain.ts:31 — the two spans are one implementation copied and then locally edited — 242 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 (21 lines × 2 locations) · ×2
  • Duplicated block (21 lines × 2 locations) src/security/export/serialization.ts:160 — src/security/export/serialization.ts:160 · src/security/export/serialization.ts:186 — 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 (21 lines × 2 locations) src/security/manifest/plugins/composer.ts:93 — src/security/manifest/plugins/composer.ts:93 · REDACTED:83 — 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 (19 lines × 2 locations) · ×2
  • Duplicated block (19 lines × 2 locations) src/frameworks/flutter.ts:63 — src/frameworks/flutter.ts:63 · src/frameworks/flutter.ts:88 — 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 (19 lines × 2 locations) src/resolution/bridges/flutter-channel.ts:262 — src/resolution/bridges/flutter-channel.ts:262 · src/resolution/bridges/flutter-channel.ts:347 — all 2 copies are in the same file, 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 (18 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (18 matched lines × 2 locations) src/compression/filters/aws.ts:146 — src/compression/filters/aws.ts:146 · src/compression/filters/generic.ts:33 — the two spans are one implementation copied and then locally edited — 77 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.
  • Duplicated block with local edits (18 matched lines × 2 locations) src/frameworks/index.ts:166 — src/frameworks/index.ts:166 · src/frameworks/index.ts:195 — the two spans are one implementation copied and then locally edited — 191 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.
R8 · Dependency Hygiene · Unused dependency 'lodash' · ×2
  • Unused dependency 'lodash' test/architecture/mock/package.json:6 — Declared in test/architecture/mock/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
  • Unused dependency 'lodash' test/security/mock/package.json:8 — Declared in test/security/mock/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
D1 · Cyclomatic Complexity · config.validateConfig (cyclomatic 191) · ×1
  • config.validateConfig (cyclomatic 191) src/config.ts:449 — config.validateConfig has cyclomatic complexity 191 (threshold 15). Of this number, 190 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 · security.handleSecurity (cyclomatic 190) · ×1
  • security.handleSecurity (cyclomatic 190) src/mcp/handlers/security.ts:4 — security.handleSecurity has cyclomatic complexity 190 (threshold 15). Of this number, 185 points are the body's own statements and 5 belong to 3 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 · core.handleCore (cyclomatic 158) · ×1
  • core.handleCore (cyclomatic 158) src/mcp/handlers/core.ts:6 — core.handleCore has cyclomatic complexity 158 (threshold 15). Of this number, 130 points are the body's own statements and 28 belong to 5 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 · memory.register (cyclomatic 142) · ×1
  • memory.register (cyclomatic 142) src/bin/commands/memory.ts:19 — memory.register has cyclomatic complexity 142 (threshold 15). Most of this is not in the body itself: 1 of the 142 points is its own statement and the rest belongs to 24 function literals inside it that branch (lines 910, 108, 502, …). 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 · pattern.register (cyclomatic 120) · ×1
  • pattern.register (cyclomatic 120) src/bin/commands/pattern.ts:45 — pattern.register has cyclomatic complexity 120 (threshold 15). Most of this is not in the body itself: 1 of the 120 points is its own statement and the rest belongs to one function literal inside it that branches (line 58). 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 · data.register (cyclomatic 117) · ×1
  • data.register (cyclomatic 117) src/bin/commands/data.ts:6 — data.register has cyclomatic complexity 117 (threshold 15). Most of this is not in the body itself: 1 of the 117 points is its own statement and the rest belongs to 19 function literals inside it that branch (lines 61, 612, 673, …). 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 · code-health.handleCodeHealth (cyclomatic 115) · ×1
  • code-health.handleCodeHealth (cyclomatic 115) src/mcp/handlers/code-health.ts:4 — code-health.handleCodeHealth has cyclomatic complexity 115 (threshold 15). Of this number, 112 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 · extractor.getLanguageSpecificKind (cyclomatic 113) · ×1
  • extractor.getLanguageSpecificKind (cyclomatic 113) src/extraction/extractor.ts:607 — extractor.getLanguageSpecificKind has cyclomatic complexity 113 (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 · security-export.generateHtml (cyclomatic 109) · ×1
  • security-export.generateHtml (cyclomatic 109) src/bin/commands/security-export.ts:60 — security-export.generateHtml has cyclomatic complexity 109 (threshold 15). Of this number, 55 points are the body's own statements and 54 belong to 9 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 · architecture.handleArchitecture (cyclomatic 98) · ×1
  • architecture.handleArchitecture (cyclomatic 98) src/mcp/handlers/architecture.ts:7 — architecture.handleArchitecture has cyclomatic complexity 98 (threshold 15). Of this number, 89 points are the body's own statements and 9 belong to 5 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 · vulns.register (cyclomatic 93) · ×1
  • vulns.register (cyclomatic 93) src/bin/commands/vulns.ts:31 — vulns.register has cyclomatic complexity 93 (threshold 15). Most of this is not in the body itself: 1 of the 93 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 46, 315, 270, …). 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 · index.runInstaller (cyclomatic 80) · ×1
  • index.runInstaller (cyclomatic 80) src/bin/installer/index.ts:124 — index.runInstaller has cyclomatic complexity 80 (threshold 15). Of this number, 73 points are the body's own statements and 7 belong to 3 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 · ToolHandler.dispatch (cyclomatic 78) · ×1
  • ToolHandler.dispatch (cyclomatic 78) REDACTED:154 — ToolHandler.dispatch has cyclomatic complexity 78 (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.handleMemory (cyclomatic 77) · ×1
  • memory.handleMemory (cyclomatic 77) src/mcp/handlers/memory.ts:5 — memory.handleMemory has cyclomatic complexity 77 (threshold 15). Of this number, 65 points are the body's own statements and 12 belong to 5 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 · git-context.handleGitContext (cyclomatic 71) · ×1
  • git-context.handleGitContext (cyclomatic 71) src/mcp/handlers/git-context.ts:12 — git-context.handleGitContext has cyclomatic complexity 71 (threshold 15). Of this number, 70 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 · data.handleData (cyclomatic 71) · ×1
  • data.handleData (cyclomatic 71) src/mcp/handlers/data.ts:38 — data.handleData has cyclomatic complexity 71 (threshold 15). Of this number, 69 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 · IndexPipeline.syncNow (cyclomatic 66) · ×1
  • IndexPipeline.syncNow (cyclomatic 66) src/core/pipeline.ts:505 — IndexPipeline.syncNow has cyclomatic complexity 66 (threshold 15). Of this number, 62 points are the body's own statements and 4 belong to 3 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 · IndexPipeline.indexAllNow (cyclomatic 65) · ×1
  • IndexPipeline.indexAllNow (cyclomatic 65) src/core/pipeline.ts:126 — IndexPipeline.indexAllNow has cyclomatic complexity 65 (threshold 15). Of this number, 52 points are the body's own statements and 13 belong to 5 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 · complexity.handleComplexity (cyclomatic 64) · ×1
  • complexity.handleComplexity (cyclomatic 64) src/mcp/handlers/complexity.ts:4 — complexity.handleComplexity has cyclomatic complexity 64 (threshold 15). Of this number, 63 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 · ArchitectureAnalyzer.analyze (cyclomatic 60) · ×1
  • ArchitectureAnalyzer.analyze (cyclomatic 60) src/architecture/index.ts:56 — ArchitectureAnalyzer.analyze has cyclomatic complexity 60 (threshold 15). Of this number, 59 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 · steering.buildSteeringContent (cyclomatic 60) · ×1
  • steering.buildSteeringContent (cyclomatic 60) src/bin/installer/steering.ts:93 — steering.buildSteeringContent has cyclomatic complexity 60 (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 · docs.register (cyclomatic 57) · ×1
  • docs.register (cyclomatic 57) src/bin/commands/docs.ts:21 — docs.register has cyclomatic complexity 57 (threshold 15). Most of this is not in the body itself: 1 of the 57 points is its own statement and the rest belongs to 9 function literals inside it that branch (lines 116, 296, 32, …). 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 · wiki.register (cyclomatic 56) · ×1
  • wiki.register (cyclomatic 56) src/bin/commands/wiki.ts:62 — wiki.register has cyclomatic complexity 56 (threshold 15). Most of this is not in the body itself: 1 of the 56 points is its own statement and the rest belongs to 12 function literals inside it that branch (lines 387, 126, 254, …). 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 · wiki.handleWiki (cyclomatic 53) · ×1
  • wiki.handleWiki (cyclomatic 53) src/mcp/handlers/wiki.ts:3 — wiki.handleWiki has cyclomatic complexity 53 (threshold 15). Of this number, 52 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 · VectorManager.embedAll (cyclomatic 52) · ×1
  • VectorManager.embedAll (cyclomatic 52) src/vectors/index.ts:375 — VectorManager.embedAll has cyclomatic complexity 52 (threshold 15). Of this number, 51 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 · patterns.handlePatterns (cyclomatic 52) · ×1
  • patterns.handlePatterns (cyclomatic 52) src/mcp/handlers/patterns.ts:6 — patterns.handlePatterns has cyclomatic complexity 52 (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 · infra.extractYaml (cyclomatic 50) · ×1
  • infra.extractYaml (cyclomatic 50) src/extraction/infra.ts:352 — infra.extractYaml has cyclomatic complexity 50 (threshold 15). Of this number, 46 points are the body's own statements and 4 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 · steering.writeWorkflowSteering (cyclomatic 49) · ×1
  • steering.writeWorkflowSteering (cyclomatic 49) src/bin/installer/steering.ts:976 — steering.writeWorkflowSteering has cyclomatic complexity 49 (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 · extractor.extractImportSource (cyclomatic 44) · ×1
  • extractor.extractImportSource (cyclomatic 44) src/extraction/extractor.ts:797 — extractor.extractImportSource 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 · edit-primitives.handleEditPrimitives (cyclomatic 44) · ×1
  • edit-primitives.handleEditPrimitives (cyclomatic 44) src/mcp/handlers/edit-primitives.ts:22 — edit-primitives.handleEditPrimitives 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 · naive-cost.estimateNaiveCost (cyclomatic 43) · ×1
  • naive-cost.estimateNaiveCost (cyclomatic 43) src/compression/naive-cost.ts:37 — naive-cost.estimateNaiveCost has cyclomatic complexity 43 (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.
D1 · Cyclomatic Complexity · manifest.register (cyclomatic 41) · ×1
  • manifest.register (cyclomatic 41) src/bin/commands/manifest.ts:6 — manifest.register has cyclomatic complexity 41 (threshold 15). Most of this is not in the body itself: 1 of the 41 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 13, 59, 97). 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 · status.register (cyclomatic 40) · ×1
  • status.register (cyclomatic 40) src/bin/commands/status.ts:7 — status.register has cyclomatic complexity 40 (threshold 15). Most of this is not in the body itself: 1 of the 40 points is its own statement and the rest belongs to one function literal inside it that branches (line 12). 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 · native-views.findNativeViewManagers (cyclomatic 39) · ×1
  • native-views.findNativeViewManagers (cyclomatic 39) src/resolution/bridges/native-views.ts:117 — native-views.findNativeViewManagers has cyclomatic complexity 39 (threshold 15). Of this number, 34 points are the body's own statements and 5 belong to 5 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 · VectorManager.initialize (cyclomatic 38) · ×1
  • VectorManager.initialize (cyclomatic 38) src/vectors/index.ts:136 — VectorManager.initialize has cyclomatic complexity 38 (threshold 15). Of this number, 36 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 · docs.handleDocs (cyclomatic 38) · ×1
  • docs.handleDocs (cyclomatic 38) src/mcp/handlers/docs.ts:3 — docs.handleDocs has cyclomatic complexity 38 (threshold 15). Of this number, 28 points are the body's own statements and 10 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 · git.filterGitStatus (cyclomatic 36) · ×1
  • git.filterGitStatus (cyclomatic 36) src/compression/filters/git.ts:38 — git.filterGitStatus 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 · instructions.buildAgentInstructions (cyclomatic 36) · ×1
  • instructions.buildAgentInstructions (cyclomatic 36) src/bin/installer/instructions.ts:52 — instructions.buildAgentInstructions has cyclomatic complexity 36 (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 · infra.extractHcl (cyclomatic 35) · ×1
  • infra.extractHcl (cyclomatic 35) src/extraction/infra.ts:154 — infra.extractHcl 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 · hook.register (cyclomatic 35) · ×1
  • hook.register (cyclomatic 35) src/bin/commands/hook.ts:35 — hook.register has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 1 of the 35 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 46, 117, 184, …). 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 · index.getTargetInstaller (cyclomatic 35) · ×1
  • index.getTargetInstaller (cyclomatic 35) src/bin/installer/targets/index.ts:41 — index.getTargetInstaller has cyclomatic complexity 35 (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 · flutter-channel.findSwiftHandlers (cyclomatic 34) · ×1
  • flutter-channel.findSwiftHandlers (cyclomatic 34) src/resolution/bridges/flutter-channel.ts:364 — flutter-channel.findSwiftHandlers has cyclomatic complexity 34 (threshold 15). Of this number, 22 points are the body's own statements and 12 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 · json-schema.validateAgainstSchema (cyclomatic 34) · ×1
  • json-schema.validateAgainstSchema (cyclomatic 34) REDACTED:51 — json-schema.validateAgainstSchema 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 · doctor.register (cyclomatic 34) · ×1
  • doctor.register (cyclomatic 34) src/bin/commands/doctor.ts:31 — doctor.register has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 1 of the 34 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 36, 88, 146). 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 · licenses.register (cyclomatic 34) · ×1
  • licenses.register (cyclomatic 34) src/bin/commands/licenses.ts:7 — licenses.register has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 1 of the 34 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 15, 137, 73). 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 · security.register.secCmd (cyclomatic 34) · ×1
  • security.register.secCmd (cyclomatic 34) src/bin/commands/security.ts:13 — security.register.secCmd 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 · sync.register (cyclomatic 34) · ×1
  • sync.register (cyclomatic 34) src/bin/commands/sync.ts:7 — sync.register has cyclomatic complexity 34 (threshold 15). 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 18, 92). 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 · turbomodules.findNativeImpls (cyclomatic 33) · ×1
  • turbomodules.findNativeImpls (cyclomatic 33) REDACTED:80 — turbomodules.findNativeImpls has cyclomatic complexity 33 (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 · ReferenceResolver.resolveUnresolvedRefs (cyclomatic 32) · ×1
  • ReferenceResolver.resolveUnresolvedRefs (cyclomatic 32) src/resolution/index.ts:163 — ReferenceResolver.resolveUnresolvedRefs has cyclomatic complexity 32 (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 · react-native.findNativeMethodDecls (cyclomatic 31) · ×1
  • react-native.findNativeMethodDecls (cyclomatic 31) src/resolution/bridges/react-native.ts:71 — react-native.findNativeMethodDecls has cyclomatic complexity 31 (threshold 15). Of this number, 22 points are the body's own statements and 9 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 · native-events.findEventEmitters (cyclomatic 31) · ×1
  • native-events.findEventEmitters (cyclomatic 31) src/resolution/bridges/native-events.ts:102 — native-events.findEventEmitters has cyclomatic complexity 31 (threshold 15). Of this number, 19 points are the body's own statements and 12 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 · prompt.multiSelect (cyclomatic 31) · ×1
  • prompt.multiSelect (cyclomatic 31) src/hooks/prompt.ts:209 — prompt.multiSelect has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 1 of the 31 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 275, 228). 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 · openapi.parseYAMLOperations (cyclomatic 30) · ×1
  • openapi.parseYAMLOperations (cyclomatic 30) src/docs/formats/openapi.ts:36 — openapi.parseYAMLOperations 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 · extractor.extractFile (cyclomatic 29) · ×1
  • extractor.extractFile (cyclomatic 29) src/extraction/extractor.ts:76 — extractor.extractFile 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 · extractor.extractName (cyclomatic 29) · ×1
  • extractor.extractName (cyclomatic 29) src/extraction/extractor.ts:914 — extractor.extractName 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 · communities.detectCommunities (cyclomatic 29) · ×1
  • communities.detectCommunities (cyclomatic 29) src/graph/communities.ts:352 — communities.detectCommunities 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 · branch.handleBranch (cyclomatic 29) · ×1
  • branch.handleBranch (cyclomatic 29) src/mcp/handlers/branch.ts:9 — branch.handleBranch 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 · infra.augmentBash (cyclomatic 28) · ×1
  • infra.augmentBash (cyclomatic 28) src/extraction/infra.ts:505 — infra.augmentBash has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 10 of the 28 points are its own statements and the rest belongs to 3 function items inside it that branch (visit, enclosing, a function literal at line 532). 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 · npm.parseNpmManifest (cyclomatic 28) · ×1
  • npm.parseNpmManifest (cyclomatic 28) src/security/manifest/plugins/npm.ts:39 — npm.parseNpmManifest 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 · DependencyGraphIntegrator.resolveTransitives (cyclomatic 28) · ×1
  • DependencyGraphIntegrator.resolveTransitives (cyclomatic 28) src/security/integrator.ts:447 — DependencyGraphIntegrator.resolveTransitives 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 · DataQueries.sampleHints (cyclomatic 28) · ×1
  • DataQueries.sampleHints (cyclomatic 28) src/data/queries.ts:614 — DataQueries.sampleHints 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 · ReferenceResolver.applyRoutePrefixes (cyclomatic 26) · ×1
  • ReferenceResolver.applyRoutePrefixes (cyclomatic 26) src/resolution/index.ts:404 — ReferenceResolver.applyRoutePrefixes has cyclomatic complexity 26 (threshold 15). Of this number, 14 points are the body's own statements and 12 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 · archive.extractTarGzFromUrl (cyclomatic 26) · ×1
  • archive.extractTarGzFromUrl (cyclomatic 26) src/bin/installer/archive.ts:148 — archive.extractTarGzFromUrl has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 175, 160, 235, …). 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 · progress.renderSyncProgressVerbose (cyclomatic 26) · ×1
  • progress.renderSyncProgressVerbose (cyclomatic 26) src/bin/progress.ts:158 — progress.renderSyncProgressVerbose 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 · package.register (cyclomatic 26) · ×1
  • package.register (cyclomatic 26) src/bin/commands/package.ts:5 — package.register has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 11, 25). 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 · maven.parseMavenManifest (cyclomatic 25) · ×1
  • maven.parseMavenManifest (cyclomatic 25) REDACTED:62 — maven.parseMavenManifest 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 · supply-chain.computeRisk (cyclomatic 25) · ×1
  • supply-chain.computeRisk (cyclomatic 25) src/security/supply-chain.ts:254 — supply-chain.computeRisk 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 · gain.register (cyclomatic 25) · ×1
  • gain.register (cyclomatic 25) src/bin/commands/gain.ts:8 — gain.register has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 1 of the 25 points is its own statement and the rest belongs to one function literal inside it that branches (line 17). 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 · prompt.singleChoice (cyclomatic 25) · ×1
  • prompt.singleChoice (cyclomatic 25) src/hooks/prompt.ts:96 — prompt.singleChoice has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 1 of the 25 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 165, 115). 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 · progress.renderIndexProgress (cyclomatic 25) · ×1
  • progress.renderIndexProgress (cyclomatic 25) src/bin/progress.ts:33 — progress.renderIndexProgress 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 · SecurityPipeline.run (cyclomatic 24) · ×1
  • SecurityPipeline.run (cyclomatic 24) src/security/pipeline.ts:46 — SecurityPipeline.run 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 · lint.lintWiki (cyclomatic 24) · ×1
  • lint.lintWiki (cyclomatic 24) src/wiki/lint.ts:29 — lint.lintWiki has cyclomatic complexity 24 (threshold 15). Of this number, 21 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 · extractor.extractVisibility (cyclomatic 23) · ×1
  • extractor.extractVisibility (cyclomatic 23) src/extraction/extractor.ts:1006 — extractor.extractVisibility 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 · journal-recovery.replayJournal (cyclomatic 23) · ×1
  • journal-recovery.replayJournal (cyclomatic 23) src/db/journal-recovery.ts:64 — journal-recovery.replayJournal 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 · flutter-channel.findKotlinJavaHandlers (cyclomatic 23) · ×1
  • flutter-channel.findKotlinJavaHandlers (cyclomatic 23) src/resolution/bridges/flutter-channel.ts:277 — flutter-channel.findKotlinJavaHandlers has cyclomatic complexity 23 (threshold 15). Of this number, 17 points are the body's own statements and 6 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 · ColumnProfiler.addBatch (cyclomatic 23) · ×1
  • ColumnProfiler.addBatch (cyclomatic 23) src/data/profiler.ts:73 — ColumnProfiler.addBatch 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 · git-context.parseDiff (cyclomatic 23) · ×1
  • git-context.parseDiff (cyclomatic 23) src/graph/git-context.ts:92 — git-context.parseDiff 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 · architecture.register (cyclomatic 23) · ×1
  • architecture.register (cyclomatic 23) src/bin/commands/architecture.ts:5 — architecture.register has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to one function literal inside it that branches (line 12). 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 · index.getChangedFiles (cyclomatic 22) · ×1
  • index.getChangedFiles (cyclomatic 22) src/sync/index.ts:258 — index.getChangedFiles 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 · extractor.walkTree (cyclomatic 22) · ×1
  • extractor.walkTree (cyclomatic 22) src/extraction/extractor.ts:506 — extractor.walkTree 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 · native-events.findEventListeners (cyclomatic 22) · ×1
  • native-events.findEventListeners (cyclomatic 22) src/resolution/bridges/native-events.ts:31 — native-events.findEventListeners has cyclomatic complexity 22 (threshold 15). Of this number, 13 points are the body's own statements and 9 belong to 3 function literals inside it that branch. 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 · communities.refinementPhase (cyclomatic 22) · ×1
  • communities.refinementPhase (cyclomatic 22) src/graph/communities.ts:185 — communities.refinementPhase 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 · progress.renderSyncProgress (cyclomatic 22) · ×1
  • progress.renderSyncProgress (cyclomatic 22) src/bin/progress.ts:100 — progress.renderSyncProgress 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 · config-prompt.promptConfigOptions (cyclomatic 22) · ×1
  • config-prompt.promptConfigOptions (cyclomatic 22) src/bin/installer/config-prompt.ts:255 — config-prompt.promptConfigOptions 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 · security-secrets.register (cyclomatic 22) · ×1
  • security-secrets.register (cyclomatic 22) src/bin/commands/security-secrets.ts:39 — security-secrets.register 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 one function literal inside it that branches (line 46). 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 · flutter-channel.findDartChannelCalls (cyclomatic 21) · ×1
  • flutter-channel.findDartChannelCalls (cyclomatic 21) src/resolution/bridges/flutter-channel.ts:109 — flutter-channel.findDartChannelCalls has cyclomatic complexity 21 (threshold 15). Of this number, 18 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 · profiler.generateColumnSummary (cyclomatic 21) · ×1
  • profiler.generateColumnSummary (cyclomatic 21) src/data/profiler.ts:176 — profiler.generateColumnSummary 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 · aws.filterCfnEvents (cyclomatic 21) · ×1
  • aws.filterCfnEvents (cyclomatic 21) src/compression/filters/aws.ts:179 — aws.filterCfnEvents 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 3 function literals inside it that branch (lines 194, 187, 210). 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 · DataQueries.quality (cyclomatic 21) · ×1
  • DataQueries.quality (cyclomatic 21) src/data/queries.ts:459 — DataQueries.quality 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 · coupling.register (cyclomatic 21) · ×1
  • coupling.register (cyclomatic 21) src/bin/commands/coupling.ts:22 — coupling.register has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 29, 45, 53). 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 · MCPServer.handleMessage (cyclomatic 21) · ×1
  • MCPServer.handleMessage (cyclomatic 21) src/mcp/server.ts:84 — MCPServer.handleMessage 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 · VectorManager.embedNode (cyclomatic 20) · ×1
  • VectorManager.embedNode (cyclomatic 20) src/vectors/index.ts:302 — VectorManager.embedNode 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 · ContextBuilder.findRelevantContext (cyclomatic 20) · ×1
  • ContextBuilder.findRelevantContext (cyclomatic 20) src/context/index.ts:79 — ContextBuilder.findRelevantContext 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 · files.filterLs (cyclomatic 20) · ×1
  • files.filterLs (cyclomatic 20) src/compression/filters/files.ts:22 — files.filterLs 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 · watchmen.handleWatchmen (cyclomatic 20) · ×1
  • watchmen.handleWatchmen (cyclomatic 20) src/mcp/handlers/watchmen.ts:3 — watchmen.handleWatchmen 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 · AttackSurfaceAnalyzer.analyze (cyclomatic 20) · ×1
  • AttackSurfaceAnalyzer.analyze (cyclomatic 20) src/security/attack-surface.ts:87 — AttackSurfaceAnalyzer.analyze has cyclomatic complexity 20 (threshold 15). Of this number, 16 points are the body's own statements and 4 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 · export.generateExport (cyclomatic 20) · ×1
  • export.generateExport (cyclomatic 20) src/bin/commands/export.ts:23 — export.generateExport 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 · export.register (cyclomatic 20) · ×1
  • export.register (cyclomatic 20) src/bin/commands/export.ts:2830 — export.register has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 2944, 2862, 2909). 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 · changelog.html.setupScrollSpy (cyclomatic 19) · ×1
  • changelog.html.setupScrollSpy (cyclomatic 19) docs/changelog.html:175 — changelog.html.setupScrollSpy has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 2 of the 19 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 187, updateActive, a function literal at line 198, …). 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 · android-rn.findAndroidNativeModuleCalls (cyclomatic 19) · ×1
  • android-rn.findAndroidNativeModuleCalls (cyclomatic 19) REDACTED:211 — android-rn.findAndroidNativeModuleCalls has cyclomatic complexity 19 (threshold 15). Of this number, 16 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 · index.buildResolutionContext.readFile (cyclomatic 19) · ×1
  • index.buildResolutionContext.readFile (cyclomatic 19) src/frameworks/index.ts:192 — index.buildResolutionContext.readFile 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 · misc.filterPlaywright (cyclomatic 19) · ×1
  • misc.filterPlaywright (cyclomatic 19) src/compression/filters/misc.ts:183 — misc.filterPlaywright 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 · filters.buildWhereClause (cyclomatic 19) · ×1
  • filters.buildWhereClause (cyclomatic 19) src/data/filters.ts:36 — filters.buildWhereClause has cyclomatic complexity 19 (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 · benchmark.runRepoBenchmark (cyclomatic 19) · ×1
  • benchmark.runRepoBenchmark (cyclomatic 19) src/bin/commands/benchmark.ts:97 — benchmark.runRepoBenchmark 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 · export.buildFiles (cyclomatic 19) · ×1
  • export.buildFiles (cyclomatic 19) src/bin/commands/export.ts:220 — export.buildFiles has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 233, 281, 299, …). 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 · expo-modules.findExpoModuleCalls (cyclomatic 18) · ×1
  • expo-modules.findExpoModuleCalls (cyclomatic 18) REDACTED:98 — expo-modules.findExpoModuleCalls has cyclomatic complexity 18 (threshold 15). Of this number, 12 points are the body's own statements and 6 belong to 2 function literals inside it that branch. 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 · npm.extractTransitiveNpmDependencies (cyclomatic 18) · ×1
  • npm.extractTransitiveNpmDependencies (cyclomatic 18) src/security/manifest/plugins/npm.ts:241 — npm.extractTransitiveNpmDependencies 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 · yaml.parseSequence (cyclomatic 18) · ×1
  • yaml.parseSequence (cyclomatic 18) src/shared/yaml.ts:111 — yaml.parseSequence 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 · PatternRunner.applyFix (cyclomatic 18) · ×1
  • PatternRunner.applyFix (cyclomatic 18) src/patterns/runner.ts:259 — PatternRunner.applyFix 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 · attack-surface.printRouteEntry (cyclomatic 18) · ×1
  • attack-surface.printRouteEntry (cyclomatic 18) src/bin/commands/attack-surface.ts:129 — attack-surface.printRouteEntry has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body's own statements and 5 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 · cost.register (cyclomatic 18) · ×1
  • cost.register (cyclomatic 18) src/bin/commands/cost.ts:37 — cost.register has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to one function literal inside it that branches (line 42). 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 · prompts.arrowSelect (cyclomatic 18) · ×1
  • prompts.arrowSelect (cyclomatic 18) src/bin/installer/prompts.ts:103 — prompts.arrowSelect has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 4 function items inside it that branch (a function literal at line 147, render, descLineCount, …). 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 · reachability.register (cyclomatic 18) · ×1
  • reachability.register (cyclomatic 18) src/bin/commands/reachability.ts:9 — reachability.register has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to one function literal inside it that branches (line 14). 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 · remediation.register (cyclomatic 18) · ×1
  • remediation.register (cyclomatic 18) src/bin/commands/remediation.ts:24 — remediation.register has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 30, 61). 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 · infra.hclTraversals · ×1
  • infra.hclTraversals::visit (cyclomatic 17) src/extraction/infra.ts:134 — infra.hclTraversals::visit 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 · infra.scanJson · ×1
  • infra.scanJson::ws (cyclomatic 17) src/extraction/infra.ts:587 — infra.scanJson::ws 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 · extractor.extractInheritance (cyclomatic 17) · ×1
  • extractor.extractInheritance (cyclomatic 17) src/extraction/extractor.ts:1425 — extractor.extractInheritance 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 · ReferenceResolver._resolveImportPath (cyclomatic 17) · ×1
  • ReferenceResolver._resolveImportPath (cyclomatic 17) src/resolution/index.ts:525 — ReferenceResolver._resolveImportPath 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 · iac.resolveHandlerString (cyclomatic 17) · ×1
  • iac.resolveHandlerString (cyclomatic 17) src/frameworks/iac.ts:337 — iac.resolveHandlerString has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 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 · state.workspaceFingerprint (cyclomatic 17) · ×1
  • state.workspaceFingerprint (cyclomatic 17) src/sync/state.ts:106 — state.workspaceFingerprint 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 · rubygems.parseRubygemsManifest (cyclomatic 17) · ×1
  • rubygems.parseRubygemsManifest (cyclomatic 17) src/security/manifest/plugins/rubygems.ts:32 — rubygems.parseRubygemsManifest 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 · linker.extractCandidateRefs (cyclomatic 17) · ×1
  • linker.extractCandidateRefs (cyclomatic 17) src/docs/linker.ts:41 — linker.extractCandidateRefs 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 · yaml.parseBlock (cyclomatic 17) · ×1
  • yaml.parseBlock (cyclomatic 17) src/shared/yaml.ts:27 — yaml.parseBlock 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 · git.filterGitLog (cyclomatic 17) · ×1
  • git.filterGitLog (cyclomatic 17) src/compression/filters/git.ts:107 — git.filterGitLog 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 · lint.filterTsc (cyclomatic 17) · ×1
  • lint.filterTsc (cyclomatic 17) src/compression/filters/lint.ts:30 — lint.filterTsc 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 · synthesize.getGenPipeline (cyclomatic 17) · ×1
  • synthesize.getGenPipeline (cyclomatic 17) src/watchmen/synthesize.ts:27 — synthesize.getGenPipeline has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 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 · caveman.register (cyclomatic 17) · ×1
  • caveman.register (cyclomatic 17) src/bin/commands/caveman.ts:42 — caveman.register 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 one function literal inside it that branches (line 46). 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 · staleness.register (cyclomatic 17) · ×1
  • staleness.register (cyclomatic 17) src/bin/commands/staleness.ts:26 — staleness.register 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 one function literal inside it that branches (line 33). 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 · libc-shims.zeroMallocInBinary (cyclomatic 16) · ×1
  • libc-shims.zeroMallocInBinary (cyclomatic 16) src/extraction/libc-shims.ts:43 — libc-shims.zeroMallocInBinary has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 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 · name-matcher.matchReference (cyclomatic 16) · ×1
  • name-matcher.matchReference (cyclomatic 16) src/resolution/name-matcher.ts:31 — name-matcher.matchReference 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 · TypesenseIndex.initialize (cyclomatic 16) · ×1
  • TypesenseIndex.initialize (cyclomatic 16) REDACTED:201 — TypesenseIndex.initialize 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 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 · index.buildResolutionContext.fileExists (cyclomatic 16) · ×1
  • index.buildResolutionContext.fileExists (cyclomatic 16) src/frameworks/index.ts:164 — index.buildResolutionContext.fileExists 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 · npm.findNpmDuplicateVersions (cyclomatic 16) · ×1
  • npm.findNpmDuplicateVersions (cyclomatic 16) src/security/manifest/plugins/npm.ts:196 — npm.findNpmDuplicateVersions 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 · npm.normalizeLicenseField (cyclomatic 16) · ×1
  • npm.normalizeLicenseField (cyclomatic 16) src/security/manifest/plugins/npm.ts:539 — npm.normalizeLicenseField 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 · composer.parseComposerManifest (cyclomatic 16) · ×1
  • composer.parseComposerManifest (cyclomatic 16) src/security/manifest/plugins/composer.ts:31 — composer.parseComposerManifest 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 · pubspec.extractSectionDependencies (cyclomatic 16) · ×1
  • pubspec.extractSectionDependencies (cyclomatic 16) src/security/manifest/plugins/pubspec.ts:121 — pubspec.extractSectionDependencies 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 · DependencyGraphIntegrator.integrate (cyclomatic 16) · ×1
  • DependencyGraphIntegrator.integrate (cyclomatic 16) src/security/integrator.ts:247 — DependencyGraphIntegrator.integrate 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 · OsvAdapter.queryBatch (cyclomatic 16) · ×1
  • OsvAdapter.queryBatch (cyclomatic 16) src/security/vuln/osv-adapter.ts:210 — OsvAdapter.queryBatch 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, 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 · affected.register (cyclomatic 16) · ×1
  • affected.register (cyclomatic 16) src/bin/commands/affected.ts:6 — affected.register 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 16). 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 · lint.filterEslint (cyclomatic 16) · ×1
  • lint.filterEslint (cyclomatic 16) src/compression/filters/lint.ts:91 — lint.filterEslint 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 · aws.unwrapDynamoTypes (cyclomatic 16) · ×1
  • aws.unwrapDynamoTypes (cyclomatic 16) src/compression/filters/aws.ts:235 — aws.unwrapDynamoTypes 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 · misc.filterGrep (cyclomatic 16) · ×1
  • misc.filterGrep (cyclomatic 16) src/compression/filters/misc.ts:27 — misc.filterGrep 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 · misc.filterDiff (cyclomatic 16) · ×1
  • misc.filterDiff (cyclomatic 16) src/compression/filters/misc.ts:88 — misc.filterDiff 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 · attack-surface.register (cyclomatic 16) · ×1
  • attack-surface.register (cyclomatic 16) src/bin/commands/attack-surface.ts:10 — attack-surface.register 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 17). 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 · exec.register (cyclomatic 16) · ×1
  • exec.register (cyclomatic 16) src/bin/commands/exec.ts:17 — exec.register 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 27). 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 · help.renderGroup (cyclomatic 16) · ×1
  • help.renderGroup (cyclomatic 16) src/bin/commands/help.ts:414 — help.renderGroup 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 · windsurf.uninitWindsurf (cyclomatic 16) · ×1
  • windsurf.uninitWindsurf (cyclomatic 16) src/bin/installer/targets/windsurf.ts:109 — windsurf.uninitWindsurf 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 · monitor.register (cyclomatic 16) · ×1
  • monitor.register (cyclomatic 16) src/bin/commands/monitor.ts:5 — monitor.register 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 2 function literals inside it that branch (lines 9, 43). 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 · status.showIntegrations (cyclomatic 16) · ×1
  • status.showIntegrations (cyclomatic 16) src/bin/commands/status.ts:186 — status.showIntegrations has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 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.
D2 · Cognitive Complexity · core.handleCore (cognitive 445) · ×1
  • core.handleCore (cognitive 445) src/mcp/handlers/core.ts:6 — core.handleCore has cognitive complexity 445 (threshold 15). Drivers by points: if/else 80 (230 pts), ternaries 27 (119 pts), loops 16 (61 pts), error handling 11 (22 pts), boolean chains 12, match/switch 1 (nesting depth added 298). Of this number, 357 points are the body's own statements and 88 belong to 5 function items inside it that branch. 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.
D2 · Cognitive Complexity · security.handleSecurity (cognitive 439) · ×1
  • security.handleSecurity (cognitive 439) src/mcp/handlers/security.ts:4 — security.handleSecurity has cognitive complexity 439 (threshold 15). Drivers by points: if/else 98 (222 pts), ternaries 50 (161 pts), loops 18 (44 pts), boolean chains 7, error handling 2 (4 pts), match/switch 1 (nesting depth added 263). Of this number, 425 points are the body's own statements and 14 belong to 3 function items inside it that branch. 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.
D2 · Cognitive Complexity · pattern.register (cognitive 257) · ×1
  • pattern.register (cognitive 257) src/bin/commands/pattern.ts:45 — pattern.register has cognitive complexity 257 (threshold 15). Drivers by points: if/else 58 (110 pts), ternaries 29 (82 pts), loops 19 (44 pts), error handling 4 (12 pts), boolean chains 9 (nesting depth added 138). None of this is in the body itself: all 257 points belong to one function literal inside it that branches (line 58). 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 · security-export.generateHtml (cognitive 253) · ×1
  • security-export.generateHtml (cognitive 253) src/bin/commands/security-export.ts:60 — security-export.generateHtml has cognitive complexity 253 (threshold 15). Drivers by points: ternaries 88 (233 pts), boolean chains 16, loops 2 (3 pts), if/else 1 (nesting depth added 146). Of this number, 104 points are the body's own statements and 149 belong to 9 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 · architecture.handleArchitecture (cognitive 228) · ×1
  • architecture.handleArchitecture (cognitive 228) src/mcp/handlers/architecture.ts:7 — architecture.handleArchitecture has cognitive complexity 228 (threshold 15). Drivers by points: if/else 38 (95 pts), ternaries 18 (58 pts), loops 19 (57 pts), boolean chains 14, error handling 1 (3 pts), match/switch 1 (nesting depth added 137). Of this number, 219 points are the body's own statements and 9 belong to 5 function literals inside it that branch. 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.
D2 · Cognitive Complexity · data.register (cognitive 216) · ×1
  • data.register (cognitive 216) src/bin/commands/data.ts:6 — data.register has cognitive complexity 216 (threshold 15). Drivers by points: if/else 99 (130 pts), ternaries 15 (43 pts), loops 14 (37 pts), error handling 4 (5 pts), boolean chains 1 (nesting depth added 83). None of this is in the body itself: all 216 points belong to 19 function literals inside it that branch (lines 612, 61, 734, …). 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 · memory.register (cognitive 213) · ×1
  • memory.register (cognitive 213) src/bin/commands/memory.ts:19 — memory.register has cognitive complexity 213 (threshold 15). Drivers by points: if/else 112 (140 pts), loops 17 (38 pts), ternaries 11 (21 pts), boolean chains 7, error handling 4 (7 pts) (nesting depth added 62). None of this is in the body itself: all 213 points belong to 24 function literals inside it that branch (lines 910, 201, 33, …). 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 · code-health.handleCodeHealth (cognitive 207) · ×1
  • code-health.handleCodeHealth (cognitive 207) src/mcp/handlers/code-health.ts:4 — code-health.handleCodeHealth has cognitive complexity 207 (threshold 15). Drivers by points: if/else 56 (120 pts), loops 22 (52 pts), ternaries 12 (28 pts), error handling 1 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 113). Of this number, 201 points are the body's own statements and 6 belong to 2 function items inside it that branch. 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.
D2 · Cognitive Complexity · config.validateConfig (cognitive 196) · ×1
  • config.validateConfig (cognitive 196) src/config.ts:449 — config.validateConfig has cognitive complexity 196 (threshold 15). Drivers by points: ternaries 89 (92 pts), boolean chains 61, if/else 33 (42 pts), loops 1 (nesting depth added 12). Of this number, 194 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, 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 · index.runInstaller (cognitive 169) · ×1
  • index.runInstaller (cognitive 169) src/bin/installer/index.ts:124 — index.runInstaller has cognitive complexity 169 (threshold 15). Drivers by points: if/else 70 (140 pts), boolean chains 17, ternaries 4 (8 pts), error handling 2 (4 pts) (nesting depth added 76). Of this number, 156 points are the body's own statements and 13 belong to 3 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 · git-context.handleGitContext (cognitive 163) · ×1
  • git-context.handleGitContext (cognitive 163) src/mcp/handlers/git-context.ts:12 — git-context.handleGitContext has cognitive complexity 163 (threshold 15). Drivers by points: if/else 28 (72 pts), ternaries 13 (41 pts), loops 12 (31 pts), error handling 6 (13 pts), boolean chains 5, match/switch 1 (nesting depth added 98). Of this number, 161 points are the body's own statements and 2 belong to one function literal inside it that branches. 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.
D2 · Cognitive Complexity · extractor.getLanguageSpecificKind (cognitive 162) · ×1
  • extractor.getLanguageSpecificKind (cognitive 162) src/extraction/extractor.ts:607 — extractor.getLanguageSpecificKind has cognitive complexity 162 (threshold 15). Drivers by points: if/else 80 (160 pts), boolean chains 1, match/switch 1 (nesting depth added 80). 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.
D2 · Cognitive Complexity · infra.extractYaml (cognitive 152) · ×1
  • infra.extractYaml (cognitive 152) src/extraction/infra.ts:352 — infra.extractYaml has cognitive complexity 152 (threshold 15). Drivers by points: if/else 23 (80 pts), loops 10 (33 pts), ternaries 8 (31 pts), boolean chains 8 (nesting depth added 103). Of this number, 137 points are the body's own statements and 15 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 · vulns.register (cognitive 148) · ×1
  • vulns.register (cognitive 148) src/bin/commands/vulns.ts:31 — vulns.register has cognitive complexity 148 (threshold 15). Drivers by points: if/else 53 (72 pts), ternaries 21 (47 pts), loops 6 (15 pts), boolean chains 14 (nesting depth added 54). None of this is in the body itself: all 148 points belong to 4 function literals inside it that branch (lines 46, 315, 270, …). 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 · data.handleData (cognitive 134) · ×1
  • data.handleData (cognitive 134) src/mcp/handlers/data.ts:38 — data.handleData has cognitive complexity 134 (threshold 15). Drivers by points: if/else 39 (79 pts), ternaries 13 (37 pts), loops 5 (13 pts), boolean chains 2, error handling 1 (2 pts), match/switch 1 (nesting depth added 73). Of this number, 130 points are the body's own statements and 4 belong to 2 function literals inside it that branch. 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.
D2 · Cognitive Complexity · ToolHandler.dispatch (cognitive 132) · ×1
  • ToolHandler.dispatch (cognitive 132) REDACTED:154 — ToolHandler.dispatch has cognitive complexity 132 (threshold 15). Drivers by points: if/else 45 (73 pts), ternaries 13 (34 pts), boolean chains 12, error handling 3 (7 pts), loops 2 (6 pts) (nesting depth added 57). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · complexity.handleComplexity (cognitive 131) · ×1
  • complexity.handleComplexity (cognitive 131) src/mcp/handlers/complexity.ts:4 — complexity.handleComplexity has cognitive complexity 131 (threshold 15). Drivers by points: ternaries 20 (54 pts), if/else 26 (50 pts), loops 9 (20 pts), boolean chains 6, match/switch 1 (nesting depth added 69). Of this number, 129 points are the body's own statements and 2 belong to one function literal inside it that branches. 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.
D2 · Cognitive Complexity · IndexPipeline.indexAllNow (cognitive 115) · ×1
  • IndexPipeline.indexAllNow (cognitive 115) src/core/pipeline.ts:126 — IndexPipeline.indexAllNow has cognitive complexity 115 (threshold 15). Drivers by points: if/else 30 (58 pts), error handling 11 (24 pts), loops 9 (17 pts), boolean chains 8, ternaries 3 (8 pts) (nesting depth added 54). Of this number, 92 points are the body's own statements and 23 belong to 5 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 · memory.handleMemory (cognitive 115) · ×1
  • memory.handleMemory (cognitive 115) src/mcp/handlers/memory.ts:5 — memory.handleMemory has cognitive complexity 115 (threshold 15). Drivers by points: if/else 33 (67 pts), ternaries 10 (27 pts), loops 3 (8 pts), boolean chains 5, error handling 2 (5 pts), match/switch 2 (3 pts) (nesting depth added 60). Of this number, 99 points are the body's own statements and 16 belong to 5 function literals inside it that branch. 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.
D2 · Cognitive Complexity · IndexPipeline.syncNow (cognitive 113) · ×1
  • IndexPipeline.syncNow (cognitive 113) src/core/pipeline.ts:505 — IndexPipeline.syncNow has cognitive complexity 113 (threshold 15). Drivers by points: if/else 34 (61 pts), error handling 8 (18 pts), loops 7 (18 pts), boolean chains 10, ternaries 3 (6 pts) (nesting depth added 51). Of this number, 105 points are the body's own statements and 8 belong to 3 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 · ArchitectureAnalyzer.analyze (cognitive 110) · ×1
  • ArchitectureAnalyzer.analyze (cognitive 110) src/architecture/index.ts:56 — ArchitectureAnalyzer.analyze has cognitive complexity 110 (threshold 15). Drivers by points: if/else 20 (50 pts), loops 28 (46 pts), ternaries 4 (8 pts), boolean chains 6 (nesting depth added 52). Of this number, 109 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 · patterns.handlePatterns (cognitive 110) · ×1
  • patterns.handlePatterns (cognitive 110) src/mcp/handlers/patterns.ts:6 — patterns.handlePatterns has cognitive complexity 110 (threshold 15). Drivers by points: if/else 26 (55 pts), loops 13 (32 pts), ternaries 4 (11 pts), error handling 4 (9 pts), boolean chains 2, match/switch 1 (nesting depth added 60). 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.
D2 · Cognitive Complexity · edit-primitives.handleEditPrimitives (cognitive 108) · ×1
  • edit-primitives.handleEditPrimitives (cognitive 108) src/mcp/handlers/edit-primitives.ts:22 — edit-primitives.handleEditPrimitives has cognitive complexity 108 (threshold 15). Drivers by points: if/else 25 (64 pts), loops 6 (20 pts), ternaries 5 (17 pts), error handling 2 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 67). 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.
D2 · Cognitive Complexity · ReferenceResolver.resolveUnresolvedRefs (cognitive 105) · ×1
  • ReferenceResolver.resolveUnresolvedRefs (cognitive 105) src/resolution/index.ts:163 — ReferenceResolver.resolveUnresolvedRefs has cognitive complexity 105 (threshold 15). Drivers by points: if/else 18 (58 pts), ternaries 6 (29 pts), loops 5 (10 pts), error handling 2 (5 pts), boolean chains 3 (nesting depth added 71). 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 · status.register (cognitive 104) · ×1
  • status.register (cognitive 104) src/bin/commands/status.ts:7 — status.register has cognitive complexity 104 (threshold 15). Drivers by points: ternaries 15 (61 pts), if/else 24 (38 pts), boolean chains 3, error handling 2 (nesting depth added 60). None of this is in the body itself: all 104 points belong to one function literal inside it that branches (line 12). 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 · VectorManager.embedAll (cognitive 100) · ×1
  • VectorManager.embedAll (cognitive 100) src/vectors/index.ts:375 — VectorManager.embedAll has cognitive complexity 100 (threshold 15). Drivers by points: if/else 25 (50 pts), ternaries 8 (36 pts), boolean chains 9, loops 2 (3 pts), error handling 1 (2 pts) (nesting depth added 55). Of this number, 99 points are the body's own statements and 1 belongs to one function item inside it that branches. 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 · wiki.handleWiki (cognitive 97) · ×1
  • wiki.handleWiki (cognitive 97) src/mcp/handlers/wiki.ts:3 — wiki.handleWiki has cognitive complexity 97 (threshold 15). Drivers by points: if/else 29 (59 pts), ternaries 7 (25 pts), loops 4 (9 pts), error handling 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 54). Of this number, 96 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
D2 · Cognitive Complexity · extractor.extractImportSource (cognitive 89) · ×1
  • extractor.extractImportSource (cognitive 89) src/extraction/extractor.ts:797 — extractor.extractImportSource has cognitive complexity 89 (threshold 15). Drivers by points: if/else 23 (53 pts), loops 10 (26 pts), boolean chains 10 (nesting depth added 46). 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 · wiki.register (cognitive 87) · ×1
  • wiki.register (cognitive 87) src/bin/commands/wiki.ts:62 — wiki.register has cognitive complexity 87 (threshold 15). Drivers by points: if/else 38 (46 pts), ternaries 8 (20 pts), loops 9 (16 pts), boolean chains 3, error handling 2 (nesting depth added 27). None of this is in the body itself: all 87 points belong to 12 function literals inside it that branch (lines 387, 254, 285, …). 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 · native-views.findNativeViewManagers (cognitive 81) · ×1
  • native-views.findNativeViewManagers (cognitive 81) src/resolution/bridges/native-views.ts:117 — native-views.findNativeViewManagers has cognitive complexity 81 (threshold 15). Drivers by points: if/else 16 (58 pts), boolean chains 13, loops 4 (10 pts) (nesting depth added 48). Of this number, 76 points are the body's own statements and 5 belong to 5 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 · docs.register (cognitive 80) · ×1
  • docs.register (cognitive 80) src/bin/commands/docs.ts:21 — docs.register has cognitive complexity 80 (threshold 15). Drivers by points: if/else 43 (49 pts), loops 9 (17 pts), ternaries 4 (11 pts), boolean chains 3 (nesting depth added 21). None of this is in the body itself: all 80 points belong to 9 function literals inside it that branch (lines 116, 296, 32, …). 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 · docs.handleDocs (cognitive 76) · ×1
  • docs.handleDocs (cognitive 76) src/mcp/handlers/docs.ts:3 — docs.handleDocs has cognitive complexity 76 (threshold 15). Drivers by points: if/else 18 (38 pts), ternaries 7 (20 pts), loops 5 (14 pts), boolean chains 3, match/switch 1 (nesting depth added 42). Of this number, 55 points are the body's own statements and 21 belong to 4 function items inside it that branch. 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.
D2 · Cognitive Complexity · manifest.register (cognitive 76) · ×1
  • manifest.register (cognitive 76) src/bin/commands/manifest.ts:6 — manifest.register has cognitive complexity 76 (threshold 15). Drivers by points: if/else 20 (37 pts), loops 8 (17 pts), ternaries 7 (16 pts), boolean chains 4, error handling 1 (2 pts) (nesting depth added 36). None of this is in the body itself: all 76 points belong to 3 function literals inside it that branch (lines 13, 59, 97). 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 · infra.extractHcl (cognitive 75) · ×1
  • infra.extractHcl (cognitive 75) src/extraction/infra.ts:154 — infra.extractHcl has cognitive complexity 75 (threshold 15). Drivers by points: if/else 14 (43 pts), ternaries 5 (15 pts), loops 5 (13 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 48). 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 · DependencyGraphIntegrator.resolveTransitives (cognitive 75) · ×1
  • DependencyGraphIntegrator.resolveTransitives (cognitive 75) src/security/integrator.ts:447 — DependencyGraphIntegrator.resolveTransitives has cognitive complexity 75 (threshold 15). Drivers by points: if/else 11 (39 pts), loops 10 (26 pts), ternaries 1 (6 pts), boolean chains 4 (nesting depth added 49). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · steering.writeWorkflowSteering (cognitive 73) · ×1
  • steering.writeWorkflowSteering (cognitive 73) src/bin/installer/steering.ts:976 — steering.writeWorkflowSteering has cognitive complexity 73 (threshold 15). Drivers by points: if/else 40 (60 pts), ternaries 6 (12 pts), boolean chains 1 (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 · doctor.register (cognitive 71) · ×1
  • doctor.register (cognitive 71) src/bin/commands/doctor.ts:31 — doctor.register has cognitive complexity 71 (threshold 15). Drivers by points: if/else 23 (33 pts), error handling 7 (19 pts), ternaries 3 (8 pts), loops 3 (6 pts), boolean chains 5 (nesting depth added 30). None of this is in the body itself: all 71 points belong to 3 function literals inside it that branch (lines 36, 88, 146). 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 · openapi.parseYAMLOperations (cognitive 69) · ×1
  • openapi.parseYAMLOperations (cognitive 69) src/docs/formats/openapi.ts:36 — openapi.parseYAMLOperations has cognitive complexity 69 (threshold 15). Drivers by points: if/else 14 (41 pts), ternaries 4 (16 pts), boolean chains 7, loops 2 (5 pts) (nesting depth added 42). 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 · turbomodules.findNativeImpls (cognitive 68) · ×1
  • turbomodules.findNativeImpls (cognitive 68) REDACTED:80 — turbomodules.findNativeImpls has cognitive complexity 68 (threshold 15). Drivers by points: if/else 15 (46 pts), loops 5 (15 pts), boolean chains 7 (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · communities.refinementPhase (cognitive 63) · ×1
  • communities.refinementPhase (cognitive 63) src/graph/communities.ts:185 — communities.refinementPhase has cognitive complexity 63 (threshold 15). Drivers by points: if/else 11 (42 pts), loops 9 (20 pts), boolean chains 1 (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · branch.handleBranch (cognitive 62) · ×1
  • branch.handleBranch (cognitive 62) src/mcp/handlers/branch.ts:9 — branch.handleBranch has cognitive complexity 62 (threshold 15). Drivers by points: if/else 18 (42 pts), loops 7 (17 pts), ternaries 1 (2 pts), match/switch 1 (nesting depth added 35). 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.
D2 · Cognitive Complexity · communities.detectCommunities (cognitive 60) · ×1
  • communities.detectCommunities (cognitive 60) src/graph/communities.ts:352 — communities.detectCommunities has cognitive complexity 60 (threshold 15). Drivers by points: if/else 11 (31 pts), loops 14 (27 pts), boolean chains 2 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · extractor.extractInheritance (cognitive 59) · ×1
  • extractor.extractInheritance (cognitive 59) src/extraction/extractor.ts:1425 — extractor.extractInheritance has cognitive complexity 59 (threshold 15). Drivers by points: if/else 10 (40 pts), loops 3 (9 pts), ternaries 1 (8 pts), boolean chains 2 (nesting depth added 43). 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 · native-events.findEventEmitters (cognitive 59) · ×1
  • native-events.findEventEmitters (cognitive 59) src/resolution/bridges/native-events.ts:102 — native-events.findEventEmitters has cognitive complexity 59 (threshold 15). Drivers by points: if/else 10 (31 pts), loops 5 (13 pts), boolean chains 10, ternaries 1 (5 pts) (nesting depth added 33). Of this number, 51 points are the body's own statements and 8 belong to 4 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 · architecture.register (cognitive 58) · ×1
  • architecture.register (cognitive 58) src/bin/commands/architecture.ts:5 — architecture.register has cognitive complexity 58 (threshold 15). Drivers by points: ternaries 5 (21 pts), if/else 11 (18 pts), loops 5 (16 pts), boolean chains 3 (nesting depth added 34). None of this is in the body itself: all 58 points belong to one function literal inside it that branches (line 12). 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 · steering.buildSteeringContent (cognitive 58) · ×1
  • steering.buildSteeringContent (cognitive 58) src/bin/installer/steering.ts:93 — steering.buildSteeringContent has cognitive complexity 58 (threshold 15). Drivers by points: if/else 28, ternaries 26, boolean chains 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 · react-native.findNativeMethodDecls (cognitive 57) · ×1
  • react-native.findNativeMethodDecls (cognitive 57) src/resolution/bridges/react-native.ts:71 — react-native.findNativeMethodDecls has cognitive complexity 57 (threshold 15). Drivers by points: if/else 11 (34 pts), boolean chains 13, loops 4 (10 pts) (nesting depth added 29). Of this number, 50 points are the body's own statements and 7 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 · VectorManager.initialize (cognitive 57) · ×1
  • VectorManager.initialize (cognitive 57) src/vectors/index.ts:136 — VectorManager.initialize has cognitive complexity 57 (threshold 15). Drivers by points: if/else 31 (48 pts), boolean chains 6, error handling 2, ternaries 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 · git.filterGitStatus (cognitive 56) · ×1
  • git.filterGitStatus (cognitive 56) src/compression/filters/git.ts:38 — git.filterGitStatus has cognitive complexity 56 (threshold 15). Drivers by points: if/else 30 (51 pts), boolean chains 4, loops 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 · security.register.secCmd (cognitive 56) · ×1
  • security.register.secCmd (cognitive 56) src/bin/commands/security.ts:13 — security.register.secCmd has cognitive complexity 56 (threshold 15). Drivers by points: if/else 23 (35 pts), ternaries 6 (17 pts), boolean chains 2, error handling 1, 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 · sync.register (cognitive 56) · ×1
  • sync.register (cognitive 56) src/bin/commands/sync.ts:7 — sync.register has cognitive complexity 56 (threshold 15). Drivers by points: if/else 26 (45 pts), loops 3 (7 pts), boolean chains 4 (nesting depth added 23). None of this is in the body itself: all 56 points belong to 2 function literals inside it that branch (lines 18, 92). 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 · json-schema.validateAgainstSchema (cognitive 55) · ×1
  • json-schema.validateAgainstSchema (cognitive 55) REDACTED:51 — json-schema.validateAgainstSchema has cognitive complexity 55 (threshold 15). Drivers by points: if/else 16 (30 pts), boolean chains 12, ternaries 3 (9 pts), loops 2 (4 pts) (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 · licenses.register (cognitive 55) · ×1
  • licenses.register (cognitive 55) src/bin/commands/licenses.ts:7 — licenses.register has cognitive complexity 55 (threshold 15). Drivers by points: if/else 24 (34 pts), ternaries 7 (16 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 20). None of this is in the body itself: all 55 points belong to 3 function literals inside it that branch (lines 15, 137, 73). 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 · extractor.extractName (cognitive 54) · ×1
  • extractor.extractName (cognitive 54) src/extraction/extractor.ts:914 — extractor.extractName has cognitive complexity 54 (threshold 15). Drivers by points: if/else 12 (33 pts), loops 7 (17 pts), boolean chains 4 (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 · hook.register (cognitive 54) · ×1
  • hook.register (cognitive 54) src/bin/commands/hook.ts:35 — hook.register has cognitive complexity 54 (threshold 15). Drivers by points: if/else 24 (37 pts), error handling 7, loops 4, boolean chains 3, ternaries 3 (nesting depth added 13). None of this is in the body itself: all 54 points belong to 4 function literals inside it that branch (lines 46, 117, 184, …). 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 · flutter-channel.findSwiftHandlers (cognitive 49) · ×1
  • flutter-channel.findSwiftHandlers (cognitive 49) src/resolution/bridges/flutter-channel.ts:364 — flutter-channel.findSwiftHandlers has cognitive complexity 49 (threshold 15). Drivers by points: if/else 9 (24 pts), boolean chains 11, loops 6 (11 pts), ternaries 1 (3 pts) (nesting depth added 22). Of this number, 41 points are the body's own statements and 8 belong to 4 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 · npm.parseNpmManifest (cognitive 49) · ×1
  • npm.parseNpmManifest (cognitive 49) src/security/manifest/plugins/npm.ts:39 — npm.parseNpmManifest has cognitive complexity 49 (threshold 15). Drivers by points: if/else 12 (26 pts), ternaries 3 (9 pts), loops 4 (7 pts), boolean chains 6, 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 · DataQueries.sampleHints (cognitive 49) · ×1
  • DataQueries.sampleHints (cognitive 49) src/data/queries.ts:614 — DataQueries.sampleHints has cognitive complexity 49 (threshold 15). Drivers by points: if/else 19 (39 pts), boolean chains 7, match/switch 1 (2 pts), loops 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 · config-prompt.promptConfigOptions (cognitive 48) · ×1
  • config-prompt.promptConfigOptions (cognitive 48) src/bin/installer/config-prompt.ts:255 — config-prompt.promptConfigOptions has cognitive complexity 48 (threshold 15). Drivers by points: if/else 19 (37 pts), loops 2 (9 pts), boolean chains 2 (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 · git-context.parseDiff (cognitive 47) · ×1
  • git-context.parseDiff (cognitive 47) src/graph/git-context.ts:92 — git-context.parseDiff has cognitive complexity 47 (threshold 15). Drivers by points: if/else 15 (39 pts), boolean chains 7, loops 1 (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 · lint.lintWiki (cognitive 47) · ×1
  • lint.lintWiki (cognitive 47) src/wiki/lint.ts:29 — lint.lintWiki has cognitive complexity 47 (threshold 15). Drivers by points: if/else 11 (31 pts), loops 4 (9 pts), boolean chains 7 (nesting depth added 25). Of this number, 44 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 · index.getChangedFiles (cognitive 46) · ×1
  • index.getChangedFiles (cognitive 46) src/sync/index.ts:258 — index.getChangedFiles has cognitive complexity 46 (threshold 15). Drivers by points: if/else 14 (34 pts), loops 4 (6 pts), boolean chains 2, error handling 1 (2 pts), ternaries 1 (2 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 · progress.renderIndexProgress (cognitive 46) · ×1
  • progress.renderIndexProgress (cognitive 46) src/bin/progress.ts:33 — progress.renderIndexProgress has cognitive complexity 46 (threshold 15). Drivers by points: if/else 19 (31 pts), ternaries 5 (13 pts), boolean chains 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · swift-objc.swiftToObjcSelector (cognitive 45) · ×1
  • swift-objc.swiftToObjcSelector (cognitive 45) src/resolution/bridges/swift-objc.ts:26 — swift-objc.swiftToObjcSelector has cognitive complexity 45 (threshold 15). Drivers by points: if/else 13 (34 pts), loops 2 (9 pts), boolean chains 2 (nesting depth added 28). 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 · prompt.multiSelect (cognitive 45) · ×1
  • prompt.multiSelect (cognitive 45) src/hooks/prompt.ts:209 — prompt.multiSelect has cognitive complexity 45 (threshold 15). Drivers by points: if/else 15 (20 pts), ternaries 7 (16 pts), boolean chains 8, loops 1 (nesting depth added 14). None of this is in the body itself: all 45 points belong to 2 function literals inside it that branch (lines 275, 228). 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 · extractor.extractVisibility (cognitive 44) · ×1
  • extractor.extractVisibility (cognitive 44) src/extraction/extractor.ts:1006 — extractor.extractVisibility has cognitive complexity 44 (threshold 15). Drivers by points: if/else 17 (34 pts), loops 3 (5 pts), ternaries 1 (4 pts), boolean chains 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 · ColumnProfiler.addBatch (cognitive 43) · ×1
  • ColumnProfiler.addBatch (cognitive 43) src/data/profiler.ts:73 — ColumnProfiler.addBatch has cognitive complexity 43 (threshold 15). Drivers by points: if/else 10 (31 pts), boolean chains 8, loops 3 (4 pts) (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 · gain.register (cognitive 42) · ×1
  • gain.register (cognitive 42) src/bin/commands/gain.ts:8 — gain.register has cognitive complexity 42 (threshold 15). Drivers by points: if/else 14 (22 pts), loops 4 (9 pts), ternaries 3 (9 pts), boolean chains 2 (nesting depth added 19). None of this is in the body itself: all 42 points belong to one function literal inside it that branches (line 17). 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 · progress.renderSyncProgressVerbose (cognitive 41) · ×1
  • progress.renderSyncProgressVerbose (cognitive 41) src/bin/progress.ts:158 — progress.renderSyncProgressVerbose has cognitive complexity 41 (threshold 15). Drivers by points: if/else 21 (30 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 · progress.renderSyncProgress (cognitive 40) · ×1
  • progress.renderSyncProgress (cognitive 40) src/bin/progress.ts:100 — progress.renderSyncProgress has cognitive complexity 40 (threshold 15). Drivers by points: if/else 19 (31 pts), ternaries 3 (7 pts), boolean chains 2 (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 · archive.extractTarGzFromUrl (cognitive 39) · ×1
  • archive.extractTarGzFromUrl (cognitive 39) src/bin/installer/archive.ts:148 — archive.extractTarGzFromUrl has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 10, error handling 2 (6 pts), ternaries 2 (3 pts), loops 1 (nesting depth added 13). None of this is in the body itself: all 39 points belong to 4 function literals inside it that branch (lines 175, 160, 235, …). 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 · maven.parseMavenManifest (cognitive 39) · ×1
  • maven.parseMavenManifest (cognitive 39) REDACTED:62 — maven.parseMavenManifest has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 6, loops 3 (5 pts), ternaries 2 (5 pts), error handling 2 (3 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 · files.filterLs (cognitive 39) · ×1
  • files.filterLs (cognitive 39) src/compression/filters/files.ts:22 — files.filterLs has cognitive complexity 39 (threshold 15). Drivers by points: if/else 13 (25 pts), ternaries 4 (11 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 20). 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 · export.register (cognitive 39) · ×1
  • export.register (cognitive 39) src/bin/commands/export.ts:2830 — export.register has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (26 pts), loops 8 (12 pts), boolean chains 1 (nesting depth added 20). None of this is in the body itself: all 39 points belong to 3 function literals inside it that branch (lines 2944, 2862, 2909). 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 · flutter-channel.findDartChannelCalls (cognitive 38) · ×1
  • flutter-channel.findDartChannelCalls (cognitive 38) src/resolution/bridges/flutter-channel.ts:109 — flutter-channel.findDartChannelCalls has cognitive complexity 38 (threshold 15). Drivers by points: if/else 9 (24 pts), loops 5 (9 pts), boolean chains 5 (nesting depth added 19). Of this number, 36 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 · flows.register (cognitive 38) · ×1
  • flows.register (cognitive 38) src/bin/commands/flows.ts:5 — flows.register has cognitive complexity 38 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 3 (13 pts), loops 3 (10 pts), boolean chains 1 (nesting depth added 23). None of this is in the body itself: all 38 points belong to one function literal inside it that branches (line 13). 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 · export.generateExport (cognitive 37) · ×1
  • export.generateExport (cognitive 37) src/bin/commands/export.ts:23 — export.generateExport has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 9 (24 pts), if/else 3 (5 pts), loops 4, error handling 2 (3 pts), boolean chains 1 (nesting depth added 18). 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 · package.register (cognitive 37) · ×1
  • package.register (cognitive 37) src/bin/commands/package.ts:5 — package.register has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (18 pts), loops 4 (9 pts), ternaries 4 (8 pts), boolean chains 2 (nesting depth added 13). None of this is in the body itself: all 37 points belong to 2 function literals inside it that branch (lines 11, 25). 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 · extractor.extractFile (cognitive 36) · ×1
  • extractor.extractFile (cognitive 36) src/extraction/extractor.ts:76 — extractor.extractFile has cognitive complexity 36 (threshold 15). Drivers by points: if/else 18 (23 pts), boolean chains 6, ternaries 1 (3 pts), error handling 2, 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 · ContextBuilder.findRelevantContext (cognitive 36) · ×1
  • ContextBuilder.findRelevantContext (cognitive 36) src/context/index.ts:79 — ContextBuilder.findRelevantContext has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 7 (11 pts), boolean chains 2 (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 · affected.register (cognitive 36) · ×1
  • affected.register (cognitive 36) src/bin/commands/affected.ts:6 — affected.register has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 4 (13 pts), boolean chains 1, error handling 1 (nesting depth added 19). None of this is in the body itself: all 36 points belong to one function literal inside it that branches (line 16). 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 · ReferenceResolver.applyRoutePrefixes (cognitive 35) · ×1
  • ReferenceResolver.applyRoutePrefixes (cognitive 35) src/resolution/index.ts:404 — ReferenceResolver.applyRoutePrefixes has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 6, loops 4 (5 pts), ternaries 2 (3 pts) (nesting depth added 12). Of this number, 22 points are the body's own statements and 13 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 · SecurityManifestAdapter.extractAll (cognitive 35) · ×1
  • SecurityManifestAdapter.extractAll (cognitive 35) src/security/manifest/adapter.ts:148 — SecurityManifestAdapter.extractAll has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 4 (14 pts), error handling 3 (9 pts), if/else 5 (9 pts), boolean chains 2, loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SecretsScanner.scan (cognitive 35) · ×1
  • SecretsScanner.scan (cognitive 35) src/security/secrets.ts:98 — SecretsScanner.scan has cognitive complexity 35 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 3 (11 pts), loops 4 (10 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 21). Of this number, 33 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 · android-rn.findAndroidNativeModuleCalls (cognitive 34) · ×1
  • android-rn.findAndroidNativeModuleCalls (cognitive 34) REDACTED:211 — android-rn.findAndroidNativeModuleCalls has cognitive complexity 34 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 6 (14 pts), boolean chains 3 (nesting depth added 19). Of this number, 32 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 · OsvAdapter.extractAffectedRanges (cognitive 34) · ×1
  • OsvAdapter.extractAffectedRanges (cognitive 34) src/security/vuln/osv-adapter.ts:506 — OsvAdapter.extractAffectedRanges has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (26 pts), loops 3 (6 pts), boolean chains 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 · yaml.parseSequence (cognitive 34) · ×1
  • yaml.parseSequence (cognitive 34) src/shared/yaml.ts:111 — yaml.parseSequence has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 5, loops 2 (4 pts), ternaries 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.
D2 · Cognitive Complexity · instructions.buildAgentInstructions (cognitive 34) · ×1
  • instructions.buildAgentInstructions (cognitive 34) src/bin/installer/instructions.ts:52 — instructions.buildAgentInstructions has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 21, if/else 10, 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 · index.getTargetInstaller (cognitive 34) · ×1
  • index.getTargetInstaller (cognitive 34) src/bin/installer/targets/index.ts:41 — index.getTargetInstaller has cognitive complexity 34 (threshold 15). Drivers by points: if/else 34. 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 · benchmark.runRepoBenchmark (cognitive 33) · ×1
  • benchmark.runRepoBenchmark (cognitive 33) src/bin/commands/benchmark.ts:97 — benchmark.runRepoBenchmark has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (15 pts), error handling 3 (7 pts), loops 3 (5 pts), ternaries 3 (5 pts), boolean chains 1 (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 · coupling.register (cognitive 33) · ×1
  • coupling.register (cognitive 33) src/bin/commands/coupling.ts:22 — coupling.register has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 5 (13 pts), if/else 7 (10 pts), loops 3 (7 pts), boolean chains 2, match/switch 1 (nesting depth added 15). None of this is in the body itself: all 33 points belong to 3 function literals inside it that branch (lines 29, 45, 53). 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 · journal-recovery.replayJournal (cognitive 32) · ×1
  • journal-recovery.replayJournal (cognitive 32) src/db/journal-recovery.ts:64 — journal-recovery.replayJournal has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 6, 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 · GraphTraverser.traverseBFS (cognitive 32) · ×1
  • GraphTraverser.traverseBFS (cognitive 32) src/graph/traversal.ts:25 — GraphTraverser.traverseBFS has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (27 pts), loops 2 (3 pts), boolean chains 2 (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 · yaml.parseBlock (cognitive 32) · ×1
  • yaml.parseBlock (cognitive 32) src/shared/yaml.ts:27 — yaml.parseBlock has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (26 pts), boolean chains 3, ternaries 1 (2 pts), loops 1 (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 · flutter-channel.findKotlinJavaHandlers (cognitive 31) · ×1
  • flutter-channel.findKotlinJavaHandlers (cognitive 31) src/resolution/bridges/flutter-channel.ts:277 — flutter-channel.findKotlinJavaHandlers has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (18 pts), boolean chains 6, loops 3 (5 pts), ternaries 1 (2 pts) (nesting depth added 14). Of this number, 27 points are the body's own statements and 4 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 · pubspec.extractSectionDependencies (cognitive 31) · ×1
  • pubspec.extractSectionDependencies (cognitive 31) src/security/manifest/plugins/pubspec.ts:121 — pubspec.extractSectionDependencies has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 2 (4 pts), boolean chains 3, ternaries 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.
D2 · Cognitive Complexity · pyproject.extractPoetryDependencies (cognitive 31) · ×1
  • pyproject.extractPoetryDependencies (cognitive 31) REDACTED:149 — pyproject.extractPoetryDependencies has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (24 pts), loops 3 (4 pts), ternaries 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 · misc.filterPlaywright (cognitive 31) · ×1
  • misc.filterPlaywright (cognitive 31) src/compression/filters/misc.ts:183 — misc.filterPlaywright has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (18 pts), ternaries 5 (9 pts), boolean chains 2, 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.
D2 · Cognitive Complexity · communities.localMovePhase (cognitive 31) · ×1
  • communities.localMovePhase (cognitive 31) src/graph/communities.ts:87 — communities.localMovePhase has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 5 (10 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 · watchmen.handleWatchmen (cognitive 31) · ×1
  • watchmen.handleWatchmen (cognitive 31) src/mcp/handlers/watchmen.ts:3 — watchmen.handleWatchmen has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (22 pts), ternaries 2 (4 pts), boolean chains 2, loops 1 (2 pts), match/switch 1 (nesting depth added 14). 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.
D2 · Cognitive Complexity · windsurf.uninitWindsurf (cognitive 31) · ×1
  • windsurf.uninitWindsurf (cognitive 31) src/bin/installer/targets/windsurf.ts:109 — windsurf.uninitWindsurf has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (27 pts), loops 1 (3 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 · reachability.register (cognitive 31) · ×1
  • reachability.register (cognitive 31) src/bin/commands/reachability.ts:9 — reachability.register has cognitive complexity 31 (threshold 15). Drivers by points: if/else 19 (27 pts), loops 2 (4 pts) (nesting depth added 10). None of this is in the body itself: all 31 points belong to one function literal inside it that branches (line 14). 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 · name-matcher.matchReference (cognitive 30) · ×1
  • name-matcher.matchReference (cognitive 30) src/resolution/name-matcher.ts:31 — name-matcher.matchReference has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 4 (5 pts), boolean chains 1 (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 · state.workspaceFingerprint (cognitive 30) · ×1
  • state.workspaceFingerprint (cognitive 30) src/sync/state.ts:106 — state.workspaceFingerprint has cognitive complexity 30 (threshold 15). Drivers by points: if/else 5 (15 pts), error handling 3 (7 pts), boolean chains 4, loops 3 (4 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.
D2 · Cognitive Complexity · rubygems.parseRubygemsManifest (cognitive 30) · ×1
  • rubygems.parseRubygemsManifest (cognitive 30) src/security/manifest/plugins/rubygems.ts:32 — rubygems.parseRubygemsManifest has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (20 pts), ternaries 2 (5 pts), boolean chains 2, loops 2, error handling 1 (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 · DataQueries.quality (cognitive 30) · ×1
  • DataQueries.quality (cognitive 30) src/data/queries.ts:459 — DataQueries.quality has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (21 pts), error handling 2 (5 pts), boolean chains 3, 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 · AttackSurfaceAnalyzer.analyze (cognitive 30) · ×1
  • AttackSurfaceAnalyzer.analyze (cognitive 30) src/security/attack-surface.ts:87 — AttackSurfaceAnalyzer.analyze has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 6, loops 3 (6 pts), error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 10). Of this number, 25 points are the body's own statements and 5 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 · cost.register (cognitive 30) · ×1
  • cost.register (cognitive 30) src/bin/commands/cost.ts:37 — cost.register has cognitive complexity 30 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 6 (9 pts), ternaries 2 (4 pts), error handling 1 (3 pts), boolean chains 2 (nesting depth added 13). None of this is in the body itself: all 30 points belong to one function literal inside it that branches (line 42). 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 · prompt.singleChoice (cognitive 30) · ×1
  • prompt.singleChoice (cognitive 30) src/hooks/prompt.ts:96 — prompt.singleChoice has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (12 pts), ternaries 4 (8 pts), boolean chains 7, loops 2 (3 pts) (nesting depth added 6). None of this is in the body itself: all 30 points belong to 2 function literals inside it that branch (lines 115, 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 · extractor.walkTree (cognitive 29) · ×1
  • extractor.walkTree (cognitive 29) src/extraction/extractor.ts:506 — extractor.walkTree has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 6, 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.
D2 · Cognitive Complexity · ReachabilityAnalyzer.getImpactSummary (cognitive 29) · ×1
  • ReachabilityAnalyzer.getImpactSummary (cognitive 29) REDACTED:187 — ReachabilityAnalyzer.getImpactSummary has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 5 (12 pts), boolean chains 1, ternaries 1 (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 · auto-detect.runAutoDetectInstaller (cognitive 29) · ×1
  • auto-detect.runAutoDetectInstaller (cognitive 29) src/bin/installer/auto-detect.ts:26 — auto-detect.runAutoDetectInstaller has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 3 (6 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 15). 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 · security-secrets.register (cognitive 29) · ×1
  • security-secrets.register (cognitive 29) src/bin/commands/security-secrets.ts:39 — security-secrets.register has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (17 pts), ternaries 5 (9 pts), boolean chains 2, loops 1 (nesting depth added 8). None of this is in the body itself: all 29 points belong to one function literal inside it that branches (line 46). 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 · changelog.html.setupScrollSpy (cognitive 28) · ×1
  • changelog.html.setupScrollSpy (cognitive 28) docs/changelog.html:175 — changelog.html.setupScrollSpy has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 6, loops 1 (nesting depth added 9). Most of this is not in the body itself: 1 of the 28 points is its own statement and the rest belongs to 6 function items inside it that branch (updateActive, a function literal at line 187, a function literal at line 198, …). 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 · GraphDatabase.resolveUnresolvedRefs (cognitive 28) · ×1
  • GraphDatabase.resolveUnresolvedRefs (cognitive 28) REDACTED:672 — GraphDatabase.resolveUnresolvedRefs has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (26 pts), boolean chains 1, loops 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 · composer.extractFromComposerLock (cognitive 28) · ×1
  • composer.extractFromComposerLock (cognitive 28) src/security/manifest/plugins/composer.ts:181 — composer.extractFromComposerLock has cognitive complexity 28 (threshold 15). Drivers by points: if/else 4 (12 pts), ternaries 3 (10 pts), loops 2 (3 pts), boolean chains 2, error handling 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 · DocsQueries.searchSections (cognitive 28) · ×1
  • DocsQueries.searchSections (cognitive 28) src/docs/queries.ts:112 — DocsQueries.searchSections has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 2 (6 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 18). 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 · ingest.applyDiff (cognitive 28) · ×1
  • ingest.applyDiff (cognitive 28) src/wiki/ingest.ts:98 — ingest.applyDiff has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (23 pts), ternaries 1 (3 pts), 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 · caveman.register (cognitive 28) · ×1
  • caveman.register (cognitive 28) src/bin/commands/caveman.ts:42 — caveman.register has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (14 pts), ternaries 2 (6 pts), loops 3 (5 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 10). None of this is in the body itself: all 28 points belong to one function literal inside it that branches (line 46). 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 · copilot.uninitCopilot (cognitive 28) · ×1
  • copilot.uninitCopilot (cognitive 28) src/bin/installer/targets/copilot.ts:94 — copilot.uninitCopilot has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 1 (3 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 · MCPServer.handleMessage (cognitive 28) · ×1
  • MCPServer.handleMessage (cognitive 28) src/mcp/server.ts:84 — MCPServer.handleMessage has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 2 (7 pts), error handling 2 (4 pts), match/switch 1 (nesting depth added 14). 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.
D2 · Cognitive Complexity · sync-if-dirty.register (cognitive 28) · ×1
  • sync-if-dirty.register (cognitive 28) src/bin/commands/sync-if-dirty.ts:7 — sync-if-dirty.register has cognitive complexity 28 (threshold 15). Drivers by points: if/else 17 (28 pts) (nesting depth added 11). None of this is in the body itself: all 28 points belong to one function literal inside it that branches (line 13). 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 · native-events.findEventListeners (cognitive 27) · ×1
  • native-events.findEventListeners (cognitive 27) src/resolution/bridges/native-events.ts:31 — native-events.findEventListeners has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (13 pts), boolean chains 7, loops 4 (7 pts) (nesting depth added 11). Of this number, 21 points are the body's own statements and 6 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 · ReferenceResolver.invalidateFile (cognitive 27) · ×1
  • ReferenceResolver.invalidateFile (cognitive 27) src/resolution/index.ts:321 — ReferenceResolver.invalidateFile has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (25 pts), 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 · composer.parseComposerManifest (cognitive 27) · ×1
  • composer.parseComposerManifest (cognitive 27) src/security/manifest/plugins/composer.ts:31 — composer.parseComposerManifest has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (13 pts), ternaries 3 (7 pts), loops 3 (4 pts), error handling 2, 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 · DataQueries.correlations (cognitive 27) · ×1
  • DataQueries.correlations (cognitive 27) src/data/queries.ts:299 — DataQueries.correlations has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 3 (12 pts), if/else 5 (11 pts), loops 2 (3 pts), boolean chains 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 · devin.uninitDevin (cognitive 27) · ×1
  • devin.uninitDevin (cognitive 27) src/bin/installer/targets/devin.ts:95 — devin.uninitDevin has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 1 (3 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 · libc-shims.zeroMallocInBinary (cognitive 26) · ×1
  • libc-shims.zeroMallocInBinary (cognitive 26) src/extraction/libc-shims.ts:43 — libc-shims.zeroMallocInBinary has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 4 (8 pts), ternaries 1 (2 pts), boolean chains 1, error handling 1 (nesting depth added 10). Of this number, 24 points are the body's own statements and 2 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 · GraphQueryManager.getAffectedTests (cognitive 26) · ×1
  • GraphQueryManager.getAffectedTests (cognitive 26) src/graph/queries.ts:157 — GraphQueryManager.getAffectedTests has cognitive complexity 26 (threshold 15). Drivers by points: if/else 4 (16 pts), loops 4 (10 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 · ReferenceResolver._resolveImportPath (cognitive 26) · ×1
  • ReferenceResolver._resolveImportPath (cognitive 26) src/resolution/index.ts:525 — ReferenceResolver._resolveImportPath has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 4 (7 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 · TypesenseIndex.initialize (cognitive 26) · ×1
  • TypesenseIndex.initialize (cognitive 26) REDACTED:201 — TypesenseIndex.initialize has cognitive complexity 26 (threshold 15). Drivers by points: error handling 7 (15 pts), if/else 5 (7 pts), ternaries 2 (3 pts), loops 1 (nesting depth added 11). Of this number, 25 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 · index.buildResolutionContext.readFile (cognitive 26) · ×1
  • index.buildResolutionContext.readFile (cognitive 26) src/frameworks/index.ts:192 — index.buildResolutionContext.readFile has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (13 pts), error handling 4 (7 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 10). Of this number, 25 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 · pyproject.parsePyprojectManifest (cognitive 26) · ×1
  • pyproject.parsePyprojectManifest (cognitive 26) REDACTED:24 — pyproject.parsePyprojectManifest has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 4 (11 pts), if/else 4 (8 pts), loops 4 (5 pts), boolean chains 1, error handling 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 · parser.compareVersions (cognitive 26) · ×1
  • parser.compareVersions (cognitive 26) src/security/manifest/parser.ts:213 — parser.compareVersions has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (20 pts), boolean chains 3, ternaries 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 · linker.detectDataReferences (cognitive 26) · ×1
  • linker.detectDataReferences (cognitive 26) src/data/linker.ts:58 — linker.detectDataReferences has cognitive complexity 26 (threshold 15). Drivers by points: if/else 3 (10 pts), ternaries 2 (9 pts), loops 4 (6 pts), boolean chains 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 · lint.filterTsc (cognitive 26) · ×1
  • lint.filterTsc (cognitive 26) src/compression/filters/lint.ts:30 — lint.filterTsc has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 3 (4 pts), ternaries 2 (3 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 · help.renderGroup (cognitive 26) · ×1
  • help.renderGroup (cognitive 26) src/bin/commands/help.ts:414 — help.renderGroup has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 5 (14 pts), loops 3 (6 pts), boolean chains 3, if/else 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 · extractor.refineDartClassKind (cognitive 25) · ×1
  • extractor.refineDartClassKind (cognitive 25) src/extraction/extractor.ts:465 — extractor.refineDartClassKind has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (19 pts), loops 2 (4 pts), boolean chains 2 (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 · LockManager.acquire (cognitive 25) · ×1
  • LockManager.acquire (cognitive 25) src/core/lock-manager.ts:39 — LockManager.acquire has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (18 pts), error handling 3 (5 pts), boolean chains 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 · DependencyGraphIntegrator.integrate (cognitive 25) · ×1
  • DependencyGraphIntegrator.integrate (cognitive 25) src/security/integrator.ts:247 — DependencyGraphIntegrator.integrate has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 4 (5 pts), boolean chains 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 · SecurityPipeline.run (cognitive 25) · ×1
  • SecurityPipeline.run (cognitive 25) src/security/pipeline.ts:46 — SecurityPipeline.run has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 8, ternaries 2 (3 pts), loops 2, match/switch 1 (2 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 · rst.extractHeadings (cognitive 25) · ×1
  • rst.extractHeadings (cognitive 25) src/docs/formats/rst.ts:30 — rst.extractHeadings has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (13 pts), ternaries 2 (8 pts), boolean chains 3, loops 1 (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 · lint.filterEslint (cognitive 25) · ×1
  • lint.filterEslint (cognitive 25) src/compression/filters/lint.ts:91 — lint.filterEslint has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (19 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.
D2 · Cognitive Complexity · misc.filterGrep (cognitive 25) · ×1
  • misc.filterGrep (cognitive 25) src/compression/filters/misc.ts:27 — misc.filterGrep has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 3 (4 pts), ternaries 1 (2 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 · DepConfusionChecker.check (cognitive 25) · ×1
  • DepConfusionChecker.check (cognitive 25) src/security/dep-confusion.ts:189 — DepConfusionChecker.check has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (15 pts), error handling 2 (5 pts), ternaries 1 (4 pts), loops 1 (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 · DataLinter.lint (cognitive 25) · ×1
  • DataLinter.lint (cognitive 25) src/data/lint.ts:38 — DataLinter.lint has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (17 pts), error handling 4 (7 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.
D2 · Cognitive Complexity · refactor.register (cognitive 25) · ×1
  • refactor.register (cognitive 25) src/bin/commands/refactor.ts:5 — refactor.register has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 4 (8 pts), ternaries 2 (5 pts) (nesting depth added 11). None of this is in the body itself: all 25 points belong to 2 function literals inside it that branch (lines 14, 67). 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 · GraphDatabase.findPath (cognitive 24) · ×1
  • GraphDatabase.findPath (cognitive 24) REDACTED:878 — GraphDatabase.findPath has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 5 (8 pts), ternaries 1 (2 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 · expo-modules.findExpoModuleDecls (cognitive 24) · ×1
  • expo-modules.findExpoModuleDecls (cognitive 24) REDACTED:31 — expo-modules.findExpoModuleDecls has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 5, loops 3 (5 pts) (nesting depth added 10). Of this number, 20 points are the body's own statements and 4 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 · expo-modules.findExpoModuleCalls (cognitive 24) · ×1
  • expo-modules.findExpoModuleCalls (cognitive 24) REDACTED:98 — expo-modules.findExpoModuleCalls has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 4 (8 pts), boolean chains 5 (nesting depth added 11). Of this number, 20 points are the body's own statements and 4 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 · native-views.findNativeViewUsages (cognitive 24) · ×1
  • native-views.findNativeViewUsages (cognitive 24) src/resolution/bridges/native-views.ts:50 — native-views.findNativeViewUsages has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 4 (7 pts), boolean chains 4 (nesting depth added 11). Of this number, 21 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 · linker.extractCandidateRefs (cognitive 24) · ×1
  • linker.extractCandidateRefs (cognitive 24) src/docs/linker.ts:41 — linker.extractCandidateRefs has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 4 (6 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 · profiler.generateColumnSummary (cognitive 24) · ×1
  • profiler.generateColumnSummary (cognitive 24) src/data/profiler.ts:176 — profiler.generateColumnSummary has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 7 (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 · aws.unwrapDynamoTypes (cognitive 24) · ×1
  • aws.unwrapDynamoTypes (cognitive 24) src/compression/filters/aws.ts:235 — aws.unwrapDynamoTypes has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (22 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 · read-modes.readDiff (cognitive 24) · ×1
  • read-modes.readDiff (cognitive 24) src/mcp/read-modes.ts:185 — read-modes.readDiff has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 3 (8 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 · snapshot.register (cognitive 24) · ×1
  • snapshot.register (cognitive 24) src/bin/commands/snapshot.ts:5 — snapshot.register has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 3 (7 pts), ternaries 2 (3 pts) (nesting depth added 11). None of this is in the body itself: all 24 points belong to 2 function literals inside it that branch (lines 61, 33). 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 · infra.augmentBash · ×1
  • infra.augmentBash::visit (cognitive 23) src/extraction/infra.ts:526 — infra.augmentBash::visit has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 3 (8 pts), boolean chains 3, loops 1 (nesting depth added 11). 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. This shape REPEATS in the file: one other method here (infra.augmentBash) 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 · extractor.walkForCalls (cognitive 23) · ×1
  • extractor.walkForCalls (cognitive 23) src/extraction/extractor.ts:1178 — extractor.walkForCalls has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (19 pts), ternaries 1 (3 pts), loops 1 (nesting depth added 14). 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 · GraphQueryManager.findPath (cognitive 23) · ×1
  • GraphQueryManager.findPath (cognitive 23) src/graph/queries.ts:88 — GraphQueryManager.findPath has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 4 (5 pts), ternaries 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 · iac.resolveHandlerString (cognitive 23) · ×1
  • iac.resolveHandlerString (cognitive 23) src/frameworks/iac.ts:337 — iac.resolveHandlerString has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 5, loops 3 (4 pts) (nesting depth added 9). Of this number, 19 points are the body's own statements and 4 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 · index.buildResolutionContext.fileExists (cognitive 23) · ×1
  • index.buildResolutionContext.fileExists (cognitive 23) src/frameworks/index.ts:164 — index.buildResolutionContext.fileExists has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3, error handling 2 (3 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 · npm.extractTransitiveNpmDependencies (cognitive 23) · ×1
  • npm.extractTransitiveNpmDependencies (cognitive 23) src/security/manifest/plugins/npm.ts:241 — npm.extractTransitiveNpmDependencies has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 3 (6 pts), boolean chains 4, error handling 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 · DependencyGraphIntegrator.matchImportToDependency (cognitive 23) · ×1
  • DependencyGraphIntegrator.matchImportToDependency (cognitive 23) src/security/integrator.ts:383 — DependencyGraphIntegrator.matchImportToDependency has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 2, loops 1 (2 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 · OsvAdapter.queryBatch (cognitive 23) · ×1
  • OsvAdapter.queryBatch (cognitive 23) src/security/vuln/osv-adapter.ts:210 — OsvAdapter.queryBatch has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 3 (6 pts), loops 3 (4 pts), error handling 1 (nesting depth added 7). Of this number, 21 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 · aws.filterCfnEvents (cognitive 23) · ×1
  • aws.filterCfnEvents (cognitive 23) src/compression/filters/aws.ts:179 — aws.filterCfnEvents has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 9 (12 pts), boolean chains 7, if/else 3, error handling 1 (nesting depth added 3). Most of this is not in the body itself: 8 of the 23 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 194, 187, 210). 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 · SBOMExporter.export (cognitive 23) · ×1
  • SBOMExporter.export (cognitive 23) src/security/export/sbom.ts:145 — SBOMExporter.export has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (6 pts), boolean chains 2, ternaries 2 (nesting depth added 10). Of this number, 21 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 · supply-chain.computeRisk (cognitive 23) · ×1
  • supply-chain.computeRisk (cognitive 23) src/security/supply-chain.ts:254 — supply-chain.computeRisk has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12, boolean chains 11. 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 · hotspots.register (cognitive 23) · ×1
  • hotspots.register (cognitive 23) src/bin/commands/hotspots.ts:8 — hotspots.register has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 2 (3 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 9). None of this is in the body itself: all 23 points belong to 2 function literals inside it that branch (lines 15, 111). 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 · infra.extractJsonConfig (cognitive 22) · ×1
  • infra.extractJsonConfig (cognitive 22) src/extraction/infra.ts:666 — infra.extractJsonConfig has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (4 pts), ternaries 2 (4 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 · android-rn.findJsxPropUsages (cognitive 22) · ×1
  • android-rn.findJsxPropUsages (cognitive 22) REDACTED:311 — android-rn.findJsxPropUsages has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 12). Of this number, 20 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 · npm.extractFromPackageLock (cognitive 22) · ×1
  • npm.extractFromPackageLock (cognitive 22) src/security/manifest/plugins/npm.ts:412 — npm.extractFromPackageLock has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 5, loops 1 (2 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 · ReachabilityAnalyzer.reverseBfsToEntryPoints (cognitive 22) · ×1
  • ReachabilityAnalyzer.reverseBfsToEntryPoints (cognitive 22) REDACTED:317 — ReachabilityAnalyzer.reverseBfsToEntryPoints has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 3 (6 pts), boolean chains 2 (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 · PatternRunner.applyFix (cognitive 22) · ×1
  • PatternRunner.applyFix (cognitive 22) src/patterns/runner.ts:259 — PatternRunner.applyFix has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 5 (7 pts), ternaries 2 (3 pts), error handling 2, boolean chains 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 · synthesize.runLocalSynthesis (cognitive 22) · ×1
  • synthesize.runLocalSynthesis (cognitive 22) src/watchmen/synthesize.ts:498 — synthesize.runLocalSynthesis has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 2 (5 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 · read-modes.readSignatures (cognitive 22) · ×1
  • read-modes.readSignatures (cognitive 22) src/mcp/read-modes.ts:127 — read-modes.readSignatures has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (6 pts), ternaries 2 (3 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 · claude.uninitClaude (cognitive 22) · ×1
  • claude.uninitClaude (cognitive 22) src/bin/installer/targets/claude.ts:75 — claude.uninitClaude has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 1 (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 · cursor.uninitCursor (cognitive 22) · ×1
  • cursor.uninitCursor (cognitive 22) src/bin/installer/targets/cursor.ts:92 — cursor.uninitCursor has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 1 (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 · remediation.register (cognitive 22) · ×1
  • remediation.register (cognitive 22) src/bin/commands/remediation.ts:24 — remediation.register has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 7 (12 pts), if/else 9, loops 1 (nesting depth added 5). None of this is in the body itself: all 22 points belong to 2 function literals inside it that branch (lines 30, 61). 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 · extractor.importBindingNames (cognitive 21) · ×1
  • extractor.importBindingNames (cognitive 21) src/extraction/extractor.ts:1347 — extractor.importBindingNames has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 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 · react.resolveComponent (cognitive 21) · ×1
  • react.resolveComponent (cognitive 21) src/frameworks/react.ts:140 — react.resolveComponent has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (12 pts), boolean chains 5, loops 3 (4 pts) (nesting depth added 9). Of this number, 17 points are the body's own statements and 4 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 · npm.findNpmDuplicateVersions (cognitive 21) · ×1
  • npm.findNpmDuplicateVersions (cognitive 21) src/security/manifest/plugins/npm.ts:196 — npm.findNpmDuplicateVersions has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3, loops 2, error handling 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 · nuget.extractFromPackagesLock (cognitive 21) · ×1
  • nuget.extractFromPackagesLock (cognitive 21) src/security/manifest/plugins/nuget.ts:271 — nuget.extractFromPackagesLock has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 5, loops 2 (3 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 · integrator.parseNpmLockTransitives (cognitive 21) · ×1
  • integrator.parseNpmLockTransitives (cognitive 21) src/security/integrator.ts:35 — integrator.parseNpmLockTransitives has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (5 pts), boolean chains 4, 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 · integrator.parseCargoLockTransitives (cognitive 21) · ×1
  • integrator.parseCargoLockTransitives (cognitive 21) src/security/integrator.ts:115 — integrator.parseCargoLockTransitives has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 2, 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 · git.filterGitLog (cognitive 21) · ×1
  • git.filterGitLog (cognitive 21) src/compression/filters/git.ts:107 — git.filterGitLog has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 6, ternaries 2 (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 · aws.filterEc2Instances (cognitive 21) · ×1
  • aws.filterEc2Instances (cognitive 21) src/compression/filters/aws.ts:69 — aws.filterEc2Instances has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 7, if/else 4 (6 pts), ternaries 1 (4 pts), loops 2 (3 pts), error handling 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 · context-warnings.getSecurityWarningsForNodes (cognitive 21) · ×1
  • context-warnings.getSecurityWarningsForNodes (cognitive 21) src/security/context-warnings.ts:34 — context-warnings.getSecurityWarningsForNodes has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (13 pts), error handling 2 (3 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). 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 · read-modes.readMap (cognitive 21) · ×1
  • read-modes.readMap (cognitive 21) src/mcp/read-modes.ts:70 — read-modes.readMap has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 3 (7 pts), if/else 3 (6 pts), loops 3 (6 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 · attack-surface.printRouteEntry (cognitive 21) · ×1
  • attack-surface.printRouteEntry (cognitive 21) src/bin/commands/attack-surface.ts:129 — attack-surface.printRouteEntry has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 6 (11 pts), if/else 4 (5 pts), boolean chains 3, loops 1, match/switch 1 (nesting depth added 6). Of this number, 18 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 · context.register (cognitive 21) · ×1
  • context.register (cognitive 21) src/bin/commands/context.ts:4 — context.register has cognitive complexity 21 (threshold 15). Drivers by points: loops 3 (11 pts), if/else 5 (10 pts) (nesting depth added 13). None of this is in the body itself: all 21 points belong to one function literal inside it that branches (line 11). 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 · export.buildFiles (cognitive 21) · ×1
  • export.buildFiles (cognitive 21) src/bin/commands/export.ts:220 — export.buildFiles has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 12, if/else 4 (7 pts), boolean chains 1, loops 1 (nesting depth added 3). Most of this is not in the body itself: 6 of the 21 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 233, 281, 299, …). 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 · help.printColoredHelp (cognitive 21) · ×1
  • help.printColoredHelp (cognitive 21) src/bin/commands/help.ts:558 — help.printColoredHelp has cognitive complexity 21 (threshold 15). Drivers by points: loops 5 (10 pts), ternaries 2 (8 pts), if/else 1 (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 · prompts.arrowSelect (cognitive 21) · ×1
  • prompts.arrowSelect (cognitive 21) src/bin/installer/prompts.ts:103 — prompts.arrowSelect has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 4, ternaries 2 (4 pts), loops 2 (3 pts) (nesting depth added 5). None of this is in the body itself: all 21 points belong to 4 function items inside it that branch (a function literal at line 147, render, descLineCount, …). 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 · codex.uninitCodex (cognitive 21) · ×1
  • codex.uninitCodex (cognitive 21) src/bin/installer/targets/codex.ts:78 — codex.uninitCodex has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 1 (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 · status.showIntegrations (cognitive 21) · ×1
  • status.showIntegrations (cognitive 21) src/bin/commands/status.ts:186 — status.showIntegrations has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 2 (6 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 7). Of this number, 16 points are the body's own statements and 5 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 · notebook.extractPythonCallName (cognitive 20) · ×1
  • notebook.extractPythonCallName (cognitive 20) src/extraction/notebook.ts:413 — notebook.extractPythonCallName has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 4, 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 · extractor.walkElixirCall (cognitive 20) · ×1
  • extractor.walkElixirCall (cognitive 20) src/extraction/extractor.ts:307 — extractor.walkElixirCall has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 3 (6 pts), ternaries 1 (3 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 · extractor.extractCallName (cognitive 20) · ×1
  • extractor.extractCallName (cognitive 20) src/extraction/extractor.ts:1150 — extractor.extractCallName has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 4, 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 · GraphTraverser.traverseDFS · ×1
  • GraphTraverser.traverseDFS::dfs (cognitive 20) src/graph/traversal.ts:93 — GraphTraverser.traverseDFS::dfs has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (17 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 · archive.extractZip (cognitive 20) · ×1
  • archive.extractZip (cognitive 20) src/bin/installer/archive.ts:67 — archive.extractZip has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3, 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 · cargo.extractFromCargoLock (cognitive 20) · ×1
  • cargo.extractFromCargoLock (cognitive 20) src/security/manifest/plugins/cargo.ts:322 — cargo.extractFromCargoLock has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (18 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 · nuget.parseNugetManifest (cognitive 20) · ×1
  • nuget.parseNugetManifest (cognitive 20) src/security/manifest/plugins/nuget.ts:36 — nuget.parseNugetManifest has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 4 (10 pts), loops 3 (4 pts), error handling 2 (3 pts), if/else 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 · nuget.extractPackageReferences (cognitive 20) · ×1
  • nuget.extractPackageReferences (cognitive 20) src/security/manifest/plugins/nuget.ts:138 — nuget.extractPackageReferences has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 4, 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 · git.filterGitDiff (cognitive 20) · ×1
  • git.filterGitDiff (cognitive 20) src/compression/filters/git.ts:141 — git.filterGitDiff has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 2 (3 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 · MemoryManager.search (cognitive 20) · ×1
  • MemoryManager.search (cognitive 20) src/memory/index.ts:182 — MemoryManager.search has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (5 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 · DataQueries.detectDrift (cognitive 20) · ×1
  • DataQueries.detectDrift (cognitive 20) src/data/queries.ts:399 — DataQueries.detectDrift has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 3, 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 · bench.register (cognitive 20) · ×1
  • bench.register (cognitive 20) src/bin/commands/bench.ts:12 — bench.register has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (7 pts), loops 3 (5 pts), error handling 2 (4 pts), ternaries 2 (4 pts) (nesting depth added 8). None of this is in the body itself: all 20 points belong to one function literal inside it that branches (line 16). 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 · gemini-cli.uninitGeminiCli (cognitive 20) · ×1
  • gemini-cli.uninitGeminiCli (cognitive 20) src/bin/installer/targets/gemini-cli.ts:87 — gemini-cli.uninitGeminiCli has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (20 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 · staleness.register (cognitive 20) · ×1
  • staleness.register (cognitive 20) src/bin/commands/staleness.ts:26 — staleness.register has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (13 pts), ternaries 3 (5 pts), boolean chains 1, loops 1 (nesting depth added 5). None of this is in the body itself: all 20 points belong to one function literal inside it that branches (line 33). 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 · supply-chain.register (cognitive 20) · ×1
  • supply-chain.register (cognitive 20) src/bin/commands/supply-chain.ts:29 — supply-chain.register has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 3 (6 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 6). None of this is in the body itself: all 20 points belong to one function literal inside it that branches (line 36). 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 · complexity.walkComplexity (cognitive 20) · ×1
  • complexity.walkComplexity (cognitive 20) src/extraction/complexity.ts:41 — complexity.walkComplexity has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (7 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 · index.scanDirectoryWalk · ×1
  • index.scanDirectoryWalk::walk (cognitive 19) src/sync/index.ts:104 — index.scanDirectoryWalk::walk has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), error handling 2, 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 · svelte.resolveComponent (cognitive 19) · ×1
  • svelte.resolveComponent (cognitive 19) src/frameworks/svelte.ts:112 — svelte.resolveComponent has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (14 pts), boolean chains 3, loops 2 (nesting depth added 9). 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 · npm.loadNpmLicenses (cognitive 19) · ×1
  • npm.loadNpmLicenses (cognitive 19) src/security/manifest/plugins/npm.ts:354 — npm.loadNpmLicenses has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, ternaries 1 (2 pts), error handling 1, 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 · npm.normalizeLicenseField (cognitive 19) · ×1
  • npm.normalizeLicenseField (cognitive 19) src/security/manifest/plugins/npm.ts:539 — npm.normalizeLicenseField has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 7 (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 · pubspec.extractFromPubspecLock (cognitive 19) · ×1
  • pubspec.extractFromPubspecLock (cognitive 19) src/security/manifest/plugins/pubspec.ts:290 — pubspec.extractFromPubspecLock has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 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 · DependencyGraphIntegrator.cleanup (cognitive 19) · ×1
  • DependencyGraphIntegrator.cleanup (cognitive 19) src/security/integrator.ts:593 — DependencyGraphIntegrator.cleanup has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 5 (6 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 7). Of this number, 17 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 · markdown.extractHeadings (cognitive 19) · ×1
  • markdown.extractHeadings (cognitive 19) src/docs/formats/markdown.ts:32 — markdown.extractHeadings has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (17 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 · csv.parseCSVLine (cognitive 19) · ×1
  • csv.parseCSVLine (cognitive 19) src/data/parsers/csv.ts:15 — csv.parseCSVLine has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (17 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 · file-tree.buildFileTree (cognitive 19) · ×1
  • file-tree.buildFileTree (cognitive 19) src/core/file-tree.ts:18 — file-tree.buildFileTree has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). 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 · files.filterFind (cognitive 19) · ×1
  • files.filterFind (cognitive 19) src/compression/filters/files.ts:89 — files.filterFind has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 3 (4 pts), ternaries 2 (4 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 · attack-surface.register (cognitive 19) · ×1
  • attack-surface.register (cognitive 19) src/bin/commands/attack-surface.ts:10 — attack-surface.register has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 4 (7 pts), boolean chains 1, error handling 1, loops 1 (nesting depth added 4). None of this is in the body itself: all 19 points belong to one function literal inside it that branches (line 17). 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 · read.register (cognitive 19) · ×1
  • read.register (cognitive 19) src/bin/commands/read.ts:9 — read.register has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), error handling 2 (5 pts), ternaries 1 (nesting depth added 6). None of this is in the body itself: all 19 points belong to one function literal inside it that branches (line 18). 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 · files.listUncached (cognitive 18) · ×1
  • files.listUncached (cognitive 18) src/sync/files.ts:115 — files.listUncached has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 3 (8 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 · android-rn.findReactMethodDecls (cognitive 18) · ×1
  • android-rn.findReactMethodDecls (cognitive 18) REDACTED:102 — android-rn.findReactMethodDecls has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 7). 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 · npm.loadResolvedVersions (cognitive 18) · ×1
  • npm.loadResolvedVersions (cognitive 18) src/security/manifest/plugins/npm.ts:297 — npm.loadResolvedVersions has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 3 (9 pts), error handling 3 (6 pts), if/else 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 · cargo.extractSectionDependencies (cognitive 18) · ×1
  • cargo.extractSectionDependencies (cognitive 18) src/security/manifest/plugins/cargo.ts:136 — cargo.extractSectionDependencies has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 2 (4 pts), loops 2 (3 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 · pyproject.extractPep621Dependencies (cognitive 18) · ×1
  • pyproject.extractPep621Dependencies (cognitive 18) REDACTED:116 — pyproject.extractPep621Dependencies has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (7 pts), loops 3 (6 pts), ternaries 1 (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 · ManifestParser.parseAll (cognitive 18) · ×1
  • ManifestParser.parseAll (cognitive 18) src/security/manifest/parser.ts:384 — ManifestParser.parseAll has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 2 (6 pts), error handling 2 (4 pts), if/else 3 (4 pts), loops 3 (4 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 · DocsIndexer.indexFile (cognitive 18) · ×1
  • DocsIndexer.indexFile (cognitive 18) src/docs/indexer.ts:99 — DocsIndexer.indexFile has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), loops 4 (7 pts), error handling 1 (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, 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 · MemoryVectorManager.search (cognitive 18) · ×1
  • MemoryVectorManager.search (cognitive 18) src/memory/vectors.ts:153 — MemoryVectorManager.search has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (5 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 · filters.buildWhereClause (cognitive 18) · ×1
  • filters.buildWhereClause (cognitive 18) src/data/filters.ts:36 — filters.buildWhereClause has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, match/switch 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 · synthesize.parseOutput (cognitive 18) · ×1
  • synthesize.parseOutput (cognitive 18) src/watchmen/synthesize.ts:279 — synthesize.parseOutput has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 3 (7 pts), loops 2 (3 pts) (nesting depth added 8). Of this number, 13 points are the body's own statements and 5 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 · ToolHandler.handle (cognitive 18) · ×1
  • ToolHandler.handle (cognitive 18) REDACTED:113 — ToolHandler.handle has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, 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 · help.printInteractiveHelp (cognitive 18) · ×1
  • help.printInteractiveHelp (cognitive 18) src/bin/commands/help.ts:467 — help.printInteractiveHelp has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (9 pts), loops 2 (5 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 5). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to one function item inside it that branches (onData). 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 · config-prompt.promptEmbeddings (cognitive 18) · ×1
  • config-prompt.promptEmbeddings (cognitive 18) src/bin/installer/config-prompt.ts:110 — config-prompt.promptEmbeddings has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 2 (4 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 · opencode.uninitOpenCode (cognitive 18) · ×1
  • opencode.uninitOpenCode (cognitive 18) src/bin/installer/targets/opencode.ts:83 — opencode.uninitOpenCode has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (18 pts) (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 · kilo.uninitKilo (cognitive 18) · ×1
  • kilo.uninitKilo (cognitive 18) src/bin/installer/targets/kilo.ts:67 — kilo.uninitKilo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (17 pts), ternaries 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 · security-export.register (cognitive 18) · ×1
  • security-export.register (cognitive 18) src/bin/commands/security-export.ts:1286 — security-export.register has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 4 (7 pts), if/else 4 (5 pts), error handling 4, boolean chains 1, loops 1 (nesting depth added 4). None of this is in the body itself: all 18 points belong to 3 function literals inside it that branch (lines 1292, 1330, 1352). 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 · config.loadDotEnv (cognitive 17) · ×1
  • config.loadDotEnv (cognitive 17) src/config.ts:998 — config.loadDotEnv has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 5, error handling 1, 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 · infra.augmentBash (cognitive 17) · ×1
  • infra.augmentBash (cognitive 17) src/extraction/infra.ts:505 — infra.augmentBash has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (26 pts), ternaries 5 (12 pts), loops 6 (8 pts), boolean chains 5 (nesting depth added 23). 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. This shape REPEATS in the file: one other method here (infra.augmentBash::visit) 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 · android-rn.findReactPropDecls (cognitive 17) · ×1
  • android-rn.findReactPropDecls (cognitive 17) REDACTED:162 — android-rn.findReactPropDecls has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 7). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · QdrantIndex.initialize (cognitive 17) · ×1
  • QdrantIndex.initialize (cognitive 17) src/vectors/qdrant-index.ts:135 — QdrantIndex.initialize has cognitive complexity 17 (threshold 15). Drivers by points: error handling 5 (10 pts), if/else 4 (5 pts), ternaries 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 · swift.extractPinsV1 (cognitive 17) · ×1
  • swift.extractPinsV1 (cognitive 17) src/security/manifest/plugins/swift.ts:299 — swift.extractPinsV1 has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 4, 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 · DataIndexer.indexFile (cognitive 17) · ×1
  • DataIndexer.indexFile (cognitive 17) REDACTED:83 — DataIndexer.indexFile has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 2, ternaries 1 (2 pts), boolean chains 1, error handling 1 (nesting depth added 4). 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 into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · misc.filterDiff (cognitive 17) · ×1
  • misc.filterDiff (cognitive 17) src/compression/filters/misc.ts:88 — misc.filterDiff has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 2 (3 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 · MemoryManager.scanConflicts (cognitive 17) · ×1
  • MemoryManager.scanConflicts (cognitive 17) src/memory/index.ts:462 — MemoryManager.scanConflicts has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 8). 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 · DataQueries.validationRules (cognitive 17) · ×1
  • DataQueries.validationRules (cognitive 17) src/data/queries.ts:567 — DataQueries.validationRules has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4, 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 · hooks.writeHooks (cognitive 17) · ×1
  • hooks.writeHooks (cognitive 17) src/bin/installer/hooks.ts:208 — hooks.writeHooks has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 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 · compression.register (cognitive 17) · ×1
  • compression.register (cognitive 17) src/bin/commands/compression.ts:23 — compression.register has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 3 (7 pts), if/else 6, error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 6). None of this is in the body itself: all 17 points belong to one function literal inside it that branches (line 27). 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 · monitor.register (cognitive 17) · ×1
  • monitor.register (cognitive 17) src/bin/commands/monitor.ts:5 — monitor.register has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (8 pts), error handling 2 (4 pts), if/else 2, loops 2, boolean chains 1 (nesting depth added 6). None of this is in the body itself: all 17 points belong to 2 function literals inside it that branch (lines 9, 43). 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 · uninit.runUninit (cognitive 17) · ×1
  • uninit.runUninit (cognitive 17) src/bin/commands/uninit.ts:100 — uninit.runUninit has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 2 (3 pts), loops 1 (2 pts), boolean chains 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 · notebook.walkPythonTree (cognitive 16) · ×1
  • notebook.walkPythonTree (cognitive 16) src/extraction/notebook.ts:213 — notebook.walkPythonTree has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 3 (6 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 · infra.hclTraversals · ×1
  • infra.hclTraversals::visit (cognitive 16) src/extraction/infra.ts:134 — infra.hclTraversals::visit has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 5, 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 · GraphDatabase.runMigrations (cognitive 16) · ×1
  • GraphDatabase.runMigrations (cognitive 16) REDACTED:168 — GraphDatabase.runMigrations has cognitive complexity 16 (threshold 15). Drivers by points: error handling 6 (9 pts), if/else 4, loops 1 (2 pts), 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 · GraphDatabase.getTypeHierarchy (cognitive 16) · ×1
  • GraphDatabase.getTypeHierarchy (cognitive 16) REDACTED:932 — GraphDatabase.getTypeHierarchy has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (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 · turbomodules.findCallSitesForModule (cognitive 16) · ×1
  • turbomodules.findCallSitesForModule (cognitive 16) REDACTED:251 — turbomodules.findCallSitesForModule has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 6). 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 into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · parser.deduplicateDependencies (cognitive 16) · ×1
  • parser.deduplicateDependencies (cognitive 16) src/security/manifest/parser.ts:288 — parser.deduplicateDependencies has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (14 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 · VulnerabilityDatabaseClient.enrichDuplicateVersions (cognitive 16) · ×1
  • VulnerabilityDatabaseClient.enrichDuplicateVersions (cognitive 16) src/security/vuln/client.ts:290 — VulnerabilityDatabaseClient.enrichDuplicateVersions has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 3 (6 pts), boolean chains 1, error handling 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 · openapi.parseJSONOperations (cognitive 16) · ×1
  • openapi.parseJSONOperations (cognitive 16) src/docs/formats/openapi.ts:165 — openapi.parseJSONOperations has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (5 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (3 pts), error handling 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 · aws.filterLogEvents (cognitive 16) · ×1
  • aws.filterLogEvents (cognitive 16) src/compression/filters/aws.ts:136 — aws.filterLogEvents has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 3 (4 pts), boolean chains 2, error handling 1, 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 · MemoryManager.store (cognitive 16) · ×1
  • MemoryManager.store (cognitive 16) src/memory/index.ts:95 — MemoryManager.store has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 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 · context-warnings.formatSecurityWarnings (cognitive 16) · ×1
  • context-warnings.formatSecurityWarnings (cognitive 16) src/security/context-warnings.ts:137 — context-warnings.formatSecurityWarnings has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 3 (7 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 · sbom.getProjectName (cognitive 16) · ×1
  • sbom.getProjectName (cognitive 16) src/security/export/sbom.ts:70 — sbom.getProjectName has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 4 (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 · exec.register (cognitive 16) · ×1
  • exec.register (cognitive 16) src/bin/commands/exec.ts:17 — exec.register has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, boolean chains 6, error handling 2. None of this is in the body itself: all 16 points belong to one function literal inside it that branches (line 27). 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.
D30 · Dependency Vulnerabilities · Medium vulnerability · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Medium advisory (unmaintained) · ×1
  • REDACTED
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×1
  • Duplicated block (7 lines × 2) native/turbovec-node/src/lib.rs:111 — native/turbovec-node/src/lib.rs:111-117 | native/turbovec-node/src/lib.rs:157-163 — 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.
P1 · CI/CD gates · No CI pipeline · ×1
  • No CI pipeline — No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, …) — changes aren't gated by an automated build/test.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×1
  • Outbound HTTP without resilience src/security/dep-confusion.ts:90 — `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.
R10 · Code Duplication · Duplication concentrated across 14 sibling directories (27 clone groups) · ×1
  • Duplication concentrated across 14 sibling directories (27 clone groups) src/architecture/layers/index.ts:23 — 27 duplicated blocks under src/ have copies in at least two of the sibling directories architecture, data, db, frameworks, graph, mcp (+8 more sibling(s) not listed) — 14 of them are reported below, and 13 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 27 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 27 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 27 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 (161 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (161 matched lines × 2 locations) src/vectors/qdrant-index.ts:59 — src/vectors/qdrant-index.ts:59 · REDACTED:103 — the two spans are one implementation copied and then locally edited — 1114 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 (93 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (93 matched lines × 2 locations) src/vectors/turboquant-index.ts:88 — src/vectors/turboquant-index.ts:88 · src/vectors/turbovec-index.ts:38 — the two spans are one implementation copied and then locally edited — 688 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 (79 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (79 matched lines × 2 locations) src/resolution/bridges/native-events.ts:15 — src/resolution/bridges/native-events.ts:15 · src/resolution/bridges/react-native.ts:14 — the two spans are one implementation copied and then locally edited — 617 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 (69 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (69 matched lines × 2 locations) src/vectors/lancedb-index.ts:33 — src/vectors/lancedb-index.ts:33 · src/vectors/pglite-index.ts:36 — the two spans are one implementation copied and then locally edited — 464 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 (56 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (56 matched lines × 2 locations) src/security/manifest/plugins/pubspec.ts:72 — src/security/manifest/plugins/pubspec.ts:72 · src/security/manifest/plugins/rubygems.ts:95 — the two spans are one implementation copied and then locally edited — 345 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 (55 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (55 matched lines × 2 locations) src/jev/client.ts:12 — src/jev/client.ts:12 · src/jev/strands-client.ts:22 — the two spans are one implementation copied and then locally edited — 378 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 (49 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (49 matched lines × 2 locations) src/security/manifest/plugins/composer.ts:50 — src/security/manifest/plugins/composer.ts:50 · src/security/manifest/plugins/pubspec.ts:44 — the two spans are one implementation copied and then locally edited — 315 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 (44 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (44 matched lines × 2 locations) src/extraction/extractor.ts:1065 — src/extraction/extractor.ts:1065 · src/extraction/notebook.ts:351 — the two spans are one implementation copied and then locally edited — 352 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 (43 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (43 matched lines × 2 locations) REDACTED:231 — REDACTED:231 · src/resolution/bridges/flutter-channel.ts:123 — the two spans are one implementation copied and then locally edited — 292 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 (39 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (39 matched lines × 2 locations) src/config.ts:567 — src/config.ts:567 · src/config.ts:642 — the two spans are one implementation copied and then locally edited — 362 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 (38 lines × 2 locations) · ×1
  • Duplicated block (38 lines × 2 locations) src/resolution/bridges/flutter-channel.ts:407 — src/resolution/bridges/flutter-channel.ts:407 · src/resolution/bridges/flutter-channel.ts:453 — 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 (37 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (37 matched lines × 2 locations) src/frameworks/python.ts:85 — src/frameworks/python.ts:85 · src/frameworks/swift.ts:79 — the two spans are one implementation copied and then locally edited — 331 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 (35 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (35 matched lines × 2 locations) src/sync/git-head.ts:17 — src/sync/git-head.ts:17 · src/sync/state.ts:92 — the two spans are one implementation copied and then locally edited — 242 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 (33 lines × 11 locations) · ×1
  • Duplicated block (33 lines × 11 locations) src/architecture/layers/csharp.ts:34 — src/architecture/layers/csharp.ts:34 · src/architecture/layers/elixir.ts:50 · src/architecture/layers/go.ts:55 · src/architecture/layers/java.ts:57 · +7 more site(s) not listed — the 11 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 11 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.
R10 · Code Duplication · Duplicated block with local edits (33 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (33 matched lines × 2 locations) REDACTED:343 — REDACTED:343 · src/resolution/bridges/react-native.ts:166 — the two spans are one implementation copied and then locally edited — 184 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 (31 lines × 2 locations) · ×1
  • Duplicated block (31 lines × 2 locations) src/core/pipeline.ts:403 — src/core/pipeline.ts:403 · src/core/pipeline.ts:775 — all 2 copies are in the same file, 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) src/frameworks/go.ts:37 — src/frameworks/go.ts:37 · src/frameworks/rust.ts:34 — 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 (23 lines × 2 locations) · ×1
  • Duplicated block (23 lines × 2 locations) src/core/pipeline.ts:266 — src/core/pipeline.ts:266 · src/core/pipeline.ts:677 — all 2 copies are in the same file, 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 (22 lines × 2 locations) · ×1
  • Duplicated block (22 lines × 2 locations) src/security/manifest/plugins/hex.ts:73 — src/security/manifest/plugins/hex.ts:73 · src/security/manifest/plugins/nuget.ts:105 — the 2 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.
R10 · Code Duplication · Duplicated block (19 lines × 3 locations) · ×1
  • Duplicated block (19 lines × 3 locations) src/security/manifest/plugins/cargo.ts:279 — src/security/manifest/plugins/cargo.ts:279 · src/security/manifest/plugins/pubspec.ts:244 · src/security/manifest/plugins/rubygems.ts:199 — the 3 copies are spread across 3 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 (18 lines × 3 locations) · ×1
  • Duplicated block (18 lines × 3 locations) src/frameworks/cloudformation.ts:73 — src/frameworks/cloudformation.ts:73 · src/frameworks/docker.ts:52 · src/frameworks/docker.ts:72 — the 3 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.
R11 · Import Boundaries · Boundary violation [package · ×1
  • Boundary violation [package:third-party-deep-import] src/extraction/grammars.ts:136 — src/extraction/grammars.ts:136 imports tree-sitter-wasms/out/, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
R2 · Cyclomatic Complexity · Complex function handleSecurity (cyclomatic 210, cognitive 448) · ×1
  • Complex function handleSecurity (cyclomatic 210, cognitive 448) src/mcp/handlers/security.ts:4 — handleSecurity has cyclomatic complexity 210 and cognitive complexity 448; 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 validateConfig (cyclomatic 190, cognitive 205) · ×1
  • Complex function validateConfig (cyclomatic 190, cognitive 205) src/config.ts:449 — validateConfig has cyclomatic complexity 190 and cognitive complexity 205; 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 handleCore (cyclomatic 164, cognitive 365) · ×1
  • Complex function handleCore (cyclomatic 164, cognitive 365) src/mcp/handlers/core.ts:6 — handleCore has cyclomatic complexity 164 and cognitive complexity 365; 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 handleCodeHealth (cyclomatic 123, cognitive 215) · ×1
  • Complex function handleCodeHealth (cyclomatic 123, cognitive 215) src/mcp/handlers/code-health.ts:4 — handleCodeHealth has cyclomatic complexity 123 and cognitive complexity 215; 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 getLanguageSpecificKind (cyclomatic 113, cognitive 162) · ×1
  • Complex function getLanguageSpecificKind (cyclomatic 113, cognitive 162) src/extraction/extractor.ts:607 — getLanguageSpecificKind has cyclomatic complexity 113 and cognitive complexity 162; 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 handleArchitecture (cyclomatic 100, cognitive 230) · ×1
  • Complex function handleArchitecture (cyclomatic 100, cognitive 230) src/mcp/handlers/architecture.ts:7 — handleArchitecture has cyclomatic complexity 100 and cognitive complexity 230; 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 handleMemory (cyclomatic 88, cognitive 124) · ×1
  • Complex function handleMemory (cyclomatic 88, cognitive 124) src/mcp/handlers/memory.ts:5 — handleMemory has cyclomatic complexity 88 and cognitive complexity 124; 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 dispatch (cyclomatic 86, cognitive 137) · ×1
  • Complex function dispatch (cyclomatic 86, cognitive 137) REDACTED:154 — dispatch has cyclomatic complexity 86 and cognitive complexity 137; 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 handleData (cyclomatic 78, cognitive 138) · ×1
  • Complex function handleData (cyclomatic 78, cognitive 138) src/mcp/handlers/data.ts:38 — handleData has cyclomatic complexity 78 and cognitive complexity 138; 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 handleGitContext (cyclomatic 77, cognitive 172) · ×1
  • Complex function handleGitContext (cyclomatic 77, cognitive 172) src/mcp/handlers/git-context.ts:12 — handleGitContext has cyclomatic complexity 77 and cognitive complexity 172; 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 handleComplexity (cyclomatic 76, cognitive 133) · ×1
  • Complex function handleComplexity (cyclomatic 76, cognitive 133) src/mcp/handlers/complexity.ts:4 — handleComplexity has cyclomatic complexity 76 and cognitive complexity 133; 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 analyze (cyclomatic 66, cognitive 116) · ×1
  • Complex function analyze (cyclomatic 66, cognitive 116) src/architecture/index.ts:56 — analyze has cyclomatic complexity 66 and cognitive complexity 116; 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 syncNow (cyclomatic 66, cognitive 113) · ×1
  • Complex function syncNow (cyclomatic 66, cognitive 113) src/core/pipeline.ts:505 — syncNow has cyclomatic complexity 66 and cognitive complexity 113; 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 handleWiki (cyclomatic 66, cognitive 104) · ×1
  • Complex function handleWiki (cyclomatic 66, cognitive 104) src/mcp/handlers/wiki.ts:3 — handleWiki has cyclomatic complexity 66 and cognitive complexity 104; 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 extractYaml (cyclomatic 63, cognitive 153) · ×1
  • Complex function extractYaml (cyclomatic 63, cognitive 153) src/extraction/infra.ts:352 — extractYaml has cyclomatic complexity 63 and cognitive complexity 153; 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 handlePatterns (cyclomatic 63, cognitive 121) · ×1
  • Complex function handlePatterns (cyclomatic 63, cognitive 121) src/mcp/handlers/patterns.ts:6 — handlePatterns has cyclomatic complexity 63 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 embedAll (cyclomatic 56, cognitive 82) · ×1
  • Complex function embedAll (cyclomatic 56, cognitive 82) src/vectors/index.ts:375 — embedAll has cyclomatic complexity 56 and cognitive complexity 82; 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 indexAllNow (cyclomatic 54, cognitive 96) · ×1
  • Complex function indexAllNow (cyclomatic 54, cognitive 96) src/core/pipeline.ts:126 — indexAllNow has cyclomatic complexity 54 and cognitive complexity 96; 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 handleEditPrimitives (cyclomatic 47, cognitive 110) · ×1
  • Complex function handleEditPrimitives (cyclomatic 47, cognitive 110) src/mcp/handlers/edit-primitives.ts:22 — handleEditPrimitives has cyclomatic complexity 47 and cognitive complexity 110; 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 extractImportSource (cyclomatic 44, cognitive 89) · ×1
  • Complex function extractImportSource (cyclomatic 44, cognitive 89) src/extraction/extractor.ts:797 — extractImportSource has cyclomatic complexity 44 and cognitive complexity 89; 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 estimateNaiveCost (cyclomatic 43, cognitive 9) · ×1
  • Complex function estimateNaiveCost (cyclomatic 43, cognitive 9) src/compression/naive-cost.ts:37 — estimateNaiveCost has cyclomatic complexity 43 and cognitive complexity 9; 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 resolve (cyclomatic 41, cognitive 87) · ×1
  • Complex function resolve (cyclomatic 41, cognitive 87) src/resolution/bridges/swift-objc.ts:122 — resolve has cyclomatic complexity 41 and cognitive complexity 87; 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 initialize (cyclomatic 41, cognitive 68) · ×1
  • Complex function initialize (cyclomatic 41, cognitive 68) src/vectors/index.ts:136 — initialize has cyclomatic complexity 41 and cognitive complexity 68; 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 resolveUnresolvedRefs (cyclomatic 39, cognitive 106) · ×1
  • Complex function resolveUnresolvedRefs (cyclomatic 39, cognitive 106) src/resolution/index.ts:163 — resolveUnresolvedRefs has cyclomatic complexity 39 and cognitive complexity 106; 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 detectCommunities (cyclomatic 38, cognitive 69) · ×1
  • Complex function detectCommunities (cyclomatic 38, cognitive 69) src/graph/communities.ts:352 — detectCommunities has cyclomatic complexity 38 and cognitive complexity 69; 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 filterGitStatus (cyclomatic 36, cognitive 56) · ×1
  • Complex function filterGitStatus (cyclomatic 36, cognitive 56) src/compression/filters/git.ts:38 — filterGitStatus has cyclomatic complexity 36 and cognitive complexity 56; 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 validateAgainstSchema (cyclomatic 35, cognitive 56) · ×1
  • Complex function validateAgainstSchema (cyclomatic 35, cognitive 56) REDACTED:51 — validateAgainstSchema has cyclomatic complexity 35 and cognitive complexity 56; 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 findNativeViewManagers (cyclomatic 34, cognitive 76) · ×1
  • Complex function findNativeViewManagers (cyclomatic 34, cognitive 76) src/resolution/bridges/native-views.ts:117 — findNativeViewManagers has cyclomatic complexity 34 and cognitive complexity 76; 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 extractHcl (cyclomatic 34, cognitive 74) · ×1
  • Complex function extractHcl (cyclomatic 34, cognitive 74) src/extraction/infra.ts:154 — extractHcl has cyclomatic complexity 34 and cognitive complexity 74; 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 findNativeImpls (cyclomatic 33, cognitive 68) · ×1
  • Complex function findNativeImpls (cyclomatic 33, cognitive 68) REDACTED:80 — findNativeImpls has cyclomatic complexity 33 and cognitive complexity 68; 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 extractFile (cyclomatic 31, cognitive 40) · ×1
  • Complex function extractFile (cyclomatic 31, cognitive 40) src/extraction/extractor.ts:76 — extractFile has cyclomatic complexity 31 and cognitive complexity 40; 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 handleBranch (cyclomatic 30, cognitive 63) · ×1
  • Complex function handleBranch (cyclomatic 30, cognitive 63) src/mcp/handlers/branch.ts:9 — handleBranch has cyclomatic complexity 30 and cognitive complexity 63; 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 handleDocs (cyclomatic 29, cognitive 56) · ×1
  • Complex function handleDocs (cyclomatic 29, cognitive 56) src/mcp/handlers/docs.ts:3 — handleDocs has cyclomatic complexity 29 and cognitive complexity 56; 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 extractName (cyclomatic 29, cognitive 54) · ×1
  • Complex function extractName (cyclomatic 29, cognitive 54) src/extraction/extractor.ts:914 — extractName has cyclomatic complexity 29 and cognitive complexity 54; 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 resolveTransitives (cyclomatic 28, cognitive 79) · ×1
  • Complex function resolveTransitives (cyclomatic 28, cognitive 79) src/security/integrator.ts:447 — resolveTransitives has cyclomatic complexity 28 and cognitive complexity 79; 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 refinementPhase (cyclomatic 28, cognitive 69) · ×1
  • Complex function refinementPhase (cyclomatic 28, cognitive 69) src/graph/communities.ts:185 — refinementPhase has cyclomatic complexity 28 and cognitive complexity 69; 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 parseNpmManifest (cyclomatic 28, cognitive 51) · ×1
  • Complex function parseNpmManifest (cyclomatic 28, cognitive 51) src/security/manifest/plugins/npm.ts:39 — parseNpmManifest has cyclomatic complexity 28 and cognitive complexity 51; 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 sampleHints (cyclomatic 28, cognitive 49) · ×1
  • Complex function sampleHints (cyclomatic 28, cognitive 49) src/data/queries.ts:614 — sampleHints has cyclomatic complexity 28 and cognitive complexity 49; 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 quality (cyclomatic 26, cognitive 35) · ×1
  • Complex function quality (cyclomatic 26, cognitive 35) src/data/queries.ts:459 — quality has cyclomatic complexity 26 and cognitive complexity 35; 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 run (cyclomatic 26, cognitive 27) · ×1
  • Complex function run (cyclomatic 26, cognitive 27) src/security/pipeline.ts:46 — run has cyclomatic complexity 26 and cognitive complexity 27; 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 · src/extraction/extractor.ts · ×1
  • src/extraction/extractor.ts: 1397 lines of code src/extraction/extractor.ts:1 — src/extraction/extractor.ts has 1397 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 · REDACTED · ×1
  • REDACTED: 1231 lines of code REDACTED:1 — REDACTED has 1231 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 · src/config.ts · ×1
  • src/config.ts: 1051 lines of code src/config.ts:1 — src/config.ts has 1051 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 · src/core/pipeline.ts · ×1
  • src/core/pipeline.ts: 769 lines of code src/core/pipeline.ts:1 — src/core/pipeline.ts has 769 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 · src/mcp/handlers/security.ts · ×1
  • src/mcp/handlers/security.ts: 759 lines of code src/mcp/handlers/security.ts:1 — src/mcp/handlers/security.ts has 759 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 · src/resolution/index.ts · ×1
  • src/resolution/index.ts: 682 lines of code src/resolution/index.ts:1 — src/resolution/index.ts has 682 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 · src/extraction/infra.ts · ×1
  • src/extraction/infra.ts: 635 lines of code src/extraction/infra.ts:1 — src/extraction/infra.ts has 635 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 · src/memory/database.ts · ×1
  • src/memory/database.ts: 613 lines of code src/memory/database.ts:1 — src/memory/database.ts has 613 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 · src/mcp/handlers/core.ts · ×1
  • src/mcp/handlers/core.ts: 608 lines of code src/mcp/handlers/core.ts:1 — src/mcp/handlers/core.ts has 608 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 · src/security/integrator.ts · ×1
  • src/security/integrator.ts: 603 lines of code src/security/integrator.ts:1 — src/security/integrator.ts has 603 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 · src/vectors/index.ts · ×1
  • src/vectors/index.ts: 575 lines of code src/vectors/index.ts:1 — src/vectors/index.ts has 575 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 · src/data/queries.ts · ×1
  • src/data/queries.ts: 565 lines of code src/data/queries.ts:1 — src/data/queries.ts has 565 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 · src/security/manifest/plugins/npm.ts · ×1
  • src/security/manifest/plugins/npm.ts: 516 lines of code src/security/manifest/plugins/npm.ts:1 — src/security/manifest/plugins/npm.ts has 516 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 · src/security/vuln/osv-adapter.ts · ×1
  • src/security/vuln/osv-adapter.ts: 513 lines of code src/security/vuln/osv-adapter.ts:1 — src/security/vuln/osv-adapter.ts has 513 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 · src/mcp/handlers/code-health.ts · ×1
  • src/mcp/handlers/code-health.ts: 511 lines of code src/mcp/handlers/code-health.ts:1 — src/mcp/handlers/code-health.ts has 511 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 · src/resolution/bridges/flutter-channel.ts · ×1
  • src/resolution/bridges/flutter-channel.ts: 497 lines of code src/resolution/bridges/flutter-channel.ts:1 — src/resolution/bridges/flutter-channel.ts has 497 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 · src/security/vuln/client.ts · ×1
  • src/security/vuln/client.ts: 497 lines of code src/security/vuln/client.ts:1 — src/security/vuln/client.ts has 497 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 · src/watchmen/synthesize.ts · ×1
  • src/watchmen/synthesize.ts: 496 lines of code src/watchmen/synthesize.ts:1 — src/watchmen/synthesize.ts has 496 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 · src/memory/index.ts · ×1
  • src/memory/index.ts: 460 lines of code src/memory/index.ts:1 — src/memory/index.ts has 460 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 · src/security/manifest/parser.ts · ×1
  • src/security/manifest/parser.ts: 447 lines of code src/security/manifest/parser.ts:1 — src/security/manifest/parser.ts 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.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 426 lines of code REDACTED:1 — REDACTED has 426 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 · src/graph/communities.ts · ×1
  • src/graph/communities.ts: 424 lines of code src/graph/communities.ts:1 — src/graph/communities.ts has 424 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 · REDACTED · ×1
  • REDACTED: 408 lines of code REDACTED:1 — REDACTED has 408 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 · No lint script · ×1
  • No lint script — test ✓ · lint ✗ · typecheck ✓ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
R7 · Dead Code · Dead file (~1674 LoC) · ×1
  • Dead file (~1674 LoC) src/mcp/tools.ts — no import path from any entry point (49 application, 7 tooling, 102 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (src/mcp/server.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~910 LoC) · ×1
  • Dead file (~910 LoC) src/mcp/handlers/security.ts — no import path from any entry point (49 application, 7 tooling, 102 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (REDACTED) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~548 LoC) · ×1
  • Dead file (~548 LoC) src/mcp/handlers/code-health.ts — no import path from any entry point (49 application, 7 tooling, 102 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (REDACTED) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~505 LoC) · ×1
  • Dead file (~505 LoC) src/graph/communities.ts — no import path from any entry point (49 application, 7 tooling, 102 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (src/mcp/handlers/architecture.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~428 LoC) · ×1
  • Dead file (~428 LoC) REDACTED — no import path from any entry point (49 application, 7 tooling, 102 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (src/mcp/tools.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~399 LoC) · ×1
  • Dead file (~399 LoC) src/security/supply-chain.ts — no import path from any entry point (49 application, 7 tooling, 102 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (src/mcp/handlers/security.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~365 LoC) · ×1
  • Dead file (~365 LoC) src/mcp/handlers/data.ts — no import path from any entry point (49 application, 7 tooling, 102 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (REDACTED) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~363 LoC) · ×1
  • Dead file (~363 LoC) src/mcp/handlers/memory.ts — no import path from any entry point (49 application, 7 tooling, 102 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (REDACTED) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~349 LoC) · ×1
  • Dead file (~349 LoC) src/security/data-flows.ts — no import path from any entry point (49 application, 7 tooling, 102 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (src/mcp/handlers/security.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~338 LoC) · ×1
  • Dead file (~338 LoC) src/mcp/read-modes.ts — no import path from any entry point (49 application, 7 tooling, 102 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (REDACTED) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~314 LoC) · ×1
  • Dead file (~314 LoC) src/mcp/handlers/patterns.ts — no import path from any entry point (49 application, 7 tooling, 102 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (REDACTED) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~311 LoC) · ×1
  • Dead file (~311 LoC) src/mcp/handlers/architecture.ts — no import path from any entry point (49 application, 7 tooling, 102 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (REDACTED) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~303 LoC) · ×1
  • Dead file (~303 LoC) src/mcp/tool-names.ts — no import path from any entry point (49 application, 7 tooling, 102 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (src/mcp/server.ts, src/mcp/tools.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~295 LoC) · ×1
  • Dead file (~295 LoC) src/security/dep-confusion.ts — no import path from any entry point (49 application, 7 tooling, 102 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (src/mcp/handlers/security.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~291 LoC) · ×1
  • Dead file (~291 LoC) src/security/staleness.ts — no import path from any entry point (49 application, 7 tooling, 102 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (src/mcp/handlers/security.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~288 LoC) · ×1
  • Dead file (~288 LoC) src/security/export/sbom.ts — no import path from any entry point (49 application, 7 tooling, 102 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (src/mcp/handlers/security.ts, src/security/index.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~278 LoC) · ×1
  • Dead file (~278 LoC) src/mcp/handlers/complexity.ts — no import path from any entry point (49 application, 7 tooling, 102 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (REDACTED) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~268 LoC) · ×1
  • Dead file (~268 LoC) src/security/export/vex.ts — no import path from any entry point (49 application, 7 tooling, 102 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (src/mcp/handlers/security.ts, src/security/index.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~267 LoC) · ×1
  • Dead file (~267 LoC) src/mcp/handlers/wiki.ts — no import path from any entry point (49 application, 7 tooling, 102 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (REDACTED) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~258 LoC) · ×1
  • Dead file (~258 LoC) src/mcp/handlers/git-context.ts — no import path from any entry point (49 application, 7 tooling, 102 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (REDACTED) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~232 LoC) · ×1
  • Dead file (~232 LoC) src/security/secrets.ts — no import path from any entry point (49 application, 7 tooling, 102 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (src/mcp/handlers/security.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~231 LoC) · ×1
  • Dead file (~231 LoC) src/compression/naive-cost.ts — no import path from any entry point (49 application, 7 tooling, 102 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (REDACTED) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~208 LoC) · ×1
  • Dead file (~208 LoC) src/mcp/server.ts — no import path from any entry point (49 application, 7 tooling, 102 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~206 LoC) · ×1
  • Dead file (~206 LoC) src/security/export/serialization.ts — no import path from any entry point (49 application, 7 tooling, 102 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~182 LoC) · ×1
  • Dead file (~182 LoC) src/mcp/cache.ts — no import path from any entry point (49 application, 7 tooling, 102 test roots considered), but 3 in-repo import(s) from 2 other file(s) do name it (REDACTED, src/mcp/read-modes.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~177 LoC) · ×1
  • Dead file (~177 LoC) src/graph/flows.ts — no import path from any entry point (49 application, 7 tooling, 102 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (src/mcp/handlers/git-context.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~164 LoC) · ×1
  • Dead file (~164 LoC) src/security/remediation.ts — no import path from any entry point (49 application, 7 tooling, 102 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (src/mcp/handlers/security.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~161 LoC) · ×1
  • Dead file (~161 LoC) src/mcp/handlers/branch.ts — no import path from any entry point (49 application, 7 tooling, 102 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (REDACTED) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~160 LoC) · ×1
  • Dead file (~160 LoC) src/mcp/handlers/docs.ts — no import path from any entry point (49 application, 7 tooling, 102 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (REDACTED) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R8 · Dependency Hygiene · Unused dependency 'figlet' · ×1
  • Unused dependency 'figlet' package.json:72 — Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency 'parquetjs-lite' · ×1
  • Unused dependency 'parquetjs-lite' package.json:74 — Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
X2 · Cancellation propagation · Async function without AbortSignal · ×1
  • Async function without AbortSignal: indexAllNow src/core/pipeline.ts:126 — `indexAllNow` holds an AbortSignal but calls `indexAll(…)` without it, so its caller's cancellation never reaches that call and it runs to its end after whatever wanted it has given up. Hand the signal on: `indexAll(…, { signal })`.
Minor — 115 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×35
  • Duplicated predicate REDACTED:48 — `!f.endsWith('.kt') && !f.endsWith('.java')` appears character-identically in 2 files — REDACTED, src/resolution/bridges/flutter-channel.ts. 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:217 — `!f.endsWith('.ts') && !f.endsWith('.tsx') && !f.endsWith('.js') && !f.endsWith('.jsx')` appears character-identically in 5 files — REDACTED, REDACTED, src/resolution/bridges/native-events.ts, src/resolution/bridges/react-native.ts. 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:319 — `!f.endsWith('.tsx') && !f.endsWith('.jsx')` appears character-identically in 2 files — REDACTED, src/resolution/bridges/native-views.ts. 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 src/frameworks/cloudformation.ts:121 — `!file.endsWith('.yaml') && !file.endsWith('.yml')` appears character-identically in 2 files — src/frameworks/cloudformation.ts, src/frameworks/kubernetes.ts. 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 src/frameworks/csharp.ts:69 — `(n.kind === 'class' || n.kind === 'interface') && n.name === name` appears character-identically in 2 files — src/frameworks/csharp.ts, src/frameworks/java.ts. 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:240 — `(n.kind === 'function' || n.kind === 'method') && n.startLine <= lineNum && n.endLine >= lineNum` appears character-identically in 6 files — REDACTED, REDACTED, src/resolution/bridges/flutter-channel.ts, src/resolution/bridges/native-events.ts. 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 src/resolution/bridges/native-events.ts:123 — `(n.kind === 'method' || n.kind === 'function') && n.startLine <= lineNum && n.endLine >= lineNum` appears character-identically in 2 files — src/resolution/bridges/native-events.ts, src/resolution/bridges/swift-objc.ts. 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 src/architecture/manifest/gradle.ts:15 — `base === 'build.gradle' || base === 'build.gradle.kts'` appears character-identically in 2 files — src/architecture/manifest/gradle.ts, src/security/manifest/parser.ts. 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:387 — `call.moduleName === decl.moduleName && call.methodName === decl.methodName` appears character-identically in 2 files — REDACTED, src/resolution/bridges/react-native.ts. 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 src/extraction/extractor.ts:1168 — `calleeName && /^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(calleeName)` appears character-identically in 2 files — src/extraction/extractor.ts, src/extraction/notebook.ts. 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 src/extraction/extractor.ts:816 — `child.type === 'dotted_name' || child.type === 'relative_import'` appears character-identically in 2 files — src/extraction/extractor.ts, src/extraction/notebook.ts. 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 src/jev/client.ts:69 — `err instanceof Error && err.name === 'AbortError'` appears character-identically in 2 files — src/jev/client.ts, src/jev/strands-client.ts. 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 src/resolution/bridges/native-events.ts:176 — `f.endsWith('.java') || f.endsWith('.kt')` appears character-identically in 4 files — src/resolution/bridges/native-events.ts, src/resolution/bridges/native-views.ts, src/resolution/bridges/react-native.ts, 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 src/resolution/bridges/native-views.ts:133 — `f.endsWith('.m') || f.endsWith('.mm') || f.endsWith('.h')` appears character-identically in 2 files — src/resolution/bridges/native-views.ts, src/resolution/bridges/swift-objc.ts. 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/build.ts:62 — `f.endsWith('.yaml') || f.endsWith('.yml')` appears character-identically in 2 files — scripts/build.ts, src/patterns/loader.ts. 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 src/extraction/routes.ts:110 — `filePath.endsWith('.ts') || filePath.endsWith('.tsx')` appears character-identically in 2 files — src/extraction/routes.ts, src/frameworks/react.ts. 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 src/core/pipeline.ts:588 — `gitChanged.added.length > 0 || gitChanged.modified.length > 0 || gitChanged.removed.length > 0` appears character-identically in 2 files — src/core/pipeline.ts, src/index.ts. 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 src/extraction/extractor.ts:989 — `kind === 'function' || kind === 'method'` appears character-identically in 2 files — src/extraction/extractor.ts, src/extraction/notebook.ts. 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 src/docs/vectors.ts:101 — `kirographDir && (config as any).turboquantMemDocs` appears character-identically in 2 files — src/docs/vectors.ts, src/memory/vectors.ts. 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 src/frameworks/laravel.ts:79 — `n.kind === 'class' && n.name === className` appears character-identically in 2 files — src/frameworks/laravel.ts, src/resolution/bridges/native-views.ts. 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 src/frameworks/go.ts:61 — `n.name === name && (kind === null || n.kind === kind)` appears character-identically in 5 files — src/frameworks/go.ts, src/frameworks/python.ts, src/frameworks/rust.ts, src/frameworks/scala.ts. 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 src/architecture/manifest/cargo.ts:39 — `path.relative(projectRoot, path.dirname(manifestPath)).replace(/\\/g, '/') || '.'` appears character-identically in 10 files — src/architecture/manifest/cargo.ts, src/architecture/manifest/csproj.ts, src/architecture/manifest/elm.ts, src/architecture/manifest/go.ts. 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 src/frameworks/rust.ts:20 — `ref.referenceName.endsWith('Service') || ref.referenceName.endsWith('Repository')` appears character-identically in 2 files — src/frameworks/rust.ts, src/frameworks/scala.ts. 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 src/frameworks/amplify.ts:29 — `ref.referenceName.includes('.') && !ref.referenceName.startsWith('.')` appears character-identically in 2 files — src/frameworks/amplify.ts, src/frameworks/iac.ts. 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 src/extraction/extractor.ts:1069 — `sibling && commentTypes.has(sibling.type)` appears character-identically in 2 files — src/extraction/extractor.ts, src/extraction/notebook.ts. 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.
  • + 10 more in this group — see findings.md.
D24 · Comment Value · redundant comment · ×30
  • redundant comment src/compression/filters/test.ts:24 — "Generic test output" repeats the code it sits on: 3 of its 3 words (generic, test, output) are already in `return filterGenericTest(rawOutput, level);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment src/compression/index.ts:82 — "Find matching filter" repeats the code it sits on: 3 of its 3 words (find, matching, filter) are already in `const filter = FILTERS.find(f => f.matches(command));`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment src/core/pipeline.ts:422 — "Check if arch_file_layers table exists" repeats the code it sits on: 5 of its 6 words (arch, file, layers, table, exists) are already in `const tableExists = rawDb.get("SELECT name FROM sqlite_master WHERE type='table' AND name='arch_file_layers'");`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment REDACTED:620 — "Find source nodes that call/import these target nodes" repeats the code it sits on: 5 of its 6 words (source, nodes, call, import, target) are already in `const rows = this.db.all(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment REDACTED:718 — "Resolve import path to an indexed file" repeats the code it sits on: 4 of its 5 words (resolve, import, path, file) are already in `const targetFileNode = this.resolveImportPath(refName, filePath);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment src/docs/queries.ts:156 — "Sort by merged score, return top N" repeats the code it sits on: 4 of its 5 words (sort, merged, score, return) are already in `const sorted = [...merged.values()].sort((a, b) => b.score - a.score).slice(0, limit);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment src/frameworks/ansible.ts:114 — "Look for roles/name/tasks/main.yml" repeats the code it sits on: 5 of its 6 words (roles, name, tasks, main, yml) are already in `const candidates = [`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment src/mcp/handlers/core.ts:66 — "Collect qualified names from entry points and related nodes" repeats the code it sits on: 6 of its 7 words (qualified, names, entry, points, related, nodes) are already in `const qualifiedNames = [`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment src/mcp/handlers/core.ts:102 — "Collect qualified names from entry points" repeats the code it sits on: 4 of its 5 words (qualified, names, entry, points) are already in `const qNames = ctx.entryPoints.map((n: any) => n.qualifiedName).filter(Boolean);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment src/mcp/handlers/core.ts:219 — "Collect file paths from context nodes" repeats the code it sits on: 4 of its 5 words (file, paths, context, nodes) are already in `const contextFiles = [`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment REDACTED:178 — "Check for expo-module.config.json" repeats the code it sits on: 5 of its 5 words (check, expo, module, config, json) are already in `if (context.fileExists('expo-module.config.json')) return true;`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment src/resolution/bridges/native-events.ts:222 — "Check for NativeEventEmitter or DeviceEventEmitter usage" repeats the code it sits on: 5 of its 6 words (check, native, event, emitter, device) are already in `if (content.includes('NativeEventEmitter') || content.includes('DeviceEventEmitter'))`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment src/resolution/bridges/native-views.ts:271 — "Check for ViewManager pattern in filenames" repeats the code it sits on: 4 of its 5 words (check, view, manager, filenames) are already in `if (fileName.includes('ViewManager') || fileName.includes('ComponentView'))`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment src/resolution/bridges/react-native.ts:53 — "Find enclosing function/method" repeats the code it sits on: 4 of its 4 words (find, enclosing, function, method) are already in `const enclosing = nodes.find(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment src/resolution/bridges/react-native.ts:103 — "Find the node for this method" repeats the code it sits on: 3 of its 3 words (find, node, method) are already in `const methodNode = nodes.find(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment src/resolution/bridges/swift-objc.ts:144 — "Build selector → Swift node map" repeats the code it sits on: 4 of its 5 words (selector, swift, node, map) are already in `const selectorToSwiftNode = new Map<string, Node>();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment src/resolution/index.ts:94 — "nodeByIdCache" repeats the code it sits on: 3 of its 3 words (node, id, cache) are already in `this.nodeByIdCache.set(node.id, node);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment src/security/context-warnings.ts:89 — "Check if the entry point is in our context nodes" repeats the code it sits on: 4 of its 5 words (check, entry, point, nodes) are already in `if (nodeIdSet.has(p.entryPoint))`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment src/security/context-warnings.ts:94 — "Check if any node on the path is in our context nodes" repeats the code it sits on: 4 of its 5 words (check, node, path, nodes) are already in `if (p.path && p.path.some(nodeId => nodeIdSet.has(nodeId)))`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment src/security/integrator.ts:291 — "Find the file node for this import's file path" repeats the code it sits on: 5 of its 5 words (find, file, node, import, path) are already in `const fileNodeId = this.findFileNodeId(rawDb, importNode.filePath);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment src/security/integrator.ts:324 — "Get all nodes in the same file" repeats the code it sits on: 3 of its 3 words (get, nodes, file) are already in `const fileNodes = this.db.getNodesByFile(importNode.filePath);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment src/security/manifest/plugins/composer.ts:64 — "Process `require` (production) and `require-dev` (development) sections" repeats the code it sits on: 5 of its 6 words (require, production, dev, development, sections) are already in `const sections: Array<{ key: string; scope: ParsedDependency['scope'] }> = [`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment REDACTED:91 — "Match all <dependency>...</dependency> blocks" repeats the code it sits on: 3 of its 3 words (match, dependency, blocks) are already in `const dependencyBlocks = dependenciesOnlyContent.matchAll(/<dependency>([\s\S]*?)<\/dependency>/g);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment src/security/manifest/plugins/nuget.ts:60 — "Extract from .csproj PackageReference elements" repeats the code it sits on: 4 of its 5 words (extract, csproj, package, reference) are already in `const csprojDeps = extractPackageReferences(content, relativeManifest);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment src/security/manifest/plugins/nuget.ts:285 — "Iterate over packages within the framework" repeats the code it sits on: 3 of its 3 words (iterate, packages, framework) are already in `for (const [packageName, packageInfo] of Object.entries(framework as Record<string, unknown>))`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • + 5 more in this group — see findings.md.
X7 · Silent fallback defaults · Silent fallback default in catch · ×29
  • Silent fallback default in catch src/sync/git-head.ts:85 — `repositoryPrefix` 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 src/sync/git-head.ts:104 — `readGitHeads` 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 src/architecture/incremental.ts:34 — `packageVersion` swallows every exception into `return 'unknown'` — 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 src/db/db-lock.ts:64 — `liveOtherWriters` 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:977 — `getEmbeddingCount` swallows every exception into `return 0` — 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 src/vectors/vec-index.ts:191 — `getEmbeddedNodeIds` 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 src/vectors/vec-index.ts:202 — `count` swallows every exception into `return 0` — 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 src/vectors/orama-index.ts:217 — `getEmbeddedNodeIds` 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 src/vectors/orama-index.ts:227 — `count` swallows every exception into `return 0` — 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 src/vectors/pglite-index.ts:190 — `getEmbeddedNodeIds` 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 src/vectors/pglite-index.ts:201 — `count` swallows every exception into `return 0` — 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 src/vectors/lancedb-index.ts:154 — `getEmbeddedNodeIds` 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 src/vectors/lancedb-index.ts:164 — `count` swallows every exception into `return 0` — 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 src/vectors/qdrant-index.ts:393 — `count` swallows every exception into `return 0` — 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:474 — `count` swallows every exception into `return 0` — 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 src/vectors/turbovec-index.ts:178 — `count` swallows every exception into `return 0` — 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 src/vectors/turbovec-index.ts:185 — `getEmbeddedIds` 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 src/frameworks/index.ts:295 — `detectFromPackageJson` 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 src/sync/state.ts:53 — `packageVersion` swallows every exception into `return 'unknown'` — 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 src/core/snapshot.ts:95 — `list` 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 src/index.ts:183 — `getPendingSyncCount` swallows every exception into `return 0` — 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 src/compression/tracker.ts:242 — `loadRecords` 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 src/docs/queries.ts:297 — `readSectionContent` swallows every exception into `return '(file not found on disk)'` — 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 src/mcp/handlers/edit-primitives.ts:154 — `handleEditPrimitives` swallows every exception into `return 'ast-grep is not installed or not on PATH. Install it (https://ast-grep.github.io/) to use this tool.'` — 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 src/security/suppressions.ts:27 — `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.
  • + 4 more in this group — see findings.md.
P2 · Observability · Console output used as the logging channel · ×8
  • Console output used as the logging channel src/errors.ts:17 — `src/errors.ts` reports through `console.*` at line 17 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel src/errors.ts:21 — `src/errors.ts` reports through `console.*` at line 21 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel src/errors.ts:24 — `src/errors.ts` reports through `console.*` at line 24 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel src/errors.ts:27 — `src/errors.ts` reports through `console.*` at line 27 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel src/hooks/import-prompt.ts:62 — `src/hooks/import-prompt.ts` reports through `console.*` at line 62 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel src/hooks/import-prompt.ts:65 — `src/hooks/import-prompt.ts` reports through `console.*` at line 65 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel src/hooks/prompt.ts:162 — `src/hooks/prompt.ts` reports through `console.*` at line 162 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel src/hooks/prompt.ts:272 — `src/hooks/prompt.ts` reports through `console.*` at line 272 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
C2 · Access Controls · No named authorization policies · ×1
  • No named authorization policies src/security/auth-detection-jev.ts:32 — Authorization IS enforced here (by route guards, auth middleware or checks that refuse a caller) — this is NOT a claim that endpoints are unprotected. What's missing is a NAMED rule set: who may do what is encoded inline where it is checked, so the rules can't be listed, reviewed or tested apart from the code that applies them. Recommendation, not a defect.
C2 · Access Controls · Thin authorization enforcement · ×1
  • Thin authorization enforcement — Only 1 place(s) refuse an unauthorized caller — too few to demonstrate default-deny across handlers.
D21 · Naming Consistency · `filterDynamoDB` spells `DB` where 41 names in the project spell it `Db` · ×1
  • `filterDynamoDB` spells `DB` where 41 names in the project spell it `Db` src/compression/filters/aws.ts:221 — 41 of 43 names in project kirograph spell the token `Db` (41 of 43; unit: names in project kirograph containing `Db`). Peers: branch-manager.branchDbPath (src/core/branch-manager.ts:9); GraphDatabase.getRawDb (REDACTED:164); db-lock.liveDbWriters (src/db/db-lock.ts:82); db-lock.clearStaleDbLock (src/db/db-lock.ts:90); MemoryManager.memDb (src/memory/index.ts:43). Rename to `filterDynamoDb`. [rule N6]
D21 · Naming Consistency · `LanceDBIndex` spells `DB` where 41 names in the project spell it `Db` · ×1
  • `LanceDBIndex` spells `DB` where 41 names in the project spell it `Db` src/vectors/lancedb-index.ts:31 — 41 of 43 names in project kirograph spell the token `Db` (41 of 43; unit: names in project kirograph containing `Db`). Peers: branch-manager.branchDbPath (src/core/branch-manager.ts:9); GraphDatabase.getRawDb (REDACTED:164); db-lock.liveDbWriters (src/db/db-lock.ts:82); db-lock.clearStaleDbLock (src/db/db-lock.ts:90); MemoryManager.memDb (src/memory/index.ts:43). Rename to `LanceDbIndex`. [rule N6]
DM9 · Scattered domain decisions · Rule about [added, modified, removed] decided in 2 places · ×1
  • Rule about [added, modified, removed] decided in 2 places — src.sync.ChangedFiles's [added, modified, removed] are judged in src.KiroGraph, src.core.pipeline.IndexPipeline — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [endLine, kind, startLine] decided in 6 places · ×1
  • Rule about [endLine, kind, startLine] decided in 6 places — src.types.Node's [endLine, kind, startLine] are judged in src.resolution.bridges.android-rn, src.resolution.bridges.expo-modules, src.resolution.bridges.flutter-channel, src.resolution.bridges.native-events, src.resolution.bridges.react-native, src.resolution.bridges.turbomodules — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [kind, name] decided in 24 places · ×1
  • Rule about [kind, name] decided in 24 places — src.types.Node's [kind, name] are judged in src.frameworks.amplify, src.frameworks.angular, src.frameworks.cloudformation, src.frameworks.csharp, src.frameworks.docker, src.frameworks.elixir, src.frameworks.express, src.frameworks.go, src.frameworks.iac, src.frameworks.java, src.frameworks.laravel, src.frameworks.python, src.frameworks.react, src.frameworks.ruby, src.frameworks.rust, src.frameworks.scala, src.frameworks.solidity, src.frameworks.svelte, src.frameworks.swift, src.resolution.ReferenceResolver, src.resolution.bridges.android-rn, src.resolution.bridges.native-views, src.resolution.bridges.react-native, src.resolution.bridges.turbomodules — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST — No static application security testing detected. For this repository's stack, add CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 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.
P3 · Security & performance tooling · No dependency-update automation · ×1
  • No dependency-update automation test/security/mock/Mock.csproj:8 — `test/security/mock/Mock.csproj` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
R8 · Dependency Hygiene · Test-only dependency 'commander' in production deps · ×1
  • Test-only dependency 'commander' in production deps package.json:71 — Only test files import it (first: test/db/unlock.test.ts:5) — move it to devDependencies.
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 11/12 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) 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.
X5 · Nullable reference types · Null assertions (`!`) override strict null checking · ×1
  • Null assertions (`!`) override strict null checking — ~4.3 `!` null assertions per 1k TypeScript source lines — 251 assertion(s) across the 58671 source line(s) of the 264 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: src/graph/communities.ts (22), src/frameworks/iac.ts (19), src/security/dep-confusion.ts (11). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.
Minor — 7 finding(s)
D10 · Test Quality · Skipped (documented) · ×6
  • Skipped (documented): (unnamed test) test/sync/remote.test.ts:59 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) test/sync/remote.test.ts:68 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) test/sync/remote.test.ts:73 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) test/extraction/worker-pool.test.ts:22 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) test/extraction/worker-pool.test.ts:40 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) test/extraction/worker-pool.test.ts:55 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
D12 · Dependency Hygiene · Outdated · ×1
  • Outdated: pg — `pg` is resolved to 1.5.4 in the committed Gemfile.lock but 1.7.0 is the current release on rubygems.org, and it already satisfies the `"~> 1.5"` requirement declared in test/security/mock/Gemfile — so the lockfile is behind this repository's own declared range. This build is therefore missing every fix published since, including any security fix. Run `bundle update pg` and commit the updated Gemfile.lock.

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/canine-gitleaks.toml --log-opts "--full-history --all --skip=0 --max-count=200" --report-format json --report-path /tmp/watchdog-gitleaks-a2f40ac78b08429c96d1f6cc63756ad2/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=200 --max-count=156" --report-format json --report-path /tmp/watchdog-gitleaks-a2f40ac78b08429c96d1f6cc63756ad2/history-1.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-1.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-a2f40ac78b08429c96d1f6cc63756ad2/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/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt --exclude test/security/mock/obj .21artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .2artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
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. semgrep could not parse 8 file(s) — `src/bin/commands/files.ts`, `src/bin/commands/security-export.ts`, `src/bin/commands/sync.ts`, `REDACTED`, `src/mcp/handlers/core.ts`, … (+3 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D36 · Supply-chain Provenance & Signingprovenance—provenance: not applicable — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.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/** .0artifacts/raw/trivy-fs.json

Run 01a1e5d3-99d5-7b52-a05c-73ef87edb404 · 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