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

github/awesome-copilot

Measured 29 October 2026, 16:51 UTC, at code version b6483db

Regression: 1 dimension fell since the last survey Code coverage: not measured

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

Code coverage is not measured: .NET suite (CouldNotMeasureNoCollector).

CAI score 44out of 100 Weak
CriticalWeakAdequateStrongExemplary
Down 4 since the last survey

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

A large codebase: 235,572 lines of product code in 30 projects, tests not counted · Estimated rebuild effort: about 1.5 person-years · Weakest lens: Code Health, 32

Findings by how serious they are

41 critical 1868 serious 154 minor

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

This survey was produced by

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
29 October 2026, 16:51 UTC

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

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

83of 83 dimensions measured by tools.
2044of 2063 findings point to an exact file and line, so you can open each one in the code. The other 19 concern the repository as a whole, such as missing documentation.
83dimensions across 6 lenses, read from 235,572 lines of product code in 30 projects.
Chapters

Executive summary

github/awesome-copilot falls short of our standard for a preview release, held back most by its Code Health lens, the quality of the code itself. It scores 44 out of 100 and is rated Weak, and 28 of its 41 critical findings are security problems.

Code Health, at 32, is the weakest lens and counts most in the score. The best first step is handling the discarded errors, worth about 7 points. Splitting the oversized files would lift Code Health itself, worth about 5 points. Raising Code Health to 67 would lift the score to about 55.

Thirteen weaknesses in the code could be used by an attacker. Three known security holes in the packages the code depends on can be used by attackers, and ten parts of the code are no longer understood by anyone working on it. Fixing the weaknesses the scanner points to, updating the vulnerable packages and having someone learn the forgotten files would close these risks. Correcting the flagged pipeline settings would fix the six weaknesses in the build pipeline's configuration, and passing outside input through environment variables would deal with the three pipeline steps that put outside input straight into a shell command. The two errors that are caught and ignored need handling or logging instead of being ignored.

The product code is 235,572 lines, about €220,000 to rebuild.

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

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

If Code Health rose from 32 to 67, the lowest score rated Strong, the score would rise from 44 to about 55.

Code composition: what the lines of code are
Business logic 2%Supporting code 3%Tests 95%
New since the last survey: 770 findings

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

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

Fixed since the last survey: 359 findings

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

  • Cyclomatic Complexity · (anonymous) (cyclomatic 51) REDACTED
  • Cyclomatic Complexity · (anonymous) (cyclomatic 37) REDACTED
  • Cyclomatic Complexity · app.previewArtifactFile (cyclomatic 26) REDACTED
  • Cyclomatic Complexity · parseRoute (cyclomatic 20) REDACTED
  • Cyclomatic Complexity · renderDrawer (cyclomatic 18) REDACTED
  • Cognitive Complexity · (anonymous) (cognitive 59) REDACTED
  • Cognitive Complexity · (anonymous) (cognitive 47) REDACTED
  • Cognitive Complexity · external-plugin-intake.buildMergedIntakeComment (cognitive 21) eng/external-plugin-intake.mjs
  • Cognitive Complexity · buildExtensionPluginOwners (cognitive 19) eng/extension-plugin-ownership.mjs
  • Cognitive Complexity · inspectArtifact (cognitive 18) extensions/pr-artifact-explorer/cache.mjs
  • Cognitive Complexity · layoutCommitGraph (cognitive 18) extensions/git-worktree-explorer/public/graph-layout.mjs
  • Cognitive Complexity · parseRoute (cognitive 16) REDACTED
  • God Classes · FunctionTooLong: cache.downloadArchive extensions/pr-artifact-explorer/cache.mjs
  • God Classes · ClassTooLong: InstructionsCatalog website/src/components/brand/InstructionsCatalog.tsx
  • God Classes · FileTooLong: brand/InstructionsCatalog.tsx website/src/components/brand/InstructionsCatalog.tsx
  • Churn × Complexity Hotspots · Hotspot: skills/daily-focus-board/assets/board.template.html skills/daily-focus-board/assets/board.template.html
  • Churn × Complexity Hotspots · Hotspot: skills/daily-focus-board/examples/sample-board.html skills/daily-focus-board/examples/sample-board.html
  • Dependency Vulnerabilities · Medium CVE: [GHSA redacted] REDACTED
  • Supply-chain Provenance & Signing · REDACTED
  • Code Duplication · Duplication concentrated across 30 sibling directories (77 clone groups) extensions/tiny-tool-town-submitter/extension.mjs
  • Code Duplication · Duplicated block with local edits (104 matched lines × 2 locations) skills/webmcpify/templates/webmcpify.js
  • Code Duplication · Duplicated block with local edits (65 matched lines × 2 locations) eng/external-plugin-quality-gates.mjs
  • Code Duplication · Duplicated block (21 lines × 2 locations) eng/external-plugin-pr-quality-gates.mjs
  • Code Duplication · Duplicated block (20 lines × 2 locations) eng/external-plugin-intake.mjs
  • Code Duplication · Duplicated block with local edits (20 matched lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block with local edits (20 matched lines × 2 locations) extensions/release-notes-showcase/releaseNotesShowcase.mjs
  • Code Duplication · Duplicated block with local edits (18 matched lines × 2 locations) extensions/jupyter-notebooks/notebook-canvas.mjs
  • Code Duplication · Duplicated block (17 lines × 2 locations) eng/external-plugin-intake.mjs
  • Code Duplication · Duplicated block (17 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block with local edits (17 matched lines × 2 locations) eng/update-readme.mjs
  • Code Duplication · Duplicated block with local edits (17 matched lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block with local edits (17 matched lines × 2 locations) extensions/repo-actions-hub/extension.mjs
  • Code Duplication · Duplicated block (17 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (16 lines × 3 locations) extensions/arcade-canvas/extension.mjs
  • Code Duplication · Duplicated block (16 lines × 2 locations) extensions/backrooms-canvas/extension.mjs
  • Code Duplication · Duplicated block (16 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (16 lines × 3 locations) REDACTED
  • Code Duplication · Duplicated block (15 lines × 2 locations) eng/external-plugin-approval.mjs
  • Code Duplication · Duplicated block with local edits (15 matched lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block with local edits (15 matched lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (15 lines × 2 locations) extensions/daily-focus-board/extension.mjs
  • Code Duplication · Duplicated block with local edits (15 matched lines × 2 locations) skills/pr-dashboard/scripts/lib/utils.mjs
  • Code Duplication · Duplicated block (14 lines × 2 locations) eng/clean-materialized-plugins.mjs
  • Code Duplication · Duplicated block with local edits (14 matched lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block with local edits (14 matched lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (14 lines × 2 locations) extensions/flight-map-canvas/game/terrainFill.js
  • Code Duplication · Duplicated block with local edits (14 matched lines × 2 locations) extensions/pr-artifact-explorer/accounts.mjs
  • Code Duplication · Duplicated block (14 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (13 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (13 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (13 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block with local edits (13 matched lines × 2 locations) extensions/pr-artifact-explorer/zip.mjs
  • Code Duplication · Duplicated block (13 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (13 lines × 3 locations) extensions/sentry-triage/server.mjs
  • Code Duplication · Duplicated block (13 lines × 2 locations) skills/build-evidence-map/scripts/contract.mjs
  • Code Duplication · Duplicated block (12 lines × 2 locations) eng/clean-materialized-plugins.mjs
  • Code Duplication · Duplicated block (12 lines × 4 locations) eng/external-plugin-approval.mjs
  • Code Duplication · Duplicated block (12 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block with local edits (12 matched lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (12 lines × 3 locations) extensions/arcade-canvas/extension.mjs
  • Code Duplication · Duplicated block (12 lines × 3 locations) REDACTED
  • Code Duplication · Duplicated block (12 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (12 lines × 2 locations) extensions/flight-map-canvas/game/app.js
  • Code Duplication · Duplicated block (12 lines × 2 locations) extensions/git-worktree-explorer/git-data.mjs
  • Code Duplication · Duplicated block (12 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (12 lines × 2 locations) extensions/pr-artifact-explorer/preview.mjs
  • Code Duplication · Duplicated block with local edits (12 matched lines × 2 locations) extensions/repo-actions-hub/extension.mjs
  • Code Duplication · Duplicated block (12 lines × 2 locations) extensions/sentry-triage/sentry.mjs
  • Code Duplication · Duplicated block (12 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (12 lines × 2 locations) extensions/site-studio/extension.mjs
  • Code Duplication · Duplicated block (12 lines × 2 locations) extensions/work-hub/data.mjs
  • Code Duplication · Duplicated block (11 lines × 3 locations) eng/external-plugin-quality-gates.mjs
  • Code Duplication · Duplicated block (11 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (11 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (11 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block with local edits (11 matched lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (11 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (11 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (11 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block with local edits (11 matched lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (11 lines × 2 locations) extensions/java-modernization-studio/server.mjs
  • Code Duplication · Duplicated block (11 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (11 lines × 2 locations) extensions/pr-artifact-explorer/preview.mjs
  • Code Duplication · Duplicated block (11 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (11 lines × 2 locations) extensions/release-notes-showcase/releaseNotesShowcase.mjs
  • Code Duplication · Duplicated block (11 lines × 2 locations) extensions/site-studio/extension.mjs
  • Code Duplication · Duplicated block (11 lines × 2 locations) extensions/site-studio/extension.mjs
  • Code Duplication · Duplicated block with local edits (11 matched lines × 2 locations) extensions/site-studio/extension.mjs
  • Code Duplication · Duplicated block with local edits (11 matched lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (11 lines × 2 locations) extensions/windows-app-storage-inspector-cleanup/src/core/storage-service.mjs
  • Code Duplication · Duplicated block (11 lines × 2 locations) extensions/work-hub/data.mjs
  • Code Duplication · Duplicated block (10 lines × 2 locations) eng/external-plugin-quality-gates.mjs
  • Code Duplication · Duplicated block (10 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (10 lines × 2 locations) eng/review-routing.mjs
  • Code Duplication · Duplicated block (10 lines × 2 locations) eng/update-readme.mjs
  • Code Duplication · Duplicated block with local edits (10 matched lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (10 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (10 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block with local edits (10 matched lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (10 lines × 2 locations) REDACTED
Rebuild cost: about €220,000 · Estimate
Cost to rebuild€74,000 to €370,000, for 1,235 to 3,921 hours of work, about 1.5 person-years for 1 to 3 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.7 at a score of 44. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeLarge: 235,572 lines of product code
Comment linesThe estimate prices 221,644 lines. Comment lines count towards the size of 235,572 lines but aren't priced as work.
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: Watchdog prices the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty.

Top priorities

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

1
Resolve the 2 EmptyCatchBlock finding(s) in Explicit Debt — start with Program.cs (2).
Raises the score by about 7 points · Low effort · Explicit Debt
2
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Raises the score by about 5 points · Medium effort · Large Files
3
Migrate the remaining .js/.jsx files to TypeScript.
Raises the score by about 5 points · Medium effort · Type Safety

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 €220,000 to build again, about 1.5 person-years of work. Its weakest lens is Code Health, at 32 (Weak). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first · First action
Resolve the 2 EmptyCatchBlock finding(s) in Explicit Debt. Of all the actions in this report, it raises the score most for the work it takes: about 7 points for low effort, because it clears the 2 Explicit Debt findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.0 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 5% to 11% on every change. The history of the code shows how much it changes: about 320,742 lines over the last 90 days, which is about 1,300,787 lines a year. At that pace, the extra work comes to an estimated 164.2 to 985.1 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of Watchdog's own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, 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: 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.

191 modules, with 17 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; 151 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 (global)2 cookbook.copilot-sdk.nodejs.recipe.ralph-loop3 cookbook.copilot-sdk.python.recipe.error_recovery_hooks4 eng5 eng.canvas-error-handoff6 eng.canvas-error-handoff.runtime7 eng.external-plugin-intake8 eng.lib9 eng.utils10 extensions.accessibility-kanban11 extensions.accessibility-kanban.public12 extensions.agent-radar13 extensions.ai-credits-breakdown14 extensions.ai-credits-breakdown.ui15 extensions.apng-studio16 extensions.apng-studio.extension17 extensions.github-security.client.assets.index-_8h8h3EK18 skills.foundry-agentic-loop.references.copilot-sdk-with-toolbox19 skills.mini-context-graph.scripts.contextgraph20 skills.terraform-azurerm-set-diff-analyzer.scripts.analyze_plan21 website.src.components.brand.CookbookRecipe22 website.src.components.brand.LearningHubIndex23 website.src.components.brand.SyntaxHighlightedCode24 website.src.components.brand.learning-hub.GithubCopilotTerminologyGlossary25 website.src.components.brand.navigation26 website.src.components.brand.searchIndex27 website.src.integrations.pagefind-resources28 website.src.lib.detail-page29 website.src.lib.sanitize-html30 cookbook.copilot-sdk.nodejs.recipe31 cookbook.copilot-sdk.python.recipe32 extensions.github-security.extension33 skills.foundry-agentic-loop.references34 skills.mini-context-graph.scripts35 skills.terraform-azurerm-set-diff-analyzer.scripts36 website.src.components.brand37 website.src.components.brand.learning-hub38 website.src.integrations39 website.src.lib.file-types40 website.src.lib
1 (global)
2 cookbook.copilot-sdk.nodejs.recipe.ralph-loop
3 cookbook.copilot-sdk.python.recipe.error_recovery_hooks
4 eng
5 eng.canvas-error-handoff
6 eng.canvas-error-handoff.runtime
7 eng.external-plugin-intake
8 eng.lib
9 eng.utils
10 extensions.accessibility-kanban
11 extensions.accessibility-kanban.public
12 extensions.agent-radar
13 extensions.ai-credits-breakdown
14 extensions.ai-credits-breakdown.ui
15 extensions.apng-studio
16 extensions.apng-studio.extension
17 extensions.github-security.client.assets.index-_8h8h3EK
18 skills.foundry-agentic-loop.references.copilot-sdk-with-toolbox
19 skills.mini-context-graph.scripts.contextgraph
20 skills.terraform-azurerm-set-diff-analyzer.scripts.analyze_plan
21 website.src.components.brand.CookbookRecipe
22 website.src.components.brand.LearningHubIndex
23 website.src.components.brand.SyntaxHighlightedCode
24 website.src.components.brand.learning-hub.GithubCopilotTerminologyGlossary
25 website.src.components.brand.navigation
26 website.src.components.brand.searchIndex
27 website.src.integrations.pagefind-resources
28 website.src.lib.detail-page
29 website.src.lib.sanitize-html
30 cookbook.copilot-sdk.nodejs.recipe1
31 cookbook.copilot-sdk.python.recipe2
32 extensions.github-security.extension1
33 skills.foundry-agentic-loop.references3
34 skills.mini-context-graph.scripts1
35 skills.terraform-azurerm-set-diff-analyzer.scripts2
36 website.src.components.brand22111
37 website.src.components.brand.learning-hub1
38 website.src.integrations1
39 website.src.lib.file-types1
40 website.src.lib221
Uses a module listed above itPart of a loopThe module itself
1 (global)2 cookbook.copilot-sdk.nodejs.recipe.ralph-loop3 cookbook.copilot-sdk.python.recipe.error_recovery_hooks4 eng5 eng.canvas-error-handoff6 eng.canvas-error-handoff.runtime7 eng.external-plugin-intake8 eng.lib9 eng.utils10 extensions.accessibility-kanban11 extensions.accessibility-kanban.public12 extensions.agent-radar13 extensions.ai-credits-breakdown14 extensions.ai-credits-breakdown.ui15 extensions.apng-studio16 extensions.apng-studio.extension17 extensions.github-security.client.assets.index-_8h8h3EK18 skills.foundry-agentic-loop.references.copilot-sdk-with-toolbox19 skills.mini-context-graph.scripts.contextgraph20 skills.terraform-azurerm-set-diff-analyzer.scripts.analyze_plan21 website.src.components.brand.CookbookRecipe22 website.src.components.brand.LearningHubIndex23 website.src.components.brand.SyntaxHighlightedCode24 website.src.components.brand.learning-hub.GithubCopilotTerminologyGlossary25 website.src.components.brand.navigation26 website.src.components.brand.searchIndex27 website.src.integrations.pagefind-resources28 website.src.lib.detail-page29 website.src.lib.sanitize-html30 cookbook.copilot-sdk.nodejs.recipe31 cookbook.copilot-sdk.python.recipe32 extensions.github-security.extension33 skills.foundry-agentic-loop.references34 skills.mini-context-graph.scripts35 skills.terraform-azurerm-set-diff-analyzer.scripts36 website.src.components.brand37 website.src.components.brand.learning-hub38 website.src.integrations39 website.src.lib.file-types40 website.src.lib(global)1cookbook.copilot-sdk.nodejs.recipe.ralph-loop2cookbook.copilot-sdk.python.recipe.error_recovery_hooks3eng4eng.canvas-error-handoff5eng.canvas-error-handoff.runtime6eng.external-plugin-intake7eng.lib8eng.utils9extensions.accessibility-kanban10extensions.accessibility-kanban.public11extensions.agent-radar12extensions.ai-credits-breakdown13extensions.ai-credits-breakdown.ui14extensions.apng-studio15extensions.apng-studio.extension16extensions.github-security.client.assets.index-_8h8h3EK17skills.foundry-agentic-loop.references.copilot-sdk-with-toolbox18skills.mini-context-graph.scripts.contextgraph19skills.terraform-azurerm-set-diff-analyzer.scripts.analyze_plan20website.src.components.brand.CookbookRecipe21website.src.components.brand.LearningHubIndex22website.src.components.brand.SyntaxHighlightedCode23website.src.components.brand.learning-hub.GithubCopilotTerminologyGlossary24website.src.components.brand.navigation25website.src.components.brand.searchIndex26website.src.integrations.pagefind-resources27website.src.lib.detail-page28website.src.lib.sanitize-html29cookbook.copilot-sdk.nodejs.recipe30cookbook.copilot-sdk.python.recipe31extensions.github-security.extension32skills.foundry-agentic-loop.references33skills.mini-context-graph.scripts34skills.terraform-azurerm-set-diff-analyzer.scripts35website.src.components.brand36website.src.components.brand.learning-hub37website.src.integrations38website.src.lib.file-types39website.src.lib4012131222111111221+151 more modules (most-connected shown)

At a glance — Code Health · 32% · Weak · gated by D1, D2, R1, R2, R3 ·

At a glance — Architecture · 69% · Adequate · gated by R11 ·

At a glance — Maturity · 76% · Strong ·

At a glance — Readiness · 43% · Adequate · gated by R6, P3 ·

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

At a glance — Performance · 60% · Adequate ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A05:2025 — Injection101High / Critical
A03:2025 — Software Supply Chain Failures11High / Critical

Roadmap

Begin by resolving the empty exception handlers in Program.cs and migrating the remaining plain JavaScript files to TypeScript to establish a safer, more maintainable codebase. Next, split the largest source files into smaller, focused modules to reduce complexity and improve readability. Finally, integrate static analysis into the CI pipeline to prevent security regressions and systematically reduce the cyclomatic complexity of branch-heavy functions.

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

Do thisHelpsEffortDimension
Resolve the 2 EmptyCatchBlock finding(s) in Explicit Debt — start with Program.cs (2).+7.4 ptsLowExplicit Debt
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.+5.3 ptsMediumLarge Files
Migrate the remaining .js/.jsx files to TypeScript.+5.1 ptsMediumType Safety
Add a SAST step to CI running what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — so a security regression fails the build instead of landing.+3.9 ptsMediumSecurity & performance tooling
Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.+3.5 ptsMediumCyclomatic 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.+2.4 ptsMediumAsync & latency hygiene
Bring the 44 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with handleApi (cyclomatic 232), index-_8h8h3EK.UnwrappedItem (cyclomatic 225), Virtualizer.constructor (cyclomatic 215).+2.2 ptsHighCyclomatic Complexity
Add eslint and `tsc --noEmit` as package.json scripts and run them in CI.+1.7 ptsMediumTooling

File quality

Per-file score 0–10 — a quality signature. Of 279 files carrying findings, judged against the Preview bar: 1% slop · 17% mixed · 82% near-clean.

FileScoreBandWorst signal
REDACTED2.0SlopDependency Vulnerabilities: High CVE: REDACTED
skills/winmd-api-search/scripts/cache-generator/Program.cs2.9SlopExplicit Debt: EmptyCatchBlock
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.6MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.6MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.6MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.6MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.6MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.9MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.9MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.9MixedStatic Analysis (SAST): Medium: REDACTED

How the grades work

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

Critical — 41

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

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

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

Could not be resolved — 5

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

Methodology & how to trust this report

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

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

What we checked — 83 dimensions across the health lenses
D1D2D3D4D5D6D7D9D10D11D13D14D15D16D17D19D20D24D26D28D29D30D31D34D35D36D37D43D44AX10AX3AX4AX5AX6GD1IC1M1M2M3M4P1P10P2P3P4P6PF3R1R10R11R2R3R4R5R6R7R8R9S1X1X12X13X14X15X16X17X18X19X20X21X22X23X24X25X26X27X28X29X3X30X32X4X5

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, 2044 of 2063 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

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

Tools & methods

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

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

Every finding is locatable in findings.md. Run 01a18892-88e8-7684-95a3-beaf89b687e3.

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.

  • D10 Test Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 1,254 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 1 test source file(s) (.py) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
  • D12 Dependency Hygiene — 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. This repository's 6 shipped Python distribution(s) across 5 manifest(s) WERE read; what went unanswered is the currency half, because it grades an EXACT pin against the newest release and every declaration here is a floor or a range — which installs the newest release it admits and so cannot be behind one. So pypi.org was never asked. This is a true statement about the repository, and the healthy one, NOT a gap on our side: no reader we could write would find a currency question here.
  • D14 License Compliance — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares package.json, but the licence verdict published here was taken over its 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.
  • D17 Explicit Debt — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 2 deducted marker(s) and the 0.7/KLoC density on this row were taken over this repository's .NET projects ALONE: .mjs (91,486 lines, 42% of production source), .js (84,860 lines, 39% of production source) went unread, because every marker collector on this path is reached through a C# workspace. D17's marker collectors need a compiler we do not have for that language, so none of its nine marker kinds were read there. 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 — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 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 — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This 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 — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
  • D22 Internal API Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
  • D24 Comment Value — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 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.
  • D27 Navigability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
  • D32 Data Compliance (PII/GDPR) — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `cookbook/copilot-sdk/dotnet/recipe/accessibility-report.cs`, `cookbook/copilot-sdk/dotnet/recipe/error-handling.cs`, `cookbook/copilot-sdk/dotnet/recipe/in-process-runtime.cs`, `cookbook/copilot-sdk/dotnet/recipe/managing-local-files.cs`, `cookbook/copilot-sdk/dotnet/recipe/multiple-sessions.cs`, … (+14 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.
  • D39 IL Efficiency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. IL NOT MEASURED: the analyzer's own build of this repository failed for an ENVIRONMENT reason (exit 1) — MSBuild's engine or the CLR gave up, or our image does not carry the SDK band/targeting pack this repository needs. This is OUR limitation, not a defect in the repo, and it is not a statement that this repository fails to build. D18 owns the question of whether this repository builds; it was not answered here.
  • AXR1 Runtime accessibility — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DevServer (start). the dev server did not expose a crawlable HTTP endpoint in time — no runtime evidence.
  • M4 Documentation accuracy — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 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 no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
  • PF3 Async & latency hygiene — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 2 further occurrence(s) are not listed individually; the score already reflects all 42.
  • R10 Code Duplication — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 340 further occurrence(s) are not listed individually; the score already reflects all 380.
  • R3 Large Files — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 41 further occurrence(s) are not listed individually; the score already reflects all 81.
  • R4 Test Coverage — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 98 further occurrence(s) are not listed individually; the score already reflects all 138.
  • R7 Dead Code — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 14 further occurrence(s) are not listed individually; the score already reflects all 54.
  • X24 Document value interpolated into markup unescaped — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 169 further occurrence(s) are not listed individually; the score already reflects all 209.

Repo exclusion declarations: 1 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D7 Architectural Integrity: Layering is checked against detected/declared rules — an architecture whose boundaries live in convention or in code review, not in a rule a scanner can read, is not enforced here.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D11 Test Reliability: Flakiness is inferred from history/markers — Watchdog runs the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
  • D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality 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.
  • D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
  • 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.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • 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.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

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

831 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was handleApi at 232. A further 6 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 extension.p at 40 — they are counted neither in the figure above nor in this dimension's score. 1 file carries no cyclomatic complexity row at all for this reason — every one of its over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: extensions/pr-artifact-explorer/jobs.mjs (JobRegistry.load at 16). 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.

main.main (cyclomatic 19) · ×7cookbook/copilot-sdk/go/recipe/accessibility-report.go:14
renderer.clientMain::overviewTab (cyclomatic 30) · ×5extensions/java-modernization-studio/renderer.mjs:255
pointer.attachPointer::finish (cyclomatic 37) · ×4extensions/draw/public/pointer.js:361
mutation-journal.validateJournals (cyclomatic 31) · ×2skills/webmcpify/templates/mutation-journal.js:108
createErrorHandoffRuntime::handle (cyclomatic 30) · ×2eng/canvas-error-handoff/runtime.mjs:298

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

What to do

  1. Bring the 44 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with handleApi (cyclomatic 232), index-_8h8h3EK.UnwrappedItem (cyclomatic 225), Virtualizer.constructor (cyclomatic 215). — 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 44 together lifts Cyclomatic Complexity from 2.0 to about 3.9/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
  2. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

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

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

1023 method(s) exceeded the cognitive complexity threshold of 15; the worst was handleApi at 367.

main.main (cognitive 23) · ×7cookbook/copilot-sdk/go/recipe/accessibility-report.go:14
attachPointer::finish (cognitive 54) · ×4extensions/draw/public/pointer.js:361
clientMain::overviewTab (cognitive 29) · ×4extensions/java-modernization-studio/renderer.mjs:255
(anonymous) (cognitive 70) · ×2REDACTED:6144
mutation-journal.validateJournals (cognitive 64) · ×2skills/webmcpify/templates/mutation-journal.js:108

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

What to do

  1. Bring the 90 bodies over 60 down to 60 or less in Cognitive Complexity — start with handleApi (cognitive 367), server.handleApi (cognitive 326), index-_8h8h3EK.focusZone (cognitive 263). — 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 90 together lifts Cognitive Complexity from 2.0 to about 3.2/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
  2. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

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

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

137 god class(es) detected.

FunctionTooLong: notebook-canvas.renderHtml · ×80extensions/jupyter-notebooks/notebook-canvas.mjs:1440
FileTooLong: REDACTED · ×52REDACTED
ClassTooLong: CopilotConfigurationBasics · ×3website/src/components/brand/learning-hub/CopilotConfigurationBasics.tsx:1
TooManyMethods: Editor · ×2extensions/draw/public/editor.js:40

What to do

  1. Resolve the 80 FunctionTooLong finding(s) in God Classes — start with REDACTED (13), REDACTED (6), REDACTED (4). — One of this dimension's main actionable groups (80 warning-level).
  2. Resolve the 52 FileTooLong finding(s) in God Classes — start with REDACTED (11), REDACTED (7), collector.mjs (2). — One of this dimension's main actionable groups (52 warning-level).
  3. Resolve the 3 ClassTooLong finding(s) in God Classes — start with CopilotConfigurationBasics.tsx, editor.js, AgentsAndSubagents.tsx. — One of this dimension's main actionable groups (3 warning-level).
  4. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D4 · Code Duplication9.9 / 10Stronggated by 38 serious findings✓ Tool-verified

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

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

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

37 duplicated block group(s) detected. One further row reports members as variants of one another; it aggregates block groups already counted above and is not itself counted. Measured on part of this repository only: .mjs, .js (79% 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 (10 lines × 2) · ×4skills/convert-excel-to-md/scripts/convert_excel_to_md.py:262
Duplicated block (11 lines × 2) · ×3skills/quality-playbook/quality_gate.py:183
Duplicated block (5 lines × 2) · ×3skills/convert-excel-to-md/scripts/convert_excel_to_md.py:262
Duplicated block (13 lines × 2) · ×2skills/winmd-api-search/scripts/cache-generator/Program.cs:571
Duplicated block (17 lines × 2) · ×2skills/agent-skill-stack/scripts/inventory_skills.py:219

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

What to do

  1. Resolve the 4 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with quality_gate.py (2), convert_excel_to_md.py, analysis.py. — One of this dimension's main actionable groups (4 warning-level).
  2. Resolve the 3 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with quality_gate.py (2), managing-local-files.go. — One of this dimension's main actionable groups (3 warning-level).
  3. Resolve the 3 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with convert_excel_to_md.py, docs_drift.py, skill_index.py. — One of this dimension's main actionable groups (3 warning-level).
  4. Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

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

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

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

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

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

30 production modules (npm), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 0 module(s) off the main sequence, with abstractness counted on 3 of the 30 (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 71 classes have LCOM4 above 3.

✓ On the Gold path — maintain.

Detailed fixes: d6_recommendation.md.

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

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

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

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

No mechanizable ADR was identified, so enforcement is not measured. Cycles found: 0.

Classify ADR enforcement: Step 9: Convergence verify · ×4skills/copilot-pr-autopilot/references/09-convergence.md

What to do

  1. Resolve the 4 Classify ADR enforcement finding(s) in Architectural Integrity — start with 09-convergence.md, 6502.md, 6522.md. — One of this dimension's main actionable groups (4 recommendation-level).
  2. Enforce Architectural Integrity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

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

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

1271 test methods: 1271 unit, 0 integration, 0 BDD, 0 e2e. The JavaScript/TypeScript suite contributes 1255 `it`/`test` case(s) across 104 test file(s) declaring at least one; its tier split is read from package names and paths only. The Python suite contributes 16 test function(s) across 2 file(s) declaring at least one — every `def test…` in a file pytest or unittest would collect, which is those frameworks' own definition of a case; a parametrize table counts once, so this is a floor. Its tier split is read from file names and paths only.

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

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

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

Skipped (documented): does not dereference untracked symlinks · ×21extensions/where-was-i/git-context.test.mjs:193

✓ On the Gold path — maintain.

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

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

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

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

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

0 flaky across 1 measured tier(s). JavaScript/TypeScript (node:test via `npm ci --ignore-scripts` in extensions/foundry-agentic-loop-canvas/ (98 tests); node:test via `npm ci --ignore-scripts` in extensions/foundry-agentic-loop-workflow/ (81 tests); node:test via `npm ci --ignore-scripts` in extensions/signals-dashboard/ (28 tests)): measured (0 flaky).

✓ On the Gold path — maintain.

Detailed fixes: d11_recommendation.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 97 packages use a banned license. ★ DEPTH: this repository's MSBuild projects declare 2 direct `PackageReference`(s), and 95 further package(s) were reached beyond them by closing the graph over 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 Hotspots9.5 / 10Stronggated by 45 serious findings✓ Tool-verified

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

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

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

Top hotspots: REDACTED (9×203=1827); REDACTED (20×55=1100); eng/canvas-error-handoff/runtime.mjs (12×89=1068) Repeated repair below the complexity floor: .github/extensions/resource-staleness-board/lib/work.mjs (4 of 5 changes were fixes); .github/extensions/duplicate-review-board/lib/publish.mjs (4 of 4 changes were fixes); eng/external-plugin-intake-state.mjs (3 of 4 changes were fixes)

Hotspot: REDACTED · ×42REDACTED:499
Repeated repair: .github/extensions/resource-staleness-board/lib/work.mjs · ×3.github/extensions/resource-staleness-board/lib/work.mjs:35

What to do

  1. Resolve the 42 Hotspot finding(s) in Churn × Complexity Hotspots — start with REDACTED (3), REDACTED (3), REDACTED (3). — One of this dimension's main actionable groups (42 warning-level).
  2. Resolve the 3 Repeated repair finding(s) in Churn × Complexity Hotspots — start with work.mjs, publish.mjs, external-plugin-intake-state.mjs. — One of this dimension's main actionable groups (3 warning-level).

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

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

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

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

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

48 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is REDACTED. Counted over 272 of the 345 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

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

What to do

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

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

D17 · Explicit Debt8.7 / 10Adequategated by 2 critical findings✓ Tool-verified

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

2 deducted debt markers + 0 dead symbols across 1045 LoC in the .NET projects (0.7/KLoC) → score 8.7. Measured on the .NET source only: .mjs, .js (81% of production source) was not read, and carries at least 0 uncounted task marker(s) in 0 file(s).

EmptyCatchBlock · ×2skills/winmd-api-search/scripts/cache-generator/Program.cs:487

What to do

  1. Resolve the 2 EmptyCatchBlock finding(s) in Explicit Debt — start with Program.cs (2). — One of this dimension's main actionable groups (2 issue-level).
  2. Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.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. 589 document(s) read across 2 unit(s).

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D20 · ADR Quality10.0 / 10Exemplary○ Nothing flagged

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

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

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

0 of 4 evaluated ADRs have a defect readable from the log itself (a missing or empty section, no title, a single option, consequences with no cost, no status, a missing enforcement field, a status the log contradicts, a dangling link, an unlinked second decision on one question, a date that is no calendar day). How well each record argues its case is not measured.

✓ On the Gold path — maintain.

Detailed fixes: d20_recommendation.md.

D24 · Comment Value6.7 6.1 / 10Adequate✓ 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 6.1 / 10 · rule-coverage 92% · ceiling Documented

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

redundant commentskills/winmd-api-search/scripts/cache-generator/Program.cs:141

What to do

  1. Resolve the 1 redundant comment finding(s) in Comment Value — start with Program.cs. — One of this dimension's main actionable groups (1 recommendation-level).

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

D26 · Project Cohesion10.0 / 10Exemplary✓ Tool-verified

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

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

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

0 of 1 projects flagged as possibly oversized/incoherent.

✓ On the Gold path — maintain.

Detailed fixes: d26_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)0.0 / 10Critical✓ Tool-verified

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

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

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

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

103 finding(s): 0 critical, 27 high, 72 medium, 4 low. semgrep hit a parse error in 32 file(s) — `REDACTED`, `cookbook/copilot-sdk/dotnet/recipe/accessibility-report.cs` (line 1), `cookbook/copilot-sdk/dotnet/recipe/error-handling.cs` (line 1, lines 1–2), `cookbook/copilot-sdk/dotnet/recipe/in-process-runtime.cs` (line 1, lines 1–2), `cookbook/copilot-sdk/dotnet/recipe/managing-local-files.cs` (line 1, lines 1–2), … (+27 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 7 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

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

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

D30 · Dependency Vulnerabilities7.8 / 10Adequategated by 3 critical 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.

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

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

REDACTED
REDACTED

What to do

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

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

D31 · IaC & Container Security10.0 / 10Exemplary○ Nothing flagged

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

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

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

trivy and checkov found no infrastructure-as-code or container misconfigurations.

✓ On the Gold path — maintain.

Detailed fixes: d31_recommendation.md.

D34 · Knowledge Freshness8.2 / 10Adequategated by 10 critical findings✓ 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 8.2 / 10 · rule-coverage 100% · ceiling Documented

49 of 272 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is skills/quality-playbook/quality_gate.py. Counted over 272 of the 345 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned knowledge · ×10skills/quality-playbook/quality_gate.py:1
Orphaned file · ×39extensions/java-modernization-studio/doctor.mjs:1
Further orphaned files (smaller)

What to do

  1. Resolve the 10 Orphaned knowledge finding(s) in Knowledge Freshness — start with quality_gate.py, REDACTED, REDACTED. — One of this dimension's main actionable groups (10 issue-level).
  2. Resolve the 39 Orphaned file finding(s) in Knowledge Freshness — start with doctor.mjs, example.py, qr.mjs. — One of this dimension's main actionable groups (39 recommendation-level).
  3. Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).

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

D35 · Change Coupling9.9 / 10Stronggated by 3 serious findings✓ 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 9.9 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: external-plugin-intake.mjs↔external-plugin-quality-gates.mjs 67%; state.mjs↔REDACTED 60%; state.mjs↔REDACTED 57%

Change coupling: external-plugin-intake.mjs ↔ external-plugin-quality-gates.mjs · ×3eng/external-plugin-intake.mjs:1

What to do

  1. Resolve the 3 Change coupling finding(s) in Change Coupling — start with state.mjs (2), external-plugin-intake.mjs. — One of this dimension's main actionable groups (3 warning-level).

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

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

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

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

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

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

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

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

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

D44 · Platform End-of-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 0 platform declaration(s) and 9 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 composition10.0 / 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.

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

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

What to do

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

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

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

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

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

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

AX5 · Architecture & structure10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether the codebase has a recognisable, scale-appropriate structure (a named architectural style, or modular enough for its size) rather than being an ad-hoc ball of mud.

Method: Roslyn plus csproj analysis: architecture style detection (DDD, clean, vertical-slice, CQRS) and structure fitness for repo size. 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.

GD1 · Unfinished & placeholder code10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Unreviewed-generation residue: shipped members still throwing NotImplementedException, and placeholder string literals left in 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.

IC1 · Incompleteness & stubs10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Unfinished work detected by code SHAPE, not keywords: members that only throw a "not implemented" exception, methods that take inputs and return a constant, async methods that never await, dead `if (false)` / `#if false` branches, and skeleton types most of whose members are holes. A real, objective slice of technical debt.

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

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

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

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

What to do

  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
  • Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
  • Add a README to the 1 of 1 project(s) that lack one — worth up to 2 pts.
M2 · Architecture documentation7.0 / 10Strong✓ Tool-verified

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

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

What to do

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

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

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

  • Production code isn't grouped under a src/ folder — it's spread across several top-level directories, so there's no one place that says 'this is the product'.

What to do

  • Group production code under src/ (or split deliberately, e.g. backend/ + frontend/) so production and tooling code aren't mixed at the root.
M4 · Documentation accuracy9.8 / 10Exemplary✓ Tool-verified

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

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

  • docs/README.agents.md names React 16, but the manifest declares `react` ^19.2.8. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/README.agents.md:175
  • docs/README.agents.md names React 18, but the manifest declares `react` ^19.2.8. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/README.agents.md:176
  • plugins/fluentui-blazor/README.md names .NET 10, but the projects target .NET 8. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — plugins/fluentui-blazor/README.md:13
  • skills/webmcpify/tests/README.md names Node.js 20, but the repository declares engines `>=22`. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — skills/webmcpify/tests/README.md:4

What to do

  • Reconcile the README with reality: docs/README.agents.md names React 16, but the manifest declares `react` ^19.2.8; docs/README.agents.md names React 18, but the manifest declares `react` ^19.2.8; plugins/fluentui-blazor/README.md names .NET 10, but the projects target .NET 8; skills/webmcpify/tests/README.md names Node.js 20, but the repository declares engines `>=22`.
P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

P2 · Observability6.3 / 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.

  • Only 3/32 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `.`, `cookbook/copilot-sdk/python/recipe`, `extensions/accessibility-kanban`, `extensions/backlog-swipe-triage` and 24 more.
  • `website/src/lib/detail-page.ts` reports through `console.*` at line 136 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — website/src/lib/detail-page.ts:136
  • `website/src/lib/sanitize-html.ts` reports through `console.*` at line 109 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — website/src/lib/sanitize-html.ts:109
  • `website/src/components/brand/pagefindSearch.ts` reports through `console.*` at line 134 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — website/src/components/brand/pagefindSearch.ts:134

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
  • 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 bandit, `semgrep --config=p/python`, or CodeQL's python pack as a CI step. What was searched, so you can tell an absence from a miss: the 1471707 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. — .github/workflows/canvas-smoke-test.yml:8
  • `skills/winmd-api-search/scripts/cache-generator/CacheGenerator.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`. — skills/winmd-api-search/scripts/cache-generator/CacheGenerator.csproj:11

What to do

  • Add a SAST step to CI running what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — 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.
P4 · Deployment & Rollback7.0 / 10Strong✓ Tool-verified

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

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

P6 · Release Hygiene5.0 / 10Adequate✓ 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.

What to do

  • Stamp a version in your build/package manifest (e.g. csproj <Version>, package.json, pyproject.toml, Cargo.toml, or a VERSION file) or tag releases with semver so builds and releases are traceable.
PF3 · Async & latency hygiene6.0 / 10Adequate✓ Tool-verified

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

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

  • `fs.mkdtempSync` in `runSmokeTest` 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. — eng/canvas-smoke-test.mjs:1318
  • `fs.rmSync` in `runSmokeTest` 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) — eng/canvas-smoke-test.mjs:1320, eng/canvas-smoke-test.mjs:1382
  • `fs.existsSync` in `runSmokeTest` 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. (×5) — eng/canvas-smoke-test.mjs:1342, eng/canvas-smoke-test.mjs:1348, eng/canvas-smoke-test.mjs:1368, …
  • `fs.mkdirSync` in `runSmokeTest` 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) — eng/canvas-smoke-test.mjs:1396, eng/canvas-smoke-test.mjs:1400
  • `fs.writeFileSync` in `runSmokeTest` 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. — eng/canvas-smoke-test.mjs:1397
  • `fs.readdirSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — eng/canvas-smoke-test.mjs:1488
  • `fs.lstatSync` in `runCanvasSmokeTest` 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. — eng/canvas-smoke-test.mjs:1532
  • `fs.mkdtempSync` in `runCanvasSmokeTest` 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. — eng/canvas-smoke-test.mjs:1587
  • `fs.rmSync` in `runCanvasSmokeTest` 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. — eng/canvas-smoke-test.mjs:1593
  • `fs.readFileSync` in `main` 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. — eng/canvas-smoke-test.mjs:1781
  • `fs.appendFileSync` in `main` 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. — eng/canvas-smoke-test.mjs:1788
  • `fs.mkdirSync` in `main` 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. — eng/canvas-smoke-test.mjs:1803
  • `fs.writeFileSync` in `main` 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) — eng/canvas-smoke-test.mjs:1804, eng/canvas-smoke-test.mjs:1805
  • `fs.copyFileSync` in `main` 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. — eng/canvas-smoke-test.mjs:1809
  • `fs.readFileSync` in `callback to http.createServer` 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) — REDACTED:561, REDACTED:100, REDACTED:127
  • `existsSync` in `ensureStateFile` 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. — REDACTED:428
  • a busy-wait on `inst` in `getParentForFragmentAncestors` 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. — REDACTED:1071
  • a busy-wait on `workInProgress` in `getStackByFiberInDevAndProd` 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. — REDACTED:1326
  • a busy-wait on `update` in `rerenderReducer` 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. — REDACTED:4083
  • a busy-wait on `actionNode` in `onActionError` 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. — REDACTED:4237
  • a busy-wait on `parentFiber` in `detachAlternateSiblings` 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. — REDACTED:7633
  • a busy-wait on `pendingEffectsStatus` in `completeRoot` 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. — REDACTED:8251
  • a busy-wait on `inst` in `getParent` 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. — REDACTED:9046
  • a busy-wait on `token` in `parseInnerExpression` 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. — extensions/github-security/extension.mjs:1442
  • `existsSync` in `listLocalProjects` 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) — extensions/work-hub/data.mjs:276, extensions/work-hub/data.mjs:285
  • `existsSync` in `getCopilotSessions` 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. — extensions/work-hub/data.mjs:369
  • `existsSync` in `getSessionInventory` 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) — extensions/work-hub/data.mjs:586, extensions/work-hub/data.mjs:608
  • `existsSync` in `getLocalGitState` 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. — extensions/work-hub/data.mjs:636
  • `readFileSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:157

What to do

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

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

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

  • 10 typed · 379 plain JS — the untyped files are eng/add-missing-contributors.mjs, eng/agent-plugin-schema.mjs, eng/board-bulk-actions.test.mjs, eng/board-column-order.test.mjs, eng/board-periodic-refresh.test.mjs, eng/board-preview.test.mjs (+373 more).

What to do

  • Migrate the remaining .js/.jsx files to TypeScript.
R10 · Code Duplication9.0 / 10Exemplary✓ Tool-verified

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

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

  • 88 duplicated blocks under extensions/ have copies in at least two of the sibling directories accessibility-kanban, agent-radar, ai-credits-breakdown, apng-studio, arcade-canvas, backlog-swipe-triage (+29 more sibling(s) not listed) — 63 of them are reported below, and 25 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 88 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 88 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 88 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. — extensions/tiny-tool-town-submitter/extension.mjs:349
  • 7 duplicated blocks under the repository root have copies in at least two of the sibling directories cookbook, eng, extensions, skills — 3 of them are reported below, and 4 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 7 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 7 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 7 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. — extensions/pr-review/github.mjs:86
  • REDACTED:30843 · extensions/github-security/extension.mjs:4031 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — REDACTED:30843
  • skills/webmcpify/templates/mutation-journal.js:71 · skills/webmcpify/templates/mutation-journal.ts:150 — the two spans are one implementation copied and then locally edited — 3604 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. — skills/webmcpify/templates/mutation-journal.js:71
  • skills/webmcpify/templates/webmcpify.js:89 · skills/webmcpify/templates/webmcpify.ts:113 — the two spans are one implementation copied and then locally edited — 939 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. — skills/webmcpify/templates/webmcpify.js:89
  • REDACTED:23575 · extensions/github-security/extension.mjs:646 — 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. — REDACTED:23575
  • extensions/tiny-tool-town-submitter/extension.mjs:349 · extensions/windows-app-storage-inspector-cleanup/src/api/server.mjs:42 — the two spans are one implementation copied and then locally edited — 462 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. — extensions/tiny-tool-town-submitter/extension.mjs:349
  • eng/external-plugin-quality-gates.mjs:662 · eng/external-plugin-quality-gates.mjs:871 — the two spans are one implementation copied and then locally edited — 335 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. — eng/external-plugin-quality-gates.mjs:662
  • REDACTED:466 · REDACTED:53 — the two spans are one implementation copied and then locally edited — 490 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:466
  • eng/create-plugin.mjs:10 · eng/create-skill.mjs:9 — the two spans are one implementation copied and then locally edited — 386 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. — eng/create-plugin.mjs:10
  • extensions/backrooms-canvas/extension.mjs:225 · REDACTED:377 — the two spans are one implementation copied and then locally edited — 354 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. — extensions/backrooms-canvas/extension.mjs:225
  • extensions/arcade-canvas/extension.mjs:32 · extensions/backrooms-canvas/extension.mjs:74 — the two spans are one implementation copied and then locally edited — 272 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. — extensions/arcade-canvas/extension.mjs:32
  • REDACTED:23439 · extensions/github-security/extension.mjs:311 — 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. — REDACTED:23439
  • extensions/arcade-canvas/extension.mjs:358 · REDACTED:426 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — extensions/arcade-canvas/extension.mjs:358
  • REDACTED:32088 · extensions/github-security/extension.mjs:5244 — 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. — REDACTED:32088
  • extensions/windows-app-storage-inspector-cleanup/src/analyzers/npm-cache.mjs:34 · extensions/windows-app-storage-inspector-cleanup/src/analyzers/uv-cache.mjs:37 — the two spans are one implementation copied and then locally edited — 186 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. — extensions/windows-app-storage-inspector-cleanup/src/analyzers/npm-cache.mjs:34
  • eng/yaml-parser.mjs:114 · eng/yaml-parser.mjs:176 — the two spans are one implementation copied and then locally edited — 234 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. — eng/yaml-parser.mjs:114
  • extensions/color-orb/extension.mjs:19 · extensions/gesture-review/extension.mjs:113 — the two spans are one implementation copied and then locally edited — 277 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. — extensions/color-orb/extension.mjs:19
  • extensions/windows-app-storage-inspector-cleanup/src/core/categorizers.mjs:86 · extensions/windows-app-storage-inspector-cleanup/src/core/item-inspector.mjs:6 — the two spans are one implementation copied and then locally edited — 293 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. — extensions/windows-app-storage-inspector-cleanup/src/core/categorizers.mjs:86
  • REDACTED:23517 · extensions/github-security/extension.mjs:428 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — REDACTED:23517
  • eng/validate-plugins.mjs:446 · eng/validate-skills.mjs:129 — the two spans are one implementation copied and then locally edited — 176 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. — eng/validate-plugins.mjs:446
  • extensions/backrooms-canvas/extension.mjs:74 · REDACTED:82 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — extensions/backrooms-canvas/extension.mjs:74
  • extensions/pr-artifact-explorer/jobs.mjs:269 · extensions/pr-artifact-explorer/limits.mjs:134 — the two spans are one implementation copied and then locally edited — 199 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. — extensions/pr-artifact-explorer/jobs.mjs:269
  • eng/update-readme.mjs:297 · eng/update-readme.mjs:357 · eng/update-readme.mjs:414 — all 3 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. — eng/update-readme.mjs:297
  • extensions/agent-radar/extension.mjs:49 · extensions/ai-credits-breakdown/server.mjs:21 — the two spans are one implementation copied and then locally edited — 275 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. — extensions/agent-radar/extension.mjs:49
  • REDACTED:47950 · REDACTED:48055 — 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. — REDACTED:47950
  • extensions/pr-artifact-explorer/github.mjs:201 · extensions/pr-artifact-explorer/github.mjs:228 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — extensions/pr-artifact-explorer/github.mjs:201
  • REDACTED:11922 · REDACTED:11947 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — REDACTED:11922
  • extensions/windows-app-storage-inspector-cleanup/src/analyzers/docker-images.mjs:24 · extensions/windows-app-storage-inspector-cleanup/src/analyzers/microsoft-scout.mjs: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. — extensions/windows-app-storage-inspector-cleanup/src/analyzers/docker-images.mjs:24
  • eng/external-plugin-intake.mjs:1170 · eng/external-plugin-intake.mjs:1200 — 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. — eng/external-plugin-intake.mjs:1170
  • extensions/arcade-canvas/extension.mjs:278 · extensions/backrooms-canvas/extension.mjs:225 · REDACTED:377 — 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. — extensions/arcade-canvas/extension.mjs:278
  • skills/latchshot-page-capture/scripts/latchshot.mjs:385 · skills/latchshot-page-capture/scripts/latchshot.mjs:436 — 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. — skills/latchshot-page-capture/scripts/latchshot.mjs:385
  • eng/external-plugin-approval.mjs:15 · REDACTED:19 — 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. — eng/external-plugin-approval.mjs:15
  • extensions/agent-radar/extension.mjs:140 · extensions/ai-credits-breakdown/extension.mjs:41 — the two spans are one implementation copied and then locally edited — 110 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. — extensions/agent-radar/extension.mjs:140
  • extensions/agent-radar/extension.mjs:143 · extensions/site-studio/extension.mjs:2287 — the two spans are one implementation copied and then locally edited — 124 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. — extensions/agent-radar/extension.mjs:143
  • REDACTED:912 · extensions/release-notes-showcase/releaseNotesShowcase.mjs:2225 — the two spans are one implementation copied and then locally edited — 97 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:912
  • REDACTED:20373 · REDACTED:20415 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — REDACTED:20373
  • REDACTED:22227 · REDACTED:22263 — 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. — REDACTED:22227
  • REDACTED:37875 · REDACTED:38741 — 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. — REDACTED:37875
  • extensions/work-hub/extension.mjs:299 · extensions/work-hub/extension.mjs:326 — 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. — extensions/work-hub/extension.mjs:299

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 Boundaries0.0 / 10Critical✓ 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.

  • eng/agent-plugin-schema.mjs:1 imports ajv/dist/2020.js, 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. — eng/agent-plugin-schema.mjs:1
  • extensions/foundry-agentic-loop-workflow/tests/evals-runner.test.mjs:9 reaches past another workspace package's public entry into its internals with a relative path (../../../skills/foundry-agentic-loop/scripts/evals.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — extensions/foundry-agentic-loop-workflow/tests/evals-runner.test.mjs:9

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

  • handleApi has cyclomatic complexity 230 and cognitive complexity 364; 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:499
  • UnwrappedItem has cyclomatic complexity 215 and cognitive complexity 184; 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. — REDACTED:19508
  • completeWork has cyclomatic complexity 182 and cognitive complexity 326; 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:5846
  • (anonymous) has cyclomatic complexity 150 and cognitive complexity 149; 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. — REDACTED:8826
  • commitMutationEffectsOnFiber has cyclomatic complexity 148 and cognitive complexity 244; 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:7023
  • setProp has cyclomatic complexity 148 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 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. — REDACTED:9071
  • updateProperties has cyclomatic complexity 139 and cognitive complexity 163; 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:9464
  • TextInputWithTokensInnerComponent has cyclomatic complexity 132 and cognitive complexity 122; 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. — REDACTED:27871
  • inspectMapContract has cyclomatic complexity 115 and cognitive complexity 179; 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. — skills/build-evidence-map/scripts/contract.mjs:110
  • applyEvent has cyclomatic complexity 110 and cognitive complexity 146; 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. — extensions/agent-radar/collector.mjs:278
  • setInitialProperties has cyclomatic complexity 91 and cognitive complexity 99; 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:9305
  • beginWork has cyclomatic complexity 86 and cognitive complexity 112; 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:5657
  • updateClassComponent has cyclomatic complexity 85 and cognitive complexity 86; 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:5257
  • AutocompleteMenu has cyclomatic complexity 84 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. — REDACTED:24424
  • onWorkSelected has cyclomatic complexity 81 and cognitive complexity 127; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:1472
  • (anonymous) has cyclomatic complexity 77 and cognitive complexity 59; 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. — REDACTED:28439
  • (anonymous) has cyclomatic complexity 70 and cognitive complexity 97; 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:2555
  • (anonymous) has cyclomatic complexity 70 and cognitive complexity 92; 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. — extensions/draw/public/keys.js:26
  • (anonymous) has cyclomatic complexity 68 and cognitive complexity 78; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:29027

What to do

  • Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
R3 · Large Files0.0 / 10Critical✓ 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.

  • extensions/github-security/extension.mjs has 10638 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — extensions/github-security/extension.mjs:1
  • REDACTED has 6411 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
  • extensions/jupyter-notebooks/notebook-canvas.mjs has 3791 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — extensions/jupyter-notebooks/notebook-canvas.mjs:1
  • REDACTED has 2977 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
  • extensions/sentry-triage/components/page.mjs has 2926 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — extensions/sentry-triage/components/page.mjs:1
  • extensions/site-studio/extension.mjs has 2234 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — extensions/site-studio/extension.mjs:1
  • REDACTED has 2232 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
  • REDACTED has 2105 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
  • REDACTED has 2097 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
  • extensions/release-notes-showcase/releaseNotesShowcase.mjs has 2071 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — extensions/release-notes-showcase/releaseNotesShowcase.mjs:1
  • extensions/foundry-agentic-loop-canvas/public/app.js has 1972 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — extensions/foundry-agentic-loop-canvas/public/app.js:1
  • eng/canvas-smoke-test.mjs has 1689 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — eng/canvas-smoke-test.mjs:1
  • extensions/repo-actions-hub/extension.mjs has 1671 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — extensions/repo-actions-hub/extension.mjs:1
  • REDACTED has 1625 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
  • REDACTED has 1525 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
  • REDACTED has 1450 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
  • REDACTED has 1357 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
  • eng/external-plugin-intake.mjs has 1315 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — eng/external-plugin-intake.mjs:1
  • extensions/sentry-triage/styles.mjs has 1315 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — extensions/sentry-triage/styles.mjs:1
  • REDACTED has 1254 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
  • REDACTED has 1193 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
  • REDACTED has 1172 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
  • extensions/work-hub/data.mjs has 1161 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — extensions/work-hub/data.mjs:1
  • extensions/gesture-review/extension.mjs has 1159 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — extensions/gesture-review/extension.mjs:1
  • REDACTED has 1146 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
  • REDACTED has 1132 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
  • extensions/work-hub/renderer.mjs has 1065 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — extensions/work-hub/renderer.mjs:1
  • REDACTED has 1014 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
  • extensions/java-modernization-studio/renderer.mjs has 972 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — extensions/java-modernization-studio/renderer.mjs:1
  • eng/external-plugin-quality-gates.mjs has 968 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — eng/external-plugin-quality-gates.mjs:1
  • extensions/agent-radar/collector.mjs has 903 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — extensions/agent-radar/collector.mjs:1
  • extensions/pr-artifact-explorer/github.mjs has 888 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — extensions/pr-artifact-explorer/github.mjs:1
  • extensions/flight-map-canvas/game/app.js has 887 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — extensions/flight-map-canvas/game/app.js:1
  • extensions/chronicle-stats/insight-view.mjs has 837 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — extensions/chronicle-stats/insight-view.mjs:1
  • eng/review-routing.mjs has 830 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — eng/review-routing.mjs:1
  • extensions/arcade-canvas/game/hud.js has 819 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — extensions/arcade-canvas/game/hud.js:1
  • eng/update-readme.mjs has 767 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — eng/update-readme.mjs:1
  • extensions/ai-credits-breakdown/ui/app.js has 758 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — extensions/ai-credits-breakdown/ui/app.js:1
  • extensions/pr-artifact-explorer/assets/trx-preview.js has 721 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — extensions/pr-artifact-explorer/assets/trx-preview.js:1
  • extensions/ai-credits-breakdown/collector.mjs has 716 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — extensions/ai-credits-breakdown/collector.mjs:1

What to do

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

  • eng/board-state-storage.test.mjs:10 imports '../.github/extensions/', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — eng/board-state-storage.test.mjs:10
  • eng/duplicate-review-board-access.test.mjs:8 imports '../.github/extensions/duplicate-review-board/', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — eng/duplicate-review-board-access.test.mjs:8
  • eng/duplicate-review-board-background.test.mjs:9 imports '../.github/extensions/duplicate-review-board/', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — eng/duplicate-review-board-background.test.mjs:9
  • eng/duplicate-review-board.test.mjs:14 imports '../.github/extensions/duplicate-review-board/', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — eng/duplicate-review-board.test.mjs:14
  • eng/resource-staleness-backend.test.mjs:15 imports '../.github/extensions/resource-staleness-board/', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — eng/resource-staleness-backend.test.mjs:15
  • REDACTED:16 imports '../.github/extensions/resource-staleness-board/', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — REDACTED:16
  • extensions/foundry-agentic-loop-workflow/tests/workflow.test.mjs:732 imports '../../foundry-agentic-loop-canvas/lib/', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — extensions/foundry-agentic-loop-workflow/tests/workflow.test.mjs:732
  • skills/webmcpify/tests/workbench-cli.test.mjs:43 imports '../templates', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — skills/webmcpify/tests/workbench-cli.test.mjs:43
  • 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. (×32) — REDACTED:1, extensions/github-security/extension.mjs:1, extensions/jupyter-notebooks/notebook-canvas.mjs: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.

What to do

  • Bump outdated dependencies to current versions to limit upgrade debt.
R6 · Tooling3.4 / 10Weak✓ Tool-verified

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

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

  • This repository declares test tooling, and the ✓ above records that declaration — but eng/board-state-storage.test.mjs and 7 other test file(s) in this workspace cannot be loaded at all: it imports a module that names no file in this repository, so the runner throws while collecting it and none of its cases execute. The wiring is present and the suite it points at does not run as written, which is why the tooling tick must not be read as a statement that the tests pass. Fix the unloadable file(s) — each one is reported with its failing import under Test Coverage — then the declared script exercises what it claims to. — eng/board-state-storage.test.mjs:10

What to do

  • Add eslint and `tsc --noEmit` as package.json scripts and run them in CI.
R7 · Dead Code7.3 / 10Strong✓ 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.

  • 1 file(s) (~599 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an REDACTED script) so reachability can see this package. — skills/microsoft-store-publisher/scripts
  • Unreachable from the 156 application, 33 tooling and 103 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 (156 application, 33 tooling, 103 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 (×15) — extensions/github-security/extension.mjs, REDACTED, extensions/tiny-tool-town-submitter/extension.mjs, …
  • no import path from any entry point (156 application, 33 tooling, 103 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (extensions/chronicle-stats/renderer.mjs) — 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) — extensions/chronicle-stats/insight-view.mjs, extensions/chronicle-stats/explorer.mjs
  • no import path from any entry point (156 application, 33 tooling, 103 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (extensions/chronicle-stats/server.mjs) — 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) — extensions/chronicle-stats/renderer.mjs, extensions/chronicle-stats/chronicle.mjs
  • no import path from any entry point (156 application, 33 tooling, 103 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (extensions/tiny-tool-town-submitter/extension.mjs) — 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 (×3) — extensions/tiny-tool-town-submitter/lib/analyzer.mjs, extensions/tiny-tool-town-submitter/lib/renderer.mjs, extensions/tiny-tool-town-submitter/lib/copy-generator.mjs
  • no import path from any entry point (156 application, 33 tooling, 103 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 (×2) — extensions/apng-studio/qr.mjs, extensions/apng-studio/apng.mjs
  • no import path from any entry point (156 application, 33 tooling, 103 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (extensions/chronicle-stats/canvas.mjs) — 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) — extensions/chronicle-stats/server.mjs, extensions/chronicle-stats/schemas.mjs
  • no import path from any entry point (156 application, 33 tooling, 103 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (extensions/chronicle-stats/explorer.mjs) — 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 — extensions/chronicle-stats/visuals.mjs
  • no import path from any entry point (156 application, 33 tooling, 103 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (extensions/chronicle-stats/db.mjs, extensions/chronicle-stats/snapshots.mjs) — 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 — extensions/chronicle-stats/analytics.mjs
  • no import path from any entry point (156 application, 33 tooling, 103 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (extensions/modernization-workflow/extension.mjs, extensions/modernization-workflow/lib/server.mjs) — 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 — extensions/modernization-workflow/lib/state.mjs
  • no import path from any entry point (156 application, 33 tooling, 103 test roots considered), but 3 in-repo import(s) from 3 other file(s) do name it (extensions/chronicle-stats/canvas.mjs, extensions/chronicle-stats/server.mjs, extensions/chronicle-stats/snapshots.mjs) — 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 — extensions/chronicle-stats/db.mjs
  • no import path from any entry point (156 application, 33 tooling, 103 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (extensions/modernization-workflow/lib/server.mjs) — 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 — extensions/modernization-workflow/lib/renderer.mjs
  • no import path from any entry point (156 application, 33 tooling, 103 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (extensions/chronicle-stats/canvas.mjs, extensions/chronicle-stats/server.mjs) — 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 — extensions/chronicle-stats/snapshots.mjs
  • no import path from any entry point (156 application, 33 tooling, 103 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (extensions/chronicle-stats/extension.mjs) — 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 — extensions/chronicle-stats/canvas.mjs
  • no import path from any entry point (156 application, 33 tooling, 103 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (extensions/modernization-workflow/extension.mjs) — 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 — extensions/modernization-workflow/lib/server.mjs
  • Nothing imports this binding — it is safe to review for removal. (×4) — eng/external-plugin-intake-state.mjs:1, extensions/draw/lib/geometry.mjs:617, extensions/draw/lib/geometry.mjs:629, …

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 Hygiene7.5 / 10Strong✓ 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.

  • Imported but not declared in any reachable package.json — installs work only by hoisting accident. — extensions/pr-artifact-explorer/extension.mjs:1
  • 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.

What to do

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

S1 · Cryptographic Hygiene8.0 / 10Strong✓ Tool-verified

Other · Security — Cryptographic hygiene (weak hash/cipher, password key-derivation). This codebase has no web surface, so transport/header/cookie/CSRF controls are N/A and only crypto is scored. Markup this repository SHIPS is scored for third-party script integrity whether or not the repository serves it itself — a page handed to a consumer runs in that consumer's origin.

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.

  • `https://unpkg.com/leaflet@1.9.4/dist/leaflet.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. 2 such include(s) across the repository's markup. — REDACTED:10

What to do

  • Pin third-party scripts and verify them: name an exact version in the URL and add an `integrity="sha384-…"` hash alongside `crossorigin="anonymous"` (both are required — an integrity hash on a cross-origin script without `crossorigin` is not evaluated, it blocks the script). Where the vendor ships a continuously-updated loader and publishes no stable hash (tag managers, analytics, chat widgets), Subresource Integrity is not available: constrain it instead with a `Content-Security-Policy` that names the exact origins allowed to execute, and drop the script from the pages that do not need it. Where the page is shipped inside a package that others host, prefer vendoring the asset and serving it from the app’s own origin, so no consumer inherits a third-party dependency they did not choose.
X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

X17 · Uncapped recursion over a caller-supplied document10.0 / 10Exemplary○ Nothing flagged

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.

X18 · Disposal-pattern correctness10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

X20 · Mistyped argument guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether an argument guard throws the exception its own condition describes — a guard that rejects a value for being EMPTY and reports it as `ArgumentNullException` tells the caller a parameter was null when it provably was not.

Method: Roslyn syntax: `throw new ArgumentNullException(nameof(p))` statements controlled by an `if`, whose condition is read for a test that is true of a NON-null `p` — an emptiness test that dereferences it (`p.Count == 0`, `!p.Any()`) or a BCL predicate documented true of the empty value (`string.IsNullOrEmpty(p)`). Deterministic, provable per finding. Advisory.

X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

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

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

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

X24 · Document value interpolated into markup unescaped5.3 / 10Adequate✓ Tool-verified

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

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

  • `cid` carries text this program read out of a document — an attribute or a text node, which the DOM hands back already decoded, so an entity its author wrote is a live character again — and it is written straight into the `id` attribute of markup built here with nothing escaping it on the way. The value is chosen by whoever authored that document, not by this program, so it can close the attribute or element it sits in and open another — a crafted document becomes markup in what this code renders. Escape `cid` at this site, or validate it against the shape the position accepts before interpolating it. — skills/draw-io-diagram-generator/scripts/validate-drawio.py:146
  • `p.id` is text this program did not author, and it is written into a quoted attribute value through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — extensions/ai-credits-breakdown/ui/app.js:151, extensions/ai-credits-breakdown/ui/app.js:152
  • `d.key` is text this program did not author, and it is written into a quoted attribute value through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — extensions/ai-credits-breakdown/ui/app.js:163
  • `esc(d.all)` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — extensions/ai-credits-breakdown/ui/app.js:187
  • `esc(o.v)` is text this program did not author, and it is written into a quoted attribute value through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — extensions/ai-credits-breakdown/ui/app.js:188
  • `credTxt(c)` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — extensions/ai-credits-breakdown/ui/app.js:276
  • `lead` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — extensions/ai-credits-breakdown/ui/app.js:303
  • `parts.join('')` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — extensions/ai-credits-breakdown/ui/app.js:304
  • `esc(x[0])` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — extensions/ai-credits-breakdown/ui/app.js:305
  • `tiers.map((v,i)=>TIER_NAME[i]+' '+pct(c?v/c:0)).join(', ')` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — extensions/ai-credits-breakdown/ui/app.js:306
  • `tierFill(i)` is text this program did not author, and it is written into a script or style context through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. A script or style context needs its own escaping (or a JSON serialiser that escapes `<`); better, pass the value through a data attribute. — extensions/ai-credits-breakdown/ui/app.js:307
  • `TIER_NAME[i]` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — extensions/ai-credits-breakdown/ui/app.js:308
  • `esc(o)` is text this program did not author, and it is written into the text of an element through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — extensions/ai-credits-breakdown/ui/app.js:333
  • `usd(total)` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — extensions/ai-credits-breakdown/ui/app.js:336
  • `esc(cmpLabel)` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — extensions/ai-credits-breakdown/ui/app.js:337
  • `esc(repo)` is text this program did not author, and it is written into a quoted attribute value through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — extensions/ai-credits-breakdown/ui/app.js:342
  • `usd(b.c)` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — extensions/ai-credits-breakdown/ui/app.js:343
  • `pct(total?b.c/total:0)` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — extensions/ai-credits-breakdown/ui/app.js:344
  • `(pv?usd(pv):'–')` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — extensions/ai-credits-breakdown/ui/app.js:345
  • `cu(b.c)` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — extensions/ai-credits-breakdown/ui/app.js:346
  • `(allRepos?'Show top 12 only':'Show all '+items.length+' repositories ('+(items.length-12)+' more, '+usd(items.slice(1…` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — extensions/ai-credits-breakdown/ui/app.js:347
  • `usd(total)` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — extensions/ai-credits-breakdown/ui/app.js:348
  • `H` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — extensions/ai-credits-breakdown/ui/app.js:394, extensions/ai-credits-breakdown/ui/app.js:539
  • `credTxt(Math.max(...tot,0))` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — extensions/ai-credits-breakdown/ui/app.js:434
  • `longDate(rainState.days[i])` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — extensions/ai-credits-breakdown/ui/app.js:445
  • `cu(tot)` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — extensions/ai-credits-breakdown/ui/app.js:446
  • `cu(rainState.cum[i])` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — extensions/ai-credits-breakdown/ui/app.js:447
  • `esc(modelName(Number(tm[0])))` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — extensions/ai-credits-breakdown/ui/app.js:449
  • `[per[0]&&'call '+cu(per[0]),'session '+cu(per[1])].filter(Boolean).join(' · ')` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — extensions/ai-credits-breakdown/ui/app.js:450
  • `a.i` is text this program did not author, and it is written into a quoted attribute value through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — extensions/ai-credits-breakdown/ui/app.js:560
  • `a.style.color` is text this program did not author, and it is written into a quoted attribute value through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — extensions/ai-credits-breakdown/ui/app.js:561
  • `esc(a.name)` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — extensions/ai-credits-breakdown/ui/app.js:562
  • `esc(i.v)` is text this program did not author, and it is written into a quoted attribute value through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — extensions/ai-credits-breakdown/ui/app.js:615
  • `esc(i.label)` is text this program did not author, and it is written into a quoted attribute value through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — extensions/ai-credits-breakdown/ui/app.js:616
  • `cu(i.c)` is text this program did not author, and it is written into the text of an element through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — extensions/ai-credits-breakdown/ui/app.js:617
  • `FAMILY_COLOR[k]` is text this program did not author, and it is written into a script or style context through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. A script or style context needs its own escaping (or a JSON serialiser that escapes `<`); better, pass the value through a data attribute. — extensions/ai-credits-breakdown/ui/app.js:631
  • `esc(items[0].label)` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — extensions/ai-credits-breakdown/ui/app.js:632
  • `EVENTS_FROM` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — extensions/ai-credits-breakdown/ui/app.js:651

What to do

  • Each finding names the expression, the attribute it lands in and the line. Confirm the value's origin from the read this analyzer traced, then escape it at the sink or validate it against the shape the attribute accepts before interpolating.
X25 · Inert configuration knob10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

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

Other · Code Health — Whether a `foreach` leaves the collection it is walking alone — a body that adds to or removes from the very collection the loop is enumerating invalidates the enumerator it is holding, so the next `MoveNext` throws `InvalidOperationException` and the remaining items are never seen.

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

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

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

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

X29 · Per-element action decided by a fixed 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.9 / 10Adequate✓ Tool-verified

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

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

  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×2) — skills/winmd-api-search/scripts/cache-generator/Program.cs:487, skills/winmd-api-search/scripts/cache-generator/Program.cs:765

What to do

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

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

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

X32 · Type resolved by simple name across every loaded assembly10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a plugin lookup names the type it means — searching every assembly loaded into the process for a candidate whose SIMPLE name equals a string supplied at runtime, and taking the first one found, is decided by assembly LOAD ORDER rather than by this source, so the same name can resolve to a different type on the next run.

Method: Roslyn syntax only, no semantic model: every invocation of `First`/`FirstOrDefault`/`Single`/`SingleOrDefault` whose OWN expression subtree contains both a `GetAssemblies()` call and a `GetTypes()`/`GetExportedTypes()` call — a single-element pick out of every type loaded into the process. A nested selector in the same chain sees no `GetAssemblies()` in its own subtree and is outside the population, so one lookup counts once however many links its chain has. A finding additionally needs both remaining halves: the selector must be `First`/`FirstOrDefault` (`Single`/`SingleOrDefault` reports the ambiguity rather than resolving it, and is counted and never reported), and the chain must carry an `==` comparison of `<lambda parameter>.Name` against something that is not a literal. The receiver must be a plain identifier bound by one of the chain’s own lambdas, which places `assembly.GetName().Name == "X"` outside the rule by construction. One exemption: a `.Name` test joined by `&&` to a `FullName`/`AssemblyQualifiedName` test on the same identifier is spared; joined by `||` it is not. Deterministic, provable per finding. Advisory.

X4 · Structured logging10.0 / 10Exemplary○ Nothing flagged

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

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

X5 · Nullable reference types9.3 / 10Exemplary✓ Tool-verified

Other · Code Health — Whether nullable reference types are enabled and not undermined by heavy `!` suppression.

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

  • ~0.9 `!` suppressions per 1k syntax nodes — 5 suppression(s) across the 5874 syntax node(s) in code where nullable warnings are ENABLED, which is the only code a `!` can suppress anything in (a `!` under `#nullable disable` is inert and is not counted, and its file's nodes are not in the denominator). Each one tells the compiler to trust you about null, suppressing the very safety NRTs provide.

What to do

  • Enable <Nullable>enable</Nullable> across all projects and resolve warnings rather than suppressing with `!`.

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 Health32%Weak — gated by D1, D2, R1, R2, R3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture69%Adequate — gated by R11Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity76%StrongStrongest area.
Readiness43%Adequate — gated by R6, P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security79%Adequate — gated by D29Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance60%AdequateAcceptable, with room to improve.
Unscored — 4 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 — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X10 Duplicated predicate — 25 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 33 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X9 Subsumed condition operand — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 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.

  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 44 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 user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
  • AC2 Forms & labels — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
  • AC3 Page structure — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
  • AC4 Keyboard semantics — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
  • AC5 ARIA correctness — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
  • AC6 Visual & motion safety — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
  • AC7 A11y enforcement — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
  • AX1 Captive dependencies — no DI registrations detected
  • AX2 Stateful singletons — no singleton implementations detected
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • 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 did not expose a crawlable HTTP endpoint in time — no runtime evidence 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 the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • C2 Access Controls — No access-control surface detected in the analyzed source — no web/app surface to authorize (no HTTP API or web-UI project) and no authorization code at all (no [Authorize]/policies, no imperative guard methods). Access control is therefore N/A here — this is a library/CLI, which is authorized by its CALLER, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
  • C3 Audit Trail — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • C4 Data Retention — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • C5 Data-Subject Rights — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • D12 Dependency Hygiene — Dependency currency not established — no declaration carries an exact pin to grade
  • D18 Solution Shape — D18 scores the shape of a .NET solution, but this repository's production source is mostly .go, .java, .py, .ts, .tsx — the .NET project files present are an immaterial minority — so the dimension does not apply.
  • D21 Naming Consistency — Naming consistency is measured on C# only; Go, Java, JavaScript, Python, TypeScript, html not measured.
  • D22 Internal API Consistency — API consistency is measured on C# only; the exposed JavaScript surface was not measured.
  • D23 Boundary Type-Coupling — single shared-core project — no cross-context coupling to assess
  • D25 ADR Conformance — None of 0 binding record(s) states a rule in checkable form (a backticked element with a prohibition, or an `adr-rules` block), so conformance cannot be read from the code. Write the rule as an `adr-rules` block (`forbid:` a symbol, a package or a dependency) to make it checkable.
  • D27 Navigability — D27 reads resolved call sites in the languages it reads only — this repository's production source is .go, .java, .py, .tsx, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D32 Data Compliance (PII/GDPR) — 19 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D39 IL Efficiency — IL not measured — the analyzer's build of the target did not succeed
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D8 Code Coverage — Coverage NOT MEASURED: the .NET half could not be measured — the repository wires up no coverage collector for `--collect:"XPlat Code Coverage"` to use; the JavaScript/TypeScript half measured 98.2% (node:test via `npm ci --ignore-scripts` in extensions/foundry-agentic-loop-canvas/; node:test via `npm ci --ignore-scripts` in extensions/foundry-agentic-loop-workflow/; node:test via `npm ci --ignore-scripts` in extensions/signals-dashboard/). 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. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan. Alternatively, commit the lcov/Cobertura report your CI produces and it is read without a re-run.
  • DM1 Domain Modelling — applicable but not scored (1 of 2 signals for this style — below the bar we score at): 6 value object(s)
  • ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
  • 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
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P7 Outbound HTTP resilience — not applicable — this isn't a service/API/worker
  • P8 Schema migrations — no EF Core usage detected
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (`coverage run -m pytest` then `coverage xml`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
  • PF1 Benchmark discipline — Performance is assessed only for perf-relevant repos — a packaged library, one that ships benchmarks, or one already using allocation-aware APIs. This repo isn't one, so the Performance lens is not applicable and is excluded from the score.
  • PF2 Allocation hygiene — Performance is assessed only for perf-relevant repos — a packaged library, one that ships benchmarks, or one already using allocation-aware APIs. This repo isn't one, so the Performance lens is not applicable and is excluded from the score.
  • X2 Cancellation propagation — no async method does work a token could cancel
  • X6 Hand-rolled structured-format parsing — 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 — 41 finding(s)
D34 · Knowledge Freshness · Orphaned knowledge · ×10
  • Orphaned knowledge skills/quality-playbook/quality_gate.py:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge extensions/java-modernization-studio/renderer.mjs:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge REDACTED:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge skills/winmd-api-search/scripts/cache-generator/Program.cs:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge skills/terraform-azurerm-set-diff-analyzer/scripts/analyze_plan.py:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge skills/eyeball/tools/eyeball.py:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge extensions/apng-studio/web/app.js:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge skills/acquire-codebase-knowledge/scripts/scan.py:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge REDACTED:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge skills/python-pypi-package-builder/scripts/scaffold.py:1 — No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · High CVE · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D17 · Explicit Debt · EmptyCatchBlock · ×2
  • EmptyCatchBlock skills/winmd-api-search/scripts/cache-generator/Program.cs:487 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
  • EmptyCatchBlock skills/winmd-api-search/scripts/cache-generator/Program.cs:765 — empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
R8 · Dependency Hygiene · Unlisted import '@github/copilot-sdk' · ×1
  • Unlisted import '@github/copilot-sdk' extensions/pr-artifact-explorer/extension.mjs:1 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Serious — 1868 finding(s)
D3 · God Classes · FunctionTooLong · ×80
  • FunctionTooLong: notebook-canvas.renderHtml extensions/jupyter-notebooks/notebook-canvas.mjs:1440 — FunctionTooLong — renderHtml runs 1706 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1606 over it, 17.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.
  • FunctionTooLong: extension.renderHtml extensions/repo-actions-hub/extension.mjs:777 — FunctionTooLong — renderHtml runs 871 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 771 over it, 8.71× 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: releaseNotesShowcase.renderHtml extensions/release-notes-showcase/releaseNotesShowcase.mjs:1168 — FunctionTooLong — renderHtml runs 812 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 712 over it, 8.12× 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: extension.getHTML extensions/gesture-review/extension.mjs:278 — FunctionTooLong — getHTML runs 733 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 633 over it, 7.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: extension.renderHtml REDACTED:108 — FunctionTooLong — renderHtml runs 716 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 616 over it, 7.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: CopilotConfigurationBasics.CopilotConfigurationBasics website/src/components/brand/learning-hub/CopilotConfigurationBasics.tsx:21 — FunctionTooLong — CopilotConfigurationBasics runs 681 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 581 over it, 6.81× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: server.handleApi REDACTED:499 — FunctionTooLong — handleApi runs 622 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 522 over it, 6.22× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: LearningHubIndex.LearningHubIndexBody website/src/components/brand/LearningHubIndex.tsx:237 — FunctionTooLong — LearningHubIndexBody runs 584 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 484 over it, 5.84× 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: extension.renderHtml extensions/site-studio/extension.mjs:893 — FunctionTooLong — renderHtml runs 558 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 458 over it, 5.58× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: AgentsAndSubagents.AgentsAndSubagents website/src/components/brand/learning-hub/AgentsAndSubagents.tsx:178 — FunctionTooLong — AgentsAndSubagents runs 431 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 331 over it, 4.31× 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: CliForBeginnersOverview.CliForBeginnersOverview website/src/components/brand/learning-hub/CliForBeginnersOverview.tsx:65 — FunctionTooLong — CliForBeginnersOverview runs 379 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 279 over it, 3.79× 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: ExtensionsCatalog.ExtensionsCatalog website/src/components/brand/ExtensionsCatalog.tsx:145 — FunctionTooLong — ExtensionsCatalog runs 373 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 273 over it, 3.73× 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: pointer.attachPointer extensions/draw/public/pointer.js:30 — FunctionTooLong — attachPointer runs 359 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 259 over it, 3.59× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: browser.renderBrowser REDACTED:709 — FunctionTooLong — renderBrowser runs 327 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 227 over it, 3.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: InstructionsCatalog.InstructionsCatalog website/src/components/brand/InstructionsCatalog.tsx:110 — FunctionTooLong — InstructionsCatalog runs 326 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 226 over it, 3.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.
  • FunctionTooLong: server.startServer extensions/sentry-triage/server.mjs:80 — FunctionTooLong — startServer runs 312 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 212 over it, 3.12× 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: SkillsCatalog.SkillsCatalog website/src/components/brand/SkillsCatalog.tsx:99 — FunctionTooLong — SkillsCatalog runs 310 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 210 over it, 3.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: PluginsCatalog.PluginsCatalog website/src/components/brand/PluginsCatalog.tsx:122 — FunctionTooLong — PluginsCatalog runs 309 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 209 over it, 3.09× 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: app.view.addEventListener("click") REDACTED:6144 — FunctionTooLong — view.addEventListener("click") runs 307 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 207 over it, 3.07× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: WhatAreAgentsSkillsInstructions.AgentsSkillsInstructions website/src/components/brand/learning-hub/WhatAreAgentsSkillsInstructions.tsx:90 — FunctionTooLong — AgentsSkillsInstructions runs 296 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 196 over it, 2.96× 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: state.createState extensions/sentry-triage/state.mjs:27 — FunctionTooLong — createState runs 295 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 195 over it, 2.95× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: server.createDrawServer REDACTED:123 — FunctionTooLong — createDrawServer runs 285 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 185 over it, 2.85× 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: UsingAutomationsInCopilotApp.UsingAutomationsInCopilotApp website/src/components/brand/learning-hub/UsingAutomationsInCopilotApp.tsx:122 — FunctionTooLong — UsingAutomationsInCopilotApp runs 285 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 185 over it, 2.85× 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: contract.inspectMapContract skills/build-evidence-map/scripts/contract.mjs:110 — FunctionTooLong — inspectMapContract runs 277 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 177 over it, 2.77× 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: WorkingWithCanvasExtensions.WorkingWithCanvasExtensions website/src/components/brand/learning-hub/WorkingWithCanvasExtensions.tsx:166 — FunctionTooLong — WorkingWithCanvasExtensions runs 271 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 171 over it, 2.71× 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.
  • + 55 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×52
  • FileTooLong: REDACTED REDACTED — FileTooLong — 33653 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 33153 over it, 67.31× 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: github-security/extension.mjs extensions/github-security/extension.mjs — FileTooLong — 7518 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 7018 over it, 15.04× 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 — 5433 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 4933 over it, 10.87× 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: jupyter-notebooks/notebook-canvas.mjs extensions/jupyter-notebooks/notebook-canvas.mjs — FileTooLong — 3094 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 2594 over it, 6.19× 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: quality-playbook/quality_gate.py skills/quality-playbook/quality_gate.py — FileTooLong — 2296 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1796 over it, 4.59× 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 — 1903 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 1403 over it, 3.81× 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: site-studio/extension.mjs extensions/site-studio/extension.mjs — FileTooLong — 1809 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 1309 over it, 3.62× 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: release-notes-showcase/releaseNotesShowcase.mjs extensions/release-notes-showcase/releaseNotesShowcase.mjs — FileTooLong — 1739 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 1239 over it, 3.48× 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 — 1725 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 1225 over it, 3.45× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED extensions/foundry-agentic-loop-canvas/public/app.js — FileTooLong — 1680 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 1180 over it, 3.36× 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: repo-actions-hub/extension.mjs extensions/repo-actions-hub/extension.mjs — FileTooLong — 1376 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 63% of them inside a single declaration: renderHtml (777-1834). The bar is 500 significant lines; this is 876 over it, 2.75× 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: REDACTED REDACTED — FileTooLong — 1257 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 757 over it, 2.51× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 1184 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 684 over it, 2.37× 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 — 1180 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 680 over it, 2.36× 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 — 1098 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 598 over it, 2.20× 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: eng/external-plugin-intake.mjs eng/external-plugin-intake.mjs — FileTooLong — 1039 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 539 over it, 2.08× 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 — 1018 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 70% of them inside a single declaration: renderHtml (108-996). The bar is 500 significant lines; this is 518 over it, 2.04× 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: REDACTED REDACTED — FileTooLong — 1010 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 510 over it, 2.02× 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: work-hub/data.mjs extensions/work-hub/data.mjs — FileTooLong — 990 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 490 over it, 1.98× 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 — 978 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 478 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 — 937 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 437 over it, 1.87× 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: gesture-review/extension.mjs extensions/gesture-review/extension.mjs — FileTooLong — 932 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 79% of them inside a single declaration: getHTML (278-1284). The bar is 500 significant lines; this is 432 over it, 1.86× 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: REDACTED REDACTED — FileTooLong — 859 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 359 over it, 1.72× 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 — 815 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 315 over it, 1.63× 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: assets/napkin.html skills/napkin/assets/napkin.html — FileTooLong — 815 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 315 over it, 1.63× 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.
  • + 27 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×42
  • Hotspot: REDACTED REDACTED:499 — REDACTED changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 203 in server.handleApi at line 499. 1 of those changes was a fix/bug commit, and the other 8 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-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 10:53:23 +11:00' --until='2026-10-29 10:53:23 +11:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:6144 — REDACTED changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 55 in app.view.addEventListener("click") at line 6144. 5 of those changes were fix/bug commits, and the other 15 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-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 10:53:23 +11:00' --until='2026-10-29 10:53:23 +11: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: eng/canvas-error-handoff/runtime.mjs eng/canvas-error-handoff/runtime.mjs:262 — eng/canvas-error-handoff/runtime.mjs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 89 in runtime.createErrorHandoffRuntime at line 262. 12 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 10:53:23 +11:00' --until='2026-10-29 10:53:23 +11:00' --full-history --no-merges -- eng/canvas-error-handoff/runtime.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: extensions/foundry-agentic-loop-canvas/public/app.js extensions/foundry-agentic-loop-canvas/public/app.js:1330 — extensions/foundry-agentic-loop-canvas/public/app.js changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 55 in app.calloutHtml at line 1330. 1 of those changes was a fix/bug commit, and the other 17 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-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 10:53:23 +11:00' --until='2026-10-29 10:53:23 +11:00' --full-history --no-merges -- extensions/foundry-agentic-loop-canvas/public/app.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:709 — REDACTED changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 94 in browser.renderBrowser at line 709. 2 of those changes were fix/bug commits, and the other 8 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-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 10:53:23 +11:00' --until='2026-10-29 10:53:23 +11: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: extensions/ai-credits-breakdown/ui/app.js extensions/ai-credits-breakdown/ui/app.js:36 — extensions/ai-credits-breakdown/ui/app.js changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 284 in app.init at line 36. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 10:53:23 +11:00' --until='2026-10-29 10:53:23 +11:00' --full-history --no-merges -- extensions/ai-credits-breakdown/ui/app.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: extensions/sentry-triage/server.mjs extensions/sentry-triage/server.mjs:80 — extensions/sentry-triage/server.mjs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 119 in server.startServer at line 80. 1 of those changes was a fix/bug commit, 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-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 10:53:23 +11:00' --until='2026-10-29 10:53:23 +11:00' --full-history --no-merges -- extensions/sentry-triage/server.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: website/src/components/brand/LearningHubIndex.tsx website/src/components/brand/LearningHubIndex.tsx:237 — website/src/components/brand/LearningHubIndex.tsx changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 62 in LearningHubIndex.LearningHubIndexBody at line 237. 2 of those changes were fix/bug commits, and the other 7 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-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 10:53:23 +11:00' --until='2026-10-29 10:53:23 +11:00' --full-history --no-merges -- website/src/components/brand/LearningHubIndex.tsx`: 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: extensions/foundry-agentic-loop-canvas/lib/model.mjs extensions/foundry-agentic-loop-canvas/lib/model.mjs:107 — extensions/foundry-agentic-loop-canvas/lib/model.mjs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in model.promptFor at line 107. 1 of those changes was a fix/bug commit, and the other 11 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-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 10:53:23 +11:00' --until='2026-10-29 10:53:23 +11:00' --full-history --no-merges -- extensions/foundry-agentic-loop-canvas/lib/model.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:1472 — REDACTED changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 83 in extension.onWorkSelected at line 1472. 1 of those changes was a fix/bug commit, 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-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 10:53:23 +11:00' --until='2026-10-29 10:53:23 +11:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:1167 — REDACTED changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 49 in generate-website-data.generateCanvasManifest at line 1167. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 10:53:23 +11:00' --until='2026-10-29 10:53:23 +11: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: extensions/foundry-agentic-loop-canvas/extension.mjs extensions/foundry-agentic-loop-canvas/extension.mjs:105 — extensions/foundry-agentic-loop-canvas/extension.mjs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in extension.perform at line 105. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 10:53:23 +11:00' --until='2026-10-29 10:53:23 +11:00' --full-history --no-merges -- extensions/foundry-agentic-loop-canvas/extension.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: website/src/lib/sanitize-html.ts website/src/lib/sanitize-html.ts:77 — website/src/lib/sanitize-html.ts changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in sanitize-html.sanitizeHtml at line 77. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 10:53:23 +11:00' --until='2026-10-29 10:53:23 +11:00' --full-history --no-merges -- website/src/lib/sanitize-html.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: website/src/components/brand/ExtensionsCatalog.tsx website/src/components/brand/ExtensionsCatalog.tsx:145 — website/src/components/brand/ExtensionsCatalog.tsx changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in ExtensionsCatalog.ExtensionsCatalog at line 145. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 10:53:23 +11:00' --until='2026-10-29 10:53:23 +11:00' --full-history --no-merges -- website/src/components/brand/ExtensionsCatalog.tsx`: 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: extensions/foundry-agentic-loop-workflow/lib/loop.mjs extensions/foundry-agentic-loop-workflow/lib/loop.mjs:405 — extensions/foundry-agentic-loop-workflow/lib/loop.mjs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in loop.runLoop at line 405. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 10:53:23 +11:00' --until='2026-10-29 10:53:23 +11:00' --full-history --no-merges -- extensions/foundry-agentic-loop-workflow/lib/loop.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: eng/external-plugin-intake.mjs eng/external-plugin-intake.mjs:1094 — eng/external-plugin-intake.mjs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in external-plugin-intake.buildQualityGatesCommentSection at line 1094. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 10:53:23 +11:00' --until='2026-10-29 10:53:23 +11:00' --full-history --no-merges -- eng/external-plugin-intake.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: extensions/foundry-agentic-loop-workflow/lib/args.mjs extensions/foundry-agentic-loop-workflow/lib/args.mjs:60 — extensions/foundry-agentic-loop-workflow/lib/args.mjs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in args.validateArgs at line 60. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 10:53:23 +11:00' --until='2026-10-29 10:53:23 +11:00' --full-history --no-merges -- extensions/foundry-agentic-loop-workflow/lib/args.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: eng/external-plugin-quality-gates.mjs eng/external-plugin-quality-gates.mjs:197 — eng/external-plugin-quality-gates.mjs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in external-plugin-quality-gates.inspectAgentPluginSpecCompliance at line 197. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 10:53:23 +11:00' --until='2026-10-29 10:53:23 +11:00' --full-history --no-merges -- eng/external-plugin-quality-gates.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: website/src/components/brand/TopNavSearch.tsx website/src/components/brand/TopNavSearch.tsx:70 — website/src/components/brand/TopNavSearch.tsx changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in TopNavSearch.TopNavSearch at line 70. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 10:53:23 +11:00' --until='2026-10-29 10:53:23 +11:00' --full-history --no-merges -- website/src/components/brand/TopNavSearch.tsx`: 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: extensions/foundry-agentic-loop-workflow/lib/prompts.mjs extensions/foundry-agentic-loop-workflow/lib/prompts.mjs:133 — extensions/foundry-agentic-loop-workflow/lib/prompts.mjs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in prompts.buildPrompt at line 133. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 10:53:23 +11:00' --until='2026-10-29 10:53:23 +11:00' --full-history --no-merges -- extensions/foundry-agentic-loop-workflow/lib/prompts.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: website/src/components/brand/PluginsCatalog.tsx website/src/components/brand/PluginsCatalog.tsx:122 — website/src/components/brand/PluginsCatalog.tsx changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in PluginsCatalog.PluginsCatalog at line 122. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 10:53:23 +11:00' --until='2026-10-29 10:53:23 +11:00' --full-history --no-merges -- website/src/components/brand/PluginsCatalog.tsx`: 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: website/src/components/brand/SkillsCatalog.tsx website/src/components/brand/SkillsCatalog.tsx:99 — website/src/components/brand/SkillsCatalog.tsx changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in SkillsCatalog.SkillsCatalog at line 99. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 10:53:23 +11:00' --until='2026-10-29 10:53:23 +11:00' --full-history --no-merges -- website/src/components/brand/SkillsCatalog.tsx`: 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:1306 — REDACTED changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in extension.startServer.server at line 1306. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 10:53:23 +11:00' --until='2026-10-29 10:53:23 +11: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: extensions/foundry-agentic-loop-workflow/lib/record.mjs extensions/foundry-agentic-loop-workflow/lib/record.mjs:188 — extensions/foundry-agentic-loop-workflow/lib/record.mjs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in record.reduce at line 188. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 10:53:23 +11:00' --until='2026-10-29 10:53:23 +11:00' --full-history --no-merges -- extensions/foundry-agentic-loop-workflow/lib/record.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:361 — REDACTED changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in targets.parseTarget at line 361. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 10:53:23 +11:00' --until='2026-10-29 10:53:23 +11: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.
  • + 17 more in this group — see findings.md.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×40
  • Sync-over-async blocking eng/canvas-smoke-test.mjs:1318 — `fs.mkdtempSync` in `runSmokeTest` 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 eng/canvas-smoke-test.mjs:1320 — `fs.rmSync` in `runSmokeTest` 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 eng/canvas-smoke-test.mjs:1342 — `fs.existsSync` in `runSmokeTest` 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 eng/canvas-smoke-test.mjs:1348 — `fs.existsSync` in `runSmokeTest` 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 eng/canvas-smoke-test.mjs:1368 — `fs.existsSync` in `runSmokeTest` 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 eng/canvas-smoke-test.mjs:1382 — `fs.rmSync` in `runSmokeTest` 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 eng/canvas-smoke-test.mjs:1396 — `fs.mkdirSync` in `runSmokeTest` 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 eng/canvas-smoke-test.mjs:1397 — `fs.writeFileSync` in `runSmokeTest` 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 eng/canvas-smoke-test.mjs:1400 — `fs.mkdirSync` in `runSmokeTest` 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 eng/canvas-smoke-test.mjs:1447 — `fs.existsSync` in `runSmokeTest` 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 eng/canvas-smoke-test.mjs:1459 — `fs.existsSync` in `runSmokeTest` 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 eng/canvas-smoke-test.mjs:1488 — `fs.readdirSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking eng/canvas-smoke-test.mjs:1532 — `fs.lstatSync` in `runCanvasSmokeTest` 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 eng/canvas-smoke-test.mjs:1587 — `fs.mkdtempSync` in `runCanvasSmokeTest` 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 eng/canvas-smoke-test.mjs:1593 — `fs.rmSync` in `runCanvasSmokeTest` 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 eng/canvas-smoke-test.mjs:1781 — `fs.readFileSync` in `main` 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 eng/canvas-smoke-test.mjs:1788 — `fs.appendFileSync` in `main` 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 eng/canvas-smoke-test.mjs:1803 — `fs.mkdirSync` in `main` 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 eng/canvas-smoke-test.mjs:1804 — `fs.writeFileSync` in `main` 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 eng/canvas-smoke-test.mjs:1805 — `fs.writeFileSync` in `main` 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 eng/canvas-smoke-test.mjs:1809 — `fs.copyFileSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking REDACTED:561 — `fs.readFileSync` in `callback to http.createServer` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking REDACTED:428 — `existsSync` in `ensureStateFile` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking REDACTED:100 — `fs.readFileSync` in `callback to http.createServer` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking REDACTED:127 — `fs.readFileSync` in `callback to http.createServer` 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.
X24 · Document value interpolated into markup unescaped · Untrusted text written into markup unescaped · ×39
  • Untrusted text written into markup unescaped extensions/ai-credits-breakdown/ui/app.js:151 — `p.id` is text this program did not author, and it is written into a quoted attribute value through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped extensions/ai-credits-breakdown/ui/app.js:152 — `p.id` is text this program did not author, and it is written into a quoted attribute value through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped extensions/ai-credits-breakdown/ui/app.js:163 — `d.key` is text this program did not author, and it is written into a quoted attribute value through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped extensions/ai-credits-breakdown/ui/app.js:187 — `esc(d.all)` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped extensions/ai-credits-breakdown/ui/app.js:188 — `esc(o.v)` is text this program did not author, and it is written into a quoted attribute value through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped extensions/ai-credits-breakdown/ui/app.js:276 — `credTxt(c)` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped extensions/ai-credits-breakdown/ui/app.js:303 — `lead` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped extensions/ai-credits-breakdown/ui/app.js:304 — `parts.join('')` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped extensions/ai-credits-breakdown/ui/app.js:305 — `esc(x[0])` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped extensions/ai-credits-breakdown/ui/app.js:306 — `tiers.map((v,i)=>TIER_NAME[i]+' '+pct(c?v/c:0)).join(', ')` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped extensions/ai-credits-breakdown/ui/app.js:307 — `tierFill(i)` is text this program did not author, and it is written into a script or style context through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. A script or style context needs its own escaping (or a JSON serialiser that escapes `<`); better, pass the value through a data attribute.
  • Untrusted text written into markup unescaped extensions/ai-credits-breakdown/ui/app.js:308 — `TIER_NAME[i]` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped extensions/ai-credits-breakdown/ui/app.js:333 — `esc(o)` is text this program did not author, and it is written into the text of an element through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped extensions/ai-credits-breakdown/ui/app.js:336 — `usd(total)` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped extensions/ai-credits-breakdown/ui/app.js:337 — `esc(cmpLabel)` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped extensions/ai-credits-breakdown/ui/app.js:342 — `esc(repo)` is text this program did not author, and it is written into a quoted attribute value through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped extensions/ai-credits-breakdown/ui/app.js:343 — `usd(b.c)` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped extensions/ai-credits-breakdown/ui/app.js:344 — `pct(total?b.c/total:0)` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped extensions/ai-credits-breakdown/ui/app.js:345 — `(pv?usd(pv):'–')` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped extensions/ai-credits-breakdown/ui/app.js:346 — `cu(b.c)` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped extensions/ai-credits-breakdown/ui/app.js:347 — `(allRepos?'Show top 12 only':'Show all '+items.length+' repositories ('+(items.length-12)+' more, '+usd(items.slice(1…` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped extensions/ai-credits-breakdown/ui/app.js:348 — `usd(total)` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped extensions/ai-credits-breakdown/ui/app.js:394 — `H` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped extensions/ai-credits-breakdown/ui/app.js:434 — `credTxt(Math.max(...tot,0))` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped extensions/ai-credits-breakdown/ui/app.js:445 — `longDate(rainState.days[i])` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • + 14 more in this group — see findings.md.
R4 · Test Coverage · No test reaches this file · ×32
  • 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 extensions/github-security/extension.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file extensions/jupyter-notebooks/notebook-canvas.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file extensions/sentry-triage/components/page.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file extensions/release-notes-showcase/releaseNotesShowcase.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file extensions/site-studio/extension.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file 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 extensions/foundry-agentic-loop-canvas/public/app.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file extensions/repo-actions-hub/extension.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file 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 extensions/sentry-triage/styles.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file extensions/gesture-review/extension.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file extensions/work-hub/data.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file extensions/work-hub/renderer.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file extensions/flight-map-canvas/game/app.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file extensions/java-modernization-studio/renderer.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file extensions/arcade-canvas/game/hud.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file extensions/chronicle-stats/insight-view.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • + 7 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED · ×29
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 4 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED · ×15
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×9
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
R4 · Test Coverage · This test file cannot be loaded · ×8
  • This test file cannot be loaded eng/board-state-storage.test.mjs:10 — eng/board-state-storage.test.mjs:10 imports '../.github/extensions/', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded eng/duplicate-review-board-access.test.mjs:8 — eng/duplicate-review-board-access.test.mjs:8 imports '../.github/extensions/duplicate-review-board/', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded eng/duplicate-review-board-background.test.mjs:9 — eng/duplicate-review-board-background.test.mjs:9 imports '../.github/extensions/duplicate-review-board/', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded eng/duplicate-review-board.test.mjs:14 — eng/duplicate-review-board.test.mjs:14 imports '../.github/extensions/duplicate-review-board/', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded eng/resource-staleness-backend.test.mjs:15 — eng/resource-staleness-backend.test.mjs:15 imports '../.github/extensions/resource-staleness-board/', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded REDACTED:16 — REDACTED:16 imports '../.github/extensions/resource-staleness-board/', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded extensions/foundry-agentic-loop-workflow/tests/workflow.test.mjs:732 — extensions/foundry-agentic-loop-workflow/tests/workflow.test.mjs:732 imports '../../foundry-agentic-loop-canvas/lib/', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded skills/webmcpify/tests/workbench-cli.test.mjs:43 — skills/webmcpify/tests/workbench-cli.test.mjs:43 imports '../templates', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
D1 · Cyclomatic Complexity · main.main (cyclomatic 19) · ×7
  • main.main (cyclomatic 19) cookbook/copilot-sdk/go/recipe/accessibility-report.go:14 — main.main has cyclomatic complexity 19 (threshold 15). Of this number, 14 points are the body's own statements and 5 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.
  • main.main (cyclomatic 19) cookbook/copilot-sdk/go/recipe/error-handling.go:11 — main.main has cyclomatic complexity 19 (threshold 15). Of this number, 14 points are the body's own statements and 5 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.
  • main.main (cyclomatic 19) cookbook/copilot-sdk/go/recipe/managing-local-files.go:13 — main.main has cyclomatic complexity 19 (threshold 15). Of this number, 14 points are the body's own statements and 5 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.
  • main.main (cyclomatic 19) cookbook/copilot-sdk/go/recipe/multiple-sessions.go:11 — main.main has cyclomatic complexity 19 (threshold 15). Of this number, 14 points are the body's own statements and 5 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.
  • main.main (cyclomatic 19) cookbook/copilot-sdk/go/recipe/persisting-sessions.go:11 — main.main has cyclomatic complexity 19 (threshold 15). Of this number, 14 points are the body's own statements and 5 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.
  • main.main (cyclomatic 19) cookbook/copilot-sdk/go/recipe/pr-visualization.go:61 — main.main has cyclomatic complexity 19 (threshold 15). Of this number, 14 points are the body's own statements and 5 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.
  • main.main (cyclomatic 19) cookbook/copilot-sdk/go/recipe/ralph-loop.go:96 — main.main has cyclomatic complexity 19 (threshold 15). Of this number, 14 points are the body's own statements and 5 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.
D2 · Cognitive Complexity · main.main (cognitive 23) · ×7
  • main.main (cognitive 23) cookbook/copilot-sdk/go/recipe/accessibility-report.go:14 — main.main has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (12 pts), match/switch 5 (9 pts), boolean chains 2 (nesting depth added 7). Of this number, 18 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.
  • main.main (cognitive 23) cookbook/copilot-sdk/go/recipe/error-handling.go:11 — main.main has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (12 pts), match/switch 5 (9 pts), boolean chains 2 (nesting depth added 7). Of this number, 18 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.
  • main.main (cognitive 23) cookbook/copilot-sdk/go/recipe/managing-local-files.go:13 — main.main has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (12 pts), match/switch 5 (9 pts), boolean chains 2 (nesting depth added 7). Of this number, 18 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.
  • main.main (cognitive 23) cookbook/copilot-sdk/go/recipe/multiple-sessions.go:11 — main.main has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (12 pts), match/switch 5 (9 pts), boolean chains 2 (nesting depth added 7). Of this number, 18 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.
  • main.main (cognitive 23) cookbook/copilot-sdk/go/recipe/persisting-sessions.go:11 — main.main has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (12 pts), match/switch 5 (9 pts), boolean chains 2 (nesting depth added 7). Of this number, 18 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.
  • main.main (cognitive 23) cookbook/copilot-sdk/go/recipe/pr-visualization.go:61 — main.main has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (12 pts), match/switch 5 (9 pts), boolean chains 2 (nesting depth added 7). Of this number, 18 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.
  • main.main (cognitive 23) cookbook/copilot-sdk/go/recipe/ralph-loop.go:96 — main.main has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (12 pts), match/switch 5 (9 pts), boolean chains 2 (nesting depth added 7). Of this number, 18 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.
D1 · Cyclomatic Complexity · renderer.clientMain · ×5
  • renderer.clientMain::overviewTab (cyclomatic 30) extensions/java-modernization-studio/renderer.mjs:255 — renderer.clientMain::overviewTab has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 4 other methods here (renderer.clientMain::heroNext, renderer.clientMain::findingActions, renderer.clientMain::planTab, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 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.
  • renderer.clientMain::renderHeader (cyclomatic 19) extensions/java-modernization-studio/renderer.mjs:900 — renderer.clientMain::renderHeader 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. This shape REPEATS in the file: 4 other methods here (renderer.clientMain::overviewTab, renderer.clientMain::heroNext, renderer.clientMain::findingActions, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 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.
  • renderer.clientMain::planTab (cyclomatic 17) extensions/java-modernization-studio/renderer.mjs:598 — renderer.clientMain::planTab has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 4 other methods here (renderer.clientMain::overviewTab, renderer.clientMain::heroNext, renderer.clientMain::findingActions, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 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.
  • renderer.clientMain::heroNext (cyclomatic 16) extensions/java-modernization-studio/renderer.mjs:389 — renderer.clientMain::heroNext has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: 4 other methods here (renderer.clientMain::overviewTab, renderer.clientMain::findingActions, renderer.clientMain::planTab, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 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.
  • renderer.clientMain::findingActions (cyclomatic 16) extensions/java-modernization-studio/renderer.mjs:477 — renderer.clientMain::findingActions has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: 4 other methods here (renderer.clientMain::overviewTab, renderer.clientMain::heroNext, renderer.clientMain::planTab, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 5 times rather than 5 independent problems. Splitting this body alone leaves the other 4 exactly as they are. Where these are variations on one operation, the change that clears all 5 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.
R10 · Code Duplication · Duplicated block (22 lines × 2 locations) · ×5
  • Duplicated block (22 lines × 2 locations) eng/external-plugin-approval.mjs:15 — eng/external-plugin-approval.mjs:15 · REDACTED:19 — 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.
  • Duplicated block (22 lines × 2 locations) REDACTED:20373 — REDACTED:20373 · REDACTED:20415 — 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 (22 lines × 2 locations) REDACTED:22227 — REDACTED:22227 · REDACTED:22263 — 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 (22 lines × 2 locations) REDACTED:37875 — REDACTED:37875 · REDACTED:38741 — 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 (22 lines × 2 locations) extensions/work-hub/extension.mjs:299 — extensions/work-hub/extension.mjs:299 · extensions/work-hub/extension.mjs:326 — 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.
D1 · Cyclomatic Complexity · pointer.attachPointer · ×4
  • pointer.attachPointer::finish (cyclomatic 37) extensions/draw/public/pointer.js:361 — pointer.attachPointer::finish has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 3 other methods here (pointer.attachPointer::cursorFor, pointer.attachPointer::down, pointer.attachPointer::dragMove) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
  • pointer.attachPointer::down (cyclomatic 27) extensions/draw/public/pointer.js:109 — pointer.attachPointer::down has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 3 other methods here (pointer.attachPointer::cursorFor, pointer.attachPointer::dragMove, pointer.attachPointer::finish) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
  • pointer.attachPointer::cursorFor (cyclomatic 18) extensions/draw/public/pointer.js:47 — pointer.attachPointer::cursorFor has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 3 other methods here (pointer.attachPointer::down, pointer.attachPointer::dragMove, pointer.attachPointer::finish) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
  • pointer.attachPointer::dragMove (cyclomatic 18) extensions/draw/public/pointer.js:208 — pointer.attachPointer::dragMove has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 3 other methods here (pointer.attachPointer::cursorFor, pointer.attachPointer::down, pointer.attachPointer::finish) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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 · attachPointer · ×4
  • attachPointer::finish (cognitive 54) extensions/draw/public/pointer.js:361 — attachPointer::finish has cognitive complexity 54 (threshold 15). Drivers by points: if/else 22 (32 pts), ternaries 6 (14 pts), boolean chains 7, error handling 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.
  • attachPointer::down (cognitive 38) extensions/draw/public/pointer.js:109 — attachPointer::down has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (24 pts), ternaries 5 (10 pts), boolean chains 4 (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.
  • attachPointer::dragMove (cognitive 29) extensions/draw/public/pointer.js:208 — attachPointer::dragMove has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 3 (8 pts), ternaries 2 (4 pts), boolean chains 3 (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.
  • attachPointer::hoverAt (cognitive 16) extensions/draw/public/pointer.js:65 — attachPointer::hoverAt has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 4, ternaries 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 · clientMain · ×4
  • clientMain::overviewTab (cognitive 29) extensions/java-modernization-studio/renderer.mjs:255 — clientMain::overviewTab has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 11, ternaries 10 (11 pts), if/else 6 (7 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • clientMain::renderHeader (cognitive 24) extensions/java-modernization-studio/renderer.mjs:900 — clientMain::renderHeader has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 12 (17 pts), boolean chains 5, if/else 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • clientMain::assessmentTab (cognitive 19) extensions/java-modernization-studio/renderer.mjs:324 — clientMain::assessmentTab has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 6, boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • clientMain::planTab (cognitive 17) extensions/java-modernization-studio/renderer.mjs:598 — clientMain::planTab has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, ternaries 5 (7 pts), if/else 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D29 · Static Analysis (SAST) · REDACTED · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×4
  • Duplicated block (10 lines × 2) skills/convert-excel-to-md/scripts/convert_excel_to_md.py:262 — skills/convert-excel-to-md/scripts/convert_excel_to_md.py:262-271 | skills/convert-pdf-to-md/scripts/convert_pdf_to_md.py:227-236 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) skills/datanalysis-credit-risk/references/analysis.py:1117 — skills/datanalysis-credit-risk/references/analysis.py:1117-1126 | skills/datanalysis-credit-risk/references/analysis.py:1141-1150 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `skills/datanalysis-credit-risk/references/analysis.py:1117` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) skills/quality-playbook/quality_gate.py:1074 — skills/quality-playbook/quality_gate.py:1074-1083 | skills/quality-playbook/quality_gate.py:1085-1094 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) skills/quality-playbook/quality_gate.py:2889 — skills/quality-playbook/quality_gate.py:2889-2898 | skills/quality-playbook/quality_gate.py:2901-2910 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `skills/quality-playbook/quality_gate.py:2889` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D15 · Churn × Complexity Hotspots · Repeated repair · ×3
  • Repeated repair: .github/extensions/resource-staleness-board/lib/work.mjs .github/extensions/resource-staleness-board/lib/work.mjs:35 — .github/extensions/resource-staleness-board/lib/work.mjs changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is buildWorkPrompt at line 35), 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(canvas): coordinate scans and qualify child evidence”; “fix(canvas): omit prepared summaries from child prompts”; “fix(canvas): bound reads and preserve live review updates”; “fix(canvas): bound reviews and reconcile shared lifecycle”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 10:53:23 +11:00' --until='2026-10-29 10:53:23 +11:00' --full-history --no-merges -- .github/extensions/resource-staleness-board/lib/work.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: .github/extensions/duplicate-review-board/lib/publish.mjs .github/extensions/duplicate-review-board/lib/publish.mjs:33 — .github/extensions/duplicate-review-board/lib/publish.mjs changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is preview at line 33), 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(canvas): preserve notice classification in board recovery”; “fix(canvas): classify expected notices across handoff capture”; “fix(canvas): preserve duplicate review freshness and editor scope”; “fix(canvas): harden duplicate review state and publication”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 10:53:23 +11:00' --until='2026-10-29 10:53:23 +11:00' --full-history --no-merges -- .github/extensions/duplicate-review-board/lib/publish.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: eng/external-plugin-intake-state.mjs eng/external-plugin-intake-state.mjs:69 — eng/external-plugin-intake-state.mjs 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 5 (its worst body is external-plugin-intake-state.syncExternalPluginIntakeLabels at line 69), 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(external-plugins): prevent false fast-track approvals”; “fix(external-plugins): preserve cards during intake”; “fix(external-plugins): block approval during intake reruns”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 10:53:23 +11:00' --until='2026-10-29 10:53:23 +11:00' --full-history --no-merges -- eng/external-plugin-intake-state.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D29 · Static Analysis (SAST) · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D3 · God Classes · ClassTooLong · ×3
  • ClassTooLong: CopilotConfigurationBasics website/src/components/brand/learning-hub/CopilotConfigurationBasics.tsx:1 — ClassTooLong — 681 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 281 over it, 1.70× 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: Editor extensions/draw/public/editor.js:40 — ClassTooLong — 514 significant lines (blank, comment-only and punctuation-only lines excluded), 62 methods. The bar is 400 significant lines; this is 114 over it, 1.29× 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: AgentsAndSubagents website/src/components/brand/learning-hub/AgentsAndSubagents.tsx:1 — ClassTooLong — 431 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 31 over it, 1.08× 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.
D35 · Change Coupling · Change coupling · ×3
  • Change coupling: external-plugin-intake.mjs ↔ external-plugin-quality-gates.mjs eng/external-plugin-intake.mjs:1 — `eng/external-plugin-intake.mjs` and `eng/external-plugin-quality-gates.mjs` change together 67% of the time (8 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `d6faa1a3` fix(external-plugins): enforce blocking quality gates; `a89cd67e` Publish full external plugin quality gate logs (#3668); `2ba72cd1` Fix external canvas extension validation (#2928) — run `git show` on any of them.
  • Change coupling: state.mjs ↔ REDACTED .github/extensions/open-pr-board/lib/state.mjs:1 — `.github/extensions/open-pr-board/lib/state.mjs` and `.github/extensions/open-pr-board/public/app.js` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `e16a103e` fix(canvas): preserve notice classification in board recovery; `f9c05ffc` fix(pr-board): preserve heads across delayed actions and moves; `4e8cb448` fix(boards): retain approval commit provenance across refreshes — run `git show` on any of them.
  • Change coupling: state.mjs ↔ REDACTED .github/extensions/external-plugin-review-board/lib/state.mjs:1 — `.github/extensions/external-plugin-review-board/lib/state.mjs` and `REDACTED` change together 57% of the time (8 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `e16a103e` fix(canvas): preserve notice classification in board recovery; `c007a44a` fix(review-board): harden fixes actions and drafts; `6474ff2e` fix(plugin-board): clarify intake-blocked review eligibility — run `git show` on any of them.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×3
  • Duplicated block (11 lines × 2) skills/quality-playbook/quality_gate.py:183 — skills/quality-playbook/quality_gate.py:183-194 | skills/quality-playbook/quality_gate.py:214-224 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) skills/quality-playbook/quality_gate.py:3039 — skills/quality-playbook/quality_gate.py:3039-3049 | skills/quality-playbook/quality_gate.py:3091-3101 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) cookbook/copilot-sdk/go/recipe/managing-local-files.go:27 — cookbook/copilot-sdk/go/recipe/managing-local-files.go:27-37 | cookbook/copilot-sdk/go/recipe/pr-visualization.go:122-132 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `cookbook/copilot-sdk/go/recipe/managing-local-files.go:27` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×3
  • Duplicated block (5 lines × 2) skills/convert-excel-to-md/scripts/convert_excel_to_md.py:262 — skills/convert-excel-to-md/scripts/convert_excel_to_md.py:262-266 | skills/convert-word-to-md/scripts/convert_word_to_md.py:210-214 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `skills/convert-excel-to-md/scripts/convert_excel_to_md.py:268` calls `sum`, `values` and `skills/convert-word-to-md/scripts/convert_word_to_md.py:216` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 2) skills/docs-sync-audit/scripts/docs_drift.py:443 — skills/docs-sync-audit/scripts/docs_drift.py:443-447 | skills/test-gap-audit/scripts/coverage_map.py:384-391 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `skills/docs-sync-audit/scripts/docs_drift.py:443` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) skills/agent-skill-stack/scripts/skill_index.py:60 — skills/agent-skill-stack/scripts/skill_index.py:60-64 | skills/agent-skill-stack/scripts/stage_install.py:56-60 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
R10 · Code Duplication · Duplicated block with local edits (22 matched lines × 2 locations) · ×3
  • Duplicated block with local edits (22 matched lines × 2 locations) extensions/agent-radar/extension.mjs:140 — extensions/agent-radar/extension.mjs:140 · extensions/ai-credits-breakdown/extension.mjs:41 — the two spans are one implementation copied and then locally edited — 110 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 (22 matched lines × 2 locations) extensions/agent-radar/extension.mjs:143 — extensions/agent-radar/extension.mjs:143 · extensions/site-studio/extension.mjs:2287 — the two spans are one implementation copied and then locally edited — 124 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 (22 matched lines × 2 locations) REDACTED:912 — REDACTED:912 · extensions/release-notes-showcase/releaseNotesShowcase.mjs:2225 — the two spans are one implementation copied and then locally edited — 97 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.
D1 · Cyclomatic Complexity · mutation-journal.validateJournals (cyclomatic 31) · ×2
  • mutation-journal.validateJournals (cyclomatic 31) skills/webmcpify/templates/mutation-journal.js:108 — mutation-journal.validateJournals has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • mutation-journal.validateJournals (cyclomatic 31) skills/webmcpify/templates/mutation-journal.ts:191 — mutation-journal.validateJournals has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · createErrorHandoffRuntime · ×2
  • createErrorHandoffRuntime::handle (cyclomatic 30) eng/canvas-error-handoff/runtime.mjs:298 — createErrorHandoffRuntime::handle 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.
  • createErrorHandoffRuntime::writeHead (cyclomatic 17) eng/canvas-error-handoff/runtime.mjs:404 — createErrorHandoffRuntime::writeHead 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 · makeHandler · ×2
  • makeHandler::handleRequest (cyclomatic 23) REDACTED:312 — makeHandler::handleRequest 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.
  • makeHandler::handler (cyclomatic 19) extensions/java-modernization-studio/server.mjs:221 — makeHandler::handler 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 · (anonymous) (cyclomatic 21) · ×2
  • (anonymous) (cyclomatic 21) .github/extensions/duplicate-review-board/lib/state.mjs:96 — (anonymous) has cyclomatic complexity 21 (threshold 15). 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 98, 99, 117, …). 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.
  • (anonymous) (cyclomatic 21) extensions/foundry-agentic-loop-canvas/public/deck.js:63 — (anonymous) 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 · index-_8h8h3EK.tokenizeHtmlFlow · ×2
  • index-_8h8h3EK.tokenizeHtmlFlow::tagName (cyclomatic 17) REDACTED:37785 — index-_8h8h3EK.tokenizeHtmlFlow::tagName has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (index-_8h8h3EK.tokenizeHtmlFlow::continuation) 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.
  • index-_8h8h3EK.tokenizeHtmlFlow::continuation (cyclomatic 16) REDACTED:38051 — index-_8h8h3EK.tokenizeHtmlFlow::continuation has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: one other method here (index-_8h8h3EK.tokenizeHtmlFlow::tagName) 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 · (anonymous) (cognitive 70) · ×2
  • (anonymous) (cognitive 70) REDACTED:6144 — (anonymous) has cognitive complexity 70 (threshold 15). Drivers by points: if/else 50 (56 pts), boolean chains 6, other 6, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • (anonymous) (cognitive 70) REDACTED:6548 — (anonymous) has cognitive complexity 70 (threshold 15). Drivers by points: if/else 22 (37 pts), boolean chains 20, ternaries 5 (12 pts), other 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 · mutation-journal.validateJournals (cognitive 64) · ×2
  • mutation-journal.validateJournals (cognitive 64) skills/webmcpify/templates/mutation-journal.js:108 — mutation-journal.validateJournals has cognitive complexity 64 (threshold 15). Drivers by points: if/else 11 (28 pts), ternaries 7 (24 pts), loops 4 (7 pts), boolean chains 5 (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • mutation-journal.validateJournals (cognitive 64) skills/webmcpify/templates/mutation-journal.ts:191 — mutation-journal.validateJournals has cognitive complexity 64 (threshold 15). Drivers by points: if/else 11 (28 pts), ternaries 7 (24 pts), loops 4 (7 pts), boolean chains 5 (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createErrorHandoffRuntime · ×2
  • createErrorHandoffRuntime::handle (cognitive 33) eng/canvas-error-handoff/runtime.mjs:298 — createErrorHandoffRuntime::handle has cognitive complexity 33 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 5, error handling 3 (5 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.
  • createErrorHandoffRuntime::writeHead (cognitive 17) eng/canvas-error-handoff/runtime.mjs:404 — createErrorHandoffRuntime::writeHead has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (7 pts), boolean chains 6, loops 1 (3 pts), ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · makeHandler · ×2
  • makeHandler::handleRequest (cognitive 29) REDACTED:312 — makeHandler::handleRequest has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 8, error handling 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.
  • makeHandler::handler (cognitive 23) extensions/java-modernization-studio/server.mjs:221 — makeHandler::handler has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 7, error handling 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · extension.handleRequest (cognitive 21) · ×2
  • extension.handleRequest (cognitive 21) extensions/repo-actions-hub/extension.mjs:206 — extension.handleRequest has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 8 (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.
  • extension.handleRequest (cognitive 21) extensions/tiny-tool-town-submitter/extension.mjs:386 — extension.handleRequest has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 10, if/else 8, ternaries 1 (2 pts), error handling 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · renderBrowser · ×2
  • renderBrowser::applyLayout (cognitive 21) REDACTED:805 — renderBrowser::applyLayout has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 4 (7 pts), boolean chains 6, if/else 5 (6 pts), error handling 1, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • renderBrowser::load (cognitive 17) REDACTED:891 — renderBrowser::load has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), error handling 2, ternaries 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 · (anonymous) (cognitive 19) · ×2
  • (anonymous) (cognitive 19) REDACTED:5918 — (anonymous) has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 2 (6 pts), boolean chains 3, error handling 1 (3 pts) (nesting depth added 8). Of this number, 15 points are the body's own statements and 4 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.
  • (anonymous) (cognitive 19) extensions/arcade-canvas/game/hud.js:246 — (anonymous) has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (12 pts), error handling 5 (7 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D3 · God Classes · TooManyMethods · ×2
  • TooManyMethods: Editor extensions/draw/public/editor.js:40 — TooManyMethods — 62 methods. The bar is 30 methods; this is 32 over it, 2.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: StateStore extensions/github-security/extension.mjs:9895 — TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× 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.
D30 · Dependency Vulnerabilities · Medium CVE · ×2
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×2
  • Duplicated block (13 lines × 2) skills/winmd-api-search/scripts/cache-generator/Program.cs:571 — skills/winmd-api-search/scripts/cache-generator/Program.cs:571-583 | skills/winmd-api-search/scripts/cache-generator/Program.cs:654-666 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `skills/winmd-api-search/scripts/cache-generator/Program.cs:571` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (13 lines × 2) skills/excalidraw-diagram-generator/scripts/add-arrow.py:235 — skills/excalidraw-diagram-generator/scripts/add-arrow.py:235-247 | skills/excalidraw-diagram-generator/scripts/add-icon-to-diagram.py:331-343 — before extracting anything, compare `skills/excalidraw-diagram-generator/scripts/add-arrow.py` and `skills/excalidraw-diagram-generator/scripts/add-icon-to-diagram.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×2
  • Duplicated block (17 lines × 2) skills/agent-skill-stack/scripts/inventory_skills.py:219 — skills/agent-skill-stack/scripts/inventory_skills.py:219-235 | skills/agent-skill-stack/scripts/skill_index.py:123-139 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (17 lines × 2) skills/datanalysis-credit-risk/references/analysis.py:727 — skills/datanalysis-credit-risk/references/analysis.py:727-743 | skills/datanalysis-credit-risk/references/analysis.py:778-794 — 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 `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×2
  • Duplicated block (12 lines × 3) skills/convert-excel-to-md/scripts/convert_excel_to_md.py:275 — skills/convert-excel-to-md/scripts/convert_excel_to_md.py:275-286 | skills/convert-pdf-to-md/scripts/convert_pdf_to_md.py:240-251 | skills/convert-word-to-md/scripts/convert_word_to_md.py:222-233 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 3) skills/convert-excel-to-md/scripts/convert_excel_to_md.py:74 — skills/convert-excel-to-md/scripts/convert_excel_to_md.py:74-85 | skills/convert-pdf-to-md/scripts/convert_pdf_to_md.py:66-77 | skills/convert-word-to-md/scripts/convert_word_to_md.py:66-77 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×2
  • Duplicated block (6 lines × 2) REDACTED:278 — REDACTED:278-283 | REDACTED:292-297 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:278` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:298` calls `get` and `REDACTED:284` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) skills/docs-sync-audit/scripts/docs_drift.py:126 — skills/docs-sync-audit/scripts/docs_drift.py:126-131 | skills/test-gap-audit/scripts/coverage_map.py:145-150 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. 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.
R10 · Code Duplication · Duplicated block with local edits (38 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (38 matched lines × 2 locations) eng/yaml-parser.mjs:114 — eng/yaml-parser.mjs:114 · eng/yaml-parser.mjs:176 — the two spans are one implementation copied and then locally edited — 234 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.
  • Duplicated block with local edits (38 matched lines × 2 locations) extensions/color-orb/extension.mjs:19 — extensions/color-orb/extension.mjs:19 · extensions/gesture-review/extension.mjs:113 — the two spans are one implementation copied and then locally edited — 277 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 (26 lines × 2 locations) · ×2
  • Duplicated block (26 lines × 2 locations) REDACTED:47950 — REDACTED:47950 · REDACTED:48055 — 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 (26 lines × 2 locations) extensions/pr-artifact-explorer/github.mjs:201 — extensions/pr-artifact-explorer/github.mjs:201 · extensions/pr-artifact-explorer/github.mjs:228 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication · Duplicated block (23 lines × 2 locations) · ×2
  • Duplicated block (23 lines × 2 locations) eng/external-plugin-intake.mjs:1170 — eng/external-plugin-intake.mjs:1170 · eng/external-plugin-intake.mjs:1200 — 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 (23 lines × 2 locations) skills/latchshot-page-capture/scripts/latchshot.mjs:385 — skills/latchshot-page-capture/scripts/latchshot.mjs:385 · skills/latchshot-page-capture/scripts/latchshot.mjs:436 — 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.
R11 · Import Boundaries · Boundary violation [package · ×2
  • Boundary violation [package:third-party-deep-import] eng/agent-plugin-schema.mjs:1 — eng/agent-plugin-schema.mjs:1 imports ajv/dist/2020.js, 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.
  • Boundary violation [package:test-cross-package-internals] extensions/foundry-agentic-loop-workflow/tests/evals-runner.test.mjs:9 — extensions/foundry-agentic-loop-workflow/tests/evals-runner.test.mjs:9 reaches past another workspace package's public entry into its internals with a relative path (../../../skills/foundry-agentic-loop/scripts/evals.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
R7 · Dead Code · Dead file (~167 LoC) · ×2
  • Dead file (~167 LoC) extensions/agent-radar/extension.mjs — no import path from any entry point (156 application, 33 tooling, 103 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
  • Dead file (~167 LoC) extensions/modernization-workflow/extension.mjs — no import path from any entry point (156 application, 33 tooling, 103 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
X3 · Exception handling · Swallowed exception (empty catch) · ×2
  • Swallowed exception (empty catch) skills/winmd-api-search/scripts/cache-generator/Program.cs:487 — 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) skills/winmd-api-search/scripts/cache-generator/Program.cs:765 — 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.
D1 · Cyclomatic Complexity · handleApi (cyclomatic 232) · ×1
  • handleApi (cyclomatic 232) REDACTED:499 — handleApi has cyclomatic complexity 232 (threshold 15). Of this number, 230 points are the body's own statements and 2 belong to 14 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 · index-_8h8h3EK.UnwrappedItem (cyclomatic 225) · ×1
  • index-_8h8h3EK.UnwrappedItem (cyclomatic 225) REDACTED:19508 — index-_8h8h3EK.UnwrappedItem has cyclomatic complexity 225 (threshold 15). Of this number, 216 points are the body's own statements and 9 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Virtualizer.constructor (cyclomatic 215) · ×1
  • Virtualizer.constructor (cyclomatic 215) REDACTED:20627 — Virtualizer.constructor has cyclomatic complexity 215 (threshold 15). Of this number, 56 points are the body's own statements and 159 belong to 36 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index-_8h8h3EK.Panel (cyclomatic 194) · ×1
  • index-_8h8h3EK.Panel (cyclomatic 194) REDACTED:26848 — index-_8h8h3EK.Panel has cyclomatic complexity 194 (threshold 15). Of this number, 61 points are the body's own statements and 133 belong to 37 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 · index-_8h8h3EK.focusZone (cyclomatic 177) · ×1
  • index-_8h8h3EK.focusZone (cyclomatic 177) REDACTED:14386 — index-_8h8h3EK.focusZone has cyclomatic complexity 177 (threshold 15). Of this number, 52 points are the body's own statements and 125 belong to 16 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 · index-_8h8h3EK.TextInputWithTokensInnerComponent (cyclomatic 176) · ×1
  • index-_8h8h3EK.TextInputWithTokensInnerComponent (cyclomatic 176) REDACTED:27871 — index-_8h8h3EK.TextInputWithTokensInnerComponent has cyclomatic complexity 176 (threshold 15). Of this number, 148 points are the body's own statements and 28 belong to 9 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index-_8h8h3EK.FilteredActionList$1 (cyclomatic 132) · ×1
  • index-_8h8h3EK.FilteredActionList$1 (cyclomatic 132) REDACTED:21638 — index-_8h8h3EK.FilteredActionList$1 has cyclomatic complexity 132 (threshold 15). Of this number, 25 points are the body's own statements and 107 belong to 20 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 · contract.inspectMapContract (cyclomatic 122) · ×1
  • contract.inspectMapContract (cyclomatic 122) skills/build-evidence-map/scripts/contract.mjs:110 — contract.inspectMapContract has cyclomatic complexity 122 (threshold 15). Of this number, 116 points are the body's own statements and 6 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 · index-_8h8h3EK.AutocompleteMenu (cyclomatic 117) · ×1
  • index-_8h8h3EK.AutocompleteMenu (cyclomatic 117) REDACTED:24424 — index-_8h8h3EK.AutocompleteMenu has cyclomatic complexity 117 (threshold 15). Of this number, 94 points are the body's own statements and 23 belong to 9 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · applyEvent (cyclomatic 110) · ×1
  • applyEvent (cyclomatic 110) extensions/agent-radar/collector.mjs:278 — applyEvent has cyclomatic complexity 110 (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 · shapeIssueDetail (cyclomatic 108) · ×1
  • shapeIssueDetail (cyclomatic 108) extensions/sentry-triage/sentryClient.mjs:416 — shapeIssueDetail has cyclomatic complexity 108 (threshold 15). Of this number, 63 points are the body's own statements and 45 belong to 14 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index-_8h8h3EK.AnchoredOverlay (cyclomatic 105) · ×1
  • index-_8h8h3EK.AnchoredOverlay (cyclomatic 105) REDACTED:22768 — index-_8h8h3EK.AnchoredOverlay has cyclomatic complexity 105 (threshold 15). Of this number, 54 points are the body's own statements and 51 belong to 13 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 · keys.attachKeys (cyclomatic 89) · ×1
  • keys.attachKeys (cyclomatic 89) extensions/draw/public/keys.js:9 — keys.attachKeys has cyclomatic complexity 89 (threshold 15). Most of this is not in the body itself: 1 of the 89 points is its own statement and the rest belongs to 9 function items inside it that branch (a function literal at line 26, typing, a function literal at line 126, …). 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 · layout.layeredLayout (cyclomatic 88) · ×1
  • layout.layeredLayout (cyclomatic 88) extensions/draw/lib/layout.mjs:94 — layout.layeredLayout has cyclomatic complexity 88 (threshold 15). Of this number, 62 points are the body's own statements and 26 belong to 11 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 · onWorkSelected (cyclomatic 85) · ×1
  • onWorkSelected (cyclomatic 85) REDACTED:1472 — onWorkSelected has cyclomatic complexity 85 (threshold 15). Of this number, 81 points are the body's own statements and 4 belong to 8 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 · index-_8h8h3EK.Textarea (cyclomatic 82) · ×1
  • index-_8h8h3EK.Textarea (cyclomatic 82) REDACTED:28439 — index-_8h8h3EK.Textarea has cyclomatic complexity 82 (threshold 15). Of this number, 79 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index-_8h8h3EK.tokenizeHtmlText (cyclomatic 81) · ×1
  • index-_8h8h3EK.tokenizeHtmlText (cyclomatic 81) REDACTED:38359 — index-_8h8h3EK.tokenizeHtmlText has cyclomatic complexity 81 (threshold 15). Most of this is not in the body itself: 1 of the 81 points is its own statement and the rest belongs to 26 function items inside it that branch (tagOpenAttributeValueBefore, tagOpenAttributeValueUnquoted, tagOpenBetween, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · REDACTED.window.addEventListener("DOMContentLoaded") (cyclomatic 79) · ×1
  • REDACTED.window.addEventListener("DOMContentLoaded") (cyclomatic 79) REDACTED:1602 — REDACTED.window.addEventListener("DOMContentLoaded") has cyclomatic complexity 79 (threshold 15). Most of this is not in the body itself: 1 of the 79 points is its own statement and the rest belongs to 16 function literals inside it that branch (lines 1812, 1688, 1648, …). 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 · ui.html.draw (cyclomatic 77) · ×1
  • ui.html.draw (cyclomatic 77) extensions/agent-radar/ui.html:486 — ui.html.draw has cyclomatic complexity 77 (threshold 15). Of this number, 74 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 · ui.html.build (cyclomatic 75) · ×1
  • ui.html.build (cyclomatic 75) extensions/agent-radar/ui.html:220 — ui.html.build has cyclomatic complexity 75 (threshold 15). Of this number, 50 points are the body's own statements and 25 belong to 13 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 · buildFromSpec (cyclomatic 74) · ×1
  • buildFromSpec (cyclomatic 74) extensions/draw/lib/layout.mjs:398 — buildFromSpec has cyclomatic complexity 74 (threshold 15). Of this number, 62 points are the body's own statements and 12 belong to 14 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 · actions.makeActions (cyclomatic 73) · ×1
  • actions.makeActions (cyclomatic 73) extensions/draw/actions.mjs:140 — actions.makeActions has cyclomatic complexity 73 (threshold 15). Most of this is not in the body itself: 1 of the 73 points is its own statement and the rest belongs to 14 function items inside it that branch (a function literal at line 201, a function literal at line 345, a function literal at line 271, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · startServer (cyclomatic 73) · ×1
  • startServer (cyclomatic 73) REDACTED:2551 — startServer has cyclomatic complexity 73 (threshold 15). Most of this is not in the body itself: 3 of the 73 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 2555, a function literal at line 2630, a function literal at line 2587, …). 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 · extension.startServer.server (cyclomatic 71) · ×1
  • extension.startServer.server (cyclomatic 71) REDACTED:2555 — extension.startServer.server 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 · page.Page (cyclomatic 69) · ×1
  • page.Page (cyclomatic 69) extensions/sentry-triage/components/page.mjs:30 — page.Page has cyclomatic complexity 69 (threshold 15). Of this number, 66 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ui.html.renderSidebar (cyclomatic 68) · ×1
  • ui.html.renderSidebar (cyclomatic 68) extensions/agent-radar/ui.html:705 — ui.html.renderSidebar has cyclomatic complexity 68 (threshold 15). Of this number, 30 points are the body's own statements and 38 belong to 9 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 · extension.enrichPlainEnglish (cyclomatic 67) · ×1
  • extension.enrichPlainEnglish (cyclomatic 67) REDACTED:905 — extension.enrichPlainEnglish has cyclomatic complexity 67 (threshold 15). Of this number, 58 points are the body's own statements and 9 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 · index-_8h8h3EK.Tooltip (cyclomatic 65) · ×1
  • index-_8h8h3EK.Tooltip (cyclomatic 65) REDACTED:15228 — index-_8h8h3EK.Tooltip has cyclomatic complexity 65 (threshold 15). Of this number, 19 points are the body's own statements and 46 belong to 13 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · buildLedger (cyclomatic 64) · ×1
  • buildLedger (cyclomatic 64) extensions/ai-credits-breakdown/collector.mjs:501 — buildLedger has cyclomatic complexity 64 (threshold 15). Of this number, 61 points are the body's own statements and 3 belong to 30 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 · parseWorkResult (cyclomatic 63) · ×1
  • parseWorkResult (cyclomatic 63) REDACTED:451 — parseWorkResult has cyclomatic complexity 63 (threshold 15). Of this number, 52 points are the body's own statements and 11 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 · index-_8h8h3EK.Banner$1 (cyclomatic 62) · ×1
  • index-_8h8h3EK.Banner$1 (cyclomatic 62) REDACTED:25445 — index-_8h8h3EK.Banner$1 has cyclomatic complexity 62 (threshold 15). Of this number, 59 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · LearningHubIndex.LearningHubIndexBody (cyclomatic 62) · ×1
  • LearningHubIndex.LearningHubIndexBody (cyclomatic 62) website/src/components/brand/LearningHubIndex.tsx:237 — LearningHubIndex.LearningHubIndexBody has cyclomatic complexity 62 (threshold 15). Of this number, 19 points are the body's own statements and 43 belong to 18 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 61) · ×1
  • (anonymous) (cyclomatic 61) REDACTED:6144 — (anonymous) has cyclomatic complexity 61 (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 · index-_8h8h3EK.CheckboxOrRadioGroup (cyclomatic 60) · ×1
  • index-_8h8h3EK.CheckboxOrRadioGroup (cyclomatic 60) REDACTED:29338 — index-_8h8h3EK.CheckboxOrRadioGroup 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 · extension.validateFinding (cyclomatic 60) · ×1
  • extension.validateFinding (cyclomatic 60) extensions/github-security/extension.mjs:280 — extension.validateFinding has cyclomatic complexity 60 (threshold 15). Of this number, 49 points are the body's own statements and 11 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · menus.attachMenus (cyclomatic 59) · ×1
  • menus.attachMenus (cyclomatic 59) extensions/draw/public/menus.js:44 — menus.attachMenus has cyclomatic complexity 59 (threshold 15). Most of this is not in the body itself: 1 of the 59 points is its own statement and the rest belongs to 19 function items inside it that branch (a function literal at line 96, drawingsAction, exportAs, …). 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 · index-_8h8h3EK.useAnchoredPosition (cyclomatic 59) · ×1
  • index-_8h8h3EK.useAnchoredPosition (cyclomatic 59) REDACTED:22356 — index-_8h8h3EK.useAnchoredPosition has cyclomatic complexity 59 (threshold 15). Most of this is not in the body itself: 13 of the 59 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 22386, a function literal at line 22381, a function literal at line 22369, …). 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 · calloutHtml (cyclomatic 59) · ×1
  • calloutHtml (cyclomatic 59) extensions/foundry-agentic-loop-canvas/public/app.js:1330 — calloutHtml has cyclomatic complexity 59 (threshold 15). Of this number, 56 points are the body's own statements and 3 belong to 7 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 · deriveVSCodeChat (cyclomatic 59) · ×1
  • deriveVSCodeChat (cyclomatic 59) extensions/agent-radar/collector.mjs:772 — deriveVSCodeChat has cyclomatic complexity 59 (threshold 15). Of this number, 57 points are the body's own statements and 2 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 · extension.renderSignalCard (cyclomatic 58) · ×1
  • extension.renderSignalCard (cyclomatic 58) REDACTED:908 — extension.renderSignalCard has cyclomatic complexity 58 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index-_8h8h3EK.Breadcrumbs (cyclomatic 57) · ×1
  • index-_8h8h3EK.Breadcrumbs (cyclomatic 57) REDACTED:26211 — index-_8h8h3EK.Breadcrumbs has cyclomatic complexity 57 (threshold 15). Of this number, 47 points are the body's own statements and 10 belong to 6 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index-_8h8h3EK.Token (cyclomatic 57) · ×1
  • index-_8h8h3EK.Token (cyclomatic 57) REDACTED:27652 — index-_8h8h3EK.Token has cyclomatic complexity 57 (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 · handleCanvasAction (cyclomatic 57) · ×1
  • handleCanvasAction (cyclomatic 57) extensions/jupyter-notebooks/notebook-canvas.mjs:1191 — handleCanvasAction has cyclomatic complexity 57 (threshold 15). Of this number, 31 points are the body's own statements and 26 belong to 19 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 · app.view.addEventListener("click") (cyclomatic 55) · ×1
  • app.view.addEventListener("click") (cyclomatic 55) REDACTED:6144 — app.view.addEventListener("click") has cyclomatic complexity 55 (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 · index-_8h8h3EK.TextInput (cyclomatic 54) · ×1
  • index-_8h8h3EK.TextInput (cyclomatic 54) REDACTED:17818 — index-_8h8h3EK.TextInput has cyclomatic complexity 54 (threshold 15). Of this number, 43 points are the body's own statements and 11 belong to 5 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · extension.handleApi (cyclomatic 54) · ×1
  • extension.handleApi (cyclomatic 54) extensions/site-studio/extension.mjs:1554 — extension.handleApi has cyclomatic complexity 54 (threshold 15). Most of this is not in the body itself: 13 of the 54 points are its own statements and the rest belongs to one function literal inside it that branches (line 1588). 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 · (anonymous) (cyclomatic 54) · ×1
  • (anonymous) (cyclomatic 54) REDACTED:6548 — (anonymous) has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app.view.addEventListener("keydown") (cyclomatic 53) · ×1
  • app.view.addEventListener("keydown") (cyclomatic 53) REDACTED:6548 — app.view.addEventListener("keydown") has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · validate-receipt.validateReceipt (cyclomatic 53) · ×1
  • validate-receipt.validateReceipt (cyclomatic 53) skills/bug-receipt/scripts/validate-receipt.mjs:35 — validate-receipt.validateReceipt has cyclomatic complexity 53 (threshold 15). Of this number, 39 points are the body's own statements and 14 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 · docs_drift.build (cyclomatic 53) · ×1
  • docs_drift.build (cyclomatic 53) skills/docs-sync-audit/scripts/docs_drift.py:265 — docs_drift.build has cyclomatic complexity 53 (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 · runtime.createErrorHandoffRuntime (cyclomatic 52) · ×1
  • runtime.createErrorHandoffRuntime (cyclomatic 52) eng/canvas-error-handoff/runtime.mjs:262 — runtime.createErrorHandoffRuntime 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 · insights.experimentCatalog (cyclomatic 52) · ×1
  • insights.experimentCatalog (cyclomatic 52) extensions/chronicle-stats/insights.mjs:117 — insights.experimentCatalog has cyclomatic complexity 52 (threshold 15). Of this number, 33 points are the body's own statements and 19 belong to 5 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index-_8h8h3EK.UnwrappedList (cyclomatic 52) · ×1
  • index-_8h8h3EK.UnwrappedList (cyclomatic 52) REDACTED:18292 — index-_8h8h3EK.UnwrappedList has cyclomatic complexity 52 (threshold 15). Of this number, 49 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · extension.handleRequest (cyclomatic 52) · ×1
  • extension.handleRequest (cyclomatic 52) extensions/work-hub/extension.mjs:116 — extension.handleRequest has cyclomatic complexity 52 (threshold 15). Of this number, 47 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 · index-_8h8h3EK.AutocompleteInput (cyclomatic 51) · ×1
  • index-_8h8h3EK.AutocompleteInput (cyclomatic 51) REDACTED:24236 — index-_8h8h3EK.AutocompleteInput has cyclomatic complexity 51 (threshold 15). Most of this is not in the body itself: 3 of the 51 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 24273, a function literal at line 24251, a function literal at line 24311, …). 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 · extension.handleRequest (cyclomatic 50) · ×1
  • extension.handleRequest (cyclomatic 50) REDACTED:616 — extension.handleRequest has cyclomatic complexity 50 (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 · scan-cypress.scanFile (cyclomatic 50) · ×1
  • scan-cypress.scanFile (cyclomatic 50) skills/cypress-flake-fixer/scripts/scan-cypress.mjs:267 — scan-cypress.scanFile has cyclomatic complexity 50 (threshold 15). Most of this is not in the body itself: 4 of the 50 points are its own statements and the rest belongs to 10 function items inside it that branch (add, a function literal at line 340, a function literal at line 362, …). 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 · validate_tour.validate_tour (cyclomatic 50) · ×1
  • validate_tour.validate_tour (cyclomatic 50) skills/code-tour/scripts/validate_tour.py:56 — validate_tour.validate_tour has cyclomatic complexity 50 (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 · isPublicAddress (cyclomatic 50) · ×1
  • isPublicAddress (cyclomatic 50) eng/external-plugin-intake.mjs:313 — isPublicAddress has cyclomatic complexity 50 (threshold 15). Of this number, 48 points are the body's own statements and 2 belong to 5 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · startCanvasServer (cyclomatic 50) · ×1
  • startCanvasServer (cyclomatic 50) extensions/windows-app-storage-inspector-cleanup/src/api/server.mjs:55 — startCanvasServer has cyclomatic complexity 50 (threshold 15). Most of this is not in the body itself: 3 of the 50 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 67, 60, 118, …). 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 · generate-website-data.generateCanvasManifest (cyclomatic 49) · ×1
  • generate-website-data.generateCanvasManifest (cyclomatic 49) REDACTED:1167 — generate-website-data.generateCanvasManifest has cyclomatic complexity 49 (threshold 15). Of this number, 47 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 · collectCopilotSession (cyclomatic 49) · ×1
  • collectCopilotSession (cyclomatic 49) extensions/agent-radar/collector.mjs:485 — collectCopilotSession has cyclomatic complexity 49 (threshold 15). Of this number, 40 points are the body's own statements and 9 belong to 9 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index-_8h8h3EK.AutocompleteOverlay (cyclomatic 48) · ×1
  • index-_8h8h3EK.AutocompleteOverlay (cyclomatic 48) REDACTED:24765 — index-_8h8h3EK.AutocompleteOverlay has cyclomatic complexity 48 (threshold 15). Of this number, 41 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · doctor.buildDoctorReport (cyclomatic 48) · ×1
  • doctor.buildDoctorReport (cyclomatic 48) extensions/java-modernization-studio/doctor.mjs:244 — doctor.buildDoctorReport has cyclomatic complexity 48 (threshold 15). Of this number, 46 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · previewArtifactFile (cyclomatic 48) · ×1
  • previewArtifactFile (cyclomatic 48) REDACTED:5049 — previewArtifactFile has cyclomatic complexity 48 (threshold 15). Of this number, 34 points are the body's own statements and 14 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 · classifyRisk (cyclomatic 48) · ×1
  • classifyRisk (cyclomatic 48) REDACTED:152 — classifyRisk has cyclomatic complexity 48 (threshold 15). Of this number, 33 points are the body's own statements and 15 belong to 10 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 · analysis.export_cleaning_report (cyclomatic 47) · ×1
  • analysis.export_cleaning_report (cyclomatic 47) skills/datanalysis-credit-risk/references/analysis.py:972 — analysis.export_cleaning_report has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · installErrorHandoff (cyclomatic 47) · ×1
  • installErrorHandoff (cyclomatic 47) eng/canvas-error-handoff/runtime.mjs:87 — installErrorHandoff has cyclomatic complexity 47 (threshold 15). Most of this is not in the body itself: 3 of the 47 points are its own statements and the rest belongs to 17 function items inside it that branch (fetch, report::onclick, a function literal at line 222, …). 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 · startServer · ×1
  • startServer::handleRequest (cyclomatic 47) extensions/sentry-triage/server.mjs:167 — startServer::handleRequest has cyclomatic complexity 47 (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 · startServer (cyclomatic 47) · ×1
  • startServer (cyclomatic 47) extensions/chronicle-stats/server.mjs:290 — startServer has cyclomatic complexity 47 (threshold 15). Most of this is not in the body itself: 1 of the 47 points is its own statement and the rest belongs to 8 function items inside it that branch (a function literal at line 294, (anonymous)::json, (anonymous)::emit, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · server.startServer.server (cyclomatic 46) · ×1
  • server.startServer.server (cyclomatic 46) extensions/chronicle-stats/server.mjs:294 — server.startServer.server has cyclomatic complexity 46 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index-_8h8h3EK.roundToSingleUnit (cyclomatic 46) · ×1
  • index-_8h8h3EK.roundToSingleUnit (cyclomatic 46) REDACTED:29980 — index-_8h8h3EK.roundToSingleUnit has cyclomatic complexity 46 (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 · extension.startServer (cyclomatic 46) · ×1
  • extension.startServer (cyclomatic 46) REDACTED:1017 — extension.startServer has cyclomatic complexity 46 (threshold 15). Of this number, 28 points are the body's own statements and 18 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · server.startCanvasServer.server (cyclomatic 46) · ×1
  • server.startCanvasServer.server (cyclomatic 46) extensions/windows-app-storage-inspector-cleanup/src/api/server.mjs:67 — server.startCanvasServer.server has cyclomatic complexity 46 (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 · index-_8h8h3EK.Group (cyclomatic 45) · ×1
  • index-_8h8h3EK.Group (cyclomatic 45) REDACTED:18587 — index-_8h8h3EK.Group has cyclomatic complexity 45 (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 · index-_8h8h3EK.AvatarStack (cyclomatic 45) · ×1
  • index-_8h8h3EK.AvatarStack (cyclomatic 45) REDACTED:25258 — index-_8h8h3EK.AvatarStack has cyclomatic complexity 45 (threshold 15). Of this number, 37 points are the body's own statements and 8 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · extension.scanSignals (cyclomatic 45) · ×1
  • extension.scanSignals (cyclomatic 45) REDACTED:616 — extension.scanSignals has cyclomatic complexity 45 (threshold 15). Of this number, 42 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · analyzer.inspectRepository (cyclomatic 45) · ×1
  • analyzer.inspectRepository (cyclomatic 45) extensions/tiny-tool-town-submitter/lib/analyzer.mjs:456 — analyzer.inspectRepository has cyclomatic complexity 45 (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 · data.adjustScore (cyclomatic 45) · ×1
  • data.adjustScore (cyclomatic 45) extensions/work-hub/data.mjs:976 — data.adjustScore has cyclomatic complexity 45 (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 · data.buildFocusItems (cyclomatic 44) · ×1
  • data.buildFocusItems (cyclomatic 44) extensions/work-hub/data.mjs:855 — data.buildFocusItems 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 · quality_gate.check_tdd_logs (cyclomatic 44) · ×1
  • quality_gate.check_tdd_logs (cyclomatic 44) skills/quality-playbook/quality_gate.py:990 — quality_gate.check_tdd_logs 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 · promptFor (cyclomatic 44) · ×1
  • promptFor (cyclomatic 44) extensions/foundry-agentic-loop-canvas/lib/model.mjs:107 — promptFor has cyclomatic complexity 44 (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 · external-plugin-quality-gates.inspectAgentPluginSpecCompliance (cyclomatic 43) · ×1
  • external-plugin-quality-gates.inspectAgentPluginSpecCompliance (cyclomatic 43) eng/external-plugin-quality-gates.mjs:197 — external-plugin-quality-gates.inspectAgentPluginSpecCompliance has cyclomatic complexity 43 (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 · index-_8h8h3EK.ButtonBase (cyclomatic 43) · ×1
  • index-_8h8h3EK.ButtonBase (cyclomatic 43) REDACTED:12917 — index-_8h8h3EK.ButtonBase has cyclomatic complexity 43 (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 · TopNavSearch.TopNavSearch (cyclomatic 43) · ×1
  • TopNavSearch.TopNavSearch (cyclomatic 43) website/src/components/brand/TopNavSearch.tsx:70 — TopNavSearch.TopNavSearch has cyclomatic complexity 43 (threshold 15). Most of this is not in the body itself: 10 of the 43 points are its own statements and the rest belongs to 11 function items inside it that branch (handleInputKeyDown, a function literal at line 162, a function literal at line 278, …). 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 · generatePluginsData (cyclomatic 43) · ×1
  • generatePluginsData (cyclomatic 43) REDACTED:546 — generatePluginsData has cyclomatic complexity 43 (threshold 15). Of this number, 41 points are the body's own statements and 2 belong to 10 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 · extension.tokensToHast (cyclomatic 42) · ×1
  • extension.tokensToHast (cyclomatic 42) extensions/github-security/extension.mjs:7823 — extension.tokensToHast has cyclomatic complexity 42 (threshold 15). Of this number, 28 points are the body's own statements and 14 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 · external-plugin-intake.validateRemoteRepository (cyclomatic 41) · ×1
  • external-plugin-intake.validateRemoteRepository (cyclomatic 41) eng/external-plugin-intake.mjs:591 — external-plugin-intake.validateRemoteRepository has cyclomatic complexity 41 (threshold 15). Of this number, 38 points are the body's own statements and 3 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 · index-_8h8h3EK.compiler · ×1
  • index-_8h8h3EK.compiler::prepareList (cyclomatic 41) REDACTED:41231 — index-_8h8h3EK.compiler::prepareList has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · validate-drawio.validate_file (cyclomatic 41) · ×1
  • validate-drawio.validate_file (cyclomatic 41) skills/draw-io-diagram-generator/scripts/validate-drawio.py:24 — validate-drawio.validate_file has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · quality_gate.validate_cardinality_gate (cyclomatic 41) · ×1
  • quality_gate.validate_cardinality_gate (cyclomatic 41) skills/quality-playbook/quality_gate.py:233 — quality_gate.validate_cardinality_gate has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · handleCanvasRequest (cyclomatic 41) · ×1
  • handleCanvasRequest (cyclomatic 41) REDACTED:950 — handleCanvasRequest has cyclomatic complexity 41 (threshold 15). Of this number, 40 points are the body's own statements and 1 belongs 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 · normalizeReviewRoutingConfig (cyclomatic 41) · ×1
  • normalizeReviewRoutingConfig (cyclomatic 41) eng/review-routing.mjs:84 — normalizeReviewRoutingConfig has cyclomatic complexity 41 (threshold 15). Of this number, 37 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 · index-_8h8h3EK.GroupHeadingImpl (cyclomatic 40) · ×1
  • index-_8h8h3EK.GroupHeadingImpl (cyclomatic 40) REDACTED:18731 — index-_8h8h3EK.GroupHeadingImpl has cyclomatic complexity 40 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index-_8h8h3EK.createTokenizer (cyclomatic 40) · ×1
  • index-_8h8h3EK.createTokenizer (cyclomatic 40) REDACTED:40371 — index-_8h8h3EK.createTokenizer has cyclomatic complexity 40 (threshold 15). Most of this is not in the body itself: 8 of the 40 points are its own statements and the rest belongs to 11 function items inside it that branch (constructFactory::hook::handleMapOfConstructs::start, main, consume, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · buildWorkPrompt (cyclomatic 40) · ×1
  • buildWorkPrompt (cyclomatic 40) REDACTED:562 — buildWorkPrompt has cyclomatic complexity 40 (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 · app.renderGraph (cyclomatic 39) · ×1
  • app.renderGraph (cyclomatic 39) REDACTED:219 — app.renderGraph has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 7 of the 39 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 386, renderCommitLaneGraph, relativeTime, …). 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 · index-_8h8h3EK.IconButton (cyclomatic 39) · ×1
  • index-_8h8h3EK.IconButton (cyclomatic 39) REDACTED:15530 — index-_8h8h3EK.IconButton has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · toHtml (cyclomatic 38) · ×1
  • toHtml (cyclomatic 38) extensions/pr-artifact-explorer/assets/markdown-preview.js:79 — toHtml has cyclomatic complexity 38 (threshold 15). Of this number, 33 points are the body's own statements and 5 belong to 6 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 · index-_8h8h3EK.TextInputBaseWrapper (cyclomatic 37) · ×1
  • index-_8h8h3EK.TextInputBaseWrapper (cyclomatic 37) REDACTED:17432 — index-_8h8h3EK.TextInputBaseWrapper has cyclomatic complexity 37 (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 · prompts.buildPrompt (cyclomatic 37) · ×1
  • prompts.buildPrompt (cyclomatic 37) extensions/java-modernization-studio/prompts.mjs:32 — prompts.buildPrompt has cyclomatic complexity 37 (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 · board.template.html.render (cyclomatic 37) · ×1
  • board.template.html.render (cyclomatic 37) skills/daily-focus-board/assets/board.template.html:318 — board.template.html.render has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 1 of the 37 points is its own statement and the rest belongs to 7 function literals inside it that branch (lines 322, 320, 348, …). 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 · parseRouteUnsafe (cyclomatic 37) · ×1
  • parseRouteUnsafe (cyclomatic 37) REDACTED:780 — parseRouteUnsafe has cyclomatic complexity 37 (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 · applyLive (cyclomatic 37) · ×1
  • applyLive (cyclomatic 37) extensions/foundry-agentic-loop-canvas/public/app.js:1479 — applyLive has cyclomatic complexity 37 (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 · perform (cyclomatic 37) · ×1
  • perform (cyclomatic 37) extensions/foundry-agentic-loop-canvas/extension.mjs:105 — perform has cyclomatic complexity 37 (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 · index-_8h8h3EK._Dialog (cyclomatic 36) · ×1
  • index-_8h8h3EK._Dialog (cyclomatic 36) REDACTED:16613 — index-_8h8h3EK._Dialog has cyclomatic complexity 36 (threshold 15). Of this number, 29 points are the body's own statements and 7 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index-_8h8h3EK.serializer · ×1
  • index-_8h8h3EK.serializer::pair (cyclomatic 36) REDACTED:43094 — index-_8h8h3EK.serializer::pair has cyclomatic complexity 36 (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 · sanitize-html.sanitizeHtml (cyclomatic 36) · ×1
  • sanitize-html.sanitizeHtml (cyclomatic 36) website/src/lib/sanitize-html.ts:77 — sanitize-html.sanitizeHtml has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 12 of the 36 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 116, 95). 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 · eyeball.cmd_setup_check (cyclomatic 36) · ×1
  • eyeball.cmd_setup_check (cyclomatic 36) skills/eyeball/tools/eyeball.py:524 — eyeball.cmd_setup_check 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 · parseReport (cyclomatic 36) · ×1
  • parseReport (cyclomatic 36) extensions/pr-artifact-explorer/assets/trx-preview.js:160 — parseReport has cyclomatic complexity 36 (threshold 15). Of this number, 20 points are the body's own statements and 16 belong to 11 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 · validateAgentPluginMcpConfig (cyclomatic 36) · ×1
  • validateAgentPluginMcpConfig (cyclomatic 36) eng/agent-plugin-schema.mjs:265 — validateAgentPluginMcpConfig 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 · index-_8h8h3EK.shouldIgnoreFocusHandling (cyclomatic 35) · ×1
  • index-_8h8h3EK.shouldIgnoreFocusHandling (cyclomatic 35) REDACTED:14355 — index-_8h8h3EK.shouldIgnoreFocusHandling has cyclomatic complexity 35 (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 · extension.normalizeTheme (cyclomatic 35) · ×1
  • extension.normalizeTheme (cyclomatic 35) extensions/github-security/extension.mjs:3302 — extension.normalizeTheme has cyclomatic complexity 35 (threshold 15). Of this number, 29 points are the body's own statements and 6 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. This is NOT this file's highest cyclomatic complexity: extension.p (cyclomatic 40) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · quality_gate.check_v1_5_0_semantic_check (cyclomatic 35) · ×1
  • quality_gate.check_v1_5_0_semantic_check (cyclomatic 35) skills/quality-playbook/quality_gate.py:2208 — quality_gate.check_v1_5_0_semantic_check has cyclomatic complexity 35 (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 · evaluateSubmission (cyclomatic 35) · ×1
  • evaluateSubmission (cyclomatic 35) REDACTED:822 — evaluateSubmission has cyclomatic complexity 35 (threshold 15). Of this number, 33 points are the body's own statements and 2 belong to 8 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · collectRepo (cyclomatic 35) · ×1
  • collectRepo (cyclomatic 35) extensions/work-hub/data.mjs:662 — collectRepo has cyclomatic complexity 35 (threshold 15). Of this number, 32 points are the body's own statements and 3 belong to 5 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · computeMetrics (cyclomatic 35) · ×1
  • computeMetrics (cyclomatic 35) eng/review-metrics.mjs:157 — computeMetrics has cyclomatic complexity 35 (threshold 15). Of this number, 29 points are the body's own statements and 6 belong to 17 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 · review-routing.resolveWorkflowRunArtifact (cyclomatic 34) · ×1
  • review-routing.resolveWorkflowRunArtifact (cyclomatic 34) eng/review-routing.mjs:816 — review-routing.resolveWorkflowRunArtifact has cyclomatic complexity 34 (threshold 15). Of this number, 30 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · server.handleApi (cyclomatic 34) · ×1
  • server.handleApi (cyclomatic 34) REDACTED:165 — server.handleApi 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 · index-_8h8h3EK.Spinner (cyclomatic 34) · ×1
  • index-_8h8h3EK.Spinner (cyclomatic 34) REDACTED:12618 — index-_8h8h3EK.Spinner has cyclomatic complexity 34 (threshold 15). Of this number, 30 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index-_8h8h3EK.tokenizeCodeFenced (cyclomatic 34) · ×1
  • index-_8h8h3EK.tokenizeCodeFenced (cyclomatic 34) REDACTED:35271 — index-_8h8h3EK.tokenizeCodeFenced 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 13 function items inside it that branch (info, meta, sequenceOpen, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · evaluateApprovals (cyclomatic 34) · ×1
  • evaluateApprovals (cyclomatic 34) REDACTED:279 — evaluateApprovals has cyclomatic complexity 34 (threshold 15). Of this number, 26 points are the body's own statements and 8 belong to 12 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 · buildChartCard (cyclomatic 34) · ×1
  • buildChartCard (cyclomatic 34) REDACTED:1168 — buildChartCard 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 · WinMdParser.ParseMembers (cyclomatic 33) · ×1
  • WinMdParser.ParseMembers (cyclomatic 33) skills/winmd-api-search/scripts/cache-generator/Program.cs:972 — WinMdParser.ParseMembers 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 · ui.html.renderModels (cyclomatic 33) · ×1
  • ui.html.renderModels (cyclomatic 33) extensions/agent-radar/ui.html:796 — ui.html.renderModels has cyclomatic complexity 33 (threshold 15). Of this number, 23 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 · server.createDrawServer.api (cyclomatic 33) · ×1
  • server.createDrawServer.api (cyclomatic 33) REDACTED:236 — server.createDrawServer.api 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 · DurationFormat.constructor (cyclomatic 33) · ×1
  • DurationFormat.constructor (cyclomatic 33) REDACTED:29786 — DurationFormat.constructor has cyclomatic complexity 33 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index-_8h8h3EK.useFocusTrap (cyclomatic 33) · ×1
  • index-_8h8h3EK.useFocusTrap (cyclomatic 33) REDACTED:15737 — index-_8h8h3EK.useFocusTrap has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 9 of the 33 points are its own statements and the rest belongs to 3 function items inside it that branch (disableTrap, a function literal at line 15773, a function literal at line 15755). 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 · index-_8h8h3EK.useMenuInitialFocus (cyclomatic 33) · ×1
  • index-_8h8h3EK.useMenuInitialFocus (cyclomatic 33) REDACTED:22033 — index-_8h8h3EK.useMenuInitialFocus has cyclomatic complexity 33 (threshold 15). Of this number, 17 points are the body's own statements and 16 belong to 7 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · check-imports.main (cyclomatic 33) · ×1
  • check-imports.main (cyclomatic 33) REDACTED:171 — check-imports.main has cyclomatic complexity 33 (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 · jobCardHtml (cyclomatic 33) · ×1
  • jobCardHtml (cyclomatic 33) REDACTED:396 — jobCardHtml has cyclomatic complexity 33 (threshold 15). Of this number, 28 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · installGlobalShortcuts (cyclomatic 33) · ×1
  • installGlobalShortcuts (cyclomatic 33) REDACTED:1143 — installGlobalShortcuts has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 1 of the 33 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 1145, 1178). 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 · getItemDetail (cyclomatic 33) · ×1
  • getItemDetail (cyclomatic 33) extensions/work-hub/data.mjs:1071 — getItemDetail has cyclomatic complexity 33 (threshold 15). Of this number, 29 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · createDrawServer.api (cyclomatic 33) · ×1
  • createDrawServer.api (cyclomatic 33) REDACTED:236 — createDrawServer.api 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 · external-plugin-readme.fetchExternalPluginReadme (cyclomatic 32) · ×1
  • external-plugin-readme.fetchExternalPluginReadme (cyclomatic 32) eng/lib/external-plugin-readme.mjs:8 — external-plugin-readme.fetchExternalPluginReadme 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 · geometry.arrowGeometry (cyclomatic 32) · ×1
  • geometry.arrowGeometry (cyclomatic 32) extensions/draw/lib/geometry.mjs:344 — geometry.arrowGeometry has cyclomatic complexity 32 (threshold 15). Of this number, 31 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 · RelativeTimeElement.update (cyclomatic 32) · ×1
  • RelativeTimeElement.update (cyclomatic 32) REDACTED:30393 — RelativeTimeElement.update has cyclomatic complexity 32 (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 · VFileMessage.constructor (cyclomatic 32) · ×1
  • VFileMessage.constructor (cyclomatic 32) REDACTED:32721 — VFileMessage.constructor has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index-_8h8h3EK.TextInputInnerVisualSlot (cyclomatic 32) · ×1
  • index-_8h8h3EK.TextInputInnerVisualSlot (cyclomatic 32) REDACTED:17341 — index-_8h8h3EK.TextInputInnerVisualSlot has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index-_8h8h3EK.initializeDocument (cyclomatic 32) · ×1
  • index-_8h8h3EK.initializeDocument (cyclomatic 32) REDACTED:34191 — index-_8h8h3EK.initializeDocument has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 1 of the 32 points is its own statement and the rest belongs to 8 function items inside it that branch (writeToChild, documentContinue, checkNewContainers, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · scan-cypress.main (cyclomatic 32) · ×1
  • scan-cypress.main (cyclomatic 32) skills/cypress-flake-fixer/scripts/scan-cypress.mjs:425 — scan-cypress.main has cyclomatic complexity 32 (threshold 15). Of this number, 29 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 · renderPullArtifactRows (cyclomatic 32) · ×1
  • renderPullArtifactRows (cyclomatic 32) REDACTED:3338 — renderPullArtifactRows has cyclomatic complexity 32 (threshold 15). Of this number, 21 points are the body's own statements and 11 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 · checkReadiness (cyclomatic 32) · ×1
  • checkReadiness (cyclomatic 32) extensions/foundry-agentic-loop-canvas/public/app.js:655 — checkReadiness has cyclomatic complexity 32 (threshold 15). Of this number, 17 points are the body's own statements and 15 belong to 12 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 · startBoardServer (cyclomatic 32) · ×1
  • startBoardServer (cyclomatic 32) REDACTED:80 — startBoardServer has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 1 of the 32 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 90, 176, 85, …). 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 · extension.server (cyclomatic 31) · ×1
  • extension.server (cyclomatic 31) REDACTED:87 — extension.server has cyclomatic complexity 31 (threshold 15). Of this number, 30 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 · index-_8h8h3EK.useAnnouncements (cyclomatic 31) · ×1
  • index-_8h8h3EK.useAnnouncements (cyclomatic 31) REDACTED:20364 — index-_8h8h3EK.useAnnouncements has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 5 of the 31 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 20408, 20372, 20379, …). 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-_8h8h3EK.factoryDestination (cyclomatic 31) · ×1
  • index-_8h8h3EK.factoryDestination (cyclomatic 31) REDACTED:36548 — index-_8h8h3EK.factoryDestination has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 2 of the 31 points are its own statements and the rest belongs to 6 function items inside it that branch (raw, start, enclosed, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · SkillDetail.SkillDetail (cyclomatic 31) · ×1
  • SkillDetail.SkillDetail (cyclomatic 31) REDACTED:138 — SkillDetail.SkillDetail has cyclomatic complexity 31 (threshold 15). Of this number, 16 points are the body's own statements and 15 belong to 9 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · markdown_to_word._convert_blocks (cyclomatic 31) · ×1
  • markdown_to_word._convert_blocks (cyclomatic 31) skills/markdown-to-word-mermaid/scripts/markdown_to_word.py:335 — markdown_to_word._convert_blocks has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · quality_gate.check_tdd_sidecar (cyclomatic 31) · ×1
  • quality_gate.check_tdd_sidecar (cyclomatic 31) skills/quality-playbook/quality_gate.py:890 — quality_gate.check_tdd_sidecar has cyclomatic complexity 31 (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 · analyze_plan.analyze_set_attribute (cyclomatic 31) · ×1
  • analyze_plan.analyze_set_attribute (cyclomatic 31) skills/terraform-azurerm-set-diff-analyzer/scripts/analyze_plan.py:251 — analyze_plan.analyze_set_attribute has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · analyze_plan.analyze_resource_change (cyclomatic 31) · ×1
  • analyze_plan.analyze_resource_change (cyclomatic 31) skills/terraform-azurerm-set-diff-analyzer/scripts/analyze_plan.py:365 — analyze_plan.analyze_resource_change has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · normalizeNotebook (cyclomatic 31) · ×1
  • normalizeNotebook (cyclomatic 31) extensions/jupyter-notebooks/notebook-canvas.mjs:147 — normalizeNotebook has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · planEscalation (cyclomatic 31) · ×1
  • planEscalation (cyclomatic 31) eng/review-routing.mjs:529 — planEscalation has cyclomatic complexity 31 (threshold 15). Of this number, 30 points are the body's own statements and 1 belongs 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 · (anonymous) (cyclomatic 31) · ×1
  • (anonymous) (cyclomatic 31) REDACTED:87 — (anonymous) has cyclomatic complexity 31 (threshold 15). Of this number, 30 points are the body's own statements and 1 belongs 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 · startBoardServer (cyclomatic 31) · ×1
  • startBoardServer (cyclomatic 31) REDACTED:80 — startBoardServer 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 6 function literals inside it that branch (lines 90, 176, 85, …). 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 · materializePlugins (cyclomatic 31) · ×1
  • materializePlugins (cyclomatic 31) eng/materialize-plugins.mjs:74 — materializePlugins has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ui.html.nodeInfo (cyclomatic 30) · ×1
  • ui.html.nodeInfo (cyclomatic 30) extensions/agent-radar/ui.html:605 — ui.html.nodeInfo 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 · extension.normalizeTutorial (cyclomatic 30) · ×1
  • extension.normalizeTutorial (cyclomatic 30) REDACTED:197 — extension.normalizeTutorial 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 · index-_8h8h3EK.Stack$1 (cyclomatic 30) · ×1
  • index-_8h8h3EK.Stack$1 (cyclomatic 30) REDACTED:16882 — index-_8h8h3EK.Stack$1 has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index-_8h8h3EK.TextInputAction (cyclomatic 30) · ×1
  • index-_8h8h3EK.TextInputAction (cyclomatic 30) REDACTED:17655 — index-_8h8h3EK.TextInputAction has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index-_8h8h3EK.Select (cyclomatic 30) · ×1
  • index-_8h8h3EK.Select (cyclomatic 30) REDACTED:26554 — index-_8h8h3EK.Select has cyclomatic complexity 30 (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 · data.getCopilotSessions (cyclomatic 30) · ×1
  • data.getCopilotSessions (cyclomatic 30) extensions/work-hub/data.mjs:351 — data.getCopilotSessions has cyclomatic complexity 30 (threshold 15). Of this number, 28 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 · ScrambleText.ScrambleText (cyclomatic 30) · ×1
  • ScrambleText.ScrambleText (cyclomatic 30) website/src/components/brand/ScrambleText.tsx:35 — ScrambleText.ScrambleText has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 2 of the 30 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 46, a function literal at line 95, a function literal at line 136, …). 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 · generate_from_docs.generate_skeleton (cyclomatic 30) · ×1
  • generate_from_docs.generate_skeleton (cyclomatic 30) skills/code-tour/scripts/generate_from_docs.py:131 — generate_from_docs.generate_skeleton 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 · add-icon-to-diagram.transform_icon_elements (cyclomatic 30) · ×1
  • add-icon-to-diagram.transform_icon_elements (cyclomatic 30) skills/excalidraw-diagram-generator/scripts/add-icon-to-diagram.py:61 — add-icon-to-diagram.transform_icon_elements 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 · scanStorage (cyclomatic 30) · ×1
  • scanStorage (cyclomatic 30) extensions/windows-app-storage-inspector-cleanup/src/core/scanner.mjs:307 — scanStorage has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 7 of the 30 points are its own statements and the rest belongs to 21 function items inside it that branch (processEntry, scanDirectory, addWarning, …). 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 · startServer (cyclomatic 30) · ×1
  • startServer (cyclomatic 30) extensions/foundry-agentic-loop-canvas/lib/server.mjs:22 — startServer has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 1 of the 30 points is its own statement and the rest belongs to 6 function items inside it that branch (a function literal at line 39, (anonymous)::json, a function literal at line 26, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · external-plugin-intake.validateCanvasPluginMetadata (cyclomatic 29) · ×1
  • external-plugin-intake.validateCanvasPluginMetadata (cyclomatic 29) eng/external-plugin-intake.mjs:804 — external-plugin-intake.validateCanvasPluginMetadata has cyclomatic complexity 29 (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 · extension.handleServerRequest (cyclomatic 29) · ×1
  • extension.handleServerRequest (cyclomatic 29) REDACTED:1844 — extension.handleServerRequest 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 · board-core.normalize (cyclomatic 29) · ×1
  • board-core.normalize (cyclomatic 29) REDACTED:90 — board-core.normalize 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 · extension.resolveDestination (cyclomatic 29) · ×1
  • extension.resolveDestination (cyclomatic 29) REDACTED:217 — extension.resolveDestination 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 · app.renderInspector (cyclomatic 29) · ×1
  • app.renderInspector (cyclomatic 29) REDACTED:613 — app.renderInspector 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 · scan.scanRepo (cyclomatic 29) · ×1
  • scan.scanRepo (cyclomatic 29) REDACTED:474 — scan.scanRepo has cyclomatic complexity 29 (threshold 15). Of this number, 28 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · server.handleRequest (cyclomatic 29) · ×1
  • server.handleRequest (cyclomatic 29) REDACTED:1323 — server.handleRequest 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 · pr-dashboard-cli.getPrDetails (cyclomatic 29) · ×1
  • pr-dashboard-cli.getPrDetails (cyclomatic 29) skills/pr-dashboard/scripts/pr-dashboard-cli.mjs:77 — pr-dashboard-cli.getPrDetails has cyclomatic complexity 29 (threshold 15). Of this number, 27 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · quality_gate.check_integration_sidecar (cyclomatic 29) · ×1
  • quality_gate.check_integration_sidecar (cyclomatic 29) skills/quality-playbook/quality_gate.py:1109 — quality_gate.check_integration_sidecar 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 · renderInventory (cyclomatic 29) · ×1
  • renderInventory (cyclomatic 29) extensions/foundry-agentic-loop-canvas/public/app.js:1116 — renderInventory has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 7 of the 29 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 1123, 1136, 1126, …). 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 · startServer (cyclomatic 29) · ×1
  • startServer (cyclomatic 29) REDACTED:1299 — startServer has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 3 of the 29 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 1306, a function literal at line 1428, (anonymous)::onError, …). 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 · streamZipEntryRange (cyclomatic 29) · ×1
  • streamZipEntryRange (cyclomatic 29) extensions/pr-artifact-explorer/zip.mjs:485 — streamZipEntryRange has cyclomatic complexity 29 (threshold 15). Of this number, 28 points are the body's own statements and 1 belongs 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 · parseTarget (cyclomatic 29) · ×1
  • parseTarget (cyclomatic 29) REDACTED:361 — parseTarget 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 · generate-website-data.extractCanvasMetadataFromSource · ×1
  • generate-website-data.extractCanvasMetadataFromSource::findMatchingBrace (cyclomatic 28) REDACTED:888 — generate-website-data.extractCanvasMetadataFromSource::findMatchingBrace 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 · submission-gate.syncPullRequestStatus (cyclomatic 28) · ×1
  • submission-gate.syncPullRequestStatus (cyclomatic 28) REDACTED:985 — submission-gate.syncPullRequestStatus has cyclomatic complexity 28 (threshold 15). Of this number, 25 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · board.html.render (cyclomatic 28) · ×1
  • board.html.render (cyclomatic 28) extensions/daily-focus-board/assets/board.html:184 — board.html.render has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 1 of the 28 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 187, 186, 206, …). 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 · server.startServer.server (cyclomatic 28) · ×1
  • server.startServer.server (cyclomatic 28) extensions/foundry-agentic-loop-canvas/lib/server.mjs:39 — server.startServer.server has cyclomatic complexity 28 (threshold 15). Of this number, 26 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index-_8h8h3EK.Description (cyclomatic 28) · ×1
  • index-_8h8h3EK.Description (cyclomatic 28) REDACTED:18866 — index-_8h8h3EK.Description has cyclomatic complexity 28 (threshold 15). Of this number, 24 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index-_8h8h3EK.useVirtualizerBase (cyclomatic 28) · ×1
  • index-_8h8h3EK.useVirtualizerBase (cyclomatic 28) REDACTED:21532 — index-_8h8h3EK.useVirtualizerBase has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 1 of the 28 points is its own statement and the rest belongs to 4 function items inside it that branch (a function literal at line 21575, applyDirectStyles, applyContainerSize, …). 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 · index-_8h8h3EK.Avatar (cyclomatic 28) · ×1
  • index-_8h8h3EK.Avatar (cyclomatic 28) REDACTED:25069 — index-_8h8h3EK.Avatar has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · extension.serializeAttribute (cyclomatic 28) · ×1
  • extension.serializeAttribute (cyclomatic 28) extensions/github-security/extension.mjs:6694 — extension.serializeAttribute has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: extension.p (cyclomatic 40) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · extension.triageSentry (cyclomatic 28) · ×1
  • extension.triageSentry (cyclomatic 28) REDACTED:786 — extension.triageSentry has cyclomatic complexity 28 (threshold 15). Of this number, 27 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 · extension.discoverProjects (cyclomatic 28) · ×1
  • extension.discoverProjects (cyclomatic 28) REDACTED:1193 — extension.discoverProjects has cyclomatic complexity 28 (threshold 15). Of this number, 24 points are the body's own statements and 4 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 · local-delegation.resolveLocalDelegationAvailability (cyclomatic 28) · ×1
  • local-delegation.resolveLocalDelegationAvailability (cyclomatic 28) extensions/signals-dashboard/local-delegation.mjs:278 — local-delegation.resolveLocalDelegationAvailability has cyclomatic complexity 28 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · convert-pptx.convert (cyclomatic 28) · ×1
  • convert-pptx.convert (cyclomatic 28) skills/publish-to-pages/scripts/convert-pptx.py:170 — convert-pptx.convert 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 · renderRapidProgress (cyclomatic 28) · ×1
  • renderRapidProgress (cyclomatic 28) extensions/foundry-agentic-loop-canvas/public/app.js:451 — renderRapidProgress has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 11 of the 28 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 475, a function literal at line 456, a function literal at line 473, …). 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 · (anonymous) (cyclomatic 28) · ×1
  • (anonymous) (cyclomatic 28) extensions/foundry-agentic-loop-canvas/public/app.js:592 — (anonymous) has cyclomatic complexity 28 (threshold 15). Of this number, 24 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 · loadEvents (cyclomatic 28) · ×1
  • loadEvents (cyclomatic 28) extensions/ai-credits-breakdown/collector.mjs:189 — loadEvents has cyclomatic complexity 28 (threshold 15). Of this number, 27 points are the body's own statements and 1 belongs 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 · result (cyclomatic 28) · ×1
  • result (cyclomatic 28) .github/extensions/resource-staleness-board/lib/state.mjs:391 — result has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 1 of the 28 points is its own statement and the rest belongs to one function literal inside it that branches (line 392). 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 · render (cyclomatic 28) · ×1
  • render (cyclomatic 28) .github/extensions/resource-staleness-board/public/app.js:279 — render has cyclomatic complexity 28 (threshold 15). Of this number, 19 points are the body's own statements and 9 belong to 6 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index-_8h8h3EK.Announce (cyclomatic 27) · ×1
  • index-_8h8h3EK.Announce (cyclomatic 27) REDACTED:12048 — index-_8h8h3EK.Announce has cyclomatic complexity 27 (threshold 15). Of this number, 17 points are the body's own statements and 10 belong to 4 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index-_8h8h3EK.calculatePosition (cyclomatic 27) · ×1
  • index-_8h8h3EK.calculatePosition (cyclomatic 27) REDACTED:14002 — index-_8h8h3EK.calculatePosition has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index-_8h8h3EK.tokenizeAutolink (cyclomatic 27) · ×1
  • index-_8h8h3EK.tokenizeAutolink (cyclomatic 27) REDACTED:34671 — index-_8h8h3EK.tokenizeAutolink has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 1 of the 27 points is its own statement and the rest belongs to 8 function items inside it that branch (schemeInsideOrEmailAtext, urlInside, schemeOrEmailAtext, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · extension.startServer.server (cyclomatic 27) · ×1
  • extension.startServer.server (cyclomatic 27) REDACTED:1306 — extension.startServer.server has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · scan-cypress.blankComments (cyclomatic 27) · ×1
  • scan-cypress.blankComments (cyclomatic 27) skills/cypress-flake-fixer/scripts/scan-cypress.mjs:178 — scan-cypress.blankComments has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · evals.validateCases (cyclomatic 27) · ×1
  • evals.validateCases (cyclomatic 27) skills/foundry-agentic-loop/scripts/evals.mjs:66 — evals.validateCases has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExtensionsCatalog.ExtensionsCatalog (cyclomatic 27) · ×1
  • ExtensionsCatalog.ExtensionsCatalog (cyclomatic 27) website/src/components/brand/ExtensionsCatalog.tsx:145 — ExtensionsCatalog.ExtensionsCatalog has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 7 of the 27 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 394, 206, 306, …). 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 · convert_excel_to_md._sheet_name_to_media (cyclomatic 27) · ×1
  • convert_excel_to_md._sheet_name_to_media (cyclomatic 27) skills/convert-excel-to-md/scripts/convert_excel_to_md.py:96 — convert_excel_to_md._sheet_name_to_media has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · wrapTermsInHtml (cyclomatic 27) · ×1
  • wrapTermsInHtml (cyclomatic 27) REDACTED:260 — wrapTermsInHtml has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · render (cyclomatic 27) · ×1
  • render (cyclomatic 27) .github/extensions/duplicate-review-board/public/app.js:165 — render has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 12 of the 27 points are its own statements and the rest belongs to 18 function literals inside it that branch (lines 181, 178, 187, …). 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 · validateArgs (cyclomatic 27) · ×1
  • validateArgs (cyclomatic 27) extensions/foundry-agentic-loop-workflow/lib/args.mjs:60 — validateArgs has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · license.isRecognizedSpdxExpression (cyclomatic 26) · ×1
  • license.isRecognizedSpdxExpression (cyclomatic 26) eng/lib/license.mjs:120 — license.isRecognizedSpdxExpression has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 4 of the 26 points are its own statements and the rest belongs to 5 function items inside it that branch (parseWithExpression, parsePrimary, parseSimpleExpression, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · external-plugin-intake.buildQualityGatesCommentSection (cyclomatic 26) · ×1
  • external-plugin-intake.buildQualityGatesCommentSection (cyclomatic 26) eng/external-plugin-intake.mjs:1094 — external-plugin-intake.buildQualityGatesCommentSection has cyclomatic complexity 26 (threshold 15). Of this number, 21 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · submission-gate.runPrCommand (cyclomatic 26) · ×1
  • submission-gate.runPrCommand (cyclomatic 26) REDACTED:1274 — submission-gate.runPrCommand has cyclomatic complexity 26 (threshold 15). Of this number, 24 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · app.frontends (cyclomatic 26) · ×1
  • app.frontends (cyclomatic 26) extensions/foundry-agentic-loop-canvas/public/app.js:592 — app.frontends has cyclomatic complexity 26 (threshold 15). Of this number, 23 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index-_8h8h3EK.Radio (cyclomatic 26) · ×1
  • index-_8h8h3EK.Radio (cyclomatic 26) REDACTED:19226 — index-_8h8h3EK.Radio has cyclomatic complexity 26 (threshold 15). Of this number, 24 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index-_8h8h3EK.tokenizeListStart (cyclomatic 26) · ×1
  • index-_8h8h3EK.tokenizeListStart (cyclomatic 26) REDACTED:39722 — index-_8h8h3EK.tokenizeListStart has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 3 of the 26 points are its own statements and the rest belongs to 4 function items inside it that branch (start, inside, atMarker, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · data.getSessionInventory (cyclomatic 26) · ×1
  • data.getSessionInventory (cyclomatic 26) extensions/work-hub/data.mjs:577 — data.getSessionInventory has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · parseTranscript (cyclomatic 26) · ×1
  • parseTranscript (cyclomatic 26) extensions/ai-credits-breakdown/collector.mjs:330 — parseTranscript has cyclomatic complexity 26 (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 · bulkAction (cyclomatic 26) · ×1
  • bulkAction (cyclomatic 26) .github/extensions/open-pr-board/public/app.js:374 — bulkAction has cyclomatic complexity 26 (threshold 15). Of this number, 24 points are the body's own statements and 2 belong to 6 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 · downloadArchive (cyclomatic 26) · ×1
  • downloadArchive (cyclomatic 26) extensions/pr-artifact-explorer/cache.mjs:104 — downloadArchive has cyclomatic complexity 26 (threshold 15). Of this number, 13 points are the body's own statements and 13 belong to 6 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 · resolveAccountsUncached (cyclomatic 26) · ×1
  • resolveAccountsUncached (cyclomatic 26) extensions/pr-artifact-explorer/accounts.mjs:212 — resolveAccountsUncached has cyclomatic complexity 26 (threshold 15). Of this number, 18 points are the body's own statements and 8 belong to 13 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · prepareRerun (cyclomatic 26) · ×1
  • prepareRerun (cyclomatic 26) extensions/pr-artifact-explorer/rerun.mjs:61 — prepareRerun 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 · external-plugin-rereview.pluginMatchesSubmission (cyclomatic 25) · ×1
  • external-plugin-rereview.pluginMatchesSubmission (cyclomatic 25) REDACTED:94 — external-plugin-rereview.pluginMatchesSubmission 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 · update-readme.extractTitle (cyclomatic 25) · ×1
  • update-readme.extractTitle (cyclomatic 25) eng/update-readme.mjs:46 — update-readme.extractTitle 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 48). 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 · collector.classifyTool (cyclomatic 25) · ×1
  • collector.classifyTool (cyclomatic 25) extensions/agent-radar/collector.mjs:102 — collector.classifyTool has cyclomatic complexity 25 (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 · UI.renderStylebar (cyclomatic 25) · ×1
  • UI.renderStylebar (cyclomatic 25) extensions/draw/public/ui.js:177 — UI.renderStylebar has cyclomatic complexity 25 (threshold 15). Of this number, 20 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index-_8h8h3EK.Menu (cyclomatic 25) · ×1
  • index-_8h8h3EK.Menu (cyclomatic 25) REDACTED:23048 — index-_8h8h3EK.Menu has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 2 of the 25 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 23072, 23053, 23067). 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 · extension.toHtml (cyclomatic 25) · ×1
  • extension.toHtml (cyclomatic 25) extensions/github-security/extension.mjs:7002 — extension.toHtml 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. This is NOT this file's highest cyclomatic complexity: extension.p (cyclomatic 40) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · zip.readZipIndex (cyclomatic 25) · ×1
  • zip.readZipIndex (cyclomatic 25) extensions/pr-artifact-explorer/zip.mjs:190 — zip.readZipIndex has cyclomatic complexity 25 (threshold 15). Of this number, 19 points are the body's own statements and 6 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 · targets.fromGitHubUrl (cyclomatic 25) · ×1
  • targets.fromGitHubUrl (cyclomatic 25) REDACTED:135 — targets.fromGitHubUrl has cyclomatic complexity 25 (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 · PluginDetail.PluginDetail (cyclomatic 25) · ×1
  • PluginDetail.PluginDetail (cyclomatic 25) REDACTED:116 — PluginDetail.PluginDetail has cyclomatic complexity 25 (threshold 15). Of this number, 20 points are the body's own statements and 5 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · pagefind-resources.pagefindResources (cyclomatic 25) · ×1
  • pagefind-resources.pagefindResources (cyclomatic 25) REDACTED:116 — pagefind-resources.pagefindResources 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 5 function literals inside it that branch (lines 133, 161, 124, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · startServer (cyclomatic 25) · ×1
  • startServer (cyclomatic 25) extensions/jupyter-notebooks/notebook-canvas.mjs:3549 — startServer has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 3 of the 25 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 3560, 3635, 3637, …). 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 · (anonymous) (cyclomatic 25) · ×1
  • (anonymous) (cyclomatic 25) extensions/foundry-agentic-loop-canvas/public/app.js:1803 — (anonymous) has cyclomatic complexity 25 (threshold 15). Of this number, 22 points are the body's own statements and 3 belong to 6 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · start (cyclomatic 25) · ×1
  • start (cyclomatic 25) extensions/foundry-agentic-loop-canvas/public/app.js:2051 — start has cyclomatic complexity 25 (threshold 15). Of this number, 18 points are the body's own statements and 7 belong to 6 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 · renderFormField (cyclomatic 25) · ×1
  • renderFormField (cyclomatic 25) REDACTED:1252 — renderFormField has cyclomatic complexity 25 (threshold 15). Of this number, 21 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · revalidateCandidate (cyclomatic 25) · ×1
  • revalidateCandidate (cyclomatic 25) extensions/windows-app-storage-inspector-cleanup/src/core/cleanup.mjs:269 — revalidateCandidate has cyclomatic complexity 25 (threshold 15). Of this number, 24 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · shapeRun (cyclomatic 25) · ×1
  • shapeRun (cyclomatic 25) extensions/foundry-agentic-loop-canvas/lib/live.mjs:143 — shapeRun has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 10 of the 25 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 145, 155, 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 · getMissingContributors (cyclomatic 25) · ×1
  • getMissingContributors (cyclomatic 25) eng/contributor-report.mjs:195 — getMissingContributors has cyclomatic complexity 25 (threshold 15). Of this number, 24 points are the body's own statements and 1 belongs 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 · load (cyclomatic 25) · ×1
  • load (cyclomatic 25) extensions/pr-artifact-explorer/jobs.mjs:216 — load has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 2 of the 25 points are its own statements and the rest belongs to one function literal inside it that branches (line 218). 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 · analyzeVsCodeInsiders (cyclomatic 25) · ×1
  • analyzeVsCodeInsiders (cyclomatic 25) extensions/windows-app-storage-inspector-cleanup/src/analyzers/vscode-insiders.mjs:92 — analyzeVsCodeInsiders has cyclomatic complexity 25 (threshold 15). Of this number, 22 points are the body's own statements and 3 belong to 12 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 · readFrontends (cyclomatic 25) · ×1
  • readFrontends (cyclomatic 25) extensions/foundry-agentic-loop-canvas/lib/frontends.mjs:62 — readFrontends has cyclomatic complexity 25 (threshold 15). Of this number, 16 points are the body's own statements and 9 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · qr.buildReserved (cyclomatic 24) · ×1
  • qr.buildReserved (cyclomatic 24) extensions/apng-studio/qr.mjs:232 — qr.buildReserved has cyclomatic complexity 24 (threshold 15). Of this number, 20 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · extension.pngSize (cyclomatic 24) · ×1
  • extension.pngSize (cyclomatic 24) REDACTED:202 — extension.pngSize has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · analytics.buildPulse (cyclomatic 24) · ×1
  • analytics.buildPulse (cyclomatic 24) extensions/chronicle-stats/analytics.mjs:185 — analytics.buildPulse has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Editor.renderOverlay (cyclomatic 24) · ×1
  • Editor.renderOverlay (cyclomatic 24) extensions/draw/public/editor.js:690 — Editor.renderOverlay has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index-_8h8h3EK.BreadcrumbsMenuItem (cyclomatic 24) · ×1
  • index-_8h8h3EK.BreadcrumbsMenuItem (cyclomatic 24) REDACTED:26029 — index-_8h8h3EK.BreadcrumbsMenuItem has cyclomatic complexity 24 (threshold 15). Of this number, 19 points are the body's own statements and 5 belong to 5 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index-_8h8h3EK.TokenBase (cyclomatic 24) · ×1
  • index-_8h8h3EK.TokenBase (cyclomatic 24) REDACTED:27442 — index-_8h8h3EK.TokenBase has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: 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 · index-_8h8h3EK.resolveAllAttention (cyclomatic 24) · ×1
  • index-_8h8h3EK.resolveAllAttention (cyclomatic 24) REDACTED:34457 — index-_8h8h3EK.resolveAllAttention has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index-_8h8h3EK.subtokenize (cyclomatic 24) · ×1
  • index-_8h8h3EK.subtokenize (cyclomatic 24) REDACTED:36231 — index-_8h8h3EK.subtokenize has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index-_8h8h3EK.createState (cyclomatic 24) · ×1
  • index-_8h8h3EK.createState (cyclomatic 24) REDACTED:44332 — index-_8h8h3EK.createState has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 2 of the 24 points are its own statements and the rest belongs to 3 function items inside it that branch (all, one, a function literal at line 44355). 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 · extension.parseSequence (cyclomatic 24) · ×1
  • extension.parseSequence (cyclomatic 24) extensions/github-security/extension.mjs:7452 — extension.parseSequence has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: extension.p (cyclomatic 40) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · app.artifactRowHtml (cyclomatic 24) · ×1
  • app.artifactRowHtml (cyclomatic 24) REDACTED:3022 — app.artifactRowHtml 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 · targets.naturalLanguage (cyclomatic 24) · ×1
  • targets.naturalLanguage (cyclomatic 24) REDACTED:318 — targets.naturalLanguage has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · scan.main (cyclomatic 24) · ×1
  • scan.main (cyclomatic 24) skills/acquire-codebase-knowledge/scripts/scan.py:556 — scan.main 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 · analysis.drop_lowiv_features (cyclomatic 24) · ×1
  • analysis.drop_lowiv_features (cyclomatic 24) skills/datanalysis-credit-risk/references/analysis.py:64 — analysis.drop_lowiv_features has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · analysis.drop_highcorr_features (cyclomatic 24) · ×1
  • analysis.drop_highcorr_features (cyclomatic 24) skills/datanalysis-credit-risk/references/analysis.py:213 — analysis.drop_highcorr_features has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · (anonymous).trackable (cyclomatic 24) · ×1
  • (anonymous).trackable (cyclomatic 24) REDACTED:22 — (anonymous).trackable has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · renderWorkflow (cyclomatic 24) · ×1
  • renderWorkflow (cyclomatic 24) extensions/foundry-agentic-loop-canvas/public/app.js:1421 — renderWorkflow has cyclomatic complexity 24 (threshold 15). Of this number, 19 points are the body's own statements and 5 belong to 13 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · parseReport (cyclomatic 24) · ×1
  • parseReport (cyclomatic 24) REDACTED:85 — parseReport 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 · recordDecision (cyclomatic 24) · ×1
  • recordDecision (cyclomatic 24) .github/extensions/open-pr-board/lib/state.mjs:271 — recordDecision has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · inspectStorageItem (cyclomatic 24) · ×1
  • inspectStorageItem (cyclomatic 24) extensions/windows-app-storage-inspector-cleanup/src/core/item-inspector.mjs:68 — inspectStorageItem has cyclomatic complexity 24 (threshold 15). Of this number, 22 points are the body's own statements and 2 belong to 5 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 · submission-gate.evaluateCheck (cyclomatic 23) · ×1
  • submission-gate.evaluateCheck (cyclomatic 23) REDACTED:408 — submission-gate.evaluateCheck has cyclomatic complexity 23 (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 · collector.trackUsage (cyclomatic 23) · ×1
  • collector.trackUsage (cyclomatic 23) extensions/agent-radar/collector.mjs:722 — collector.trackUsage has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 7 of the 23 points are its own statements and the rest belongs to one function literal inside it that branches (line 727). 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 · extension.makeHandler (cyclomatic 23) · ×1
  • extension.makeHandler (cyclomatic 23) REDACTED:311 — extension.makeHandler 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 312). 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 · chronicle.prepareChronicle (cyclomatic 23) · ×1
  • chronicle.prepareChronicle (cyclomatic 23) extensions/chronicle-stats/chronicle.mjs:39 — chronicle.prepareChronicle 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 · REDACTED.computeLayout (cyclomatic 23) · ×1
  • REDACTED.computeLayout (cyclomatic 23) extensions/diagram-viewer/public/index.html:372 — REDACTED.computeLayout 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 · Sync.flush (cyclomatic 23) · ×1
  • Sync.flush (cyclomatic 23) extensions/draw/public/sync.js:362 — Sync.flush 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 · index-_8h8h3EK.apply · ×1
  • index-_8h8h3EK.apply::applyPopoverInvokerElementMixin (cyclomatic 23) REDACTED:15090 — index-_8h8h3EK.apply::applyPopoverInvokerElementMixin has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: one other method here (index-_8h8h3EK.apply) 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.
D1 · Cyclomatic Complexity · index-_8h8h3EK.InputLabel (cyclomatic 23) · ×1
  • index-_8h8h3EK.InputLabel (cyclomatic 23) REDACTED:23310 — index-_8h8h3EK.InputLabel has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index-_8h8h3EK.FormControlLabel (cyclomatic 23) · ×1
  • index-_8h8h3EK.FormControlLabel (cyclomatic 23) REDACTED:28768 — index-_8h8h3EK.FormControlLabel has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index-_8h8h3EK.footer (cyclomatic 23) · ×1
  • index-_8h8h3EK.footer (cyclomatic 23) REDACTED:43313 — index-_8h8h3EK.footer 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 · index-_8h8h3EK.visitParents (cyclomatic 23) · ×1
  • index-_8h8h3EK.visitParents (cyclomatic 23) REDACTED:43792 — index-_8h8h3EK.visitParents has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 4 of the 23 points are its own statements and the rest belongs to 2 function items inside it that branch (factory::visit, factory). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · index-_8h8h3EK.post · ×1
  • index-_8h8h3EK.post::transform (cyclomatic 23) REDACTED:47260 — index-_8h8h3EK.post::transform 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 · extension.element (cyclomatic 23) · ×1
  • extension.element (cyclomatic 23) extensions/github-security/extension.mjs:6639 — extension.element 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. This is NOT this file's highest cyclomatic complexity: extension.p (cyclomatic 40) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · notebook-canvas.validateHttpActionPayload (cyclomatic 23) · ×1
  • notebook-canvas.validateHttpActionPayload (cyclomatic 23) extensions/jupyter-notebooks/notebook-canvas.mjs:1107 — notebook-canvas.validateHttpActionPayload has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · scan-cypress.parseArgs (cyclomatic 23) · ×1
  • scan-cypress.parseArgs (cyclomatic 23) skills/cypress-flake-fixer/scripts/scan-cypress.mjs:93 — scan-cypress.parseArgs has cyclomatic complexity 23 (threshold 15). Of this number, 22 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 · napkin.html.container.addEventListener("pointerdown") (cyclomatic 23) · ×1
  • napkin.html.container.addEventListener("pointerdown") (cyclomatic 23) skills/napkin/assets/napkin.html:1288 — napkin.html.container.addEventListener("pointerdown") has cyclomatic complexity 23 (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 · CookbookRecipe.CookbookRecipe (cyclomatic 23) · ×1
  • CookbookRecipe.CookbookRecipe (cyclomatic 23) REDACTED:96 — CookbookRecipe.CookbookRecipe has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 11 of the 23 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 125, 141, 240, …). 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 · ExtensionDetail.ExtensionDetail (cyclomatic 23) · ×1
  • ExtensionDetail.ExtensionDetail (cyclomatic 23) REDACTED:103 — ExtensionDetail.ExtensionDetail has cyclomatic complexity 23 (threshold 15). Of this number, 22 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 · SkillsCatalog.SkillsCatalog (cyclomatic 23) · ×1
  • SkillsCatalog.SkillsCatalog (cyclomatic 23) website/src/components/brand/SkillsCatalog.tsx:99 — SkillsCatalog.SkillsCatalog has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 11 of the 23 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 146, a function literal at line 233, copyInstall, …). 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 · detect_hazards.scan_file (cyclomatic 23) · ×1
  • detect_hazards.scan_file (cyclomatic 23) skills/poka-yoke/scripts/detect_hazards.py:389 — detect_hazards.scan_file 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 · quality_gate.check_v1_5_3_council_inbox_validation (cyclomatic 23) · ×1
  • quality_gate.check_v1_5_3_council_inbox_validation (cyclomatic 23) skills/quality-playbook/quality_gate.py:2799 — quality_gate.check_v1_5_3_council_inbox_validation 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 · highlightXml (cyclomatic 23) · ×1
  • highlightXml (cyclomatic 23) REDACTED:380 — highlightXml 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 · renderTemplateView (cyclomatic 23) · ×1
  • renderTemplateView (cyclomatic 23) extensions/foundry-agentic-loop-canvas/public/app.js:997 — renderTemplateView 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 · load (cyclomatic 23) · ×1
  • load (cyclomatic 23) extensions/foundry-agentic-loop-canvas/lib/model.mjs:177 — load has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · resolveViewport (cyclomatic 23) · ×1
  • resolveViewport (cyclomatic 23) REDACTED:56 — resolveViewport has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · normalizeElement (cyclomatic 23) · ×1
  • normalizeElement (cyclomatic 23) extensions/draw/lib/model.mjs:185 — normalizeElement has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · collector.readVSCodeLog (cyclomatic 22) · ×1
  • collector.readVSCodeLog (cyclomatic 22) extensions/agent-radar/collector.mjs:611 — collector.readVSCodeLog has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · flightControls.FlightControls.update (cyclomatic 22) · ×1
  • flightControls.FlightControls.update (cyclomatic 22) extensions/flight-map-canvas/game/flightControls.js:242 — flightControls.FlightControls.update has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · app.document.addEventListener("click") (cyclomatic 22) · ×1
  • app.document.addEventListener("click") (cyclomatic 22) extensions/foundry-agentic-loop-canvas/public/app.js:1803 — app.document.addEventListener("click") has cyclomatic complexity 22 (threshold 15). 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: 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 · Processor.use (cyclomatic 22) · ×1
  • Processor.use (cyclomatic 22) REDACTED:46846 — Processor.use has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 6 of the 22 points are its own statements and the rest belongs to 4 function items inside it that branch (addPlugin, addList, add, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · index-_8h8h3EK.isFocusable$1 (cyclomatic 22) · ×1
  • index-_8h8h3EK.isFocusable$1 (cyclomatic 22) REDACTED:13348 — index-_8h8h3EK.isFocusable$1 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 · index-_8h8h3EK.useMnemonics (cyclomatic 22) · ×1
  • index-_8h8h3EK.useMnemonics (cyclomatic 22) REDACTED:22113 — index-_8h8h3EK.useMnemonics has cyclomatic complexity 22 (threshold 15). Of this number, 13 points are the body's own statements and 9 belong to 4 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index-_8h8h3EK.normalizeString (cyclomatic 22) · ×1
  • index-_8h8h3EK.normalizeString (cyclomatic 22) REDACTED:45233 — index-_8h8h3EK.normalizeString 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 · _RuleFactory._compilePatterns (cyclomatic 22) · ×1
  • _RuleFactory._compilePatterns (cyclomatic 22) extensions/github-security/extension.mjs:1932 — _RuleFactory._compilePatterns 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. This is NOT this file's highest cyclomatic complexity: extension.p (cyclomatic 40) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · autopilot.runAutopilot (cyclomatic 22) · ×1
  • autopilot.runAutopilot (cyclomatic 22) extensions/java-modernization-studio/autopilot.mjs:88 — autopilot.runAutopilot 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 · ReviewStore.context (cyclomatic 22) · ×1
  • ReviewStore.context (cyclomatic 22) extensions/pr-review/review.mjs:212 — ReviewStore.context has cyclomatic complexity 22 (threshold 15). 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, separate the cases: extract each independent 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 · card.Card (cyclomatic 22) · ×1
  • card.Card (cyclomatic 22) extensions/sentry-triage/components/card.mjs:86 — card.Card has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · extension.resolveOnPath (cyclomatic 22) · ×1
  • extension.resolveOnPath (cyclomatic 22) REDACTED:139 — extension.resolveOnPath 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 · extension.renderLocalDelegationControl (cyclomatic 22) · ×1
  • extension.renderLocalDelegationControl (cyclomatic 22) REDACTED:825 — extension.renderLocalDelegationControl 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 · data.runItemAction (cyclomatic 22) · ×1
  • data.runItemAction (cyclomatic 22) extensions/work-hub/data.mjs:1148 — data.runItemAction has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · drawio-to-png.main (cyclomatic 22) · ×1
  • drawio-to-png.main (cyclomatic 22) skills/drawio/scripts/drawio-to-png.mjs:206 — drawio-to-png.main has cyclomatic complexity 22 (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 · quality_gate.main (cyclomatic 22) · ×1
  • quality_gate.main (cyclomatic 22) skills/quality-playbook/quality_gate.py:3303 — quality_gate.main has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · decide (cyclomatic 22) · ×1
  • decide (cyclomatic 22) REDACTED:678 — decide has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · startServer (cyclomatic 22) · ×1
  • startServer (cyclomatic 22) REDACTED:315 — startServer has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 4 of the 22 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 322, a function literal at line 375, (anonymous)::onError, …). 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 · browserCommand (cyclomatic 22) · ×1
  • browserCommand (cyclomatic 22) REDACTED:280 — browserCommand 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 · renderDetailContent (cyclomatic 22) · ×1
  • renderDetailContent (cyclomatic 22) .github/extensions/resource-staleness-board/public/app.js:215 — renderDetailContent has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · submission-gate.renderStatusComment (cyclomatic 21) · ×1
  • submission-gate.renderStatusComment (cyclomatic 21) REDACTED:547 — submission-gate.renderStatusComment 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 · collector.resolveSessionRelations (cyclomatic 21) · ×1
  • collector.resolveSessionRelations (cyclomatic 21) extensions/agent-radar/collector.mjs:189 — collector.resolveSessionRelations has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · server.waitForCoachReply · ×1
  • server.waitForCoachReply::observe (cyclomatic 21) extensions/chronicle-stats/server.mjs:45 — server.waitForCoachReply::observe 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 · Editor.handles (cyclomatic 21) · ×1
  • Editor.handles (cyclomatic 21) extensions/draw/public/editor.js:620 — Editor.handles has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · deck.document.addEventListener("keydown") (cyclomatic 21) · ×1
  • deck.document.addEventListener("keydown") (cyclomatic 21) extensions/foundry-agentic-loop-canvas/public/deck.js:63 — deck.document.addEventListener("keydown") 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 · index-_8h8h3EK.useCloseMenuOnTab (cyclomatic 21) · ×1
  • index-_8h8h3EK.useCloseMenuOnTab (cyclomatic 21) REDACTED:22212 — index-_8h8h3EK.useCloseMenuOnTab has cyclomatic complexity 21 (threshold 15). Of this number, 13 points are the body's own statements and 8 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index-_8h8h3EK.Overlay (cyclomatic 21) · ×1
  • index-_8h8h3EK.Overlay (cyclomatic 21) REDACTED:23182 — index-_8h8h3EK.Overlay has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 9 of the 21 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 23186, 23196, 23202, …). 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-_8h8h3EK.factoryLabel (cyclomatic 21) · ×1
  • index-_8h8h3EK.factoryLabel (cyclomatic 21) REDACTED:36731 — index-_8h8h3EK.factoryLabel 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 items inside it that branch (atBreak, labelInside, labelEscape). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · index-_8h8h3EK.preprocess · ×1
  • index-_8h8h3EK.preprocess::preprocessor (cyclomatic 21) REDACTED:40873 — index-_8h8h3EK.preprocess::preprocessor 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 · index-_8h8h3EK.basename (cyclomatic 21) · ×1
  • index-_8h8h3EK.basename (cyclomatic 21) REDACTED:45082 — index-_8h8h3EK.basename 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 · index-_8h8h3EK.FindingItem (cyclomatic 21) · ×1
  • index-_8h8h3EK.FindingItem (cyclomatic 21) REDACTED:48797 — index-_8h8h3EK.FindingItem has cyclomatic complexity 21 (threshold 15). Of this number, 18 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, 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 · scan.buildAssessment (cyclomatic 21) · ×1
  • scan.buildAssessment (cyclomatic 21) REDACTED:413 — scan.buildAssessment has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent 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 · zip.locateDirectory (cyclomatic 21) · ×1
  • zip.locateDirectory (cyclomatic 21) extensions/pr-artifact-explorer/zip.mjs:125 — zip.locateDirectory 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 · analyzer.validateSubmission (cyclomatic 21) · ×1
  • analyzer.validateSubmission (cyclomatic 21) extensions/tiny-tool-town-submitter/lib/analyzer.mjs:346 — analyzer.validateSubmission 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 · extension.handleRequest (cyclomatic 21) · ×1
  • extension.handleRequest (cyclomatic 21) extensions/tiny-tool-town-submitter/extension.mjs:386 — extension.handleRequest has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · data.getDeployments (cyclomatic 21) · ×1
  • data.getDeployments (cyclomatic 21) extensions/work-hub/data.mjs:738 — data.getDeployments has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 10 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 753). 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 · pr-dashboard-cli.renderHtml (cyclomatic 21) · ×1
  • pr-dashboard-cli.renderHtml (cyclomatic 21) skills/pr-dashboard/scripts/pr-dashboard-cli.mjs:189 — pr-dashboard-cli.renderHtml has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 9 of the 21 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 212, replaceStat, statusColor, …). 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 · detect_hazards.main (cyclomatic 21) · ×1
  • detect_hazards.main (cyclomatic 21) skills/poka-yoke/scripts/detect_hazards.py:486 — detect_hazards.main 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 · createMatchers (cyclomatic 21) · ×1
  • createMatchers (cyclomatic 21) extensions/github-security/extension.mjs:1377 — createMatchers has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 7 of the 21 points are its own statements and the rest belongs to 9 function items inside it that branch (parseOperand, parseInnerExpression, a function literal at line 1408, …). 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. This is NOT this file's highest cyclomatic complexity: p (cyclomatic 40) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · _tokenizeWithTheme (cyclomatic 21) · ×1
  • _tokenizeWithTheme (cyclomatic 21) extensions/github-security/extension.mjs:3783 — _tokenizeWithTheme 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. This is NOT this file's highest cyclomatic complexity: p (cyclomatic 40) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · continueProgressivePullList (cyclomatic 21) · ×1
  • continueProgressivePullList (cyclomatic 21) REDACTED:2717 — continueProgressivePullList 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 · updateRunList (cyclomatic 21) · ×1
  • updateRunList (cyclomatic 21) REDACTED:3921 — updateRunList has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs 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 · mountAsciinemaPlayer (cyclomatic 21) · ×1
  • mountAsciinemaPlayer (cyclomatic 21) REDACTED:4791 — mountAsciinemaPlayer has cyclomatic complexity 21 (threshold 15). Of this number, 13 points are the body's own statements and 8 belong to 6 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 · renderArtifact (cyclomatic 21) · ×1
  • renderArtifact (cyclomatic 21) REDACTED:5362 — renderArtifact 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 · renderProjects (cyclomatic 21) · ×1
  • renderProjects (cyclomatic 21) extensions/foundry-agentic-loop-canvas/public/app.js:776 — renderProjects has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body's own statements and 2 belong to 5 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 · renderMarkdownFragment (cyclomatic 21) · ×1
  • renderMarkdownFragment (cyclomatic 21) REDACTED:513 — renderMarkdownFragment has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body's own statements and 2 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 · renderReview (cyclomatic 21) · ×1
  • renderReview (cyclomatic 21) REDACTED:476 — renderReview 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 · render (cyclomatic 21) · ×1
  • render (cyclomatic 21) REDACTED:256 — render has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body's own statements and 2 belong to 5 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · generateMarkdownReport (cyclomatic 21) · ×1
  • generateMarkdownReport (cyclomatic 21) eng/contributor-report.mjs:463 — generateMarkdownReport has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 10 of the 21 points are its own statements and the rest belongs to 3 function items inside it that branch (computeTypesArg, a function literal at line 498, a function literal at line 480). 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 · publish (cyclomatic 21) · ×1
  • publish (cyclomatic 21) .github/extensions/duplicate-review-board/lib/publish.mjs:55 — publish has cyclomatic complexity 21 (threshold 15). Of this number, 13 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · validate-plugins.validateCompositionNamespace (cyclomatic 20) · ×1
  • validate-plugins.validateCompositionNamespace (cyclomatic 20) eng/validate-plugins.mjs:283 — validate-plugins.validateCompositionNamespace 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 · extension.server (cyclomatic 20) · ×1
  • extension.server (cyclomatic 20) REDACTED:495 — extension.server has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · collector.trackTools (cyclomatic 20) · ×1
  • collector.trackTools (cyclomatic 20) extensions/agent-radar/collector.mjs:749 — collector.trackTools 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 · qr.penalty (cyclomatic 20) · ×1
  • qr.penalty (cyclomatic 20) extensions/apng-studio/qr.mjs:351 — qr.penalty 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 · board-core.recapMarkdown (cyclomatic 20) · ×1
  • board-core.recapMarkdown (cyclomatic 20) REDACTED:243 — board-core.recapMarkdown has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent 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 · geometry.hitTest (cyclomatic 20) · ×1
  • geometry.hitTest (cyclomatic 20) extensions/draw/lib/geometry.mjs:582 — geometry.hitTest 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 · flightControls.FlightControls._init (cyclomatic 20) · ×1
  • flightControls.FlightControls._init (cyclomatic 20) extensions/flight-map-canvas/game/flightControls.js:90 — flightControls.FlightControls._init 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 6 function literals inside it that branch (lines 135, 93, 114, …). 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-_8h8h3EK.deserializer · ×1
  • index-_8h8h3EK.deserializer::unpair (cyclomatic 20) REDACTED:43009 — index-_8h8h3EK.deserializer::unpair has cyclomatic complexity 20 (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 · UtfString.constructor (cyclomatic 20) · ×1
  • UtfString.constructor (cyclomatic 20) extensions/github-security/extension.mjs:8233 — UtfString.constructor 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. This is NOT this file's highest cyclomatic complexity: extension.p (cyclomatic 40) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · extension.parseTheme (cyclomatic 20) · ×1
  • extension.parseTheme (cyclomatic 20) extensions/github-security/extension.mjs:1077 — extension.parseTheme 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. This is NOT this file's highest cyclomatic complexity: extension.p (cyclomatic 40) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · extension.verifyIntersections (cyclomatic 20) · ×1
  • extension.verifyIntersections (cyclomatic 20) extensions/github-security/extension.mjs:7340 — extension.verifyIntersections 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. This is NOT this file's highest cyclomatic complexity: extension.p (cyclomatic 40) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · board.template.html.dayRecap (cyclomatic 20) · ×1
  • board.template.html.dayRecap (cyclomatic 20) skills/daily-focus-board/assets/board.template.html:427 — board.template.html.dayRecap has cyclomatic complexity 20 (threshold 15). Of this number, 13 points are the body's own statements and 7 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TopNav.TopNav (cyclomatic 20) · ×1
  • TopNav.TopNav (cyclomatic 20) website/src/components/brand/TopNav.tsx:44 — TopNav.TopNav has cyclomatic complexity 20 (threshold 15). Of this number, 10 points are the body's own statements and 10 belong to 6 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · markdown-images.resolveMarkdownImage (cyclomatic 20) · ×1
  • markdown-images.resolveMarkdownImage (cyclomatic 20) website/src/lib/markdown-images.ts:11 — markdown-images.resolveMarkdownImage has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · quality_gate._check_citation_block (cyclomatic 20) · ×1
  • quality_gate._check_citation_block (cyclomatic 20) skills/quality-playbook/quality_gate.py:1863 — quality_gate._check_citation_block has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · repositoryResultHtml (cyclomatic 20) · ×1
  • repositoryResultHtml (cyclomatic 20) REDACTED:1102 — repositoryResultHtml has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · refreshPullTable (cyclomatic 20) · ×1
  • refreshPullTable (cyclomatic 20) REDACTED:2861 — refreshPullTable 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 · handler (cyclomatic 20) · ×1
  • handler (cyclomatic 20) REDACTED:2049 — handler has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · workflowAction (cyclomatic 20) · ×1
  • workflowAction (cyclomatic 20) extensions/foundry-agentic-loop-canvas/public/app.js:1550 — workflowAction has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 5 of the 20 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1569, 1561). 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 · evaluateExternalPluginIssue (cyclomatic 20) · ×1
  • evaluateExternalPluginIssue (cyclomatic 20) eng/external-plugin-intake.mjs:1356 — evaluateExternalPluginIssue has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · runLoop (cyclomatic 20) · ×1
  • runLoop (cyclomatic 20) extensions/foundry-agentic-loop-workflow/lib/loop.mjs:405 — runLoop has cyclomatic complexity 20 (threshold 15). Of this number, 15 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 · geocode (cyclomatic 20) · ×1
  • geocode (cyclomatic 20) REDACTED:170 — geocode 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 · (anonymous) (cyclomatic 20) · ×1
  • (anonymous) (cyclomatic 20) REDACTED:495 — (anonymous) has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · dispatch (cyclomatic 20) · ×1
  • dispatch (cyclomatic 20) .github/extensions/resource-staleness-board/extension.mjs:142 — dispatch 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 · ghTokens (cyclomatic 20) · ×1
  • ghTokens (cyclomatic 20) extensions/pr-review/github.mjs:20 — ghTokens has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent 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 · submission-gate.resolvePullRequestForWorkflowRun (cyclomatic 19) · ×1
  • submission-gate.resolvePullRequestForWorkflowRun (cyclomatic 19) REDACTED:1168 — submission-gate.resolvePullRequestForWorkflowRun has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · submission-gate.rerunChecks (cyclomatic 19) · ×1
  • submission-gate.rerunChecks (cyclomatic 19) REDACTED:1205 — submission-gate.rerunChecks 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 · ui.html.spawnParticles (cyclomatic 19) · ×1
  • ui.html.spawnParticles (cyclomatic 19) extensions/agent-radar/ui.html:435 — ui.html.spawnParticles 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 · sample-data.writeSampleHome · ×1
  • sample-data.writeSampleHome::generateSession (cyclomatic 19) extensions/ai-credits-breakdown/sample-data.mjs:90 — sample-data.writeSampleHome::generateSession 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. This shape REPEATS in the file: one other method here (sample-data.writeSampleHome) 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.
D1 · Cyclomatic Complexity · qr.placeFinder (cyclomatic 19) · ×1
  • qr.placeFinder (cyclomatic 19) extensions/apng-studio/qr.mjs:158 — qr.placeFinder has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · board-core.startServer.server (cyclomatic 19) · ×1
  • board-core.startServer.server (cyclomatic 19) REDACTED:322 — board-core.startServer.server 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 · extension.server (cyclomatic 19) · ×1
  • extension.server (cyclomatic 19) extensions/gesture-review/extension.mjs:106 — extension.server has cyclomatic complexity 19 (threshold 15). Of this number, 14 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 · index-_8h8h3EK.Portal (cyclomatic 19) · ×1
  • index-_8h8h3EK.Portal (cyclomatic 19) REDACTED:15887 — index-_8h8h3EK.Portal has cyclomatic complexity 19 (threshold 15). Of this number, 14 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index-_8h8h3EK.SkeletonBox (cyclomatic 19) · ×1
  • index-_8h8h3EK.SkeletonBox (cyclomatic 19) REDACTED:17095 — index-_8h8h3EK.SkeletonBox 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, 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 · index-_8h8h3EK.Autocomplete (cyclomatic 19) · ×1
  • index-_8h8h3EK.Autocomplete (cyclomatic 19) REDACTED:24919 — index-_8h8h3EK.Autocomplete has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index-_8h8h3EK.resolveAllLineSuffixes (cyclomatic 19) · ×1
  • index-_8h8h3EK.resolveAllLineSuffixes (cyclomatic 19) REDACTED:40176 — index-_8h8h3EK.resolveAllLineSuffixes 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 · index-_8h8h3EK.listItem (cyclomatic 19) · ×1
  • index-_8h8h3EK.listItem (cyclomatic 19) REDACTED:42489 — index-_8h8h3EK.listItem 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 · server.dispatchAction (cyclomatic 19) · ×1
  • server.dispatchAction (cyclomatic 19) extensions/java-modernization-studio/server.mjs:139 — server.dispatchAction has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · server.makeHandler (cyclomatic 19) · ×1
  • server.makeHandler (cyclomatic 19) extensions/java-modernization-studio/server.mjs:220 — server.makeHandler has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to one function literal inside it that branches (line 221). 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 · extension.handleRequest (cyclomatic 19) · ×1
  • extension.handleRequest (cyclomatic 19) extensions/repo-actions-hub/extension.mjs:206 — extension.handleRequest has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · extension.parseInputs (cyclomatic 19) · ×1
  • extension.parseInputs (cyclomatic 19) extensions/repo-actions-hub/extension.mjs:587 — extension.parseInputs 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 · REDACTED.initSummaryMap (cyclomatic 19) · ×1
  • REDACTED.initSummaryMap (cyclomatic 19) REDACTED:2016 — REDACTED.initSummaryMap has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 2035). 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 · utils.parseDateRange (cyclomatic 19) · ×1
  • utils.parseDateRange (cyclomatic 19) skills/pr-dashboard/scripts/lib/utils.mjs:8 — utils.parseDateRange has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useAgentDetailScroll.useAgentDetailHeroPin (cyclomatic 19) · ×1
  • useAgentDetailScroll.useAgentDetailHeroPin (cyclomatic 19) website/src/components/brand/useAgentDetailScroll.ts:13 — useAgentDetailScroll.useAgentDetailHeroPin has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 36, 20, 60). 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 · AgentsCatalog.AgentsCatalog (cyclomatic 19) · ×1
  • AgentsCatalog.AgentsCatalog (cyclomatic 19) website/src/components/brand/AgentsCatalog.tsx:114 — AgentsCatalog.AgentsCatalog has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 6 of the 19 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 162, 257, 143, …). 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 · PluginsCatalog.PluginsCatalog (cyclomatic 19) · ×1
  • PluginsCatalog.PluginsCatalog (cyclomatic 19) website/src/components/brand/PluginsCatalog.tsx:122 — PluginsCatalog.PluginsCatalog has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 6 of the 19 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 164, 264, 163, …). 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 · quality_gate.check_file_existence (cyclomatic 19) · ×1
  • quality_gate.check_file_existence (cyclomatic 19) skills/quality-playbook/quality_gate.py:756 — quality_gate.check_file_existence 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 · quality_gate.check_bugs_heading (cyclomatic 19) · ×1
  • quality_gate.check_bugs_heading (cyclomatic 19) skills/quality-playbook/quality_gate.py:829 — quality_gate.check_bugs_heading 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 · quality_gate.check_v1_5_0_requirements_manifest (cyclomatic 19) · ×1
  • quality_gate.check_v1_5_0_requirements_manifest (cyclomatic 19) skills/quality-playbook/quality_gate.py:1958 — quality_gate.check_v1_5_0_requirements_manifest 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 · quality_gate.check_hybrid_cross_cutting_reqs (cyclomatic 19) · ×1
  • quality_gate.check_hybrid_cross_cutting_reqs (cyclomatic 19) skills/quality-playbook/quality_gate.py:3071 — quality_gate.check_hybrid_cross_cutting_reqs 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 · continueProgressivePullList · ×1
  • continueProgressivePullList::worker (cyclomatic 19) REDACTED:2786 — continueProgressivePullList::worker 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 · renderBrowser · ×1
  • renderBrowser::applyLayout (cyclomatic 19) REDACTED:805 — renderBrowser::applyLayout 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 · (anonymous) (cyclomatic 19) · ×1
  • (anonymous) (cyclomatic 19) extensions/gesture-review/extension.mjs:106 — (anonymous) has cyclomatic complexity 19 (threshold 15). Of this number, 14 points are the body's own statements and 5 belong to 7 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · createActions.apply (cyclomatic 19) · ×1
  • createActions.apply (cyclomatic 19) eng/review-routing.mjs:647 — createActions.apply 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 · updatePreview (cyclomatic 19) · ×1
  • updatePreview (cyclomatic 19) REDACTED:623 — updatePreview has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · renderBoard (cyclomatic 19) · ×1
  • renderBoard (cyclomatic 19) .github/extensions/open-pr-board/public/app.js:281 — renderBoard 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 8 function items inside it that branch ((anonymous)::ondrop, a function literal at line 286, a function literal at line 340, …). 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 · load (cyclomatic 19) · ×1
  • load (cyclomatic 19) .github/extensions/resource-staleness-board/lib/state.mjs:125 — load has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · reduce (cyclomatic 19) · ×1
  • reduce (cyclomatic 19) extensions/foundry-agentic-loop-workflow/lib/record.mjs:188 — reduce has cyclomatic complexity 19 (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 · normalizeCheck (cyclomatic 19) · ×1
  • normalizeCheck (cyclomatic 19) .github/extensions/open-pr-board/lib/github.mjs:111 — normalizeCheck 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 · startServer (cyclomatic 19) · ×1
  • startServer (cyclomatic 19) extensions/agent-radar/extension.mjs:49 — startServer has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 5 of the 19 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 59, authorized, a function literal at line 79, …). 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 · resourceTable (cyclomatic 19) · ×1
  • resourceTable (cyclomatic 19) .github/extensions/duplicate-review-board/lib/report.mjs:44 — resourceTable has cyclomatic complexity 19 (threshold 15). Of this number, 15 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 · runtime.redactError · ×1
  • runtime.redactError::sanitizeEmbeddedJson (cyclomatic 18) eng/canvas-error-handoff/runtime.mjs:23 — runtime.redactError::sanitizeEmbeddedJson 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 · review-routing.createActions.apply (cyclomatic 18) · ×1
  • review-routing.createActions.apply (cyclomatic 18) eng/review-routing.mjs:647 — review-routing.createActions.apply 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 · validate-plugins.validateMcpConfig (cyclomatic 18) · ×1
  • validate-plugins.validateMcpConfig (cyclomatic 18) eng/validate-plugins.mjs:215 — validate-plugins.validateMcpConfig 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 · collector.collectBackgroundShells (cyclomatic 18) · ×1
  • collector.collectBackgroundShells (cyclomatic 18) extensions/agent-radar/collector.mjs:248 — collector.collectBackgroundShells has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, 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 · db.computeSnapshot (cyclomatic 18) · ×1
  • db.computeSnapshot (cyclomatic 18) extensions/chronicle-stats/db.mjs:69 — db.computeSnapshot has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · server.createDrawServer.drawingsAction (cyclomatic 18) · ×1
  • server.createDrawServer.drawingsAction (cyclomatic 18) REDACTED:318 — server.createDrawServer.drawingsAction 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 · index-_8h8h3EK.TrailingAction (cyclomatic 18) · ×1
  • index-_8h8h3EK.TrailingAction (cyclomatic 18) REDACTED:19117 — index-_8h8h3EK.TrailingAction has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index-_8h8h3EK.useMoveFocusToMenuItem (cyclomatic 18) · ×1
  • index-_8h8h3EK.useMoveFocusToMenuItem (cyclomatic 18) REDACTED:22288 — index-_8h8h3EK.useMoveFocusToMenuItem has cyclomatic complexity 18 (threshold 15). Of this number, 10 points are the body's own statements and 8 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index-_8h8h3EK.toJsxRuntime (cyclomatic 18) · ×1
  • index-_8h8h3EK.toJsxRuntime (cyclomatic 18) REDACTED:32926 — index-_8h8h3EK.toJsxRuntime 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 · index-_8h8h3EK.subcontent (cyclomatic 18) · ×1
  • index-_8h8h3EK.subcontent (cyclomatic 18) REDACTED:36305 — index-_8h8h3EK.subcontent 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 · index-_8h8h3EK.FindingsList (cyclomatic 18) · ×1
  • index-_8h8h3EK.FindingsList (cyclomatic 18) REDACTED:48960 — index-_8h8h3EK.FindingsList has cyclomatic complexity 18 (threshold 15). Of this number, 14 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · GitRepositoryInfoResolver.getRepositoryInfo (cyclomatic 18) · ×1
  • GitRepositoryInfoResolver.getRepositoryInfo (cyclomatic 18) extensions/github-security/extension.mjs:9686 — GitRepositoryInfoResolver.getRepositoryInfo has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: extension.p (cyclomatic 40) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · extension.transformerDecorations.code · ×1
  • extension.transformerDecorations.code::applyLineSection (cyclomatic 18) extensions/github-security/extension.mjs:7280 — extension.transformerDecorations.code::applyLineSection has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: extension.p (cyclomatic 40) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · github.createGitHubClient.listFiles (cyclomatic 18) · ×1
  • github.createGitHubClient.listFiles (cyclomatic 18) extensions/pr-review/github.mjs:207 — github.createGitHubClient.listFiles has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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 · data.normalizeRuntimeSession (cyclomatic 18) · ×1
  • data.normalizeRuntimeSession (cyclomatic 18) extensions/work-hub/data.mjs:438 — data.normalizeRuntimeSession has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · data.normalizeAppWorkspace (cyclomatic 18) · ×1
  • data.normalizeAppWorkspace (cyclomatic 18) extensions/work-hub/data.mjs:471 — data.normalizeAppWorkspace has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · data.summarizeRepoStatus (cyclomatic 18) · ×1
  • data.summarizeRepoStatus (cyclomatic 18) extensions/work-hub/data.mjs:836 — data.summarizeRepoStatus has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · evals.run (cyclomatic 18) · ×1
  • evals.run (cyclomatic 18) skills/foundry-agentic-loop/scripts/evals.mjs:303 — evals.run has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · InstructionsCatalog.InstructionsCatalog (cyclomatic 18) · ×1
  • InstructionsCatalog.InstructionsCatalog (cyclomatic 18) website/src/components/brand/InstructionsCatalog.tsx:110 — InstructionsCatalog.InstructionsCatalog has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 161, 258, 167, …). 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 · convert_pdf_to_md.extract_images (cyclomatic 18) · ×1
  • convert_pdf_to_md.extract_images (cyclomatic 18) skills/convert-pdf-to-md/scripts/convert_pdf_to_md.py:96 — convert_pdf_to_md.extract_images has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · markdown_to_word._add_inline_content (cyclomatic 18) · ×1
  • markdown_to_word._add_inline_content (cyclomatic 18) skills/markdown-to-word-mermaid/scripts/markdown_to_word.py:173 — markdown_to_word._add_inline_content 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 · quality_gate.check_writeups (cyclomatic 18) · ×1
  • quality_gate.check_writeups (cyclomatic 18) skills/quality-playbook/quality_gate.py:1442 — quality_gate.check_writeups 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 · quality_gate.check_v1_5_0_index_md (cyclomatic 18) · ×1
  • quality_gate.check_v1_5_0_index_md (cyclomatic 18) skills/quality-playbook/quality_gate.py:2076 — quality_gate.check_v1_5_0_index_md 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 · quality_gate.check_challenge_gate_coverage (cyclomatic 18) · ×1
  • quality_gate.check_challenge_gate_coverage (cyclomatic 18) skills/quality-playbook/quality_gate.py:2551 — quality_gate.check_challenge_gate_coverage 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 · analyze_plan.format_set_change (cyclomatic 18) · ×1
  • analyze_plan.format_set_change (cyclomatic 18) skills/terraform-azurerm-set-diff-analyzer/scripts/analyze_plan.py:515 — analyze_plan.format_set_change has cyclomatic complexity 18 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · transformerDecorations.code · ×1
  • transformerDecorations.code::applyLineSection (cyclomatic 18) extensions/github-security/extension.mjs:7280 — transformerDecorations.code::applyLineSection has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: p (cyclomatic 40) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · toReleaseStateFromCommits (cyclomatic 18) · ×1
  • toReleaseStateFromCommits (cyclomatic 18) extensions/release-notes-showcase/releaseNotesShowcase.mjs:354 — toReleaseStateFromCommits has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 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 · buildReleaseFromRepository (cyclomatic 18) · ×1
  • buildReleaseFromRepository (cyclomatic 18) extensions/release-notes-showcase/releaseNotesShowcase.mjs:572 — buildReleaseFromRepository 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 · textToTable (cyclomatic 18) · ×1
  • textToTable (cyclomatic 18) REDACTED:349 — textToTable has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to 7 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · buildMergedIntakeComment (cyclomatic 18) · ×1
  • buildMergedIntakeComment (cyclomatic 18) eng/external-plugin-intake.mjs:1285 — buildMergedIntakeComment has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · planRouting (cyclomatic 18) · ×1
  • planRouting (cyclomatic 18) eng/review-routing.mjs:449 — planRouting 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 · makeSimulationContext (cyclomatic 18) · ×1
  • makeSimulationContext (cyclomatic 18) skills/webmcpify/templates/webmcp-workbench.js:58 — makeSimulationContext 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 12 function items inside it that branch (registerTool, executeTool, a function literal at line 96, …). 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 · signalPills (cyclomatic 18) · ×1
  • signalPills (cyclomatic 18) REDACTED:119 — signalPills has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · bulkAction (cyclomatic 18) · ×1
  • bulkAction (cyclomatic 18) REDACTED:250 — bulkAction has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to 6 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · statusPills (cyclomatic 18) · ×1
  • statusPills (cyclomatic 18) .github/extensions/open-pr-board/public/app.js:211 — statusPills has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · createDrawServer.drawingsAction (cyclomatic 18) · ×1
  • createDrawServer.drawingsAction (cyclomatic 18) REDACTED:318 — createDrawServer.drawingsAction 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 · createValidationContext (cyclomatic 18) · ×1
  • createValidationContext (cyclomatic 18) extensions/windows-app-storage-inspector-cleanup/src/core/cleanup.mjs:154 — createValidationContext has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 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 · patchElement (cyclomatic 18) · ×1
  • patchElement (cyclomatic 18) extensions/draw/actions.mjs:101 — patchElement has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 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 · fromExplorerPath (cyclomatic 18) · ×1
  • fromExplorerPath (cyclomatic 18) REDACTED:201 — fromExplorerPath 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 · routeFor (cyclomatic 18) · ×1
  • routeFor (cyclomatic 18) REDACTED:414 — routeFor 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 · readUsageWindow (cyclomatic 18) · ×1
  • readUsageWindow (cyclomatic 18) extensions/chronicle-stats/analytics.mjs:32 — readUsageWindow has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body's own statements and 5 belong to 11 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 · createGitHubClient.listFiles (cyclomatic 18) · ×1
  • createGitHubClient.listFiles (cyclomatic 18) extensions/pr-review/github.mjs:207 — createGitHubClient.listFiles has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · (anonymous).search (cyclomatic 18) · ×1
  • (anonymous).search (cyclomatic 18) extensions/flight-map-canvas/game/geocoder.js:254 — (anonymous).search has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 5 of the 18 points are its own statements and the rest belongs to 2 function items inside it that branch (success, failure). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · probeCandidate (cyclomatic 18) · ×1
  • probeCandidate (cyclomatic 18) extensions/pr-artifact-explorer/accounts.mjs:123 — probeCandidate 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 · createSnapshotStore.page (cyclomatic 18) · ×1
  • createSnapshotStore.page (cyclomatic 18) extensions/chronicle-stats/snapshots.mjs:44 — createSnapshotStore.page has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 52). 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 · agent-plugin-schema.validateRemoteServer (cyclomatic 17) · ×1
  • agent-plugin-schema.validateRemoteServer (cyclomatic 17) eng/agent-plugin-schema.mjs:219 — agent-plugin-schema.validateRemoteServer 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 · HandoffResponse.writeHead (cyclomatic 17) · ×1
  • HandoffResponse.writeHead (cyclomatic 17) eng/canvas-error-handoff/runtime.mjs:404 — HandoffResponse.writeHead 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 · update-readme.generatePluginsSection (cyclomatic 17) · ×1
  • update-readme.generatePluginsSection (cyclomatic 17) eng/update-readme.mjs:531 — update-readme.generatePluginsSection has cyclomatic complexity 17 (threshold 15). Of this number, 14 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 · validate-plugins.validateSpecPaths (cyclomatic 17) · ×1
  • validate-plugins.validateSpecPaths (cyclomatic 17) eng/validate-plugins.mjs:119 — validate-plugins.validateSpecPaths 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 · sample-data.writeSampleHome (cyclomatic 17) · ×1
  • sample-data.writeSampleHome (cyclomatic 17) extensions/ai-credits-breakdown/sample-data.mjs:36 — sample-data.writeSampleHome has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (sample-data.writeSampleHome::generateSession) 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.
D1 · Cyclomatic Complexity · app.init · ×1
  • app.init::renderStatement (cyclomatic 17) extensions/ai-credits-breakdown/ui/app.js:265 — app.init::renderStatement 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 · model.sameJson (cyclomatic 17) · ×1
  • model.sameJson (cyclomatic 17) extensions/draw/lib/model.mjs:269 — model.sameJson 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 · extension.clampLoadedState (cyclomatic 17) · ×1
  • extension.clampLoadedState (cyclomatic 17) REDACTED:597 — extension.clampLoadedState has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · terrainFill.TerrainFill._isSkipColor (cyclomatic 17) · ×1
  • terrainFill.TerrainFill._isSkipColor (cyclomatic 17) extensions/flight-map-canvas/game/terrainFill.js:275 — terrainFill.TerrainFill._isSkipColor 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 · app.renderPhase (cyclomatic 17) · ×1
  • app.renderPhase (cyclomatic 17) extensions/foundry-agentic-loop-canvas/public/app.js:1269 — app.renderPhase has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · loop.checkpointLines (cyclomatic 17) · ×1
  • loop.checkpointLines (cyclomatic 17) extensions/foundry-agentic-loop-workflow/lib/loop.mjs:53 — loop.checkpointLines has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Duration.constructor (cyclomatic 17) · ×1
  • Duration.constructor (cyclomatic 17) REDACTED:29890 — Duration.constructor 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 · index-_8h8h3EK.focusTrap (cyclomatic 17) · ×1
  • index-_8h8h3EK.focusTrap (cyclomatic 17) REDACTED:14123 — index-_8h8h3EK.focusTrap has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to 2 function items inside it that branch (ensureTrapZoneHasFocus, a function literal at line 14166). 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 · index-_8h8h3EK.Checkbox (cyclomatic 17) · ×1
  • index-_8h8h3EK.Checkbox (cyclomatic 17) REDACTED:20258 — index-_8h8h3EK.Checkbox has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to 3 function items inside it that branch (handleOnChange, a function literal at line 20295, a function literal at line 20288). 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 · index-_8h8h3EK.Anchor (cyclomatic 17) · ×1
  • index-_8h8h3EK.Anchor (cyclomatic 17) REDACTED:23129 — index-_8h8h3EK.Anchor 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 5 function items inside it that branch (a function literal at line 23131, onButtonClick, onButtonKeyDown, …). 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 · index-_8h8h3EK.i (cyclomatic 17) · ×1
  • index-_8h8h3EK.i (cyclomatic 17) REDACTED:24162 — index-_8h8h3EK.i has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent 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-_8h8h3EK.FindingCodeSnippet (cyclomatic 17) · ×1
  • index-_8h8h3EK.FindingCodeSnippet (cyclomatic 17) REDACTED:47551 — index-_8h8h3EK.FindingCodeSnippet has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent 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-_8h8h3EK.FindingDetailsContent (cyclomatic 17) · ×1
  • index-_8h8h3EK.FindingDetailsContent (cyclomatic 17) REDACTED:48211 — index-_8h8h3EK.FindingDetailsContent 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 · extension._tokenizeString · ×1
  • extension._tokenizeString::scanNext (cyclomatic 17) extensions/github-security/extension.mjs:2290 — extension._tokenizeString::scanNext has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: extension.p (cyclomatic 40) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · extension.flatTokenVariants (cyclomatic 17) · ×1
  • extension.flatTokenVariants (cyclomatic 17) extensions/github-security/extension.mjs:7178 — extension.flatTokenVariants has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 2 function items inside it that branch (a function literal at line 7191, varKey). 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. This is NOT this file's highest cyclomatic complexity: extension.p (cyclomatic 40) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · extension.main (cyclomatic 17) · ×1
  • extension.main (cyclomatic 17) extensions/github-security/extension.mjs:8138 — extension.main has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 4 function items inside it that branch (UTF8ArrayToString, _emscripten_resize_heap, emscripten_realloc_buffer, …). 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. This is NOT this file's highest cyclomatic complexity: extension.p (cyclomatic 40) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · doctor.expandJavaHomeValue (cyclomatic 17) · ×1
  • doctor.expandJavaHomeValue (cyclomatic 17) extensions/java-modernization-studio/doctor.mjs:108 — doctor.expandJavaHomeValue has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · scan.normalizeFinding (cyclomatic 17) · ×1
  • scan.normalizeFinding (cyclomatic 17) REDACTED:108 — scan.normalizeFinding 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 · browser.handleBrowserCommand (cyclomatic 17) · ×1
  • browser.handleBrowserCommand (cyclomatic 17) REDACTED:1099 — browser.handleBrowserCommand 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 · card.statusLinks (cyclomatic 17) · ×1
  • card.statusLinks (cyclomatic 17) extensions/sentry-triage/components/card.mjs:42 — card.statusLinks 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 · extension.launchDeskConsole (cyclomatic 17) · ×1
  • extension.launchDeskConsole (cyclomatic 17) REDACTED:434 — extension.launchDeskConsole 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 · analyzer.detectLicenseText (cyclomatic 17) · ×1
  • analyzer.detectLicenseText (cyclomatic 17) extensions/tiny-tool-town-submitter/lib/analyzer.mjs:198 — analyzer.detectLicenseText has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · extension.requestItemSession (cyclomatic 17) · ×1
  • extension.requestItemSession (cyclomatic 17) extensions/work-hub/extension.mjs:82 — extension.requestItemSession has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · scan-cypress.countTopLevelCommas (cyclomatic 17) · ×1
  • scan-cypress.countTopLevelCommas (cyclomatic 17) skills/cypress-flake-fixer/scripts/scan-cypress.mjs:248 — scan-cypress.countTopLevelCommas 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 · napkin.html.finishDrawing (cyclomatic 17) · ×1
  • napkin.html.finishDrawing (cyclomatic 17) skills/napkin/assets/napkin.html:1402 — napkin.html.finishDrawing has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · napkin.html.document.addEventListener("keydown") (cyclomatic 17) · ×1
  • napkin.html.document.addEventListener("keydown") (cyclomatic 17) skills/napkin/assets/napkin.html:1544 — napkin.html.document.addEventListener("keydown") 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 · CatalogResourceSizeControl.CatalogResourceSizeControl (cyclomatic 17) · ×1
  • CatalogResourceSizeControl.CatalogResourceSizeControl (cyclomatic 17) website/src/components/brand/CatalogResourceSizeControl.tsx:48 — CatalogResourceSizeControl.CatalogResourceSizeControl 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 6 function items inside it that branch (handleKeyDown, closeMenu, a function literal at line 75, …). 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 · LearningArticleLayout.LearningArticleLayoutBody (cyclomatic 17) · ×1
  • LearningArticleLayout.LearningArticleLayoutBody (cyclomatic 17) website/src/components/brand/LearningArticleLayout.tsx:165 — LearningArticleLayout.LearningArticleLayoutBody has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, 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 · inventory_skills.parse_frontmatter (cyclomatic 17) · ×1
  • inventory_skills.parse_frontmatter (cyclomatic 17) skills/agent-skill-stack/scripts/inventory_skills.py:49 — inventory_skills.parse_frontmatter 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 · analysis.drop_highpsi_features (cyclomatic 17) · ×1
  • analysis.drop_highpsi_features (cyclomatic 17) skills/datanalysis-credit-risk/references/analysis.py:529 — analysis.drop_highpsi_features has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · verify_step6_completion.validate_results_dir (cyclomatic 17) · ×1
  • verify_step6_completion.validate_results_dir (cyclomatic 17) skills/eval-driven-dev/resources/verify_step6_completion.py:56 — verify_step6_completion.validate_results_dir 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 · eyeball.convert_to_pdf (cyclomatic 17) · ×1
  • eyeball.convert_to_pdf (cyclomatic 17) skills/eyeball/tools/eyeball.py:82 — eyeball.convert_to_pdf 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 · detect_hazards.python_ast_findings (cyclomatic 17) · ×1
  • detect_hazards.python_ast_findings (cyclomatic 17) skills/poka-yoke/scripts/detect_hazards.py:252 — detect_hazards.python_ast_findings 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 · analyze_plan.format_markdown_output (cyclomatic 17) · ×1
  • analyze_plan.format_markdown_output (cyclomatic 17) skills/terraform-azurerm-set-diff-analyzer/scripts/analyze_plan.py:572 — analyze_plan.format_markdown_output has cyclomatic complexity 17 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · produceFromScopes (cyclomatic 17) · ×1
  • produceFromScopes (cyclomatic 17) extensions/github-security/extension.mjs:3004 — produceFromScopes has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: p (cyclomatic 40) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · accountCardHtml (cyclomatic 17) · ×1
  • accountCardHtml (cyclomatic 17) REDACTED:5561 — accountCardHtml has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · initialRouteFromInput (cyclomatic 17) · ×1
  • initialRouteFromInput (cyclomatic 17) REDACTED:163 — initialRouteFromInput has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · loadGateConfig (cyclomatic 17) · ×1
  • loadGateConfig (cyclomatic 17) REDACTED:88 — loadGateConfig 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 · parseExternalPluginIssueBody (cyclomatic 17) · ×1
  • parseExternalPluginIssueBody (cyclomatic 17) eng/external-plugin-intake.mjs:952 — parseExternalPluginIssueBody has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · h (cyclomatic 17) · ×1
  • h (cyclomatic 17) .github/extensions/open-pr-board/public/app.js:79 — h 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 · save (cyclomatic 17) · ×1
  • save (cyclomatic 17) .github/extensions/duplicate-review-board/public/app.js:400 — save 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 · renderFrames (cyclomatic 17) · ×1
  • renderFrames (cyclomatic 17) extensions/apng-studio/web/app.js:135 — renderFrames has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 141, (anonymous)::updateHint, (anonymous)::commit, …). 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 · sync (cyclomatic 17) · ×1
  • sync (cyclomatic 17) .github/extensions/resource-staleness-board/lib/state.mjs:294 — sync has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 302, 295, 303). 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 · renderBatch (cyclomatic 17) · ×1
  • renderBatch (cyclomatic 17) .github/extensions/resource-staleness-board/public/app.js:166 — renderBatch has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to 8 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · records (cyclomatic 17) · ×1
  • records (cyclomatic 17) extensions/foundry-agentic-loop-canvas/lib/live.mjs:359 — records has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs 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 · buildPrompt (cyclomatic 17) · ×1
  • buildPrompt (cyclomatic 17) extensions/foundry-agentic-loop-workflow/lib/prompts.mjs:133 — buildPrompt has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · resolveAccounts (cyclomatic 17) · ×1
  • resolveAccounts (cyclomatic 17) extensions/pr-artifact-explorer/accounts.mjs:277 — resolveAccounts has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 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 · (anonymous).apply (cyclomatic 17) · ×1
  • (anonymous).apply (cyclomatic 17) extensions/flight-map-canvas/game/renderConfig.js:140 — (anonymous).apply 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 · (anonymous) (cyclomatic 17) · ×1
  • (anonymous) (cyclomatic 17) extensions/foundry-agentic-loop-canvas/public/deck.js:96 — (anonymous) has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · boot (cyclomatic 17) · ×1
  • boot (cyclomatic 17) extensions/draw/public/app.js:27 — boot has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to 19 function items inside it that branch (answerExport, applyMode, a function literal at line 100, …). 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 · startServer (cyclomatic 17) · ×1
  • startServer (cyclomatic 17) extensions/ai-credits-breakdown/server.mjs:21 — startServer has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 35, authorized, reply, …). 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 · create-plugin.parseArgs (cyclomatic 16) · ×1
  • create-plugin.parseArgs (cyclomatic 16) eng/create-plugin.mjs:21 — create-plugin.parseArgs has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · external-plugin-intake.inspectHomepage (cyclomatic 16) · ×1
  • external-plugin-intake.inspectHomepage (cyclomatic 16) eng/external-plugin-intake.mjs:457 — external-plugin-intake.inspectHomepage 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 · external-plugin-quality-gates.runCanvasStructureGate (cyclomatic 16) · ×1
  • external-plugin-quality-gates.runCanvasStructureGate (cyclomatic 16) eng/external-plugin-quality-gates.mjs:861 — external-plugin-quality-gates.runCanvasStructureGate 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 · review-metrics.renderReport (cyclomatic 16) · ×1
  • review-metrics.renderReport (cyclomatic 16) eng/review-metrics.mjs:308 — review-metrics.renderReport 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 · update-readme.generateFeaturedPluginsSection (cyclomatic 16) · ×1
  • update-readme.generateFeaturedPluginsSection (cyclomatic 16) eng/update-readme.mjs:629 — update-readme.generateFeaturedPluginsSection has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 646). 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 · validate-plugins.validatePlugins (cyclomatic 16) · ×1
  • validate-plugins.validatePlugins (cyclomatic 16) eng/validate-plugins.mjs:424 — validate-plugins.validatePlugins 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 · collector.createdSession (cyclomatic 16) · ×1
  • collector.createdSession (cyclomatic 16) extensions/agent-radar/collector.mjs:164 — collector.createdSession 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 items inside it that branch (read, a function literal at line 171). 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 · collector.mutate (cyclomatic 16) · ×1
  • collector.mutate (cyclomatic 16) extensions/agent-radar/collector.mjs:577 — collector.mutate 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 · collector.collectVSCodeChats (cyclomatic 16) · ×1
  • collector.collectVSCodeChats (cyclomatic 16) extensions/agent-radar/collector.mjs:871 — collector.collectVSCodeChats has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 881, 897). 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 · extension.SNAPSHOT_FN (cyclomatic 16) · ×1
  • extension.SNAPSHOT_FN (cyclomatic 16) REDACTED:202 — extension.SNAPSHOT_FN has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · snapshots.createSnapshotStore.page (cyclomatic 16) · ×1
  • snapshots.createSnapshotStore.page (cyclomatic 16) extensions/chronicle-stats/snapshots.mjs:44 — snapshots.createSnapshotStore.page has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 52). 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 · snapshots.createSnapshotStore.coaching (cyclomatic 16) · ×1
  • snapshots.createSnapshotStore.coaching (cyclomatic 16) extensions/chronicle-stats/snapshots.mjs:64 — snapshots.createSnapshotStore.coaching 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 · server.createDrawServer.handle (cyclomatic 16) · ×1
  • server.createDrawServer.handle (cyclomatic 16) REDACTED:411 — server.createDrawServer.handle has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · app.renderWorkIq (cyclomatic 16) · ×1
  • app.renderWorkIq (cyclomatic 16) extensions/foundry-agentic-loop-canvas/public/app.js:717 — app.renderWorkIq has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · app.loadTab (cyclomatic 16) · ×1
  • app.loadTab (cyclomatic 16) extensions/foundry-agentic-loop-canvas/public/app.js:1741 — app.loadTab has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · IndexedSet.insertAt (cyclomatic 16) · ×1
  • IndexedSet.insertAt (cyclomatic 16) REDACTED:14200 — IndexedSet.insertAt has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index-_8h8h3EK.iterateFocusableElements (cyclomatic 16) · ×1
  • index-_8h8h3EK.iterateFocusableElements (cyclomatic 16) REDACTED:13312 — index-_8h8h3EK.iterateFocusableElements has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index-_8h8h3EK.getDefaultSettings (cyclomatic 16) · ×1
  • index-_8h8h3EK.getDefaultSettings (cyclomatic 16) REDACTED:13931 — index-_8h8h3EK.getDefaultSettings has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index-_8h8h3EK.pureCalculateAnchoredPosition (cyclomatic 16) · ×1
  • index-_8h8h3EK.pureCalculateAnchoredPosition (cyclomatic 16) REDACTED:13944 — index-_8h8h3EK.pureCalculateAnchoredPosition 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 · index-_8h8h3EK.isFocusable (cyclomatic 16) · ×1
  • index-_8h8h3EK.isFocusable (cyclomatic 16) REDACTED:14777 — index-_8h8h3EK.isFocusable has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index-_8h8h3EK.apply (cyclomatic 16) · ×1
  • index-_8h8h3EK.apply (cyclomatic 16) REDACTED:15015 — index-_8h8h3EK.apply has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (index-_8h8h3EK.apply::applyPopoverInvokerElementMixin) 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.
D1 · Cyclomatic Complexity · index-_8h8h3EK.Heading$2 (cyclomatic 16) · ×1
  • index-_8h8h3EK.Heading$2 (cyclomatic 16) REDACTED:18194 — index-_8h8h3EK.Heading$2 has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index-_8h8h3EK.Overlay$1 (cyclomatic 16) · ×1
  • index-_8h8h3EK.Overlay$1 (cyclomatic 16) REDACTED:22689 — index-_8h8h3EK.Overlay$1 has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 22708, 22704). 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-_8h8h3EK.SelectPanelMessage (cyclomatic 16) · ×1
  • index-_8h8h3EK.SelectPanelMessage (cyclomatic 16) REDACTED:26730 — index-_8h8h3EK.SelectPanelMessage has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index-_8h8h3EK.InputValidation (cyclomatic 16) · ×1
  • index-_8h8h3EK.InputValidation (cyclomatic 16) REDACTED:28902 — index-_8h8h3EK.InputValidation has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index-_8h8h3EK.RadioGroup (cyclomatic 16) · ×1
  • index-_8h8h3EK.RadioGroup (cyclomatic 16) REDACTED:29574 — index-_8h8h3EK.RadioGroup has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index-_8h8h3EK.resolveToLabelEnd (cyclomatic 16) · ×1
  • index-_8h8h3EK.resolveToLabelEnd (cyclomatic 16) REDACTED:38996 — index-_8h8h3EK.resolveToLabelEnd 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 · extension.collectExternalReferencesInRules (cyclomatic 16) · ×1
  • extension.collectExternalReferencesInRules (cyclomatic 16) extensions/github-security/extension.mjs:1558 — extension.collectExternalReferencesInRules has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: extension.p (cyclomatic 40) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · doctor.discoverJavaHome (cyclomatic 16) · ×1
  • doctor.discoverJavaHome (cyclomatic 16) extensions/java-modernization-studio/doctor.mjs:157 — doctor.discoverJavaHome 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, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · app.requestPullPayload (cyclomatic 16) · ×1
  • app.requestPullPayload (cyclomatic 16) REDACTED:2359 — app.requestPullPayload has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: app.renderArtifact (cyclomatic 17) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · app.renderRoute (cyclomatic 16) · ×1
  • app.renderRoute (cyclomatic 16) REDACTED:5707 — app.renderRoute has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: app.renderArtifact (cyclomatic 17) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · junit-preview.parseReport · ×1
  • junit-preview.parseReport::visit (cyclomatic 16) REDACTED:107 — junit-preview.parseReport::visit 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 · preview.servePreviewRequest (cyclomatic 16) · ×1
  • preview.servePreviewRequest (cyclomatic 16) extensions/pr-artifact-explorer/preview.mjs:127 — preview.servePreviewRequest 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 · sentry.categorize (cyclomatic 16) · ×1
  • sentry.categorize (cyclomatic 16) extensions/sentry-triage/sentry.mjs:190 — sentry.categorize has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, 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 · extension.capturePluginMcpJson (cyclomatic 16) · ×1
  • extension.capturePluginMcpJson (cyclomatic 16) REDACTED:231 — extension.capturePluginMcpJson 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 4 function literals inside it that branch (lines 232, 256, 283, …). 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 · REDACTED.showLocationPopup (cyclomatic 16) · ×1
  • REDACTED.showLocationPopup (cyclomatic 16) REDACTED:1255 — REDACTED.showLocationPopup has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1267, 1325). 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 · SkillDetail.FileView (cyclomatic 16) · ×1
  • SkillDetail.FileView (cyclomatic 16) REDACTED:411 — SkillDetail.FileView has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · docs_drift.env_names_documented (cyclomatic 16) · ×1
  • docs_drift.env_names_documented (cyclomatic 16) skills/docs-sync-audit/scripts/docs_drift.py:220 — docs_drift.env_names_documented 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 · ContextGraphSkill.query_with_evidence (cyclomatic 16) · ×1
  • ContextGraphSkill.query_with_evidence (cyclomatic 16) skills/mini-context-graph/scripts/contextgraph.py:215 — ContextGraphSkill.query_with_evidence 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 · convert-pdf.convert (cyclomatic 16) · ×1
  • convert-pdf.convert (cyclomatic 16) skills/publish-to-pages/scripts/convert-pdf.py:32 — convert-pdf.convert has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · quality_gate._classify_bug_triggers (cyclomatic 16) · ×1
  • quality_gate._classify_bug_triggers (cyclomatic 16) skills/quality-playbook/quality_gate.py:2478 — quality_gate._classify_bug_triggers has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · artifactDownloadProgressHtml (cyclomatic 16) · ×1
  • artifactDownloadProgressHtml (cyclomatic 16) REDACTED:3208 — artifactDownloadProgressHtml has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · diffLines (cyclomatic 16) · ×1
  • diffLines (cyclomatic 16) REDACTED:880 — diffLines has cyclomatic complexity 16 (threshold 15). Of this number, 14 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 · generateSamplesData (cyclomatic 16) · ×1
  • generateSamplesData (cyclomatic 16) REDACTED:1547 — generateSamplesData has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 1585, 1623, 1582, …). 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 · runVersionMatchGate (cyclomatic 16) · ×1
  • runVersionMatchGate (cyclomatic 16) eng/external-plugin-quality-gates.mjs:658 — runVersionMatchGate has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs 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 · createDrawServer.handle (cyclomatic 16) · ×1
  • createDrawServer.handle (cyclomatic 16) REDACTED:411 — createDrawServer.handle has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · postDecisionCommand (cyclomatic 16) · ×1
  • postDecisionCommand (cyclomatic 16) REDACTED:187 — postDecisionCommand has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · describeShare (cyclomatic 16) · ×1
  • describeShare (cyclomatic 16) REDACTED:480 — describeShare 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 · prerequisites (cyclomatic 16) · ×1
  • prerequisites (cyclomatic 16) extensions/foundry-agentic-loop-canvas/lib/azure.mjs:162 — prerequisites 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 15 function items inside it that branch (a function literal at line 172, a function literal at line 198, a function literal at line 164, …). 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 · validate (cyclomatic 16) · ×1
  • validate (cyclomatic 16) extensions/foundry-agentic-loop-canvas/extension.mjs:60 — validate has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · #load (cyclomatic 16) · ×1
  • #load (cyclomatic 16) extensions/draw/store.mjs:97 — #load 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 · startAutopilot (cyclomatic 16) · ×1
  • startAutopilot (cyclomatic 16) extensions/java-modernization-studio/server.mjs:93 — startAutopilot has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to 5 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 · stagePullRequest (cyclomatic 16) · ×1
  • stagePullRequest (cyclomatic 16) extensions/pr-review/review.mjs:160 — stagePullRequest has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · syncPullRequests (cyclomatic 16) · ×1
  • syncPullRequests (cyclomatic 16) .github/extensions/open-pr-board/lib/state.mjs:147 — syncPullRequests has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · (anonymous).buildResultLabel (cyclomatic 16) · ×1
  • (anonymous).buildResultLabel (cyclomatic 16) extensions/flight-map-canvas/game/geocoder.js:226 — (anonymous).buildResultLabel has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · (anonymous).init (cyclomatic 16) · ×1
  • (anonymous).init (cyclomatic 16) extensions/flight-map-canvas/game/destinationInput.js:227 — (anonymous).init has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 276, 263, 269, …). 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 · createSnapshotStore.coaching (cyclomatic 16) · ×1
  • createSnapshotStore.coaching (cyclomatic 16) extensions/chronicle-stats/snapshots.mjs:64 — createSnapshotStore.coaching has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 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 · createGitHubClient.request (cyclomatic 16) · ×1
  • createGitHubClient.request (cyclomatic 16) eng/lib/review-automation-github.mjs:20 — createGitHubClient.request 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 · readTheme (cyclomatic 16) · ×1
  • readTheme (cyclomatic 16) extensions/draw/public/theme.js:45 — readTheme has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · handleApi (cognitive 367) · ×1
  • handleApi (cognitive 367) REDACTED:499 — handleApi has cognitive complexity 367 (threshold 15). Drivers by points: if/else 100 (185 pts), boolean chains 62, ternaries 22 (61 pts), error handling 16 (34 pts), other 25 (nesting depth added 142). Of this number, 364 points are the body's own statements and 3 belong to 14 function items 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 · index-_8h8h3EK.focusZone (cognitive 263) · ×1
  • index-_8h8h3EK.focusZone (cognitive 263) REDACTED:14386 — index-_8h8h3EK.focusZone has cognitive complexity 263 (threshold 15). Drivers by points: if/else 80 (162 pts), boolean chains 53, ternaries 20 (26 pts), loops 12 (22 pts) (nesting depth added 98). Of this number, 43 points are the body's own statements and 220 belong to 16 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 · index-_8h8h3EK.Panel (cognitive 216) · ×1
  • index-_8h8h3EK.Panel (cognitive 216) REDACTED:26848 — index-_8h8h3EK.Panel has cognitive complexity 216 (threshold 15). Drivers by points: if/else 73 (95 pts), ternaries 44 (61 pts), boolean chains 56, loops 3 (4 pts) (nesting depth added 40). Of this number, 57 points are the body's own statements and 159 belong to 37 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 · app.init (cognitive 206) · ×1
  • app.init (cognitive 206) extensions/ai-credits-breakdown/ui/app.js:36 — app.init has cognitive complexity 206 (threshold 15). Drivers by points: if/else 80 (86 pts), boolean chains 72, ternaries 36 (43 pts), loops 4 (5 pts) (nesting depth added 14). Most of this is not in the body itself: 4 of the 206 points are its own statements and the rest belongs to 105 function items inside it that branch (renderRain, comparison, renderStatement, …). 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 · contract.inspectMapContract (cognitive 179) · ×1
  • contract.inspectMapContract (cognitive 179) skills/build-evidence-map/scripts/contract.mjs:110 — contract.inspectMapContract has cognitive complexity 179 (threshold 15). Drivers by points: if/else 60 (118 pts), boolean chains 37, loops 14 (21 pts), ternaries 3 (nesting depth added 65). Of this number, 172 points are the body's own statements and 7 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 · index-_8h8h3EK.UnwrappedItem (cognitive 169) · ×1
  • index-_8h8h3EK.UnwrappedItem (cognitive 169) REDACTED:19508 — index-_8h8h3EK.UnwrappedItem has cognitive complexity 169 (threshold 15). Drivers by points: if/else 76 (82 pts), boolean chains 58, ternaries 29 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · layeredLayout (cognitive 153) · ×1
  • layeredLayout (cognitive 153) extensions/draw/lib/layout.mjs:94 — layeredLayout has cognitive complexity 153 (threshold 15). Drivers by points: if/else 26 (53 pts), ternaries 24 (49 pts), loops 27 (40 pts), boolean chains 11 (nesting depth added 65). Of this number, 112 points are the body's own statements and 41 belong to 43 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 · index-_8h8h3EK.FilteredActionList$1 (cognitive 148) · ×1
  • index-_8h8h3EK.FilteredActionList$1 (cognitive 148) REDACTED:21638 — index-_8h8h3EK.FilteredActionList$1 has cognitive complexity 148 (threshold 15). Drivers by points: ternaries 34 (51 pts), if/else 31 (47 pts), boolean chains 46, loops 2 (4 pts) (nesting depth added 35). Of this number, 23 points are the body's own statements and 125 belong to 20 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 · applyEvent (cognitive 146) · ×1
  • applyEvent (cognitive 146) extensions/agent-radar/collector.mjs:278 — applyEvent has cognitive complexity 146 (threshold 15). Drivers by points: if/else 39 (80 pts), boolean chains 31, loops 9 (27 pts), ternaries 2 (5 pts), other 2, match/switch 1 (nesting depth added 62). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · onWorkSelected (cognitive 133) · ×1
  • onWorkSelected (cognitive 133) REDACTED:1472 — onWorkSelected has cognitive complexity 133 (threshold 15). Drivers by points: if/else 27 (57 pts), ternaries 17 (40 pts), boolean chains 27, loops 4 (5 pts), error handling 1 (2 pts), other 2 (nesting depth added 55). Of this number, 127 points are the body's own statements and 6 belong to 8 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 · docs_drift.build (cognitive 132) · ×1
  • docs_drift.build (cognitive 132) skills/docs-sync-audit/scripts/docs_drift.py:265 — docs_drift.build has cognitive complexity 132 (threshold 15). Drivers by points: if/else 27 (89 pts), loops 11 (24 pts), boolean chains 10, ternaries 3 (9 pts) (nesting depth added 81). To reduce it, split the body into named stages: move each independent step or branch 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-_8h8h3EK.TextInputWithTokensInnerComponent (cognitive 131) · ×1
  • index-_8h8h3EK.TextInputWithTokensInnerComponent (cognitive 131) REDACTED:27871 — index-_8h8h3EK.TextInputWithTokensInnerComponent has cognitive complexity 131 (threshold 15). Drivers by points: if/else 64 (65 pts), boolean chains 58, ternaries 8 (nesting depth added 1). Of this number, 122 points are the body's own statements and 9 belong to 9 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · REDACTED.window.addEventListener("DOMContentLoaded") (cognitive 131) · ×1
  • REDACTED.window.addEventListener("DOMContentLoaded") (cognitive 131) REDACTED:1602 — REDACTED.window.addEventListener("DOMContentLoaded") has cognitive complexity 131 (threshold 15). Drivers by points: if/else 49 (94 pts), boolean chains 21, loops 7 (16 pts) (nesting depth added 54). None of this is in the body itself: all 131 points belong to 16 function literals inside it that branch (lines 1688, 1648, 1812, …). 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 · buildFromSpec (cognitive 128) · ×1
  • buildFromSpec (cognitive 128) extensions/draw/lib/layout.mjs:398 — buildFromSpec has cognitive complexity 128 (threshold 15). Drivers by points: if/else 28 (55 pts), ternaries 11 (31 pts), boolean chains 20, loops 8 (14 pts), other 8 (nesting depth added 53). Of this number, 110 points are the body's own statements and 18 belong to 14 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 · buildLedger (cognitive 126) · ×1
  • buildLedger (cognitive 126) extensions/ai-credits-breakdown/collector.mjs:501 — buildLedger has cognitive complexity 126 (threshold 15). Drivers by points: if/else 21 (49 pts), loops 17 (41 pts), ternaries 9 (19 pts), boolean chains 12, other 3, error handling 1 (2 pts) (nesting depth added 63). Of this number, 123 points are the body's own statements and 3 belong to 30 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 · analysis.export_cleaning_report (cognitive 124) · ×1
  • analysis.export_cleaning_report (cognitive 124) skills/datanalysis-credit-risk/references/analysis.py:972 — analysis.export_cleaning_report has cognitive complexity 124 (threshold 15). Drivers by points: if/else 34 (84 pts), loops 8 (18 pts), ternaries 3 (17 pts), boolean chains 4, error handling 1 (nesting depth added 74). 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 · extension.enrichPlainEnglish (cognitive 122) · ×1
  • extension.enrichPlainEnglish (cognitive 122) REDACTED:905 — extension.enrichPlainEnglish has cognitive complexity 122 (threshold 15). Drivers by points: ternaries 16 (42 pts), if/else 15 (33 pts), loops 10 (26 pts), boolean chains 20, error handling 1 (nesting depth added 60). Of this number, 98 points are the body's own statements and 24 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 · ui.html.draw (cognitive 121) · ×1
  • ui.html.draw (cognitive 121) extensions/agent-radar/ui.html:486 — ui.html.draw has cognitive complexity 121 (threshold 15). Drivers by points: ternaries 19 (65 pts), if/else 21 (33 pts), boolean chains 13, loops 8 (10 pts) (nesting depth added 60). Of this number, 119 points are the body's own statements and 2 belong to 2 function items 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 · index-_8h8h3EK.AnchoredOverlay (cognitive 118) · ×1
  • index-_8h8h3EK.AnchoredOverlay (cognitive 118) REDACTED:22768 — index-_8h8h3EK.AnchoredOverlay has cognitive complexity 118 (threshold 15). Drivers by points: ternaries 23 (45 pts), boolean chains 42, if/else 21 (28 pts), error handling 1 (3 pts) (nesting depth added 31). Of this number, 66 points are the body's own statements and 52 belong to 13 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 · validate_tour.validate_tour (cognitive 111) · ×1
  • validate_tour.validate_tour (cognitive 111) skills/code-tour/scripts/validate_tour.py:56 — validate_tour.validate_tour has cognitive complexity 111 (threshold 15). Drivers by points: if/else 34 (89 pts), error handling 4 (10 pts), loops 3 (7 pts), boolean chains 5 (nesting depth added 65). 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 · keys.attachKeys (cognitive 108) · ×1
  • keys.attachKeys (cognitive 108) extensions/draw/public/keys.js:9 — keys.attachKeys has cognitive complexity 108 (threshold 15). Drivers by points: if/else 49 (70 pts), boolean chains 26, ternaries 6 (12 pts) (nesting depth added 27). None of this is in the body itself: all 108 points belong to 9 function items inside it that branch (a function literal at line 26, a function literal at line 126, a function literal at line 133, …). 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 · ui.html.build (cognitive 100) · ×1
  • ui.html.build (cognitive 100) extensions/agent-radar/ui.html:220 — ui.html.build has cognitive complexity 100 (threshold 15). Drivers by points: loops 21 (29 pts), if/else 13 (26 pts), boolean chains 24, ternaries 11 (21 pts) (nesting depth added 31). Of this number, 75 points are the body's own statements and 25 belong to 13 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 · startServer (cognitive 100) · ×1
  • startServer (cognitive 100) REDACTED:2551 — startServer has cognitive complexity 100 (threshold 15). Drivers by points: if/else 29 (50 pts), boolean chains 30, error handling 5 (10 pts), ternaries 5 (10 pts) (nesting depth added 31). Most of this is not in the body itself: 2 of the 100 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 2555, a function literal at line 2630, a function literal at line 2587, …). 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 · extension.startServer.server (cognitive 98) · ×1
  • extension.startServer.server (cognitive 98) REDACTED:2555 — extension.startServer.server has cognitive complexity 98 (threshold 15). Drivers by points: if/else 29 (50 pts), boolean chains 31, error handling 5 (10 pts), ternaries 3 (7 pts) (nesting depth added 30). Of this number, 97 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 · parseWorkResult (cognitive 95) · ×1
  • parseWorkResult (cognitive 95) REDACTED:451 — parseWorkResult has cognitive complexity 95 (threshold 15). Drivers by points: ternaries 25 (50 pts), boolean chains 22, if/else 5 (13 pts), loops 3 (6 pts), other 4 (nesting depth added 36). Of this number, 74 points are the body's own statements and 21 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 · extension.renderSignalCard (cognitive 94) · ×1
  • extension.renderSignalCard (cognitive 94) REDACTED:908 — extension.renderSignalCard has cognitive complexity 94 (threshold 15). Drivers by points: ternaries 39 (85 pts), boolean chains 7, if/else 2 (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 · shapeIssueDetail (cognitive 91) · ×1
  • shapeIssueDetail (cognitive 91) extensions/sentry-triage/sentryClient.mjs:416 — shapeIssueDetail has cognitive complexity 91 (threshold 15). Drivers by points: boolean chains 71, ternaries 12, other 5, error handling 1 (2 pts), if/else 1 (nesting depth added 1). Of this number, 54 points are the body's own statements and 37 belong to 14 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · makeActions (cognitive 90) · ×1
  • makeActions (cognitive 90) extensions/draw/actions.mjs:140 — makeActions has cognitive complexity 90 (threshold 15). Drivers by points: if/else 37 (46 pts), ternaries 12 (20 pts), boolean chains 19, error handling 3 (4 pts), loops 1 (nesting depth added 18). None of this is in the body itself: all 90 points belong to 31 function items inside it that branch (a function literal at line 271, a function literal at line 345, a function literal at line 201, …). 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 · buildFocusItems (cognitive 88) · ×1
  • buildFocusItems (cognitive 88) extensions/work-hub/data.mjs:855 — buildFocusItems has cognitive complexity 88 (threshold 15). Drivers by points: if/else 14 (35 pts), ternaries 12 (33 pts), boolean chains 14, loops 4 (6 pts) (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · inspectAgentPluginSpecCompliance (cognitive 84) · ×1
  • inspectAgentPluginSpecCompliance (cognitive 84) eng/external-plugin-quality-gates.mjs:197 — inspectAgentPluginSpecCompliance has cognitive complexity 84 (threshold 15). Drivers by points: if/else 26 (55 pts), boolean chains 14, loops 5 (14 pts), error handling 1 (nesting depth added 38). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · app.calloutHtml (cognitive 83) · ×1
  • app.calloutHtml (cognitive 83) extensions/foundry-agentic-loop-canvas/public/app.js:1330 — app.calloutHtml has cognitive complexity 83 (threshold 15). Drivers by points: ternaries 27 (59 pts), if/else 11 (14 pts), boolean chains 10 (nesting depth added 35). Of this number, 79 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 · extension.scanSignals (cognitive 82) · ×1
  • extension.scanSignals (cognitive 82) REDACTED:616 — extension.scanSignals has cognitive complexity 82 (threshold 15). Drivers by points: if/else 10 (34 pts), boolean chains 21, error handling 4 (12 pts), ternaries 3 (9 pts), loops 3 (6 pts) (nesting depth added 41). Of this number, 80 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 · validate-receipt.validateReceipt (cognitive 82) · ×1
  • validate-receipt.validateReceipt (cognitive 82) skills/bug-receipt/scripts/validate-receipt.mjs:35 — validate-receipt.validateReceipt has cognitive complexity 82 (threshold 15). Drivers by points: if/else 42 (67 pts), boolean chains 11, ternaries 1 (3 pts), loops 1 (nesting depth added 27). Of this number, 52 points are the body's own statements and 30 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 · handleCanvasAction (cognitive 82) · ×1
  • handleCanvasAction (cognitive 82) extensions/jupyter-notebooks/notebook-canvas.mjs:1191 — handleCanvasAction has cognitive complexity 82 (threshold 15). Drivers by points: if/else 45 (65 pts), boolean chains 7, loops 2 (4 pts), other 4, ternaries 1 (2 pts) (nesting depth added 23). Of this number, 34 points are the body's own statements and 48 belong to 19 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 · generateCanvasManifest (cognitive 82) · ×1
  • generateCanvasManifest (cognitive 82) REDACTED:1167 — generateCanvasManifest has cognitive complexity 82 (threshold 15). Drivers by points: ternaries 12 (32 pts), if/else 11 (20 pts), boolean chains 19, loops 5 (9 pts), error handling 1 (2 pts) (nesting depth added 34). Of this number, 80 points are the body's own statements and 2 belong to 17 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 · materializePlugins (cognitive 76) · ×1
  • materializePlugins (cognitive 76) eng/materialize-plugins.mjs:74 — materializePlugins has cognitive complexity 76 (threshold 15). Drivers by points: if/else 21 (56 pts), loops 5 (10 pts), ternaries 1 (4 pts), boolean chains 3, error handling 1 (2 pts), other 1 (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch 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-_8h8h3EK.AutocompleteMenu (cognitive 75) · ×1
  • index-_8h8h3EK.AutocompleteMenu (cognitive 75) REDACTED:24424 — index-_8h8h3EK.AutocompleteMenu has cognitive complexity 75 (threshold 15). Drivers by points: if/else 40 (41 pts), boolean chains 32, ternaries 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · validate-drawio.validate_file (cognitive 75) · ×1
  • validate-drawio.validate_file (cognitive 75) skills/draw-io-diagram-generator/scripts/validate-drawio.py:24 — validate-drawio.validate_file has cognitive complexity 75 (threshold 15). Drivers by points: if/else 21 (56 pts), boolean chains 11, loops 4 (7 pts), error handling 1 (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · handleApi (cognitive 75) · ×1
  • handleApi (cognitive 75) extensions/site-studio/extension.mjs:1554 — handleApi has cognitive complexity 75 (threshold 15). Drivers by points: if/else 29 (42 pts), boolean chains 14, ternaries 7 (14 pts), loops 2 (4 pts), error handling 1 (nesting depth added 22). Most of this is not in the body itself: 15 of the 75 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 1588, 1572, 1602, …). 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 · quality_gate.check_tdd_logs (cognitive 74) · ×1
  • quality_gate.check_tdd_logs (cognitive 74) skills/quality-playbook/quality_gate.py:990 — quality_gate.check_tdd_logs has cognitive complexity 74 (threshold 15). Drivers by points: if/else 27 (52 pts), boolean chains 11, ternaries 2 (6 pts), loops 3 (5 pts) (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 · deriveVSCodeChat (cognitive 73) · ×1
  • deriveVSCodeChat (cognitive 73) extensions/agent-radar/collector.mjs:772 — deriveVSCodeChat has cognitive complexity 73 (threshold 15). Drivers by points: boolean chains 29, if/else 10 (27 pts), ternaries 7 (11 pts), loops 4 (6 pts) (nesting depth added 23). Of this number, 72 points are the body's own statements and 1 belongs 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 · page.Page (cognitive 72) · ×1
  • page.Page (cognitive 72) extensions/sentry-triage/components/page.mjs:30 — page.Page has cognitive complexity 72 (threshold 15). Drivers by points: ternaries 38 (49 pts), boolean chains 23 (nesting depth added 11). 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 · quality_gate.validate_cardinality_gate (cognitive 71) · ×1
  • quality_gate.validate_cardinality_gate (cognitive 71) skills/quality-playbook/quality_gate.py:233 — quality_gate.validate_cardinality_gate has cognitive complexity 71 (threshold 15). Drivers by points: if/else 21 (48 pts), loops 9 (13 pts), boolean chains 8, error handling 2 (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 · index-_8h8h3EK.tokenizeHtmlText (cognitive 69) · ×1
  • index-_8h8h3EK.tokenizeHtmlText (cognitive 69) REDACTED:38359 — index-_8h8h3EK.tokenizeHtmlText has cognitive complexity 69 (threshold 15). Drivers by points: if/else 49, boolean chains 11, ternaries 6 (9 pts) (nesting depth added 3). None of this is in the body itself: all 69 points belong to 26 function items inside it that branch (tagOpenAttributeValueBefore, tagOpenBetween, open, …). 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 · convert-pptx.convert (cognitive 69) · ×1
  • convert-pptx.convert (cognitive 69) skills/publish-to-pages/scripts/convert-pptx.py:170 — convert-pptx.convert has cognitive complexity 69 (threshold 15). Drivers by points: if/else 15 (40 pts), loops 6 (18 pts), ternaries 3 (7 pts), boolean chains 4 (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 · validateFinding (cognitive 69) · ×1
  • validateFinding (cognitive 69) extensions/github-security/extension.mjs:280 — validateFinding has cognitive complexity 69 (threshold 15). Drivers by points: boolean chains 31, if/else 23 (31 pts), ternaries 3 (4 pts), loops 2 (3 pts) (nesting depth added 10). Of this number, 52 points are the body's own statements and 17 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 · external-plugin-intake.validateRemoteRepository (cognitive 68) · ×1
  • external-plugin-intake.validateRemoteRepository (cognitive 68) eng/external-plugin-intake.mjs:591 — external-plugin-intake.validateRemoteRepository has cognitive complexity 68 (threshold 15). Drivers by points: if/else 25 (35 pts), ternaries 11 (29 pts), boolean chains 4 (nesting depth added 28). Of this number, 65 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · validateAgentPluginMcpConfig (cognitive 68) · ×1
  • validateAgentPluginMcpConfig (cognitive 68) eng/agent-plugin-schema.mjs:265 — validateAgentPluginMcpConfig has cognitive complexity 68 (threshold 15). Drivers by points: if/else 13 (39 pts), boolean chains 14, loops 4 (9 pts), ternaries 1 (4 pts), other 2 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index-_8h8h3EK.Breadcrumbs (cognitive 65) · ×1
  • index-_8h8h3EK.Breadcrumbs (cognitive 65) REDACTED:26211 — index-_8h8h3EK.Breadcrumbs has cognitive complexity 65 (threshold 15). Drivers by points: if/else 40 (50 pts), boolean chains 10, ternaries 4 (5 pts) (nesting depth added 11). 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 · data.adjustScore (cognitive 65) · ×1
  • data.adjustScore (cognitive 65) extensions/work-hub/data.mjs:976 — data.adjustScore has cognitive complexity 65 (threshold 15). Drivers by points: if/else 32 (53 pts), boolean chains 12 (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 · add-icon-to-diagram.transform_icon_elements (cognitive 65) · ×1
  • add-icon-to-diagram.transform_icon_elements (cognitive 65) skills/excalidraw-diagram-generator/scripts/add-icon-to-diagram.py:61 — add-icon-to-diagram.transform_icon_elements has cognitive complexity 65 (threshold 15). Drivers by points: if/else 19 (51 pts), loops 5 (9 pts), boolean chains 5 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · previewArtifactFile (cognitive 65) · ×1
  • previewArtifactFile (cognitive 65) REDACTED:5049 — previewArtifactFile has cognitive complexity 65 (threshold 15). Drivers by points: if/else 25 (40 pts), boolean chains 9, ternaries 5 (8 pts), error handling 3 (7 pts), other 1 (nesting depth added 22). Of this number, 46 points are the body's own statements and 19 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 · app.view.addEventListener("click") (cognitive 64) · ×1
  • app.view.addEventListener("click") (cognitive 64) REDACTED:6144 — app.view.addEventListener("click") has cognitive complexity 64 (threshold 15). Drivers by points: if/else 50 (56 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · extension.handleRequest (cognitive 64) · ×1
  • extension.handleRequest (cognitive 64) extensions/work-hub/extension.mjs:116 — extension.handleRequest has cognitive complexity 64 (threshold 15). Drivers by points: if/else 18 (22 pts), boolean chains 21, ternaries 10 (20 pts), error handling 1 (nesting depth added 14). Of this number, 55 points are the body's own statements and 9 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 · runtime.createErrorHandoffRuntime (cognitive 63) · ×1
  • runtime.createErrorHandoffRuntime (cognitive 63) eng/canvas-error-handoff/runtime.mjs:262 — runtime.createErrorHandoffRuntime has cognitive complexity 63 (threshold 15). Drivers by points: if/else 40 (56 pts), boolean chains 24, ternaries 10 (14 pts), loops 5 (8 pts), error handling 2 (3 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 · markdown-preview.toHtml (cognitive 62) · ×1
  • markdown-preview.toHtml (cognitive 62) extensions/pr-artifact-explorer/assets/markdown-preview.js:79 — markdown-preview.toHtml has cognitive complexity 62 (threshold 15). Drivers by points: if/else 11 (21 pts), ternaries 5 (17 pts), loops 6 (15 pts), boolean chains 9 (nesting depth added 31). Of this number, 48 points are the body's own statements and 14 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 · scan-cypress.scanFile (cognitive 62) · ×1
  • scan-cypress.scanFile (cognitive 62) skills/cypress-flake-fixer/scripts/scan-cypress.mjs:267 — scan-cypress.scanFile has cognitive complexity 62 (threshold 15). Drivers by points: if/else 25 (30 pts), ternaries 9 (17 pts), boolean chains 10, loops 5 (nesting depth added 13). Most of this is not in the body itself: 4 of the 62 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 378, add, a function literal at line 340, …). 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 · generate-website-data.generatePluginsData (cognitive 61) · ×1
  • generate-website-data.generatePluginsData (cognitive 61) REDACTED:546 — generate-website-data.generatePluginsData has cognitive complexity 61 (threshold 15). Drivers by points: if/else 10 (23 pts), boolean chains 21, loops 3 (8 pts), error handling 3 (7 pts), ternaries 1 (2 pts) (nesting depth added 23). Of this number, 58 points are the body's own statements and 3 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 · quality_gate.check_v1_5_0_semantic_check (cognitive 61) · ×1
  • quality_gate.check_v1_5_0_semantic_check (cognitive 61) skills/quality-playbook/quality_gate.py:2208 — quality_gate.check_v1_5_0_semantic_check has cognitive complexity 61 (threshold 15). Drivers by points: if/else 27 (52 pts), boolean chains 5, loops 3 (4 pts) (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 · ui.html.renderSidebar (cognitive 60) · ×1
  • ui.html.renderSidebar (cognitive 60) extensions/agent-radar/ui.html:705 — ui.html.renderSidebar has cognitive complexity 60 (threshold 15). Drivers by points: if/else 8 (19 pts), ternaries 11 (17 pts), boolean chains 14, loops 7 (10 pts) (nesting depth added 20). Of this number, 46 points are the body's own statements and 14 belong to 9 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 · extension.tokensToHast (cognitive 60) · ×1
  • extension.tokensToHast (cognitive 60) extensions/github-security/extension.mjs:7823 — extension.tokensToHast has cognitive complexity 60 (threshold 15). Drivers by points: if/else 20 (31 pts), loops 10 (17 pts), boolean chains 12 (nesting depth added 18). Of this number, 41 points are the body's own statements and 19 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 · _compilePatterns (cognitive 60) · ×1
  • _compilePatterns (cognitive 60) extensions/github-security/extension.mjs:1932 — _compilePatterns has cognitive complexity 60 (threshold 15). Drivers by points: if/else 12 (45 pts), ternaries 2 (6 pts), match/switch 1 (4 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 41). 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 · attachMenus (cognitive 60) · ×1
  • attachMenus (cognitive 60) extensions/draw/public/menus.js:44 — attachMenus has cognitive complexity 60 (threshold 15). Drivers by points: if/else 31 (36 pts), boolean chains 10, ternaries 8, error handling 5 (6 pts) (nesting depth added 6). None of this is in the body itself: all 60 points belong to 38 function items inside it that branch (a function literal at line 96, drawingsAction, exportAs, …). 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 · index-_8h8h3EK.subtokenize (cognitive 59) · ×1
  • index-_8h8h3EK.subtokenize (cognitive 59) REDACTED:36231 — index-_8h8h3EK.subtokenize has cognitive complexity 59 (threshold 15). Drivers by points: if/else 14 (44 pts), loops 4 (10 pts), boolean chains 5 (nesting depth added 36). 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 · index-_8h8h3EK.compiler · ×1
  • index-_8h8h3EK.compiler::prepareList (cognitive 59) REDACTED:41231 — index-_8h8h3EK.compiler::prepareList has cognitive complexity 59 (threshold 15). Drivers by points: if/else 13 (42 pts), boolean chains 10, loops 2 (5 pts), match/switch 1 (2 pts) (nesting depth added 33). 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 · app.view.addEventListener("keydown") (cognitive 58) · ×1
  • app.view.addEventListener("keydown") (cognitive 58) REDACTED:6548 — app.view.addEventListener("keydown") has cognitive complexity 58 (threshold 15). Drivers by points: if/else 22 (37 pts), boolean chains 20, 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 · handleCanvasRequest (cognitive 58) · ×1
  • handleCanvasRequest (cognitive 58) REDACTED:950 — handleCanvasRequest has cognitive complexity 58 (threshold 15). Drivers by points: if/else 15 (24 pts), ternaries 6 (12 pts), boolean chains 10, loops 3 (6 pts), other 4, error handling 2 (nesting depth added 18). Of this number, 56 points are the body's own statements and 2 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 · classifyRisk (cognitive 56) · ×1
  • classifyRisk (cognitive 56) REDACTED:152 — classifyRisk has cognitive complexity 56 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 22, loops 6 (8 pts), other 3 (nesting depth added 11). Of this number, 43 points are the body's own statements and 13 belong to 10 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 · LearningHubIndex.LearningHubIndexBody (cognitive 54) · ×1
  • LearningHubIndex.LearningHubIndexBody (cognitive 54) website/src/components/brand/LearningHubIndex.tsx:237 — LearningHubIndex.LearningHubIndexBody has cognitive complexity 54 (threshold 15). Drivers by points: boolean chains 28, ternaries 12 (13 pts), if/else 10 (12 pts), match/switch 1 (nesting depth added 3). Of this number, 17 points are the body's own statements and 37 belong to 18 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · installErrorHandoff (cognitive 54) · ×1
  • installErrorHandoff (cognitive 54) eng/canvas-error-handoff/runtime.mjs:87 — installErrorHandoff has cognitive complexity 54 (threshold 15). Drivers by points: if/else 26 (32 pts), boolean chains 11, ternaries 3 (5 pts), error handling 3 (4 pts), loops 2 (nesting depth added 9). Most of this is not in the body itself: 2 of the 54 points are its own statements and the rest belongs to 17 function items inside it that branch (fetch, report::onclick, scan, …). 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 · extension.handleRequest (cognitive 53) · ×1
  • extension.handleRequest (cognitive 53) REDACTED:616 — extension.handleRequest has cognitive complexity 53 (threshold 15). Drivers by points: if/else 18 (23 pts), boolean chains 18, error handling 3 (5 pts), ternaries 2 (5 pts), match/switch 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 · Virtualizer.constructor (cognitive 53) · ×1
  • Virtualizer.constructor (cognitive 53) REDACTED:20627 — Virtualizer.constructor has cognitive complexity 53 (threshold 15). Drivers by points: boolean chains 53. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · doctor.buildDoctorReport (cognitive 53) · ×1
  • doctor.buildDoctorReport (cognitive 53) extensions/java-modernization-studio/doctor.mjs:244 — doctor.buildDoctorReport has cognitive complexity 53 (threshold 15). Drivers by points: ternaries 14 (24 pts), boolean chains 18, if/else 11 (nesting depth added 10). Of this number, 51 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · normalizeReviewRoutingConfig (cognitive 53) · ×1
  • normalizeReviewRoutingConfig (cognitive 53) eng/review-routing.mjs:84 — normalizeReviewRoutingConfig has cognitive complexity 53 (threshold 15). Drivers by points: if/else 20 (28 pts), boolean chains 12, ternaries 6 (7 pts), loops 3 (4 pts), other 2 (nesting depth added 10). Of this number, 47 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 · startServer · ×1
  • startServer::handleRequest (cognitive 53) extensions/sentry-triage/server.mjs:167 — startServer::handleRequest has cognitive complexity 53 (threshold 15). Drivers by points: if/else 21 (22 pts), boolean chains 19, error handling 3 (6 pts), ternaries 3 (6 pts) (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · WinMdParser.ParseMembers (cognitive 52) · ×1
  • WinMdParser.ParseMembers (cognitive 52) skills/winmd-api-search/scripts/cache-generator/Program.cs:972 — WinMdParser.ParseMembers has cognitive complexity 52 (threshold 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 · index-_8h8h3EK.Banner$1 (cognitive 52) · ×1
  • index-_8h8h3EK.Banner$1 (cognitive 52) REDACTED:25445 — index-_8h8h3EK.Banner$1 has cognitive complexity 52 (threshold 15). Drivers by points: if/else 26, boolean chains 13, ternaries 12 (13 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · scan-cypress.main (cognitive 52) · ×1
  • scan-cypress.main (cognitive 52) skills/cypress-flake-fixer/scripts/scan-cypress.mjs:425 — scan-cypress.main has cognitive complexity 52 (threshold 15). Drivers by points: if/else 12 (22 pts), ternaries 6 (14 pts), loops 6 (10 pts), boolean chains 6 (nesting depth added 22). Of this number, 50 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 · generate_from_docs.generate_skeleton (cognitive 52) · ×1
  • generate_from_docs.generate_skeleton (cognitive 52) skills/code-tour/scripts/generate_from_docs.py:131 — generate_from_docs.generate_skeleton has cognitive complexity 52 (threshold 15). Drivers by points: if/else 14 (35 pts), loops 8 (13 pts), boolean chains 4 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · arrowGeometry (cognitive 52) · ×1
  • arrowGeometry (cognitive 52) extensions/draw/lib/geometry.mjs:344 — arrowGeometry has cognitive complexity 52 (threshold 15). Drivers by points: ternaries 11 (23 pts), if/else 11 (16 pts), boolean chains 11, loops 1 (2 pts) (nesting depth added 18). Of this number, 49 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index-_8h8h3EK.useAnchoredPosition (cognitive 51) · ×1
  • index-_8h8h3EK.useAnchoredPosition (cognitive 51) REDACTED:22356 — index-_8h8h3EK.useAnchoredPosition has cognitive complexity 51 (threshold 15). Drivers by points: boolean chains 24, if/else 15 (19 pts), ternaries 6, loops 2 (nesting depth added 4). Most of this is not in the body itself: 11 of the 51 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 22386, a function literal at line 22381, a function literal at line 22435, …). 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 · index-_8h8h3EK.normalizeString (cognitive 51) · ×1
  • index-_8h8h3EK.normalizeString (cognitive 51) REDACTED:45233 — index-_8h8h3EK.normalizeString has cognitive complexity 51 (threshold 15). Drivers by points: if/else 18 (46 pts), boolean chains 4, loops 1 (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 · evals.validateCases (cognitive 51) · ×1
  • evals.validateCases (cognitive 51) skills/foundry-agentic-loop/scripts/evals.mjs:66 — evals.validateCases has cognitive complexity 51 (threshold 15). Drivers by points: if/else 15 (34 pts), loops 4 (10 pts), boolean chains 7 (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 · analyze_plan.analyze_set_attribute (cognitive 51) · ×1
  • analyze_plan.analyze_set_attribute (cognitive 51) skills/terraform-azurerm-set-diff-analyzer/scripts/analyze_plan.py:251 — analyze_plan.analyze_set_attribute has cognitive complexity 51 (threshold 15). Drivers by points: if/else 13 (25 pts), ternaries 6 (13 pts), loops 6 (8 pts), boolean chains 5 (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 · index-_8h8h3EK.Textarea (cognitive 50) · ×1
  • index-_8h8h3EK.Textarea (cognitive 50) REDACTED:28439 — index-_8h8h3EK.Textarea has cognitive complexity 50 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 17, ternaries 8 (12 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 · check-imports.main (cognitive 50) · ×1
  • check-imports.main (cognitive 50) REDACTED:171 — check-imports.main has cognitive complexity 50 (threshold 15). Drivers by points: loops 9 (20 pts), if/else 11 (18 pts), boolean chains 8, error handling 2, ternaries 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · planEscalation (cognitive 50) · ×1
  • planEscalation (cognitive 50) eng/review-routing.mjs:529 — planEscalation has cognitive complexity 50 (threshold 15). Drivers by points: if/else 15 (25 pts), ternaries 8 (15 pts), other 4, boolean chains 3, loops 1 (3 pts) (nesting depth added 19). Of this number, 49 points are the body's own statements and 1 belongs 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 · startCanvasServer (cognitive 50) · ×1
  • startCanvasServer (cognitive 50) extensions/windows-app-storage-inspector-cleanup/src/api/server.mjs:55 — startCanvasServer has cognitive complexity 50 (threshold 15). Drivers by points: if/else 24 (25 pts), boolean chains 21, error handling 1, loops 1, other 1, ternaries 1 (nesting depth added 1). Most of this is not in the body itself: 2 of the 50 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 67, 60, 118, …). 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 · index-_8h8h3EK.Tooltip (cognitive 49) · ×1
  • index-_8h8h3EK.Tooltip (cognitive 49) REDACTED:15228 — index-_8h8h3EK.Tooltip has cognitive complexity 49 (threshold 15). Drivers by points: boolean chains 23, if/else 13 (16 pts), ternaries 7 (8 pts), error handling 2 (nesting depth added 4). Of this number, 18 points are the body's own statements and 31 belong to 13 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · index-_8h8h3EK.CheckboxOrRadioGroup (cognitive 49) · ×1
  • index-_8h8h3EK.CheckboxOrRadioGroup (cognitive 49) REDACTED:29338 — index-_8h8h3EK.CheckboxOrRadioGroup has cognitive complexity 49 (threshold 15). Drivers by points: if/else 27, boolean chains 15, ternaries 7. 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-_8h8h3EK.createTokenizer (cognitive 49) · ×1
  • index-_8h8h3EK.createTokenizer (cognitive 49) REDACTED:40371 — index-_8h8h3EK.createTokenizer has cognitive complexity 49 (threshold 15). Drivers by points: if/else 18 (22 pts), boolean chains 13, ternaries 7 (10 pts), loops 2 (4 pts) (nesting depth added 9). Most of this is not in the body itself: 7 of the 49 points are its own statements and the rest belongs to 11 function items inside it that branch (main, constructFactory::hook::handleMapOfConstructs::start, consume, …). 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 · ui.html.renderModels (cognitive 48) · ×1
  • ui.html.renderModels (cognitive 48) extensions/agent-radar/ui.html:796 — ui.html.renderModels has cognitive complexity 48 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 13, loops 6 (9 pts), ternaries 6 (8 pts) (nesting depth added 15). Of this number, 37 points are the body's own statements and 11 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 · index-_8h8h3EK.Group (cognitive 48) · ×1
  • index-_8h8h3EK.Group (cognitive 48) REDACTED:18587 — index-_8h8h3EK.Group has cognitive complexity 48 (threshold 15). Drivers by points: if/else 20, boolean chains 14, ternaries 8 (14 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · extension._tokenizeWithTheme (cognitive 48) · ×1
  • extension._tokenizeWithTheme (cognitive 48) extensions/github-security/extension.mjs:3783 — extension._tokenizeWithTheme has cognitive complexity 48 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 4 (12 pts), ternaries 4 (11 pts), match/switch 1 (6 pts), boolean chains 2 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · startServer (cognitive 48) · ×1
  • startServer (cognitive 48) extensions/chronicle-stats/server.mjs:290 — startServer has cognitive complexity 48 (threshold 15). Drivers by points: boolean chains 23, if/else 18 (19 pts), ternaries 2 (4 pts), error handling 1, other 1 (nesting depth added 3). None of this is in the body itself: all 48 points belong to 8 function items inside it that branch (a function literal at line 294, (anonymous)::json, (anonymous)::emit, …). 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 · server.startServer.server (cognitive 47) · ×1
  • server.startServer.server (cognitive 47) extensions/chronicle-stats/server.mjs:294 — server.startServer.server has cognitive complexity 47 (threshold 15). Drivers by points: boolean chains 23, if/else 18 (19 pts), ternaries 2 (4 pts), error handling 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · convert_excel_to_md._sheet_name_to_media (cognitive 47) · ×1
  • convert_excel_to_md._sheet_name_to_media (cognitive 47) skills/convert-excel-to-md/scripts/convert_excel_to_md.py:96 — convert_excel_to_md._sheet_name_to_media has cognitive complexity 47 (threshold 15). Drivers by points: if/else 14 (31 pts), loops 7 (11 pts), boolean chains 4, error handling 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 · eyeball.cmd_setup_check (cognitive 47) · ×1
  • eyeball.cmd_setup_check (cognitive 47) skills/eyeball/tools/eyeball.py:524 — eyeball.cmd_setup_check has cognitive complexity 47 (threshold 15). Drivers by points: if/else 11 (16 pts), error handling 7 (12 pts), ternaries 6 (8 pts), boolean chains 7, loops 3 (4 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 · evaluateApprovals (cognitive 47) · ×1
  • evaluateApprovals (cognitive 47) REDACTED:279 — evaluateApprovals has cognitive complexity 47 (threshold 15). Drivers by points: if/else 14 (25 pts), boolean chains 16, ternaries 3 (5 pts), loops 1 (nesting depth added 13). Of this number, 39 points are the body's own statements and 8 belong to 12 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 · wrapTermsInHtml (cognitive 47) · ×1
  • wrapTermsInHtml (cognitive 47) REDACTED:260 — wrapTermsInHtml has cognitive complexity 47 (threshold 15). Drivers by points: if/else 13 (30 pts), loops 4 (9 pts), boolean chains 4, other 4 (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 · startServer (cognitive 47) · ×1
  • startServer (cognitive 47) REDACTED:1017 — startServer has cognitive complexity 47 (threshold 15). Drivers by points: boolean chains 16, if/else 12 (16 pts), error handling 4 (8 pts), ternaries 3 (5 pts), loops 1 (2 pts) (nesting depth added 11). Most of this is not in the body itself: 2 of the 47 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 1026, 1044, 1110, …). 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 · index-_8h8h3EK.TextInput (cognitive 46) · ×1
  • index-_8h8h3EK.TextInput (cognitive 46) REDACTED:17818 — index-_8h8h3EK.TextInput has cognitive complexity 46 (threshold 15). Drivers by points: boolean chains 32, ternaries 12, if/else 2. Of this number, 37 points are the body's own statements and 9 belong to 5 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · index-_8h8h3EK.resolveAllLineSuffixes (cognitive 46) · ×1
  • index-_8h8h3EK.resolveAllLineSuffixes (cognitive 46) REDACTED:40176 — index-_8h8h3EK.resolveAllLineSuffixes has cognitive complexity 46 (threshold 15). Drivers by points: if/else 10 (25 pts), loops 3 (9 pts), ternaries 2 (8 pts), boolean chains 4 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.startCanvasServer.server (cognitive 46) · ×1
  • server.startCanvasServer.server (cognitive 46) extensions/windows-app-storage-inspector-cleanup/src/api/server.mjs:67 — server.startCanvasServer.server has cognitive complexity 46 (threshold 15). Drivers by points: if/else 24 (25 pts), boolean chains 20, error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · sanitize-html.sanitizeHtml (cognitive 46) · ×1
  • sanitize-html.sanitizeHtml (cognitive 46) website/src/lib/sanitize-html.ts:77 — sanitize-html.sanitizeHtml has cognitive complexity 46 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 13, ternaries 7 (13 pts), error handling 1 (2 pts) (nesting depth added 13). Most of this is not in the body itself: 11 of the 46 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 116, 95). 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 · quality_gate.check_integration_sidecar (cognitive 46) · ×1
  • quality_gate.check_integration_sidecar (cognitive 46) skills/quality-playbook/quality_gate.py:1109 — quality_gate.check_integration_sidecar has cognitive complexity 46 (threshold 15). Drivers by points: if/else 24 (35 pts), loops 4 (6 pts), ternaries 3, boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · normalizeTheme (cognitive 46) · ×1
  • normalizeTheme (cognitive 46) extensions/github-security/extension.mjs:3302 — normalizeTheme has cognitive complexity 46 (threshold 15). Drivers by points: if/else 17 (26 pts), boolean chains 11, ternaries 3 (8 pts), loops 1 (nesting depth added 14). Of this number, 37 points are the body's own statements and 9 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 · model.promptFor (cognitive 45) · ×1
  • model.promptFor (cognitive 45) extensions/foundry-agentic-loop-canvas/lib/model.mjs:107 — model.promptFor has cognitive complexity 45 (threshold 15). Drivers by points: ternaries 24 (30 pts), boolean chains 10, if/else 5 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · index-_8h8h3EK.UnwrappedList (cognitive 45) · ×1
  • index-_8h8h3EK.UnwrappedList (cognitive 45) REDACTED:18292 — index-_8h8h3EK.UnwrappedList has cognitive complexity 45 (threshold 15). Drivers by points: if/else 20 (21 pts), boolean chains 13, ternaries 10 (11 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · analyzer.inspectRepository (cognitive 45) · ×1
  • analyzer.inspectRepository (cognitive 45) extensions/tiny-tool-town-submitter/lib/analyzer.mjs:456 — analyzer.inspectRepository has cognitive complexity 45 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 14, ternaries 9 (10 pts), 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 · TopNavSearch.TopNavSearch (cognitive 45) · ×1
  • TopNavSearch.TopNavSearch (cognitive 45) website/src/components/brand/TopNavSearch.tsx:70 — TopNavSearch.TopNavSearch has cognitive complexity 45 (threshold 15). Drivers by points: if/else 21 (24 pts), boolean chains 12, ternaries 6 (8 pts), loops 1 (nesting depth added 5). Most of this is not in the body itself: 8 of the 45 points are its own statements and the rest belongs to 11 function items inside it that branch (handleInputKeyDown, a function literal at line 162, a function literal at line 112, …). 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 · scan.main (cognitive 45) · ×1
  • scan.main (cognitive 45) skills/acquire-codebase-knowledge/scripts/scan.py:556 — scan.main has cognitive complexity 45 (threshold 15). Drivers by points: if/else 34 (38 pts), loops 3 (6 pts), error handling 1 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · analysis.drop_highcorr_features (cognitive 45) · ×1
  • analysis.drop_highcorr_features (cognitive 45) skills/datanalysis-credit-risk/references/analysis.py:213 — analysis.drop_highcorr_features has cognitive complexity 45 (threshold 15). Drivers by points: if/else 18 (33 pts), loops 5 (10 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 · quality_gate.check_v1_5_3_council_inbox_validation (cognitive 45) · ×1
  • quality_gate.check_v1_5_3_council_inbox_validation (cognitive 45) skills/quality-playbook/quality_gate.py:2799 — quality_gate.check_v1_5_3_council_inbox_validation has cognitive complexity 45 (threshold 15). Drivers by points: if/else 16 (35 pts), loops 3 (7 pts), boolean chains 3 (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 · highlightXml (cognitive 45) · ×1
  • highlightXml (cognitive 45) REDACTED:380 — highlightXml has cognitive complexity 45 (threshold 15). Drivers by points: if/else 15 (30 pts), ternaries 2 (6 pts), boolean chains 4, loops 2 (4 pts), other 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 · server.handleApi (cognitive 44) · ×1
  • server.handleApi (cognitive 44) REDACTED:165 — server.handleApi has cognitive complexity 44 (threshold 15). Drivers by points: if/else 18 (26 pts), boolean chains 14, ternaries 2 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index-_8h8h3EK.Token (cognitive 44) · ×1
  • index-_8h8h3EK.Token (cognitive 44) REDACTED:27652 — index-_8h8h3EK.Token has cognitive complexity 44 (threshold 15). Drivers by points: if/else 28, boolean chains 15, ternaries 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · index-_8h8h3EK.serializer · ×1
  • index-_8h8h3EK.serializer::pair (cognitive 44) REDACTED:43094 — index-_8h8h3EK.serializer::pair has cognitive complexity 44 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 4 (8 pts), match/switch 3 (6 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · startServer (cognitive 44) · ×1
  • startServer (cognitive 44) REDACTED:1299 — startServer has cognitive complexity 44 (threshold 15). Drivers by points: if/else 15 (25 pts), boolean chains 9, error handling 3 (7 pts), loops 1 (2 pts), ternaries 1 (nesting depth added 15). Most of this is not in the body itself: 2 of the 44 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 1306, a function literal at line 1428, (anonymous)::onError, …). 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 · buildChartCard (cognitive 44) · ×1
  • buildChartCard (cognitive 44) REDACTED:1168 — buildChartCard has cognitive complexity 44 (threshold 15). Drivers by points: boolean chains 11, ternaries 6 (11 pts), if/else 7 (10 pts), other 7, loops 2 (5 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · computeMetrics (cognitive 44) · ×1
  • computeMetrics (cognitive 44) eng/review-metrics.mjs:157 — computeMetrics has cognitive complexity 44 (threshold 15). Drivers by points: if/else 9 (19 pts), other 9, boolean chains 7, loops 5 (6 pts), ternaries 2 (3 pts) (nesting depth added 12). Of this number, 40 points are the body's own statements and 4 belong to 17 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 · update-readme.extractTitle (cognitive 43) · ×1
  • update-readme.extractTitle (cognitive 43) eng/update-readme.mjs:46 — update-readme.extractTitle has cognitive complexity 43 (threshold 15). Drivers by points: if/else 11 (27 pts), boolean chains 8, ternaries 2 (5 pts), loops 2 (3 pts) (nesting depth added 20). None of this is in the body itself: all 43 points belong to one function literal inside it that branches (line 48). 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 · collector.resolveSessionRelations (cognitive 43) · ×1
  • collector.resolveSessionRelations (cognitive 43) extensions/agent-radar/collector.mjs:189 — collector.resolveSessionRelations has cognitive complexity 43 (threshold 15). Drivers by points: if/else 10 (26 pts), loops 6 (12 pts), boolean chains 4, ternaries 1 (nesting depth added 22). Of this number, 41 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · extension.server (cognitive 43) · ×1
  • extension.server (cognitive 43) REDACTED:87 — extension.server has cognitive complexity 43 (threshold 15). Drivers by points: if/else 16 (28 pts), boolean chains 13, ternaries 1 (2 pts) (nesting depth added 13). Of this number, 41 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 · server.createDrawServer.api (cognitive 43) · ×1
  • server.createDrawServer.api (cognitive 43) REDACTED:236 — server.createDrawServer.api has cognitive complexity 43 (threshold 15). Drivers by points: if/else 18 (26 pts), ternaries 5 (9 pts), boolean chains 8 (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 · index-_8h8h3EK.AvatarStack (cognitive 43) · ×1
  • index-_8h8h3EK.AvatarStack (cognitive 43) REDACTED:25258 — index-_8h8h3EK.AvatarStack has cognitive complexity 43 (threshold 15). Drivers by points: if/else 21 (24 pts), boolean chains 12, ternaries 5, loops 1 (2 pts) (nesting depth added 4). Of this number, 33 points are the body's own statements and 10 belong to 3 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · app.renderPullArtifactRows (cognitive 43) · ×1
  • app.renderPullArtifactRows (cognitive 43) REDACTED:3338 — app.renderPullArtifactRows has cognitive complexity 43 (threshold 15). Drivers by points: ternaries 10 (32 pts), boolean chains 6, if/else 5 (nesting depth added 22). Of this number, 40 points are the body's own statements and 3 belong to one function literal 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 · docs_drift.env_names_documented (cognitive 43) · ×1
  • docs_drift.env_names_documented (cognitive 43) skills/docs-sync-audit/scripts/docs_drift.py:220 — docs_drift.env_names_documented has cognitive complexity 43 (threshold 15). Drivers by points: if/else 8 (27 pts), loops 4 (12 pts), boolean chains 4 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · detect_hazards.main (cognitive 43) · ×1
  • detect_hazards.main (cognitive 43) skills/poka-yoke/scripts/detect_hazards.py:486 — detect_hazards.main has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (23 pts), ternaries 6 (15 pts), loops 2 (4 pts), boolean chains 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 · renderGraph (cognitive 43) · ×1
  • renderGraph (cognitive 43) REDACTED:219 — renderGraph has cognitive complexity 43 (threshold 15). Drivers by points: if/else 19 (22 pts), ternaries 10 (12 pts), boolean chains 8, loops 1 (nesting depth added 5). Most of this is not in the body itself: 7 of the 43 points are its own statements and the rest belongs to 23 function items inside it that branch (a function literal at line 386, renderCommitLaneGraph, relativeTime, …). 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 · createDrawServer.api (cognitive 43) · ×1
  • createDrawServer.api (cognitive 43) REDACTED:236 — createDrawServer.api has cognitive complexity 43 (threshold 15). Drivers by points: if/else 18 (26 pts), ternaries 5 (9 pts), boolean chains 8 (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 · experimentCatalog (cognitive 43) · ×1
  • experimentCatalog (cognitive 43) extensions/chronicle-stats/insights.mjs:117 — experimentCatalog has cognitive complexity 43 (threshold 15). Drivers by points: boolean chains 23, if/else 4 (13 pts), loops 3 (4 pts), ternaries 1 (3 pts) (nesting depth added 12). Of this number, 32 points are the body's own statements and 11 belong to 12 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · startBoardServer (cognitive 43) · ×1
  • startBoardServer (cognitive 43) REDACTED:80 — startBoardServer has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 8, ternaries 4 (8 pts), error handling 3 (5 pts), loops 2 (3 pts), other 3 (nesting depth added 11). None of this is in the body itself: all 43 points belong to 6 function literals inside it that branch (lines 90, 176, 85, …). 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 · geometry.hitTest (cognitive 42) · ×1
  • geometry.hitTest (cognitive 42) extensions/draw/lib/geometry.mjs:582 — geometry.hitTest has cognitive complexity 42 (threshold 15). Drivers by points: if/else 15 (38 pts), boolean chains 2, loops 2 (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 · index-_8h8h3EK.useAnnouncements (cognitive 42) · ×1
  • index-_8h8h3EK.useAnnouncements (cognitive 42) REDACTED:20364 — index-_8h8h3EK.useAnnouncements has cognitive complexity 42 (threshold 15). Drivers by points: ternaries 13 (23 pts), if/else 9 (11 pts), boolean chains 8 (nesting depth added 12). Most of this is not in the body itself: 4 of the 42 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 20408, 20372, 20379, …). 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 · index-_8h8h3EK.basename (cognitive 42) · ×1
  • index-_8h8h3EK.basename (cognitive 42) REDACTED:45082 — index-_8h8h3EK.basename has cognitive complexity 42 (threshold 15). Drivers by points: if/else 16 (35 pts), loops 2 (3 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 21). 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 · extension.startServer.server (cognitive 42) · ×1
  • extension.startServer.server (cognitive 42) REDACTED:1306 — extension.startServer.server has cognitive complexity 42 (threshold 15). Drivers by points: if/else 15 (25 pts), boolean chains 8, error handling 3 (7 pts), loops 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · scan-cypress.blankComments (cognitive 42) · ×1
  • scan-cypress.blankComments (cognitive 42) skills/cypress-flake-fixer/scripts/scan-cypress.mjs:178 — scan-cypress.blankComments has cognitive complexity 42 (threshold 15). Drivers by points: if/else 15 (32 pts), boolean chains 9, 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 · analyze_plan.analyze_resource_change (cognitive 42) · ×1
  • analyze_plan.analyze_resource_change (cognitive 42) skills/terraform-azurerm-set-diff-analyzer/scripts/analyze_plan.py:365 — analyze_plan.analyze_resource_change has cognitive complexity 42 (threshold 15). Drivers by points: if/else 15 (27 pts), boolean chains 13, loops 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 · collectCopilotSession (cognitive 42) · ×1
  • collectCopilotSession (cognitive 42) extensions/agent-radar/collector.mjs:485 — collectCopilotSession has cognitive complexity 42 (threshold 15). Drivers by points: boolean chains 18, ternaries 7 (9 pts), if/else 6 (8 pts), error handling 4, loops 2, other 1 (nesting depth added 4). Of this number, 33 points are the body's own statements and 9 belong to 9 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 · (anonymous) (cognitive 42) · ×1
  • (anonymous) (cognitive 42) REDACTED:87 — (anonymous) has cognitive complexity 42 (threshold 15). Drivers by points: if/else 16 (28 pts), boolean chains 12, ternaries 1 (2 pts) (nesting depth added 13). Of this number, 40 points are the body's own statements and 2 belong to 5 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 · startBoardServer (cognitive 42) · ×1
  • startBoardServer (cognitive 42) REDACTED:80 — startBoardServer has cognitive complexity 42 (threshold 15). Drivers by points: if/else 12 (16 pts), ternaries 4 (8 pts), boolean chains 7, error handling 3 (5 pts), loops 2 (3 pts), other 3 (nesting depth added 11). None of this is in the body itself: all 42 points belong to 6 function literals inside it that branch (lines 90, 176, 85, …). 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 · validate-plugins.validateSpecPaths (cognitive 41) · ×1
  • validate-plugins.validateSpecPaths (cognitive 41) eng/validate-plugins.mjs:119 — validate-plugins.validateSpecPaths has cognitive complexity 41 (threshold 15). Drivers by points: if/else 13 (33 pts), ternaries 1 (4 pts), loops 2 (3 pts), boolean chains 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 · ui.html.nodeInfo (cognitive 41) · ×1
  • ui.html.nodeInfo (cognitive 41) extensions/agent-radar/ui.html:605 — ui.html.nodeInfo has cognitive complexity 41 (threshold 15). Drivers by points: if/else 15 (25 pts), loops 3 (7 pts), boolean chains 5, ternaries 2 (4 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · extension.resolveOnPath (cognitive 41) · ×1
  • extension.resolveOnPath (cognitive 41) REDACTED:139 — extension.resolveOnPath has cognitive complexity 41 (threshold 15). Drivers by points: if/else 8 (23 pts), boolean chains 8, ternaries 2 (5 pts), loops 2 (4 pts), error handling 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 · quality_gate.check_tdd_sidecar (cognitive 41) · ×1
  • quality_gate.check_tdd_sidecar (cognitive 41) skills/quality-playbook/quality_gate.py:890 — quality_gate.check_tdd_sidecar has cognitive complexity 41 (threshold 15). Drivers by points: if/else 21 (29 pts), loops 6 (7 pts), boolean chains 3, ternaries 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 · external-plugin-readme.fetchExternalPluginReadme (cognitive 40) · ×1
  • external-plugin-readme.fetchExternalPluginReadme (cognitive 40) eng/lib/external-plugin-readme.mjs:8 — external-plugin-readme.fetchExternalPluginReadme has cognitive complexity 40 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 3 (7 pts), ternaries 4 (6 pts), boolean chains 4, error handling 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 · extension.handleServerRequest (cognitive 40) · ×1
  • extension.handleServerRequest (cognitive 40) REDACTED:1844 — extension.handleServerRequest has cognitive complexity 40 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 11, ternaries 2 (6 pts), error handling 2 (4 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 · app.renderRapidProgress (cognitive 40) · ×1
  • app.renderRapidProgress (cognitive 40) extensions/foundry-agentic-loop-canvas/public/app.js:451 — app.renderRapidProgress has cognitive complexity 40 (threshold 15). Drivers by points: ternaries 12 (30 pts), boolean chains 10 (nesting depth added 18). Most of this is not in the body itself: 8 of the 40 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 475, url, a function literal at line 473, …). 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 · index-_8h8h3EK.IconButton (cognitive 40) · ×1
  • index-_8h8h3EK.IconButton (cognitive 40) REDACTED:15530 — index-_8h8h3EK.IconButton has cognitive complexity 40 (threshold 15). Drivers by points: if/else 14 (19 pts), ternaries 6 (11 pts), boolean chains 10 (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 · verify_step6_completion.validate_results_dir (cognitive 40) · ×1
  • verify_step6_completion.validate_results_dir (cognitive 40) skills/eval-driven-dev/resources/verify_step6_completion.py:56 — verify_step6_completion.validate_results_dir has cognitive complexity 40 (threshold 15). Drivers by points: if/else 10 (28 pts), loops 6 (12 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 · markdown_to_word._convert_blocks (cognitive 40) · ×1
  • markdown_to_word._convert_blocks (cognitive 40) skills/markdown-to-word-mermaid/scripts/markdown_to_word.py:335 — markdown_to_word._convert_blocks has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (30 pts), ternaries 2 (6 pts), boolean chains 3, 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 · normalizeNotebook (cognitive 40) · ×1
  • normalizeNotebook (cognitive 40) extensions/jupyter-notebooks/notebook-canvas.mjs:147 — normalizeNotebook has cognitive complexity 40 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 10, ternaries 6 (7 pts), other 4, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · validateCanvasPluginMetadata (cognitive 40) · ×1
  • validateCanvasPluginMetadata (cognitive 40) eng/external-plugin-intake.mjs:804 — validateCanvasPluginMetadata has cognitive complexity 40 (threshold 15). Drivers by points: if/else 23 (31 pts), boolean chains 4, error handling 1 (2 pts), ternaries 2, loops 1 (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · renderInspector (cognitive 40) · ×1
  • renderInspector (cognitive 40) REDACTED:613 — renderInspector has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (16 pts), ternaries 7 (13 pts), boolean chains 11 (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 · extension.normalizeTutorial (cognitive 39) · ×1
  • extension.normalizeTutorial (cognitive 39) REDACTED:197 — extension.normalizeTutorial has cognitive complexity 39 (threshold 15). Drivers by points: if/else 13 (21 pts), ternaries 5 (9 pts), boolean chains 7, loops 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 · index-_8h8h3EK.ButtonBase (cognitive 39) · ×1
  • index-_8h8h3EK.ButtonBase (cognitive 39) REDACTED:12917 — index-_8h8h3EK.ButtonBase has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 16 (23 pts), boolean chains 14, if/else 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index-_8h8h3EK.shouldIgnoreFocusHandling (cognitive 39) · ×1
  • index-_8h8h3EK.shouldIgnoreFocusHandling (cognitive 39) REDACTED:14355 — index-_8h8h3EK.shouldIgnoreFocusHandling has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 17 (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 · data.getCopilotSessions (cognitive 39) · ×1
  • data.getCopilotSessions (cognitive 39) extensions/work-hub/data.mjs:351 — data.getCopilotSessions has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 14, loops 2 (3 pts), error handling 1, ternaries 1 (nesting depth added 11). Of this number, 38 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 · quality_gate.check_file_existence (cognitive 39) · ×1
  • quality_gate.check_file_existence (cognitive 39) skills/quality-playbook/quality_gate.py:756 — quality_gate.check_file_existence has cognitive complexity 39 (threshold 15). Drivers by points: if/else 23 (35 pts), boolean chains 2, loops 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 · loadEvents (cognitive 39) · ×1
  • loadEvents (cognitive 39) extensions/ai-credits-breakdown/collector.mjs:189 — loadEvents has cognitive complexity 39 (threshold 15). Drivers by points: if/else 6 (14 pts), ternaries 4 (8 pts), boolean chains 6, other 6, loops 2 (3 pts), error handling 1 (2 pts) (nesting depth added 14). Of this number, 38 points are the body's own statements and 1 belongs to 5 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 · qr.penalty (cognitive 38) · ×1
  • qr.penalty (cognitive 38) extensions/apng-studio/qr.mjs:351 — qr.penalty has cognitive complexity 38 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 9 (15 pts), boolean chains 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch 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-_8h8h3EK._Dialog (cognitive 38) · ×1
  • index-_8h8h3EK._Dialog (cognitive 38) REDACTED:16613 — index-_8h8h3EK._Dialog has cognitive complexity 38 (threshold 15). Drivers by points: ternaries 15 (18 pts), boolean chains 12, if/else 6 (7 pts), loops 1 (nesting depth added 4). Of this number, 31 points are the body's own statements and 7 belong to 3 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · server.handleRequest (cognitive 38) · ×1
  • server.handleRequest (cognitive 38) REDACTED:1323 — server.handleRequest has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (15 pts), ternaries 5 (11 pts), boolean chains 9, error handling 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · detect_hazards.scan_file (cognitive 38) · ×1
  • detect_hazards.scan_file (cognitive 38) skills/poka-yoke/scripts/detect_hazards.py:389 — detect_hazards.scan_file has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (24 pts), boolean chains 7, loops 4 (6 pts), 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 · normalize (cognitive 38) · ×1
  • normalize (cognitive 38) REDACTED:90 — normalize has cognitive complexity 38 (threshold 15). Drivers by points: ternaries 10 (14 pts), boolean chains 12, if/else 6 (11 pts), loops 1 (nesting depth added 9). Of this number, 34 points are the body's own statements and 4 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 · index-_8h8h3EK.footer (cognitive 37) · ×1
  • index-_8h8h3EK.footer (cognitive 37) REDACTED:43313 — index-_8h8h3EK.footer has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 4 (10 pts), boolean chains 8, loops 2 (3 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 · extension.parseSequence (cognitive 37) · ×1
  • extension.parseSequence (cognitive 37) extensions/github-security/extension.mjs:7452 — extension.parseSequence has cognitive complexity 37 (threshold 15). Drivers by points: if/else 20 (34 pts), boolean chains 2, 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 · quality_gate.check_writeups (cognitive 37) · ×1
  • quality_gate.check_writeups (cognitive 37) skills/quality-playbook/quality_gate.py:1442 — quality_gate.check_writeups has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (26 pts), ternaries 2 (6 pts), error handling 1 (3 pts), loops 1 (2 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 · evaluateSubmission (cognitive 37) · ×1
  • evaluateSubmission (cognitive 37) REDACTED:822 — evaluateSubmission has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 16, if/else 9 (11 pts), ternaries 2 (4 pts), other 3, error handling 1 (2 pts), loops 1 (nesting depth added 5). Of this number, 35 points are the body's own statements and 2 belong to 8 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · parseReport (cognitive 37) · ×1
  • parseReport (cognitive 37) extensions/pr-artifact-explorer/assets/trx-preview.js:160 — parseReport has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 11, other 5, loops 4, ternaries 4 (nesting depth added 5). Of this number, 21 points are the body's own statements and 16 belong to 11 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 · readZipIndex (cognitive 37) · ×1
  • readZipIndex (cognitive 37) extensions/pr-artifact-explorer/zip.mjs:190 — readZipIndex has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 5, ternaries 3 (5 pts), loops 2 (3 pts) (nesting depth added 15). Of this number, 32 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 · startServer (cognitive 37) · ×1
  • startServer (cognitive 37) extensions/foundry-agentic-loop-canvas/lib/server.mjs:22 — startServer has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 9, ternaries 4 (8 pts), other 2, error handling 1 (nesting depth added 9). None of this is in the body itself: all 37 points belong to 6 function items inside it that branch (a function literal at line 39, (anonymous)::json, a function literal at line 26, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · server.startServer.server (cognitive 36) · ×1
  • server.startServer.server (cognitive 36) extensions/foundry-agentic-loop-canvas/lib/server.mjs:39 — server.startServer.server has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 9, ternaries 4 (9 pts), error handling 1 (nesting depth added 10). Of this number, 34 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index-_8h8h3EK.AutocompleteInput (cognitive 36) · ×1
  • index-_8h8h3EK.AutocompleteInput (cognitive 36) REDACTED:24236 — index-_8h8h3EK.AutocompleteInput has cognitive complexity 36 (threshold 15). Drivers by points: boolean chains 18, if/else 15 (17 pts), ternaries 1 (nesting depth added 2). Most of this is not in the body itself: 2 of the 36 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 24251, a function literal at line 24311, a function literal at line 24273, …). 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 · card.Card (cognitive 36) · ×1
  • card.Card (cognitive 36) extensions/sentry-triage/components/card.mjs:86 — card.Card has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 15 (30 pts), boolean chains 6 (nesting depth added 15). Of this number, 35 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 · scan-cypress.parseArgs (cognitive 36) · ×1
  • scan-cypress.parseArgs (cognitive 36) skills/cypress-flake-fixer/scripts/scan-cypress.mjs:93 — scan-cypress.parseArgs has cognitive complexity 36 (threshold 15). Drivers by points: if/else 17 (27 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 13). Of this number, 34 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ScrambleText.ScrambleText (cognitive 36) · ×1
  • ScrambleText.ScrambleText (cognitive 36) website/src/components/brand/ScrambleText.tsx:35 — ScrambleText.ScrambleText has cognitive complexity 36 (threshold 15). Drivers by points: if/else 21 (26 pts), ternaries 4, boolean chains 3, loops 3 (nesting depth added 5). Most of this is not in the body itself: 1 of the 36 points is its own statement and the rest belongs to 11 function items inside it that branch (a function literal at line 46, a function literal at line 95, a function literal at line 147, …). 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 · renderTemplateView (cognitive 36) · ×1
  • renderTemplateView (cognitive 36) extensions/foundry-agentic-loop-canvas/public/app.js:997 — renderTemplateView has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 11 (24 pts), other 5, if/else 3 (4 pts), boolean chains 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · isPublicAddress (cognitive 36) · ×1
  • isPublicAddress (cognitive 36) eng/external-plugin-intake.mjs:313 — isPublicAddress has cognitive complexity 36 (threshold 15). Drivers by points: boolean chains 27, ternaries 4, if/else 3, other 2. Of this number, 34 points are the body's own statements and 2 belong to 5 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · bulkAction (cognitive 36) · ×1
  • bulkAction (cognitive 36) .github/extensions/open-pr-board/public/app.js:374 — bulkAction has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (16 pts), ternaries 7 (12 pts), boolean chains 4, error handling 2 (3 pts), loops 1 (nesting depth added 11). Of this number, 34 points are the body's own statements and 2 belong to 6 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-_8h8h3EK.roundToSingleUnit (cognitive 35) · ×1
  • index-_8h8h3EK.roundToSingleUnit (cognitive 35) REDACTED:29980 — index-_8h8h3EK.roundToSingleUnit has cognitive complexity 35 (threshold 15). Drivers by points: if/else 21 (25 pts), boolean chains 10 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · index-_8h8h3EK.tokenizeCodeFenced (cognitive 35) · ×1
  • index-_8h8h3EK.tokenizeCodeFenced (cognitive 35) REDACTED:35271 — index-_8h8h3EK.tokenizeCodeFenced has cognitive complexity 35 (threshold 15). Drivers by points: if/else 15, boolean chains 11, ternaries 6 (9 pts) (nesting depth added 3). None of this is in the body itself: all 35 points belong to 13 function items inside it that branch (info, infoBefore, meta, …). 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 · index-_8h8h3EK.createState · ×1
  • index-_8h8h3EK.createState::all (cognitive 35) REDACTED:44396 — index-_8h8h3EK.createState::all has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (29 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · index-_8h8h3EK.post · ×1
  • index-_8h8h3EK.post::transform (cognitive 35) REDACTED:47260 — index-_8h8h3EK.post::transform has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 7, ternaries 2 (5 pts), loops 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · drawio-to-png.main (cognitive 35) · ×1
  • drawio-to-png.main (cognitive 35) skills/drawio/scripts/drawio-to-png.mjs:206 — drawio-to-png.main has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (15 pts), error handling 5 (12 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · analysis.drop_lowiv_features (cognitive 35) · ×1
  • analysis.drop_lowiv_features (cognitive 35) skills/datanalysis-credit-risk/references/analysis.py:64 — analysis.drop_lowiv_features has cognitive complexity 35 (threshold 15). Drivers by points: if/else 17 (24 pts), loops 5 (7 pts), boolean chains 3, 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 · detect_hazards.python_ast_findings (cognitive 35) · ×1
  • detect_hazards.python_ast_findings (cognitive 35) skills/poka-yoke/scripts/detect_hazards.py:252 — detect_hazards.python_ast_findings has cognitive complexity 35 (threshold 15). Drivers by points: if/else 7 (24 pts), loops 3 (7 pts), boolean chains 3, error handling 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 · installGlobalShortcuts (cognitive 35) · ×1
  • installGlobalShortcuts (cognitive 35) REDACTED:1143 — installGlobalShortcuts has cognitive complexity 35 (threshold 15). Drivers by points: if/else 20 (25 pts), boolean chains 9, other 1 (nesting depth added 5). None of this is in the body itself: all 35 points belong to 2 function literals inside it that branch (lines 1145, 1178). 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 · buildReserved (cognitive 35) · ×1
  • buildReserved (cognitive 35) extensions/apng-studio/qr.mjs:232 — buildReserved has cognitive complexity 35 (threshold 15). Drivers by points: loops 12 (24 pts), boolean chains 6, if/else 3 (5 pts) (nesting depth added 14). Of this number, 33 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · buildPrompt (cognitive 35) · ×1
  • buildPrompt (cognitive 35) extensions/java-modernization-studio/prompts.mjs:32 — buildPrompt has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 7 (14 pts), if/else 6 (12 pts), boolean chains 8, match/switch 1 (nesting depth added 13). 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 · submission-gate.syncPullRequestStatus (cognitive 34) · ×1
  • submission-gate.syncPullRequestStatus (cognitive 34) REDACTED:985 — submission-gate.syncPullRequestStatus has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 8, error handling 3 (4 pts), ternaries 2, loops 1 (nesting depth added 6). Of this number, 31 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Sync.flush (cognitive 34) · ×1
  • Sync.flush (cognitive 34) extensions/draw/public/sync.js:362 — Sync.flush has cognitive complexity 34 (threshold 15). Drivers by points: if/else 18 (26 pts), ternaries 1 (3 pts), boolean chains 2, loops 1 (2 pts), error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app.connectEvents (cognitive 34) · ×1
  • app.connectEvents (cognitive 34) REDACTED:997 — app.connectEvents has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (24 pts), loops 3 (6 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index-_8h8h3EK.resolveAllAttention (cognitive 34) · ×1
  • index-_8h8h3EK.resolveAllAttention (cognitive 34) REDACTED:34457 — index-_8h8h3EK.resolveAllAttention has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (24 pts), boolean chains 5, loops 3 (5 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UtfString.constructor (cognitive 34) · ×1
  • UtfString.constructor (cognitive 34) extensions/github-security/extension.mjs:8233 — UtfString.constructor has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (29 pts), boolean chains 2, 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 · local-delegation.findLocalDelegationSkillDir (cognitive 34) · ×1
  • local-delegation.findLocalDelegationSkillDir (cognitive 34) extensions/signals-dashboard/local-delegation.mjs:205 — local-delegation.findLocalDelegationSkillDir has cognitive complexity 34 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 4 (10 pts), error handling 2 (5 pts), ternaries 1 (2 pts), boolean chains 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 · pr-dashboard-cli.getPrDetails (cognitive 34) · ×1
  • pr-dashboard-cli.getPrDetails (cognitive 34) skills/pr-dashboard/scripts/pr-dashboard-cli.mjs:77 — pr-dashboard-cli.getPrDetails has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 13, error handling 4 (nesting depth added 4). Of this number, 32 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · trackTools (cognitive 34) · ×1
  • trackTools (cognitive 34) extensions/agent-radar/collector.mjs:749 — trackTools has cognitive complexity 34 (threshold 15). Drivers by points: if/else 5 (13 pts), ternaries 4 (10 pts), boolean chains 7, 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 · resolveDestination (cognitive 34) · ×1
  • resolveDestination (cognitive 34) REDACTED:217 — resolveDestination has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 6 (10 pts), boolean chains 9 (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 · writeSampleHome · ×1
  • writeSampleHome::generateSession (cognitive 34) extensions/ai-credits-breakdown/sample-data.mjs:90 — writeSampleHome::generateSession has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 5 (14 pts), if/else 7 (13 pts), boolean chains 4, loops 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 · generate-website-data.extractCanvasMetadataFromSource · ×1
  • generate-website-data.extractCanvasMetadataFromSource::findMatchingBrace (cognitive 33) REDACTED:888 — generate-website-data.extractCanvasMetadataFromSource::findMatchingBrace has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (25 pts), boolean chains 7, 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 · ui.html.focusedNodes (cognitive 33) · ×1
  • ui.html.focusedNodes (cognitive 33) extensions/agent-radar/ui.html:467 — ui.html.focusedNodes has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 3 (14 pts), if/else 4 (11 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 · sample-data.writeSampleHome (cognitive 33) · ×1
  • sample-data.writeSampleHome (cognitive 33) extensions/ai-credits-breakdown/sample-data.mjs:36 — sample-data.writeSampleHome has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (27 pts), ternaries 8 (25 pts), loops 7 (9 pts), boolean chains 8 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · analytics.buildPulse (cognitive 33) · ×1
  • analytics.buildPulse (cognitive 33) extensions/chronicle-stats/analytics.mjs:185 — analytics.buildPulse has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 5 (15 pts), if/else 8 (12 pts), boolean chains 6 (nesting depth added 14). Of this number, 32 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 · REDACTED.computeLayout (cognitive 33) · ×1
  • REDACTED.computeLayout (cognitive 33) extensions/diagram-viewer/public/index.html:372 — REDACTED.computeLayout has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 7 (8 pts), boolean chains 6 (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 · index-_8h8h3EK.calculatePosition (cognitive 33) · ×1
  • index-_8h8h3EK.calculatePosition (cognitive 33) REDACTED:14002 — index-_8h8h3EK.calculatePosition has cognitive complexity 33 (threshold 15). Drivers by points: if/else 25 (29 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · index-_8h8h3EK.TextInputInnerVisualSlot (cognitive 33) · ×1
  • index-_8h8h3EK.TextInputInnerVisualSlot (cognitive 33) REDACTED:17341 — index-_8h8h3EK.TextInputInnerVisualSlot has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 12, ternaries 5 (6 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · index-_8h8h3EK.AutocompleteOverlay (cognitive 33) · ×1
  • index-_8h8h3EK.AutocompleteOverlay (cognitive 33) REDACTED:24765 — index-_8h8h3EK.AutocompleteOverlay has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 16, if/else 16, ternaries 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · extension.verifyIntersections (cognitive 33) · ×1
  • extension.verifyIntersections (cognitive 33) extensions/github-security/extension.mjs:7340 — extension.verifyIntersections has cognitive complexity 33 (threshold 15). Drivers by points: if/else 6 (21 pts), boolean chains 9, loops 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 · extension.triageSentry (cognitive 33) · ×1
  • extension.triageSentry (cognitive 33) REDACTED:786 — extension.triageSentry has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 8, ternaries 4 (7 pts), error handling 1 (nesting depth added 6). Of this number, 32 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ExtensionDetail.ExtensionDetail (cognitive 33) · ×1
  • ExtensionDetail.ExtensionDetail (cognitive 33) REDACTED:103 — ExtensionDetail.ExtensionDetail has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 20 (31 pts), boolean chains 2 (nesting depth added 11). Of this number, 31 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 · SkillDetail.SkillDetail (cognitive 33) · ×1
  • SkillDetail.SkillDetail (cognitive 33) REDACTED:138 — SkillDetail.SkillDetail has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 16 (20 pts), if/else 9, boolean chains 2, error handling 2 (nesting depth added 4). Of this number, 18 points are the body's own statements and 15 belong to 9 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · convert_pdf_to_md.extract_images (cognitive 33) · ×1
  • convert_pdf_to_md.extract_images (cognitive 33) skills/convert-pdf-to-md/scripts/convert_pdf_to_md.py:96 — convert_pdf_to_md.extract_images has cognitive complexity 33 (threshold 15). Drivers by points: if/else 5 (14 pts), error handling 4 (8 pts), loops 4 (7 pts), boolean chains 4 (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 · diffLines (cognitive 33) · ×1
  • diffLines (cognitive 33) REDACTED:880 — diffLines has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 4 (8 pts), boolean chains 5 (nesting depth added 16). Of this number, 31 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 33) · ×1
  • (anonymous) (cognitive 33) extensions/foundry-agentic-loop-canvas/public/app.js:592 — (anonymous) has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 7, ternaries 5 (7 pts), other 2, error handling 1 (nesting depth added 8). Of this number, 30 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index-_8h8h3EK.Avatar (cognitive 32) · ×1
  • index-_8h8h3EK.Avatar (cognitive 32) REDACTED:25069 — index-_8h8h3EK.Avatar has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (19 pts), ternaries 7, boolean chains 3, loops 1 (3 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · parseRouteUnsafe (cognitive 32) · ×1
  • parseRouteUnsafe (cognitive 32) REDACTED:780 — parseRouteUnsafe has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10, other 9, boolean chains 8, ternaries 4 (5 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · checkReadiness (cognitive 32) · ×1
  • checkReadiness (cognitive 32) extensions/foundry-agentic-loop-canvas/public/app.js:655 — checkReadiness has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 15 (17 pts), boolean chains 7, if/else 3, other 3, error handling 1, loops 1 (nesting depth added 2). Of this number, 18 points are the body's own statements and 14 belong to 12 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · scanRepo (cognitive 32) · ×1
  • scanRepo (cognitive 32) REDACTED:474 — scanRepo has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 14, ternaries 6 (8 pts), if/else 5, loops 2 (3 pts), error handling 1 (2 pts) (nesting depth added 4). Of this number, 31 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · streamZipEntryRange (cognitive 32) · ×1
  • streamZipEntryRange (cognitive 32) extensions/pr-artifact-explorer/zip.mjs:485 — streamZipEntryRange has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (17 pts), ternaries 4 (5 pts), boolean chains 4, other 4, error handling 1, loops 1 (nesting depth added 7). Of this number, 31 points are the body's own statements and 1 belongs 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 · scanStorage (cognitive 32) · ×1
  • scanStorage (cognitive 32) extensions/windows-app-storage-inspector-cleanup/src/core/scanner.mjs:307 — scanStorage has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (16 pts), error handling 4, boolean chains 3, loops 3, other 3, ternaries 3 (nesting depth added 3). Most of this is not in the body itself: 6 of the 32 points are its own statements and the rest belongs to 21 function items inside it that branch (processEntry, scanDirectory, addWarning, …). 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 · renderStylebar (cognitive 32) · ×1
  • renderStylebar (cognitive 32) extensions/draw/public/ui.js:177 — renderStylebar has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (17 pts), ternaries 7 (10 pts), boolean chains 5 (nesting depth added 7). Of this number, 28 points are the body's own statements and 4 belong to 18 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 · review-routing.createActions.apply (cognitive 31) · ×1
  • review-routing.createActions.apply (cognitive 31) eng/review-routing.mjs:647 — review-routing.createActions.apply has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (18 pts), error handling 2 (5 pts), loops 2 (4 pts), boolean chains 3, ternaries 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 · review-routing.resolveWorkflowRunArtifact (cognitive 31) · ×1
  • review-routing.resolveWorkflowRunArtifact (cognitive 31) eng/review-routing.mjs:816 — review-routing.resolveWorkflowRunArtifact has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17 (19 pts), boolean chains 11, ternaries 1 (nesting depth added 2). Of this number, 29 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 · submission-gate.runPrCommand (cognitive 31) · ×1
  • submission-gate.runPrCommand (cognitive 31) REDACTED:1274 — submission-gate.runPrCommand has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 10, ternaries 3 (6 pts), error handling 2, loops 1 (2 pts) (nesting depth added 5). Of this number, 29 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · Processor.use (cognitive 31) · ×1
  • Processor.use (cognitive 31) REDACTED:46846 — Processor.use has cognitive complexity 31 (threshold 15). Drivers by points: if/else 20 (24 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 5). Most of this is not in the body itself: 8 of the 31 points are its own statements and the rest belongs to 4 function items inside it that branch (addPlugin, add, addList, …). 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 · index-_8h8h3EK.SessionDiffSummary (cognitive 31) · ×1
  • index-_8h8h3EK.SessionDiffSummary (cognitive 31) REDACTED:49190 — index-_8h8h3EK.SessionDiffSummary has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 12 (30 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 · notebook-canvas.startServer (cognitive 31) · ×1
  • notebook-canvas.startServer (cognitive 31) extensions/jupyter-notebooks/notebook-canvas.mjs:3549 — notebook-canvas.startServer has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 5 (15 pts), if/else 7 (8 pts), boolean chains 7, error handling 1 (nesting depth added 11). Most of this is not in the body itself: 2 of the 31 points are its own statements and the rest belongs to one function literal inside it that branches (line 3560). 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 · browser.jobCardHtml (cognitive 31) · ×1
  • browser.jobCardHtml (cognitive 31) REDACTED:396 — browser.jobCardHtml has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 21 (26 pts), boolean chains 5 (nesting depth added 5). Of this number, 25 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · targets.naturalLanguage (cognitive 31) · ×1
  • targets.naturalLanguage (cognitive 31) REDACTED:318 — targets.naturalLanguage has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17 (24 pts), ternaries 3 (4 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · pagefind-resources.pagefindResources (cognitive 31) · ×1
  • pagefind-resources.pagefindResources (cognitive 31) REDACTED:116 — pagefind-resources.pagefindResources has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 4 (6 pts), ternaries 5 (6 pts), boolean chains 5, error handling 1 (nesting depth added 7). None of this is in the body itself: all 31 points belong to 5 function literals inside it that branch (lines 133, 161, 124, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · analysis.drop_highpsi_features (cognitive 31) · ×1
  • analysis.drop_highpsi_features (cognitive 31) skills/datanalysis-credit-risk/references/analysis.py:529 — analysis.drop_highpsi_features has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 7 (13 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 · createMatchers (cognitive 31) · ×1
  • createMatchers (cognitive 31) extensions/github-security/extension.mjs:1377 — createMatchers has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 7 (12 pts), boolean chains 4, match/switch 1 (3 pts) (nesting depth added 11). Most of this is not in the body itself: 9 of the 31 points are its own statements and the rest belongs to 9 function items inside it that branch (parseInnerExpression, parseOperand, a function literal at line 1408, …). 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 · collectRepo (cognitive 31) · ×1
  • collectRepo (cognitive 31) extensions/work-hub/data.mjs:662 — collectRepo has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 17, ternaries 7, if/else 5 (6 pts), loops 1 (nesting depth added 1). Of this number, 29 points are the body's own statements and 2 belong to 5 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · renderMarkdownFragment (cognitive 31) · ×1
  • renderMarkdownFragment (cognitive 31) REDACTED:513 — renderMarkdownFragment has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 4 (10 pts), boolean chains 4, other 2 (nesting depth added 13). Of this number, 29 points are the body's own statements and 2 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 · createActions.apply (cognitive 31) · ×1
  • createActions.apply (cognitive 31) eng/review-routing.mjs:647 — createActions.apply has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (18 pts), error handling 2 (5 pts), loops 2 (4 pts), boolean chains 2, other 1, ternaries 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 · parseTarget (cognitive 31) · ×1
  • parseTarget (cognitive 31) REDACTED:361 — parseTarget has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 8, other 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · load (cognitive 31) · ×1
  • load (cognitive 31) extensions/pr-artifact-explorer/jobs.mjs:216 — load has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 5 (10 pts), other 9, if/else 5 (8 pts), boolean chains 2, error handling 1, loops 1 (nesting depth added 8). Most of this is not in the body itself: 1 of the 31 points is its own statement and the rest belongs to one function literal inside it that branches (line 218). 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 · validate-plugins.validatePlugins (cognitive 30) · ×1
  • validate-plugins.validatePlugins (cognitive 30) eng/validate-plugins.mjs:424 — validate-plugins.validatePlugins has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (23 pts), loops 3 (5 pts), boolean chains 1, ternaries 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 · chronicle.prepareChronicle (cognitive 30) · ×1
  • chronicle.prepareChronicle (cognitive 30) extensions/chronicle-stats/chronicle.mjs:39 — chronicle.prepareChronicle has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 5 (12 pts), boolean chains 8, if/else 5 (8 pts), loops 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 · app.renderBuildMark (cognitive 30) · ×1
  • app.renderBuildMark (cognitive 30) extensions/foundry-agentic-loop-canvas/public/app.js:431 — app.renderBuildMark has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 6 (24 pts), if/else 4, boolean chains 2 (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 · app.renderInventory (cognitive 30) · ×1
  • app.renderInventory (cognitive 30) extensions/foundry-agentic-loop-canvas/public/app.js:1116 — app.renderInventory has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 12 (22 pts), boolean chains 5, if/else 3 (nesting depth added 10). Most of this is not in the body itself: 2 of the 30 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 1123, 1136, 1123). 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 · DurationFormat.constructor (cognitive 30) · ×1
  • DurationFormat.constructor (cognitive 30) REDACTED:29786 — DurationFormat.constructor has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 16 (19 pts), boolean chains 10, if/else 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · RelativeTimeElement.update (cognitive 30) · ×1
  • RelativeTimeElement.update (cognitive 30) REDACTED:30393 — RelativeTimeElement.update has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 14 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · VFileMessage.constructor (cognitive 30) · ×1
  • VFileMessage.constructor (cognitive 30) REDACTED:32721 — VFileMessage.constructor has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 13, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · index-_8h8h3EK.Spinner (cognitive 30) · ×1
  • index-_8h8h3EK.Spinner (cognitive 30) REDACTED:12618 — index-_8h8h3EK.Spinner has cognitive complexity 30 (threshold 15). Drivers by points: if/else 19, boolean chains 6, ternaries 5. 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-_8h8h3EK.Description (cognitive 30) · ×1
  • index-_8h8h3EK.Description (cognitive 30) REDACTED:18866 — index-_8h8h3EK.Description has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 6, ternaries 4 (6 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index-_8h8h3EK.useVirtualizerBase (cognitive 30) · ×1
  • index-_8h8h3EK.useVirtualizerBase (cognitive 30) REDACTED:21532 — index-_8h8h3EK.useVirtualizerBase has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 6, ternaries 3 (5 pts), loops 1 (nesting depth added 7). None of this is in the body itself: all 30 points belong to 4 function items inside it that branch (applyDirectStyles, a function literal at line 21575, applyContainerSize, …). 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 · index-_8h8h3EK.preprocess · ×1
  • index-_8h8h3EK.preprocess::preprocessor (cognitive 30) REDACTED:40873 — index-_8h8h3EK.preprocess::preprocessor has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 2 (5 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · extension.parseTheme (cognitive 30) · ×1
  • extension.parseTheme (cognitive 30) extensions/github-security/extension.mjs:1077 — extension.parseTheme has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 3 (6 pts), match/switch 1 (4 pts), boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · extension._tokenizeString · ×1
  • extension._tokenizeString::scanNext (cognitive 30) extensions/github-security/extension.mjs:2290 — extension._tokenizeString::scanNext has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 4, ternaries 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 · ReviewStore.context (cognitive 30) · ×1
  • ReviewStore.context (cognitive 30) extensions/pr-review/review.mjs:212 — ReviewStore.context has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (24 pts), boolean chains 5, ternaries 1 (nesting depth added 13). Of this number, 29 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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 · extension.renderLocalDelegationControl (cognitive 30) · ×1
  • extension.renderLocalDelegationControl (cognitive 30) REDACTED:825 — extension.renderLocalDelegationControl has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 15 (24 pts), boolean chains 6 (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 · analysis.value_ratio_distribution_by_org (cognitive 30) · ×1
  • analysis.value_ratio_distribution_by_org (cognitive 30) skills/datanalysis-credit-risk/references/analysis.py:797 — analysis.value_ratio_distribution_by_org has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (16 pts), ternaries 3 (9 pts), loops 3 (5 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 · analyze_plan.format_set_change (cognitive 30) · ×1
  • analyze_plan.format_set_change (cognitive 30) skills/terraform-azurerm-set-diff-analyzer/scripts/analyze_plan.py:515 — analyze_plan.format_set_change has cognitive complexity 30 (threshold 15). Drivers by points: loops 7 (16 pts), if/else 9 (13 pts), boolean chains 1 (nesting depth added 13). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · getItemDetail (cognitive 30) · ×1
  • getItemDetail (cognitive 30) extensions/work-hub/data.mjs:1071 — getItemDetail has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 20, if/else 4 (5 pts), other 3, ternaries 1 (2 pts) (nesting depth added 2). Of this number, 29 points are the body's own statements and 1 belongs to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · parseTranscript (cognitive 30) · ×1
  • parseTranscript (cognitive 30) extensions/ai-credits-breakdown/collector.mjs:330 — parseTranscript has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 9, if/else 2 (6 pts), loops 4 (6 pts), other 5, error handling 2 (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 · render (cognitive 30) · ×1
  • render (cognitive 30) .github/extensions/duplicate-review-board/public/app.js:165 — render has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 13, if/else 8 (9 pts), loops 2 (3 pts), ternaries 2 (3 pts), other 2 (nesting depth added 3). Most of this is not in the body itself: 13 of the 30 points are its own statements and the rest belongs to 18 function literals inside it that branch (lines 181, 178, 187, …). 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 · recapMarkdown (cognitive 30) · ×1
  • recapMarkdown (cognitive 30) REDACTED:243 — recapMarkdown has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 6 (11 pts), loops 4 (8 pts), if/else 4 (6 pts), boolean chains 5 (nesting depth added 11). Of this number, 28 points are the body's own statements and 2 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 · extension.makeHandler (cognitive 29) · ×1
  • extension.makeHandler (cognitive 29) REDACTED:311 — extension.makeHandler has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 8, error handling 3 (6 pts) (nesting depth added 7). None of this is in the body itself: all 29 points belong to one function literal inside it that branches (line 312). 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 · index-_8h8h3EK.Stack$1 (cognitive 29) · ×1
  • index-_8h8h3EK.Stack$1 (cognitive 29) REDACTED:16882 — index-_8h8h3EK.Stack$1 has cognitive complexity 29 (threshold 15). Drivers by points: if/else 22, ternaries 6, boolean chains 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · PluginDetail.PluginDetail (cognitive 29) · ×1
  • PluginDetail.PluginDetail (cognitive 29) REDACTED:116 — PluginDetail.PluginDetail has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 18 (23 pts), boolean chains 3, if/else 2, error handling 1 (nesting depth added 5). Of this number, 23 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · (anonymous) (cognitive 29) · ×1
  • (anonymous) (cognitive 29) extensions/foundry-agentic-loop-canvas/public/app.js:1803 — (anonymous) has cognitive complexity 29 (threshold 15). Drivers by points: if/else 17 (18 pts), error handling 2 (4 pts), ternaries 2 (4 pts), boolean chains 2, other 1 (nesting depth added 5). Of this number, 24 points are the body's own statements and 5 belong to 6 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · renderOverlay (cognitive 29) · ×1
  • renderOverlay (cognitive 29) extensions/draw/public/editor.js:690 — renderOverlay has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (17 pts), ternaries 4 (5 pts), boolean chains 4, loops 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · wrapText (cognitive 29) · ×1
  • wrapText (cognitive 29) extensions/draw/lib/geometry.mjs:45 — wrapText has cognitive complexity 29 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 4 (10 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 18). Of this number, 22 points are the body's own statements and 7 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 · generateMarkdownReport (cognitive 29) · ×1
  • generateMarkdownReport (cognitive 29) eng/contributor-report.mjs:463 — generateMarkdownReport has cognitive complexity 29 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 4 (8 pts), loops 4 (6 pts), boolean chains 4, other 3 (nesting depth added 10). Most of this is not in the body itself: 13 of the 29 points are its own statements and the rest belongs to 3 function items inside it that branch (computeTypesArg, a function literal at line 498, a function literal at line 480). 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 · analyzeVsCodeInsiders (cognitive 29) · ×1
  • analyzeVsCodeInsiders (cognitive 29) extensions/windows-app-storage-inspector-cleanup/src/analyzers/vscode-insiders.mjs:92 — analyzeVsCodeInsiders has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, error handling 3 (4 pts), other 4, ternaries 3 (4 pts), loops 1 (nesting depth added 6). Of this number, 27 points are the body's own statements and 2 belong to 12 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 · runAutopilot (cognitive 29) · ×1
  • runAutopilot (cognitive 29) extensions/java-modernization-studio/autopilot.mjs:88 — runAutopilot has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 10, error handling 2 (3 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · collector.collectVSCodeChats (cognitive 28) · ×1
  • collector.collectVSCodeChats (cognitive 28) extensions/agent-radar/collector.mjs:871 — collector.collectVSCodeChats has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (15 pts), error handling 4 (8 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 13). Most of this is not in the body itself: 6 of the 28 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 881, 897). 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 · app.frontends (cognitive 28) · ×1
  • app.frontends (cognitive 28) extensions/foundry-agentic-loop-canvas/public/app.js:592 — app.frontends has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 7, ternaries 2 (4 pts), error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index-_8h8h3EK.subcontent (cognitive 28) · ×1
  • index-_8h8h3EK.subcontent (cognitive 28) REDACTED:36305 — index-_8h8h3EK.subcontent has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 5 (6 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 · extension.collectExternalReferencesInRules (cognitive 28) · ×1
  • extension.collectExternalReferencesInRules (cognitive 28) extensions/github-security/extension.mjs:1558 — extension.collectExternalReferencesInRules has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 3 (9 pts), match/switch 1 (2 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 · app.artifactRowHtml (cognitive 28) · ×1
  • app.artifactRowHtml (cognitive 28) REDACTED:3022 — app.artifactRowHtml has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 16 (21 pts), boolean chains 7 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · extension.parseInputs (cognitive 28) · ×1
  • extension.parseInputs (cognitive 28) extensions/repo-actions-hub/extension.mjs:587 — extension.parseInputs has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 4, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · extension.discoverProjects (cognitive 28) · ×1
  • extension.discoverProjects (cognitive 28) REDACTED:1193 — extension.discoverProjects has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 7 (10 pts), boolean chains 7, error handling 1 (nesting depth added 4). Of this number, 24 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · local-delegation.resolveLocalDelegationAvailability (cognitive 28) · ×1
  • local-delegation.resolveLocalDelegationAvailability (cognitive 28) extensions/signals-dashboard/local-delegation.mjs:278 — local-delegation.resolveLocalDelegationAvailability has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 14, if/else 10 (12 pts), ternaries 1 (2 pts) (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · ExtensionsCatalog.ExtensionsCatalog (cognitive 28) · ×1
  • ExtensionsCatalog.ExtensionsCatalog (cognitive 28) website/src/components/brand/ExtensionsCatalog.tsx:145 — ExtensionsCatalog.ExtensionsCatalog has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 15 (17 pts), boolean chains 8, if/else 3 (nesting depth added 2). Most of this is not in the body itself: 6 of the 28 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 394, 206, 306, …). 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 · quality_gate.check_bugs_heading (cognitive 28) · ×1
  • quality_gate.check_bugs_heading (cognitive 28) skills/quality-playbook/quality_gate.py:829 — quality_gate.check_bugs_heading has cognitive complexity 28 (threshold 15). Drivers by points: if/else 17 (24 pts), boolean chains 3, 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 · quality_gate.check_v1_5_0_requirements_manifest (cognitive 28) · ×1
  • quality_gate.check_v1_5_0_requirements_manifest (cognitive 28) skills/quality-playbook/quality_gate.py:1958 — quality_gate.check_v1_5_0_requirements_manifest has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · analyze_plan.format_markdown_output (cognitive 28) · ×1
  • analyze_plan.format_markdown_output (cognitive 28) skills/terraform-azurerm-set-diff-analyzer/scripts/analyze_plan.py:572 — analyze_plan.format_markdown_output has cognitive complexity 28 (threshold 15). Drivers by points: loops 8 (17 pts), if/else 9 (11 pts) (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · serializeAttribute (cognitive 28) · ×1
  • serializeAttribute (cognitive 28) extensions/github-security/extension.mjs:6694 — serializeAttribute has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 12, if/else 8 (9 pts), ternaries 6 (7 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · renderReview (cognitive 28) · ×1
  • renderReview (cognitive 28) REDACTED:476 — renderReview has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 10 (16 pts), if/else 7 (9 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · shutdownIncrements (cognitive 28) · ×1
  • shutdownIncrements (cognitive 28) extensions/ai-credits-breakdown/collector.mjs:414 — shutdownIncrements has cognitive complexity 28 (threshold 15). Drivers by points: if/else 4 (10 pts), ternaries 3 (9 pts), loops 4 (8 pts), boolean chains 1 (nesting depth added 16). Of this number, 25 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 · startServer (cognitive 28) · ×1
  • startServer (cognitive 28) REDACTED:315 — startServer has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 8, error handling 3 (5 pts), ternaries 2 (3 pts) (nesting depth added 6). Most of this is not in the body itself: 3 of the 28 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 322, a function literal at line 375, (anonymous)::onError, …). 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 · browserCommand (cognitive 28) · ×1
  • browserCommand (cognitive 28) REDACTED:280 — browserCommand has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (22 pts), boolean chains 3, ternaries 1 (2 pts), other 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 · downloadArchive (cognitive 28) · ×1
  • downloadArchive (cognitive 28) extensions/pr-artifact-explorer/cache.mjs:104 — downloadArchive has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 7 (9 pts), if/else 6 (7 pts), boolean chains 6, error handling 3, other 2, loops 1 (nesting depth added 3). Of this number, 15 points are the body's own statements and 13 belong to 6 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · render (cognitive 28) · ×1
  • render (cognitive 28) .github/extensions/resource-staleness-board/public/app.js:279 — render has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 7 (8 pts), other 6, boolean chains 4 (nesting depth added 2). Of this number, 20 points are the body's own statements and 8 belong to 6 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · perform (cognitive 28) · ×1
  • perform (cognitive 28) extensions/foundry-agentic-loop-canvas/extension.mjs:105 — perform has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (17 pts), ternaries 3 (6 pts), boolean chains 3, match/switch 1, other 1 (nesting depth added 12). 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 · recordDecision (cognitive 28) · ×1
  • recordDecision (cognitive 28) .github/extensions/open-pr-board/lib/state.mjs:271 — recordDecision has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 7, other 5, 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 · external-plugin-quality-gates.runCanvasStructureGate (cognitive 27) · ×1
  • external-plugin-quality-gates.runCanvasStructureGate (cognitive 27) eng/external-plugin-quality-gates.mjs:861 — external-plugin-quality-gates.runCanvasStructureGate has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (24 pts), boolean chains 2, loops 1 (nesting depth added 10). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · submission-gate.rerunChecks (cognitive 27) · ×1
  • submission-gate.rerunChecks (cognitive 27) REDACTED:1205 — submission-gate.rerunChecks has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 7, error handling 3 (7 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 · extension.server (cognitive 27) · ×1
  • extension.server (cognitive 27) extensions/gesture-review/extension.mjs:106 — extension.server has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 6, ternaries 2 (6 pts) (nesting depth added 9). Of this number, 16 points are the body's own statements and 11 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-_8h8h3EK.pureCalculateAnchoredPosition (cognitive 27) · ×1
  • index-_8h8h3EK.pureCalculateAnchoredPosition (cognitive 27) REDACTED:13944 — index-_8h8h3EK.pureCalculateAnchoredPosition has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 2 (6 pts), boolean chains 4 (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 · index-_8h8h3EK.Autocomplete (cognitive 27) · ×1
  • index-_8h8h3EK.Autocomplete (cognitive 27) REDACTED:24919 — index-_8h8h3EK.Autocomplete has cognitive complexity 27 (threshold 15). Drivers by points: if/else 22, boolean chains 5. 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-_8h8h3EK.BreadcrumbsMenuItem (cognitive 27) · ×1
  • index-_8h8h3EK.BreadcrumbsMenuItem (cognitive 27) REDACTED:26029 — index-_8h8h3EK.BreadcrumbsMenuItem has cognitive complexity 27 (threshold 15). Drivers by points: if/else 22, boolean chains 4, ternaries 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · quality_gate.check_hybrid_cross_cutting_reqs (cognitive 27) · ×1
  • quality_gate.check_hybrid_cross_cutting_reqs (cognitive 27) skills/quality-playbook/quality_gate.py:3071 — quality_gate.check_hybrid_cross_cutting_reqs has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 3 (5 pts), boolean chains 4, error handling 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 · quality_gate.main (cognitive 27) · ×1
  • quality_gate.main (cognitive 27) skills/quality-playbook/quality_gate.py:3303 — quality_gate.main has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (19 pts), loops 4 (6 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · produceFromScopes (cognitive 27) · ×1
  • produceFromScopes (cognitive 27) extensions/github-security/extension.mjs:3004 — produceFromScopes has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 4, loops 1 (3 pts), other 3 (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 · createAnsiSequenceParser.parse (cognitive 27) · ×1
  • createAnsiSequenceParser.parse (cognitive 27) extensions/github-security/extension.mjs:7534 — createAnsiSequenceParser.parse has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 4 (8 pts), ternaries 1 (2 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 · continueProgressivePullList · ×1
  • continueProgressivePullList::worker (cognitive 27) REDACTED:2786 — continueProgressivePullList::worker has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (7 pts), boolean chains 6, other 2, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · continueProgressivePullList (cognitive 27) · ×1
  • continueProgressivePullList (cognitive 27) REDACTED:2717 — continueProgressivePullList has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 11, loops 6 (11 pts), other 5, ternaries 2 (4 pts), error handling 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 · mountAsciinemaPlayer (cognitive 27) · ×1
  • mountAsciinemaPlayer (cognitive 27) REDACTED:4791 — mountAsciinemaPlayer has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 3 (7 pts), boolean chains 6, error handling 1 (2 pts), other 1 (nesting depth added 8). Most of this is not in the body itself: 13 of the 27 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 4843, 4839, 4822, …). 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 · renderFormField (cognitive 27) · ×1
  • renderFormField (cognitive 27) REDACTED:1252 — renderFormField has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 9 (13 pts), other 6, boolean chains 4, if/else 4 (nesting depth added 4). Of this number, 21 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · (anonymous) (cognitive 27) · ×1
  • (anonymous) (cognitive 27) extensions/gesture-review/extension.mjs:106 — (anonymous) has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 6, ternaries 2 (6 pts) (nesting depth added 9). Of this number, 16 points are the body's own statements and 11 belong to 7 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · getMissingContributors (cognitive 27) · ×1
  • getMissingContributors (cognitive 27) eng/contributor-report.mjs:195 — getMissingContributors has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (14 pts), other 6, boolean chains 5, error handling 1, loops 1 (nesting depth added 5). Of this number, 26 points are the body's own statements and 1 belongs to 5 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 · runtime.redactError · ×1
  • runtime.redactError::sanitizeEmbeddedJson (cognitive 26) eng/canvas-error-handoff/runtime.mjs:23 — runtime.redactError::sanitizeEmbeddedJson has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 4, loops 2 (3 pts), error handling 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 · license.isRecognizedSpdxExpression (cognitive 26) · ×1
  • license.isRecognizedSpdxExpression (cognitive 26) eng/lib/license.mjs:120 — license.isRecognizedSpdxExpression has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 5, loops 2 (nesting depth added 4). Most of this is not in the body itself: 3 of the 26 points are its own statements and the rest belongs to 5 function items inside it that branch (parsePrimary, parseWithExpression, parseAndExpression, …). 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 · submission-gate.observeChecks (cognitive 26) · ×1
  • submission-gate.observeChecks (cognitive 26) REDACTED:678 — submission-gate.observeChecks has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 5, error handling 1 (4 pts), loops 1 (nesting depth added 12). Of this number, 24 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 · collector.createdSession · ×1
  • collector.createdSession::read (cognitive 26) extensions/agent-radar/collector.mjs:165 — collector.createdSession::read has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 2 (4 pts), error handling 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · pointer.attachPointer · ×1
  • pointer.attachPointer::cursorFor (cognitive 26) extensions/draw/public/pointer.js:47 — pointer.attachPointer::cursorFor has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (15 pts), ternaries 4 (8 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index-_8h8h3EK.TextInputBaseWrapper (cognitive 26) · ×1
  • index-_8h8h3EK.TextInputBaseWrapper (cognitive 26) REDACTED:17432 — index-_8h8h3EK.TextInputBaseWrapper has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14, boolean chains 11, ternaries 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · index-_8h8h3EK.tokenizeListStart (cognitive 26) · ×1
  • index-_8h8h3EK.tokenizeListStart (cognitive 26) REDACTED:39722 — index-_8h8h3EK.tokenizeListStart has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 11, if/else 7 (10 pts), ternaries 3 (5 pts) (nesting depth added 5). Most of this is not in the body itself: 2 of the 26 points are its own statements and the rest belongs to 4 function items inside it that branch (start, inside, atMarker, …). 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 · _RegExpSource.constructor (cognitive 26) · ×1
  • _RegExpSource.constructor (cognitive 26) extensions/github-security/extension.mjs:1983 — _RegExpSource.constructor has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · extension.createAnsiSequenceParser.parse (cognitive 26) · ×1
  • extension.createAnsiSequenceParser.parse (cognitive 26) extensions/github-security/extension.mjs:7534 — extension.createAnsiSequenceParser.parse has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 3 (7 pts), ternaries 1 (2 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 · scan.buildAssessment (cognitive 26) · ×1
  • scan.buildAssessment (cognitive 26) REDACTED:413 — scan.buildAssessment has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 7, ternaries 4 (7 pts), error handling 1, loops 1 (nesting depth added 7). 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 · zip.locateDirectory (cognitive 26) · ×1
  • zip.locateDirectory (cognitive 26) extensions/pr-artifact-explorer/zip.mjs:125 — zip.locateDirectory has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 5, 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 · data.getSessionInventory (cognitive 26) · ×1
  • data.getSessionInventory (cognitive 26) extensions/work-hub/data.mjs:577 — data.getSessionInventory has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 13, if/else 6 (8 pts), ternaries 2 (3 pts), error handling 1, loops 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · docs_drift.unreferenced_modules (cognitive 26) · ×1
  • docs_drift.unreferenced_modules (cognitive 26) skills/docs-sync-audit/scripts/docs_drift.py:183 — docs_drift.unreferenced_modules has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 4 (7 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ContextGraphSkill.query_with_evidence (cognitive 26) · ×1
  • ContextGraphSkill.query_with_evidence (cognitive 26) skills/mini-context-graph/scripts/contextgraph.py:215 — ContextGraphSkill.query_with_evidence has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 5 (6 pts), boolean chains 1, ternaries 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · quality_gate.check_v1_5_0_manifest_wrappers (cognitive 26) · ×1
  • quality_gate.check_v1_5_0_manifest_wrappers (cognitive 26) skills/quality-playbook/quality_gate.py:1810 — quality_gate.check_v1_5_0_manifest_wrappers has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 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 · renderProjects (cognitive 26) · ×1
  • renderProjects (cognitive 26) extensions/foundry-agentic-loop-canvas/public/app.js:776 — renderProjects has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 10 (14 pts), boolean chains 5, if/else 3, loops 1 (2 pts), other 2 (nesting depth added 5). Of this number, 23 points are the body's own statements and 3 belong to 5 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · renderWorkflow (cognitive 26) · ×1
  • renderWorkflow (cognitive 26) extensions/foundry-agentic-loop-canvas/public/app.js:1421 — renderWorkflow has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 8, boolean chains 5, other 3 (nesting depth added 4). Of this number, 22 points are the body's own statements and 4 belong to 13 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · workflowAction (cognitive 26) · ×1
  • workflowAction (cognitive 26) extensions/foundry-agentic-loop-canvas/public/app.js:1550 — workflowAction has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (16 pts), ternaries 3 (6 pts), boolean chains 3, other 1 (nesting depth added 7). Most of this is not in the body itself: 4 of the 26 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1569, 1561). 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 · readVSCodeLog (cognitive 26) · ×1
  • readVSCodeLog (cognitive 26) extensions/agent-radar/collector.mjs:611 — readVSCodeLog has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 7, error handling 2 (4 pts), loops 1, ternaries 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.
D2 · Cognitive Complexity · decide (cognitive 26) · ×1
  • decide (cognitive 26) REDACTED:678 — decide has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (14 pts), ternaries 5 (7 pts), boolean chains 4, 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 · parseReport (cognitive 26) · ×1
  • parseReport (cognitive 26) REDACTED:85 — parseReport has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 15, if/else 12 (14 pts), ternaries 5 (8 pts), loops 4 (6 pts), other 3 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · placeAlignment (cognitive 26) · ×1
  • placeAlignment (cognitive 26) extensions/apng-studio/qr.mjs:173 — placeAlignment has cognitive complexity 26 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 2 (6 pts), boolean chains 5, ternaries 1 (5 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · prepareRerun (cognitive 26) · ×1
  • prepareRerun (cognitive 26) extensions/pr-artifact-explorer/rerun.mjs:61 — prepareRerun has cognitive complexity 26 (threshold 15). Drivers by points: other 10, if/else 6 (8 pts), boolean chains 4, ternaries 2 (3 pts), error handling 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · external-plugin-intake.buildQualityGatesCommentSection (cognitive 25) · ×1
  • external-plugin-intake.buildQualityGatesCommentSection (cognitive 25) eng/external-plugin-intake.mjs:1094 — external-plugin-intake.buildQualityGatesCommentSection has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 16, if/else 9. Of this number, 20 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · review-metrics.renderReport (cognitive 25) · ×1
  • review-metrics.renderReport (cognitive 25) eng/review-metrics.mjs:308 — review-metrics.renderReport has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 5 (9 pts), loops 4 (6 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 · submission-gate.renderStatusComment (cognitive 25) · ×1
  • submission-gate.renderStatusComment (cognitive 25) REDACTED:547 — submission-gate.renderStatusComment has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 9 (12 pts), if/else 7, loops 3 (4 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · collector.trackUsage (cognitive 25) · ×1
  • collector.trackUsage (cognitive 25) extensions/agent-radar/collector.mjs:722 — collector.trackUsage has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 13, if/else 4 (7 pts), ternaries 2 (3 pts), loops 2 (nesting depth added 4). Most of this is not in the body itself: 7 of the 25 points are its own statements and the rest belongs to one function literal inside it that branches (line 727). 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 · board-core.startServer.server (cognitive 25) · ×1
  • board-core.startServer.server (cognitive 25) REDACTED:322 — board-core.startServer.server has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 7, error handling 2 (4 pts), ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.createDrawServer.drawingsAction (cognitive 25) · ×1
  • server.createDrawServer.drawingsAction (cognitive 25) REDACTED:318 — server.createDrawServer.drawingsAction has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 5, error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IndexedSet.insertAt (cognitive 25) · ×1
  • IndexedSet.insertAt (cognitive 25) REDACTED:14200 — IndexedSet.insertAt has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 6 (10 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · index-_8h8h3EK.isFocusable$1 (cognitive 25) · ×1
  • index-_8h8h3EK.isFocusable$1 (cognitive 25) REDACTED:13348 — index-_8h8h3EK.isFocusable$1 has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (18 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 · index-_8h8h3EK.useFocusTrap (cognitive 25) · ×1
  • index-_8h8h3EK.useFocusTrap (cognitive 25) REDACTED:15737 — index-_8h8h3EK.useFocusTrap has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 11, if/else 9 (11 pts), ternaries 3 (nesting depth added 2). Most of this is not in the body itself: 8 of the 25 points are its own statements and the rest belongs to 3 function items inside it that branch (disableTrap, a function literal at line 15755, a function literal at line 15773). 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 · index-_8h8h3EK.Selection (cognitive 25) · ×1
  • index-_8h8h3EK.Selection (cognitive 25) REDACTED:19316 — index-_8h8h3EK.Selection has cognitive complexity 25 (threshold 15). Drivers by points: if/else 18 (23 pts), boolean chains 2 (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 · index-_8h8h3EK.FindingCodeSnippet (cognitive 25) · ×1
  • index-_8h8h3EK.FindingCodeSnippet (cognitive 25) REDACTED:47551 — index-_8h8h3EK.FindingCodeSnippet has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 8 (17 pts), if/else 5, boolean chains 3 (nesting depth added 9). Of this number, 15 points are the body's own statements and 10 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 · GitRepositoryInfoResolver.getRepositoryInfo (cognitive 25) · ×1
  • GitRepositoryInfoResolver.getRepositoryInfo (cognitive 25) extensions/github-security/extension.mjs:9686 — GitRepositoryInfoResolver.getRepositoryInfo has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 4, error handling 1, 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 · extension.flatTokenVariants (cognitive 25) · ×1
  • extension.flatTokenVariants (cognitive 25) extensions/github-security/extension.mjs:7178 — extension.flatTokenVariants has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 6, ternaries 2 (3 pts), loops 1 (nesting depth added 10). None of this is in the body itself: all 25 points belong to 2 function items inside it that branch (a function literal at line 7191, varKey). 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 · evals.extractJson (cognitive 25) · ×1
  • evals.extractJson (cognitive 25) skills/foundry-agentic-loop/scripts/evals.mjs:91 — evals.extractJson has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (16 pts), error handling 1 (4 pts), loops 2 (3 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 · scan.search_todos (cognitive 25) · ×1
  • scan.search_todos (cognitive 25) skills/acquire-codebase-knowledge/scripts/scan.py:290 — scan.search_todos has cognitive complexity 25 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 4 (10 pts), error handling 2 (4 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 · inventory_skills.parse_frontmatter (cognitive 25) · ×1
  • inventory_skills.parse_frontmatter (cognitive 25) skills/agent-skill-stack/scripts/inventory_skills.py:49 — inventory_skills.parse_frontmatter has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4, loops 2 (4 pts), ternaries 1 (3 pts), error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · refreshPullTable (cognitive 25) · ×1
  • refreshPullTable (cognitive 25) REDACTED:2861 — refreshPullTable has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 3 (5 pts), boolean chains 4, error handling 1, other 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 · findFreeSpot (cognitive 25) · ×1
  • findFreeSpot (cognitive 25) extensions/draw/lib/layout.mjs:335 — findFreeSpot has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 4 (11 pts), if/else 4 (8 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 12). Of this number, 24 points are the body's own statements and 1 belongs 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 · createDrawServer.drawingsAction (cognitive 25) · ×1
  • createDrawServer.drawingsAction (cognitive 25) REDACTED:318 — createDrawServer.drawingsAction has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 5, error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · revalidateCandidate (cognitive 25) · ×1
  • revalidateCandidate (cognitive 25) extensions/windows-app-storage-inspector-cleanup/src/core/cleanup.mjs:269 — revalidateCandidate has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 8, ternaries 4, other 2, error handling 1 (nesting depth added 2). Of this number, 24 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · dispatch (cognitive 25) · ×1
  • dispatch (cognitive 25) .github/extensions/resource-staleness-board/extension.mjs:142 — dispatch has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 9, boolean chains 2, other 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 · validateArgs (cognitive 25) · ×1
  • validateArgs (cognitive 25) extensions/foundry-agentic-loop-workflow/lib/args.mjs:60 — validateArgs has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12, boolean chains 5, other 5, ternaries 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 · collector.classifyTool (cognitive 24) · ×1
  • collector.classifyTool (cognitive 24) extensions/agent-radar/collector.mjs:102 — collector.classifyTool has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 7, loops 1 (2 pts) (nesting depth added 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 · ui.html.spawnParticles (cognitive 24) · ×1
  • ui.html.spawnParticles (cognitive 24) extensions/agent-radar/ui.html:435 — ui.html.spawnParticles has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 4 (9 pts), if/else 5 (8 pts), boolean chains 6, 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 · extension.pngSize (cognitive 24) · ×1
  • extension.pngSize (cognitive 24) REDACTED:202 — extension.pngSize has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 5, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · record.planWorkstreams (cognitive 24) · ×1
  • record.planWorkstreams (cognitive 24) extensions/foundry-agentic-loop-workflow/lib/record.mjs:114 — record.planWorkstreams has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 2 (3 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index-_8h8h3EK.GroupHeadingImpl (cognitive 24) · ×1
  • index-_8h8h3EK.GroupHeadingImpl (cognitive 24) REDACTED:18731 — index-_8h8h3EK.GroupHeadingImpl has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 13, if/else 7, ternaries 4. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · index-_8h8h3EK.Menu (cognitive 24) · ×1
  • index-_8h8h3EK.Menu (cognitive 24) REDACTED:23048 — index-_8h8h3EK.Menu has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 9, match/switch 1, ternaries 1 (nesting depth added 4). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 23072, 23053, 23067). 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 · index-_8h8h3EK.tokenizeHtmlFlow · ×1
  • index-_8h8h3EK.tokenizeHtmlFlow::tagName (cognitive 24) REDACTED:37785 — index-_8h8h3EK.tokenizeHtmlFlow::tagName has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 4 (11 pts), if/else 5 (9 pts), boolean chains 4 (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 · index-_8h8h3EK.resolveToLabelEnd (cognitive 24) · ×1
  • index-_8h8h3EK.resolveToLabelEnd (cognitive 24) REDACTED:38996 — index-_8h8h3EK.resolveToLabelEnd has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 5, loops 1, ternaries 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · extension.toHtml (cognitive 24) · ×1
  • extension.toHtml (cognitive 24) extensions/github-security/extension.mjs:7002 — extension.toHtml has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 20, ternaries 3, if/else 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · card.statusLinks (cognitive 24) · ×1
  • card.statusLinks (cognitive 24) extensions/sentry-triage/components/card.mjs:42 — card.statusLinks has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 4 (10 pts), if/else 6 (8 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.
D2 · Cognitive Complexity · board.template.html.render (cognitive 24) · ×1
  • board.template.html.render (cognitive 24) skills/daily-focus-board/assets/board.template.html:318 — board.template.html.render has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 6 (9 pts), if/else 7 (8 pts), boolean chains 7 (nesting depth added 4). None of this is in the body itself: all 24 points belong to 7 function literals inside it that branch (lines 322, 320, 348, …). 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 · CookbookRecipe.CookbookRecipe (cognitive 24) · ×1
  • CookbookRecipe.CookbookRecipe (cognitive 24) REDACTED:96 — CookbookRecipe.CookbookRecipe has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 11 (13 pts), if/else 8, boolean chains 2, error handling 1 (nesting depth added 2). Most of this is not in the body itself: 11 of the 24 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 125, 141, 240, …). 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 · add-arrow.main (cognitive 24) · ×1
  • add-arrow.main (cognitive 24) skills/excalidraw-diagram-generator/scripts/add-arrow.py:234 — add-arrow.main has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (22 pts), 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 · markdown_to_word._add_inline_content (cognitive 24) · ×1
  • markdown_to_word._add_inline_content (cognitive 24) skills/markdown-to-word-mermaid/scripts/markdown_to_word.py:173 — markdown_to_word._add_inline_content has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (17 pts), boolean chains 3, ternaries 1 (3 pts), 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 · getCompiledRuleId (cognitive 24) · ×1
  • getCompiledRuleId (cognitive 24) extensions/github-security/extension.mjs:1897 — getCompiledRuleId has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (6 pts), boolean chains 5 (nesting depth added 11). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to one function literal inside it that branches (line 1898). 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 · buildWorkPrompt (cognitive 24) · ×1
  • buildWorkPrompt (cognitive 24) REDACTED:562 — buildWorkPrompt has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 13, ternaries 7 (8 pts), other 2, if/else 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · applyLive (cognitive 24) · ×1
  • applyLive (cognitive 24) extensions/foundry-agentic-loop-canvas/public/app.js:1479 — applyLive has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 8, if/else 7, ternaries 5, other 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 · start (cognitive 24) · ×1
  • start (cognitive 24) extensions/foundry-agentic-loop-canvas/public/app.js:2051 — start has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9, boolean chains 4, error handling 3 (4 pts), other 4, ternaries 3 (nesting depth added 1). Of this number, 17 points are the body's own statements and 7 belong to 6 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · planRouting (cognitive 24) · ×1
  • planRouting (cognitive 24) eng/review-routing.mjs:449 — planRouting has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 3, ternaries 2 (3 pts), loops 1 (2 pts), other 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 · load (cognitive 24) · ×1
  • load (cognitive 24) extensions/foundry-agentic-loop-canvas/lib/model.mjs:177 — load has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 6, error handling 2, loops 1, other 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 · result (cognitive 24) · ×1
  • result (cognitive 24) .github/extensions/resource-staleness-board/lib/state.mjs:391 — result has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 8, error handling 1 (2 pts), other 2 (nesting depth added 4). None of this is in the body itself: all 24 points belong to one function literal inside it that branches (line 392). 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 · renderDetailContent (cognitive 24) · ×1
  • renderDetailContent (cognitive 24) .github/extensions/resource-staleness-board/public/app.js:215 — renderDetailContent has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 5, other 1, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · validateMcpConfig (cognitive 24) · ×1
  • validateMcpConfig (cognitive 24) eng/validate-plugins.mjs:215 — validateMcpConfig has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 5, error handling 3 (5 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 · ghTokens (cognitive 24) · ×1
  • ghTokens (cognitive 24) extensions/pr-review/github.mjs:20 — ghTokens has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (14 pts), error handling 2 (3 pts), loops 3, boolean chains 2, other 2 (nesting depth added 7). Of this number, 22 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · external-plugin-intake.evaluateExternalPluginIssue (cognitive 23) · ×1
  • external-plugin-intake.evaluateExternalPluginIssue (cognitive 23) eng/external-plugin-intake.mjs:1356 — external-plugin-intake.evaluateExternalPluginIssue has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 11 (17 pts), if/else 4 (5 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · extension.lanIPv4 (cognitive 23) · ×1
  • extension.lanIPv4 (cognitive 23) REDACTED:794 — extension.lanIPv4 has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (16 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (nesting depth added 11). Of this number, 22 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · extension.screenPattern (cognitive 23) · ×1
  • extension.screenPattern (cognitive 23) REDACTED:120 — extension.screenPattern has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (21 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 · Virtualizer.reconcileScroll (cognitive 23) · ×1
  • Virtualizer.reconcileScroll (cognitive 23) REDACTED:21428 — Virtualizer.reconcileScroll has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 3 (5 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index-_8h8h3EK.focusDelegate (cognitive 23) · ×1
  • index-_8h8h3EK.focusDelegate (cognitive 23) REDACTED:14786 — index-_8h8h3EK.focusDelegate has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 3 (6 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 · index-_8h8h3EK.TextInputAction (cognitive 23) · ×1
  • index-_8h8h3EK.TextInputAction (cognitive 23) REDACTED:17655 — index-_8h8h3EK.TextInputAction has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13, boolean chains 9, ternaries 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · index-_8h8h3EK.Select (cognitive 23) · ×1
  • index-_8h8h3EK.Select (cognitive 23) REDACTED:26554 — index-_8h8h3EK.Select has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14, boolean chains 7, ternaries 2. 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 · extension.handleCaptures (cognitive 23) · ×1
  • extension.handleCaptures (cognitive 23) extensions/github-security/extension.mjs:2484 — extension.handleCaptures has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 3 (4 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · extension.element (cognitive 23) · ×1
  • extension.element (cognitive 23) extensions/github-security/extension.mjs:6639 — extension.element has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (9 pts), ternaries 4 (5 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 · analyzer.validateSubmission (cognitive 23) · ×1
  • analyzer.validateSubmission (cognitive 23) extensions/tiny-tool-town-submitter/lib/analyzer.mjs:346 — analyzer.validateSubmission has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 5, error handling 2 (4 pts), loops 1 (nesting depth added 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 · SkillsCatalog.SkillsCatalog (cognitive 23) · ×1
  • SkillsCatalog.SkillsCatalog (cognitive 23) website/src/components/brand/SkillsCatalog.tsx:99 — SkillsCatalog.SkillsCatalog has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 10 (11 pts), boolean chains 8, if/else 3, error handling 1 (nesting depth added 1). Most of this is not in the body itself: 10 of the 23 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 233, a function literal at line 146, a function literal at line 145, …). 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 · inventory_skills.scan_indicators (cognitive 23) · ×1
  • inventory_skills.scan_indicators (cognitive 23) skills/agent-skill-stack/scripts/inventory_skills.py:107 — inventory_skills.scan_indicators has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 4 (6 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · detect_hazards.collect_paths (cognitive 23) · ×1
  • detect_hazards.collect_paths (cognitive 23) skills/poka-yoke/scripts/detect_hazards.py:365 — detect_hazards.collect_paths has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (14 pts), loops 3 (8 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 · quality_gate.check_v1_5_0_index_md (cognitive 23) · ×1
  • quality_gate.check_v1_5_0_index_md (cognitive 23) skills/quality-playbook/quality_gate.py:2076 — quality_gate.check_v1_5_0_index_md has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (17 pts), loops 2 (3 pts), boolean chains 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 · h (cognitive 23) · ×1
  • h (cognitive 23) .github/extensions/open-pr-board/public/app.js:79 — h has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 3 (5 pts), ternaries 2 (5 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · fromExplorerPath (cognitive 23) · ×1
  • fromExplorerPath (cognitive 23) REDACTED:201 — fromExplorerPath has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 2, ternaries 1 (2 pts), other 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 · validateCompositionNamespace (cognitive 23) · ×1
  • validateCompositionNamespace (cognitive 23) eng/validate-plugins.mjs:283 — validateCompositionNamespace has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 10, if/else 6 (10 pts), loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · normalizeElement (cognitive 23) · ×1
  • normalizeElement (cognitive 23) extensions/draw/lib/model.mjs:185 — normalizeElement has cognitive complexity 23 (threshold 15). Drivers by points: other 12, if/else 6, ternaries 2 (3 pts), boolean chains 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · readUsageWindow (cognitive 23) · ×1
  • readUsageWindow (cognitive 23) extensions/chronicle-stats/analytics.mjs:32 — readUsageWindow has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 8 (13 pts), if/else 6 (7 pts), boolean chains 2, loops 1 (nesting depth added 6). Of this number, 17 points are the body's own statements and 6 belong to 11 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 · NuGetResolver.FindPackagesFromAssets (cognitive 22) · ×1
  • NuGetResolver.FindPackagesFromAssets (cognitive 22) skills/winmd-api-search/scripts/cache-generator/Program.cs:503 — NuGetResolver.FindPackagesFromAssets has cognitive complexity 22 (threshold 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 · extension.server (cognitive 22) · ×1
  • extension.server (cognitive 22) REDACTED:495 — extension.server has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 8 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · extension.loadStateFromArtifact (cognitive 22) · ×1
  • extension.loadStateFromArtifact (cognitive 22) REDACTED:653 — extension.loadStateFromArtifact has cognitive complexity 22 (threshold 15). Drivers by points: if/else 3 (9 pts), error handling 2 (5 pts), loops 2 (3 pts), ternaries 2 (3 pts), boolean chains 2 (nesting depth added 11). Of this number, 19 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app.document.addEventListener("click") (cognitive 22) · ×1
  • app.document.addEventListener("click") (cognitive 22) extensions/foundry-agentic-loop-canvas/public/app.js:1803 — app.document.addEventListener("click") has cognitive complexity 22 (threshold 15). Drivers by points: if/else 17 (18 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 2). 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: 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 · index-_8h8h3EK.initializeDocument · ×1
  • index-_8h8h3EK.initializeDocument::writeToChild (cognitive 22) REDACTED:34313 — index-_8h8h3EK.initializeDocument::writeToChild has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (6 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 · index-_8h8h3EK.factoryDestination (cognitive 22) · ×1
  • index-_8h8h3EK.factoryDestination (cognitive 22) REDACTED:36548 — index-_8h8h3EK.factoryDestination has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11, boolean chains 9, ternaries 2. Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 6 function items inside it that branch (raw, enclosed, start, …). 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 · extension.transformerDecorations.code · ×1
  • extension.transformerDecorations.code::applyLineSection (cognitive 22) extensions/github-security/extension.mjs:7280 — extension.transformerDecorations.code::applyLineSection has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 5, loops 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 · extension.main (cognitive 22) · ×1
  • extension.main (cognitive 22) extensions/github-security/extension.mjs:8138 — extension.main has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 3, boolean chains 2, ternaries 2, error handling 1 (nesting depth added 5). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 4 function items inside it that branch (UTF8ArrayToString, _emscripten_resize_heap, emscripten_realloc_buffer, …). 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 · server.makeHandler (cognitive 22) · ×1
  • server.makeHandler (cognitive 22) extensions/java-modernization-studio/server.mjs:220 — server.makeHandler has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 6, error handling 2 (3 pts) (nesting depth added 5). None of this is in the body itself: all 22 points belong to one function literal inside it that branches (line 221). 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 · targets.fromGitHubUrl (cognitive 22) · ×1
  • targets.fromGitHubUrl (cognitive 22) REDACTED:135 — targets.fromGitHubUrl has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 8 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · sentry.listProjects (cognitive 22) · ×1
  • sentry.listProjects (cognitive 22) extensions/sentry-triage/sentry.mjs:253 — sentry.listProjects has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (12 pts), error handling 2 (5 pts), loops 2 (3 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 · data.runItemAction (cognitive 22) · ×1
  • data.runItemAction (cognitive 22) extensions/work-hub/data.mjs:1148 — data.runItemAction has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 10 (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 · eyeball.convert_to_pdf (cognitive 22) · ×1
  • eyeball.convert_to_pdf (cognitive 22) skills/eyeball/tools/eyeball.py:82 — eyeball.convert_to_pdf has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 5 (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 · graph_store.add_edge (cognitive 22) · ×1
  • graph_store.add_edge (cognitive 22) skills/mini-context-graph/scripts/tools/graph_store.py:83 — graph_store.add_edge has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (17 pts), boolean chains 4, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · wiki_store._load_index (cognitive 22) · ×1
  • wiki_store._load_index (cognitive 22) skills/mini-context-graph/scripts/tools/wiki_store.py:70 — wiki_store._load_index has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 3 (12 pts), if/else 4 (9 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 · simplicite-log2json.main (cognitive 22) · ×1
  • simplicite-log2json.main (cognitive 22) skills/optimize-simplicite-logs/scripts/simplicite-log2json.py:60 — simplicite-log2json.main has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (16 pts), error handling 2 (3 pts), ternaries 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 · transformerDecorations.code · ×1
  • transformerDecorations.code::applyLineSection (cognitive 22) extensions/github-security/extension.mjs:7280 — transformerDecorations.code::applyLineSection has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 5, loops 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 · toReleaseStateFromCommits (cognitive 22) · ×1
  • toReleaseStateFromCommits (cognitive 22) extensions/release-notes-showcase/releaseNotesShowcase.mjs:354 — toReleaseStateFromCommits has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 10 (14 pts), if/else 4 (5 pts), loops 2, other 1 (nesting depth added 5). Of this number, 20 points are the body's own statements and 2 belong to 5 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 · init · ×1
  • init::renderStatement (cognitive 22) extensions/ai-credits-breakdown/ui/app.js:265 — init::renderStatement has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 6 (11 pts), if/else 10, boolean chains 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 · mutate (cognitive 22) · ×1
  • mutate (cognitive 22) extensions/agent-radar/collector.mjs:577 — mutate has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 3 (6 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · bulkAction (cognitive 22) · ×1
  • bulkAction (cognitive 22) REDACTED:250 — bulkAction has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 6 (7 pts), error handling 2 (3 pts), loops 1 (nesting depth added 5). Of this number, 20 points are the body's own statements and 2 belong to 6 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · handles (cognitive 22) · ×1
  • handles (cognitive 22) extensions/draw/public/editor.js:620 — handles has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 8, if/else 6 (8 pts), ternaries 2 (4 pts), loops 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 · (anonymous) (cognitive 22) · ×1
  • (anonymous) (cognitive 22) REDACTED:495 — (anonymous) has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 8 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · waitForCoachReply · ×1
  • waitForCoachReply::observe (cognitive 22) extensions/chronicle-stats/server.mjs:45 — waitForCoachReply::observe has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 8, if/else 8, ternaries 3 (6 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.
D2 · Cognitive Complexity · shapeRun (cognitive 22) · ×1
  • shapeRun (cognitive 22) extensions/foundry-agentic-loop-canvas/lib/live.mjs:143 — shapeRun has cognitive complexity 22 (threshold 15). Drivers by points: other 18, ternaries 3, boolean chains 1. Most of this is not in the body itself: 9 of the 22 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 145, 155, 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 · placeData (cognitive 22) · ×1
  • placeData (cognitive 22) extensions/apng-studio/qr.mjs:280 — placeData has cognitive complexity 22 (threshold 15). Drivers by points: loops 5 (9 pts), ternaries 2 (7 pts), if/else 2 (6 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 · validateRemoteServer (cognitive 22) · ×1
  • validateRemoteServer (cognitive 22) eng/agent-plugin-schema.mjs:219 — validateRemoteServer has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 4, loops 1 (2 pts), error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · normalizeCheck (cognitive 22) · ×1
  • normalizeCheck (cognitive 22) .github/extensions/open-pr-board/lib/github.mjs:111 — normalizeCheck has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (7 pts), other 7, boolean chains 4, ternaries 2 (4 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · resolveAccountsUncached (cognitive 22) · ×1
  • resolveAccountsUncached (cognitive 22) extensions/pr-artifact-explorer/accounts.mjs:212 — resolveAccountsUncached has cognitive complexity 22 (threshold 15). Drivers by points: other 9, ternaries 5 (6 pts), if/else 3 (4 pts), loops 2, boolean chains 1 (nesting depth added 2). Of this number, 13 points are the body's own statements and 9 belong to 13 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · readFrontends (cognitive 22) · ×1
  • readFrontends (cognitive 22) extensions/foundry-agentic-loop-canvas/lib/frontends.mjs:62 — readFrontends has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (11 pts), error handling 3 (4 pts), boolean chains 3, other 3, ternaries 1 (nesting depth added 3). Of this number, 17 points are the body's own statements and 5 belong to 3 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · lastMeaningfulChange (cognitive 22) · ×1
  • lastMeaningfulChange (cognitive 22) .github/extensions/resource-staleness-board/lib/inventory.mjs:41 — lastMeaningfulChange has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (12 pts), ternaries 1 (4 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · agent-plugin-schema.isPathWithinRoot (cognitive 21) · ×1
  • agent-plugin-schema.isPathWithinRoot (cognitive 21) eng/agent-plugin-schema.mjs:118 — agent-plugin-schema.isPathWithinRoot has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (11 pts), error handling 3 (6 pts), boolean chains 3, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · collector.prescanSubagents (cognitive 21) · ×1
  • collector.prescanSubagents (cognitive 21) extensions/agent-radar/collector.mjs:415 — collector.prescanSubagents has cognitive complexity 21 (threshold 15). Drivers by points: if/else 3 (9 pts), error handling 1 (4 pts), ternaries 2 (4 pts), loops 2 (3 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 · flightControls.FlightControls.update (cognitive 21) · ×1
  • flightControls.FlightControls.update (cognitive 21) extensions/flight-map-canvas/game/flightControls.js:242 — flightControls.FlightControls.update has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14, boolean chains 6, ternaries 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · app.metaFor (cognitive 21) · ×1
  • app.metaFor (cognitive 21) REDACTED:108 — app.metaFor has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 4 (11 pts), if/else 6 (9 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 · index-_8h8h3EK.getPositionedParentAndClippingNode (cognitive 21) · ×1
  • index-_8h8h3EK.getPositionedParentAndClippingNode (cognitive 21) REDACTED:13865 — index-_8h8h3EK.getPositionedParentAndClippingNode has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 6, ternaries 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 · index-_8h8h3EK.apply · ×1
  • index-_8h8h3EK.apply::applyPopoverInvokerElementMixin (cognitive 21) REDACTED:15090 — index-_8h8h3EK.apply::applyPopoverInvokerElementMixin has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11, boolean chains 10. 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. This shape REPEATS in the file: one other method here (index-_8h8h3EK.apply) 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 · index-_8h8h3EK.TokenBase (cognitive 21) · ×1
  • index-_8h8h3EK.TokenBase (cognitive 21) REDACTED:27442 — index-_8h8h3EK.TokenBase has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 6, ternaries 2 (3 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 · index-_8h8h3EK.toJsxRuntime (cognitive 21) · ×1
  • index-_8h8h3EK.toJsxRuntime (cognitive 21) REDACTED:32926 — index-_8h8h3EK.toJsxRuntime has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 9, ternaries 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index-_8h8h3EK.tokenizeAutolink (cognitive 21) · ×1
  • index-_8h8h3EK.tokenizeAutolink (cognitive 21) REDACTED:34671 — index-_8h8h3EK.tokenizeAutolink has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12, boolean chains 6, ternaries 2 (3 pts) (nesting depth added 1). None of this is in the body itself: all 21 points belong to 8 function items inside it that branch (emailValue, schemeInsideOrEmailAtext, urlInside, …). 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 · index-_8h8h3EK.resolveCodeText (cognitive 21) · ×1
  • index-_8h8h3EK.resolveCodeText (cognitive 21) REDACTED:35824 — index-_8h8h3EK.resolveCodeText 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 · index-_8h8h3EK.FindingsList (cognitive 21) · ×1
  • index-_8h8h3EK.FindingsList (cognitive 21) REDACTED:48960 — index-_8h8h3EK.FindingsList has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 5 (8 pts), if/else 6 (7 pts), boolean chains 5, loops 1 (nesting depth added 4). Of this number, 13 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 · launch-profile.parsePluginMcpNames (cognitive 21) · ×1
  • launch-profile.parsePluginMcpNames (cognitive 21) extensions/signals-dashboard/launch-profile.mjs:43 — launch-profile.parsePluginMcpNames has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (11 pts), error handling 2 (4 pts), boolean chains 3, 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 · data.getDeployments (cognitive 21) · ×1
  • data.getDeployments (cognitive 21) extensions/work-hub/data.mjs:738 — data.getDeployments has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 11, ternaries 5 (6 pts), if/else 2 (3 pts), loops 1 (nesting depth added 2). Of this number, 11 points are the body's own statements and 10 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · scan-cypress.chainStart (cognitive 21) · ×1
  • scan-cypress.chainStart (cognitive 21) skills/cypress-flake-fixer/scripts/scan-cypress.mjs:229 — scan-cypress.chainStart has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 3, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · evals.run (cognitive 21) · ×1
  • evals.run (cognitive 21) skills/foundry-agentic-loop/scripts/evals.mjs:303 — evals.run has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5, ternaries 3, loops 1 (2 pts) (nesting depth added 4). Of this number, 19 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · latchshot.parseFlags (cognitive 21) · ×1
  • latchshot.parseFlags (cognitive 21) skills/latchshot-page-capture/scripts/latchshot.mjs:116 — latchshot.parseFlags has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), ternaries 2 (4 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 · napkin.html.document.addEventListener("keydown") (cognitive 21) · ×1
  • napkin.html.document.addEventListener("keydown") (cognitive 21) skills/napkin/assets/napkin.html:1544 — napkin.html.document.addEventListener("keydown") has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 5 (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 · utils.parseDateRange (cognitive 21) · ×1
  • utils.parseDateRange (cognitive 21) skills/pr-dashboard/scripts/lib/utils.mjs:8 — utils.parseDateRange has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · scan.collect_code_metrics (cognitive 21) · ×1
  • scan.collect_code_metrics (cognitive 21) skills/acquire-codebase-knowledge/scripts/scan.py:473 — scan.collect_code_metrics has cognitive complexity 21 (threshold 15). Drivers by points: error handling 3 (8 pts), if/else 3 (8 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · quality_gate.check_challenge_gate_coverage (cognitive 21) · ×1
  • quality_gate.check_challenge_gate_coverage (cognitive 21) skills/quality-playbook/quality_gate.py:2551 — quality_gate.check_challenge_gate_coverage has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 3 (5 pts), boolean chains 2, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous).trackable (cognitive 21) · ×1
  • (anonymous).trackable (cognitive 21) REDACTED:22 — (anonymous).trackable has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 10, if/else 7, other 3, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · validateHttpActionPayload (cognitive 21) · ×1
  • validateHttpActionPayload (cognitive 21) extensions/jupyter-notebooks/notebook-canvas.mjs:1107 — validateHttpActionPayload has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 11, if/else 10. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · sanitizeHtml (cognitive 21) · ×1
  • sanitizeHtml (cognitive 21) REDACTED:165 — sanitizeHtml has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (5 pts), other 2, 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 · inspectHomepage (cognitive 21) · ×1
  • inspectHomepage (cognitive 21) eng/external-plugin-intake.mjs:457 — inspectHomepage has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 2 (3 pts), error handling 2, loops 2, 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 · runVersionMatchGate (cognitive 21) · ×1
  • runVersionMatchGate (cognitive 21) eng/external-plugin-quality-gates.mjs:658 — runVersionMatchGate has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3, other 2, loops 1 (nesting depth added 6). Of this number, 20 points are the body's own statements and 1 belongs 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 · runLoop (cognitive 21) · ×1
  • runLoop (cognitive 21) extensions/foundry-agentic-loop-workflow/lib/loop.mjs:405 — runLoop has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 2, other 2, error handling 1, loops 1, ternaries 1 (nesting depth added 5). Of this number, 16 points are the body's own statements and 5 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 · #load (cognitive 21) · ×1
  • #load (cognitive 21) extensions/draw/store.mjs:97 — #load has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 5, error handling 3 (4 pts), 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 · (anonymous) (cognitive 21) · ×1
  • (anonymous) (cognitive 21) .github/extensions/duplicate-review-board/lib/state.mjs:96 — (anonymous) has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 8 (10 pts), boolean chains 4, other 4, if/else 1 (2 pts), loops 1 (nesting depth added 3). Most of this is not in the body itself: 8 of the 21 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 98, 99, 117, …). 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 · startServer (cognitive 21) · ×1
  • startServer (cognitive 21) extensions/agent-radar/extension.mjs:49 — startServer has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 6, error handling 2 (3 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 3). Most of this is not in the body itself: 5 of the 21 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 59, authorized, a function literal at line 79, …). 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 · resourceTable (cognitive 21) · ×1
  • resourceTable (cognitive 21) .github/extensions/duplicate-review-board/lib/report.mjs:44 — resourceTable has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 5, loops 1, other 1, ternaries 1 (nesting depth added 6). Of this number, 19 points are the body's own statements and 2 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 · NuGetResolver.FindPackagesFromConfig (cognitive 20) · ×1
  • NuGetResolver.FindPackagesFromConfig (cognitive 20) skills/winmd-api-search/scripts/cache-generator/Program.cs:594 — NuGetResolver.FindPackagesFromConfig has cognitive complexity 20 (threshold 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 · update-readme.generatePluginsSection (cognitive 20) · ×1
  • update-readme.generatePluginsSection (cognitive 20) eng/update-readme.mjs:531 — update-readme.generatePluginsSection has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 8, ternaries 4 (8 pts), if/else 3, loops 1 (nesting depth added 4). Of this number, 17 points are the body's own statements and 3 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 · ui.html.messagePoint (cognitive 20) · ×1
  • ui.html.messagePoint (cognitive 20) extensions/agent-radar/ui.html:403 — ui.html.messagePoint has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 3 (10 pts), if/else 2 (5 pts), loops 2 (3 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 · db.computeSnapshot (cognitive 20) · ×1
  • db.computeSnapshot (cognitive 20) extensions/chronicle-stats/db.mjs:69 — db.computeSnapshot has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6 (7 pts), boolean chains 6, loops 3 (4 pts), if/else 2 (3 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.
D2 · Cognitive Complexity · rerun.rerunPlan (cognitive 20) · ×1
  • rerun.rerunPlan (cognitive 20) extensions/foundry-agentic-loop-workflow/lib/rerun.mjs:60 — rerun.rerunPlan has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 6, ternaries 2 (4 pts), loops 1 (nesting depth added 6). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · loop.checkpointLines (cognitive 20) · ×1
  • loop.checkpointLines (cognitive 20) extensions/foundry-agentic-loop-workflow/lib/loop.mjs:53 — loop.checkpointLines has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 9 (13 pts), if/else 5, boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · index-_8h8h3EK.Announce (cognitive 20) · ×1
  • index-_8h8h3EK.Announce (cognitive 20) REDACTED:12048 — index-_8h8h3EK.Announce has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12, boolean chains 4, ternaries 4. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · index-_8h8h3EK.observeFocusTrap (cognitive 20) · ×1
  • index-_8h8h3EK.observeFocusTrap (cognitive 20) REDACTED:14109 — index-_8h8h3EK.observeFocusTrap has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (12 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 10). None of this is in the body itself: all 20 points belong to one function literal inside it that branches (line 14110). 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 · index-_8h8h3EK.i (cognitive 20) · ×1
  • index-_8h8h3EK.i (cognitive 20) REDACTED:24162 — index-_8h8h3EK.i has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 5 (10 pts), boolean chains 4, if/else 3, loops 2 (3 pts) (nesting depth added 6). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index-_8h8h3EK.createJsxElementProps (cognitive 20) · ×1
  • index-_8h8h3EK.createJsxElementProps (cognitive 20) REDACTED:33216 — index-_8h8h3EK.createJsxElementProps has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 3, 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 · index-_8h8h3EK.syntaxExtension (cognitive 20) · ×1
  • index-_8h8h3EK.syntaxExtension (cognitive 20) REDACTED:33683 — index-_8h8h3EK.syntaxExtension has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 2 (9 pts), if/else 2 (6 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index-_8h8h3EK.normalizeUri (cognitive 20) · ×1
  • index-_8h8h3EK.normalizeUri (cognitive 20) REDACTED:34004 — index-_8h8h3EK.normalizeUri has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.dispatchAction (cognitive 20) · ×1
  • server.dispatchAction (cognitive 20) extensions/java-modernization-studio/server.mjs:139 — server.dispatchAction has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 7, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · notebook-canvas.migrateLegacyDirectory (cognitive 20) · ×1
  • notebook-canvas.migrateLegacyDirectory (cognitive 20) extensions/jupyter-notebooks/notebook-canvas.mjs:61 — notebook-canvas.migrateLegacyDirectory has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (13 pts), error handling 3 (6 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · junit-preview.parseReport · ×1
  • junit-preview.parseReport::visit (cognitive 20) REDACTED:107 — junit-preview.parseReport::visit has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 7, if/else 4 (5 pts), loops 2 (4 pts), ternaries 2 (4 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 · client.renderDiff (cognitive 20) · ×1
  • client.renderDiff (cognitive 20) extensions/pr-review/client.js:247 — client.renderDiff has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 4 (9 pts), boolean chains 5, if/else 3 (4 pts), loops 2 (nesting depth added 6). Most of this is not in the body itself: 5 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 258). 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 · extension.launchDeskConsole (cognitive 20) · ×1
  • extension.launchDeskConsole (cognitive 20) REDACTED:434 — extension.launchDeskConsole has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 4, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · pr-dashboard-cli.renderHtml (cognitive 20) · ×1
  • pr-dashboard-cli.renderHtml (cognitive 20) skills/pr-dashboard/scripts/pr-dashboard-cli.mjs:189 — pr-dashboard-cli.renderHtml has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 8, error handling 5, if/else 3, ternaries 2 (3 pts), loops 1 (nesting depth added 1). Most of this is not in the body itself: 7 of the 20 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 212, replaceStat, statusColor, …). 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 · a11y-audit.auditSite (cognitive 20) · ×1
  • a11y-audit.auditSite (cognitive 20) website/scripts/a11y-audit.mjs:216 — a11y-audit.auditSite has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 4 (7 pts), boolean chains 2 (nesting depth added 7). Of this number, 12 points are the body's own statements and 8 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · quality_gate.check_patches (cognitive 20) · ×1
  • quality_gate.check_patches (cognitive 20) skills/quality-playbook/quality_gate.py:1362 — quality_gate.check_patches has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 1, loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · loadWasm (cognitive 20) · ×1
  • loadWasm (cognitive 20) extensions/github-security/extension.mjs:8460 — loadWasm has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 1 (nesting depth added 4). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 2 function items inside it that branch (a function literal at line 8463, _load). 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 · loadRunArtifactCounts (cognitive 20) · ×1
  • loadRunArtifactCounts (cognitive 20) REDACTED:3987 — loadRunArtifactCounts has cognitive complexity 20 (threshold 15). Drivers by points: if/else 3 (7 pts), loops 4 (7 pts), ternaries 1 (3 pts), error handling 1 (2 pts), other 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 · clampLoadedState (cognitive 20) · ×1
  • clampLoadedState (cognitive 20) REDACTED:597 — clampLoadedState has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 6, if/else 4 (6 pts), ternaries 3 (5 pts), loops 3 (nesting depth added 4). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · parseMarkdownDocument (cognitive 20) · ×1
  • parseMarkdownDocument (cognitive 20) REDACTED:618 — parseMarkdownDocument has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 3, loops 1, other 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 · parseExternalPluginIssueBody (cognitive 20) · ×1
  • parseExternalPluginIssueBody (cognitive 20) eng/external-plugin-intake.mjs:952 — parseExternalPluginIssueBody has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 8, if/else 4 (7 pts), loops 2 (3 pts), boolean chains 1, other 1 (nesting depth added 4). Of this number, 19 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, 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 · generateSamplesData (cognitive 20) · ×1
  • generateSamplesData (cognitive 20) REDACTED:1547 — generateSamplesData has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 7, error handling 1 (3 pts), ternaries 1 (2 pts) (nesting depth added 4). Most of this is not in the body itself: 3 of the 20 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 1585, 1623, 1582, …). 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 · signalPills (cognitive 20) · ×1
  • signalPills (cognitive 20) REDACTED:119 — signalPills has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (11 pts), ternaries 2 (4 pts), boolean chains 3, loops 1, other 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · save (cognitive 20) · ×1
  • save (cognitive 20) .github/extensions/duplicate-review-board/public/app.js:400 — save has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 5, error handling 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createValidationContext (cognitive 20) · ×1
  • createValidationContext (cognitive 20) extensions/windows-app-storage-inspector-cleanup/src/core/cleanup.mjs:154 — createValidationContext has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 8, if/else 3 (5 pts), error handling 2 (3 pts), other 2, loops 1, ternaries 1 (nesting depth added 3). Of this number, 18 points are the body's own statements and 2 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 · patchElement (cognitive 20) · ×1
  • patchElement (cognitive 20) extensions/draw/actions.mjs:101 — patchElement has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 6, ternaries 2 (4 pts), loops 1 (nesting depth added 5). Of this number, 17 points are the body's own statements and 3 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 · flushBeacon (cognitive 20) · ×1
  • flushBeacon (cognitive 20) extensions/draw/public/sync.js:447 — flushBeacon has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, error handling 2, loops 1 (2 pts), ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · render (cognitive 20) · ×1
  • render (cognitive 20) REDACTED:256 — render has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 11 (12 pts), boolean chains 6, error handling 1, other 1 (nesting depth added 1). Of this number, 18 points are the body's own statements and 2 belong to 5 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · inspectStorageItem (cognitive 20) · ×1
  • inspectStorageItem (cognitive 20) extensions/windows-app-storage-inspector-cleanup/src/core/item-inspector.mjs:68 — inspectStorageItem has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 6, other 5, if/else 4, ternaries 3, error handling 2. Of this number, 18 points are the body's own statements and 2 belong to 5 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · submission-gate.evaluateCheck (cognitive 19) · ×1
  • submission-gate.evaluateCheck (cognitive 19) REDACTED:408 — submission-gate.evaluateCheck has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 5, ternaries 1 (3 pts), match/switch 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 · update-readme.main (cognitive 19) · ×1
  • update-readme.main (cognitive 19) eng/update-readme.mjs:751 — update-readme.main has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (18 pts), error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · collector.loadShutdowns (cognitive 19) · ×1
  • collector.loadShutdowns (cognitive 19) extensions/ai-credits-breakdown/collector.mjs:373 — collector.loadShutdowns has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (4 pts), error handling 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.
D2 · Cognitive Complexity · extension.openInstance (cognitive 19) · ×1
  • extension.openInstance (cognitive 19) REDACTED:464 — extension.openInstance has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · board.html.render (cognitive 19) · ×1
  • board.html.render (cognitive 19) extensions/daily-focus-board/assets/board.html:184 — board.html.render has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (5 pts), ternaries 3 (5 pts) (nesting depth added 3). None of this is in the body itself: all 19 points belong to 4 function literals inside it that branch (lines 187, 206, 224, …). 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 · app.updateTiles (cognitive 19) · ×1
  • app.updateTiles (cognitive 19) extensions/flight-map-canvas/game/app.js:353 — app.updateTiles has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 4 (5 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 · flightControls.FlightControls._init (cognitive 19) · ×1
  • flightControls.FlightControls._init (cognitive 19) extensions/flight-map-canvas/game/flightControls.js:90 — flightControls.FlightControls._init has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, boolean chains 6. None of this is in the body itself: all 19 points belong to 6 function literals inside it that branch (lines 135, 93, 114, …). 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 · index-_8h8h3EK.Overlay (cognitive 19) · ×1
  • index-_8h8h3EK.Overlay (cognitive 19) REDACTED:23182 — index-_8h8h3EK.Overlay has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 7 (8 pts), boolean chains 7, if/else 3 (4 pts) (nesting depth added 2). Most of this is not in the body itself: 9 of the 19 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 23196, 23186, 23202, …). 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 · index-_8h8h3EK.resolveToSetextUnderline (cognitive 19) · ×1
  • index-_8h8h3EK.resolveToSetextUnderline (cognitive 19) REDACTED:39879 — index-_8h8h3EK.resolveToSetextUnderline 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 · index-_8h8h3EK.listItem (cognitive 19) · ×1
  • index-_8h8h3EK.listItem (cognitive 19) REDACTED:42489 — index-_8h8h3EK.listItem has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5, loops 1, 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 · _RuleFactory._compileCaptures (cognitive 19) · ×1
  • _RuleFactory._compileCaptures (cognitive 19) extensions/github-security/extension.mjs:1912 — _RuleFactory._compileCaptures has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (6 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 · UtfString._utf8ByteLength (cognitive 19) · ×1
  • UtfString._utf8ByteLength (cognitive 19) extensions/github-security/extension.mjs:8303 — UtfString._utf8ByteLength has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · extension._checkWhileConditions (cognitive 19) · ×1
  • extension._checkWhileConditions (cognitive 19) extensions/github-security/extension.mjs:2370 — extension._checkWhileConditions has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2, boolean chains 1, 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 · extension.transformerDecorations.getContext (cognitive 19) · ×1
  • extension.transformerDecorations.getContext (cognitive 19) extensions/github-security/extension.mjs:7232 — extension.transformerDecorations.getContext has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 3 (nesting depth added 9). Most of this is not in the body itself: 2 of the 19 points are its own statements and the rest belongs to one function item inside it that branches (normalizePosition). 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 · zip.applyZip64Extra (cognitive 19) · ×1
  • zip.applyZip64Extra (cognitive 19) extensions/pr-artifact-explorer/zip.mjs:92 — zip.applyZip64Extra has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 1, loops 1 (nesting depth added 10). Of this number, 16 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · preview.servePreviewRequest (cognitive 19) · ×1
  • preview.servePreviewRequest (cognitive 19) extensions/pr-artifact-explorer/preview.mjs:127 — preview.servePreviewRequest has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 5 (8 pts), boolean chains 2, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sentry.humanizeSince (cognitive 19) · ×1
  • sentry.humanizeSince (cognitive 19) extensions/sentry-triage/sentry.mjs:61 — sentry.humanizeSince has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 6 (11 pts), if/else 8 (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 · drawio-to-png.findDrawioCliPath (cognitive 19) · ×1
  • drawio-to-png.findDrawioCliPath (cognitive 19) skills/drawio/scripts/drawio-to-png.mjs:159 — drawio-to-png.findDrawioCliPath has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 2 (4 pts), loops 2, ternaries 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AgentsCatalog.AgentsCatalog (cognitive 19) · ×1
  • AgentsCatalog.AgentsCatalog (cognitive 19) website/src/components/brand/AgentsCatalog.tsx:114 — AgentsCatalog.AgentsCatalog has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 8 (9 pts), boolean chains 7, if/else 3 (nesting depth added 1). Most of this is not in the body itself: 5 of the 19 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 257, 162, 143, …). 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 · PluginsCatalog.PluginsCatalog (cognitive 19) · ×1
  • PluginsCatalog.PluginsCatalog (cognitive 19) website/src/components/brand/PluginsCatalog.tsx:122 — PluginsCatalog.PluginsCatalog has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 8, ternaries 7 (8 pts), if/else 3 (nesting depth added 1). Most of this is not in the body itself: 5 of the 19 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 164, 264, 163, …). 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 · convert_word_to_md._document_order_media (cognitive 19) · ×1
  • convert_word_to_md._document_order_media (cognitive 19) skills/convert-word-to-md/scripts/convert_word_to_md.py:80 — convert_word_to_md._document_order_media has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 2 (4 pts), loops 3, boolean chains 2, error handling 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · eyeball.screenshot_region (cognitive 19) · ×1
  • eyeball.screenshot_region (cognitive 19) skills/eyeball/tools/eyeball.py:274 — eyeball.screenshot_region has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 3 (4 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 · graph_store.add_node (cognitive 19) · ×1
  • graph_store.add_node (cognitive 19) skills/mini-context-graph/scripts/tools/graph_store.py:38 — graph_store.add_node has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (15 pts), boolean chains 3, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · quality_gate._check_citation_block (cognitive 19) · ×1
  • quality_gate._check_citation_block (cognitive 19) skills/quality-playbook/quality_gate.py:1863 — quality_gate._check_citation_block has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9, boolean chains 6, error handling 2, ternaries 2. 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 · transformerDecorations.getContext (cognitive 19) · ×1
  • transformerDecorations.getContext (cognitive 19) extensions/github-security/extension.mjs:7232 — transformerDecorations.getContext has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 3 (nesting depth added 9). Most of this is not in the body itself: 2 of the 19 points are its own statements and the rest belongs to 2 function items inside it that branch (normalizePosition, a function literal at line 7255). 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 · repositoryResultHtml (cognitive 19) · ×1
  • repositoryResultHtml (cognitive 19) REDACTED:1102 — repositoryResultHtml has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 16, boolean chains 2, other 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · updateRunList (cognitive 19) · ×1
  • updateRunList (cognitive 19) REDACTED:3921 — updateRunList has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 12, boolean chains 4, other 2, if/else 1. Of this number, 18 points are the body's own statements and 1 belongs to 2 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · handler (cognitive 19) · ×1
  • handler (cognitive 19) REDACTED:2049 — handler has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7, boolean chains 5, ternaries 5, other 2. 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 · renderWorkIq (cognitive 19) · ×1
  • renderWorkIq (cognitive 19) extensions/foundry-agentic-loop-canvas/public/app.js:717 — renderWorkIq has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8, ternaries 4 (8 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · buildReleaseFromRepository (cognitive 19) · ×1
  • buildReleaseFromRepository (cognitive 19) extensions/release-notes-showcase/releaseNotesShowcase.mjs:572 — buildReleaseFromRepository has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 8 (11 pts), boolean chains 6, if/else 1, other 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · resolvePullRequestForWorkflowRun (cognitive 19) · ×1
  • resolvePullRequestForWorkflowRun (cognitive 19) REDACTED:1168 — resolvePullRequestForWorkflowRun has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 10, if/else 3 (4 pts), loops 3 (4 pts), ternaries 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · statusPills (cognitive 19) · ×1
  • statusPills (cognitive 19) .github/extensions/open-pr-board/public/app.js:211 — statusPills has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 4 (nesting depth added 2). Of this number, 18 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · renderBoard (cognitive 19) · ×1
  • renderBoard (cognitive 19) .github/extensions/open-pr-board/public/app.js:281 — renderBoard has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (6 pts), boolean chains 5, ternaries 4, loops 2, error handling 1, other 1 (nesting depth added 1). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to 8 function items inside it that branch ((anonymous)::ondrop, a function literal at line 286, a function literal at line 340, …). 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 · load (cognitive 19) · ×1
  • load (cognitive 19) .github/extensions/resource-staleness-board/lib/state.mjs:125 — load has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 8, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · sameJson (cognitive 19) · ×1
  • sameJson (cognitive 19) extensions/draw/lib/model.mjs:269 — sameJson has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · probeCandidate (cognitive 19) · ×1
  • probeCandidate (cognitive 19) extensions/pr-artifact-explorer/accounts.mjs:123 — probeCandidate has cognitive complexity 19 (threshold 15). Drivers by points: other 10, if/else 3 (4 pts), ternaries 2 (3 pts), boolean chains 1, error handling 1 (nesting depth added 2). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · latestRecord (cognitive 19) · ×1
  • latestRecord (cognitive 19) extensions/foundry-agentic-loop-workflow/lib/rerun.mjs:14 — latestRecord has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, error handling 2 (3 pts), loops 1, other 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 · boot (cognitive 19) · ×1
  • boot (cognitive 19) extensions/draw/public/app.js:27 — boot has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9, error handling 4 (6 pts), boolean chains 2, ternaries 2 (nesting depth added 2). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to 19 function items inside it that branch (answerExport, applyMode, a function literal at line 100, …). 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 · NuGetResolver.FindProjectAssetsJson (cognitive 18) · ×1
  • NuGetResolver.FindProjectAssetsJson (cognitive 18) skills/winmd-api-search/scripts/cache-generator/Program.cs:455 — NuGetResolver.FindProjectAssetsJson has cognitive complexity 18 (threshold 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 · HandoffResponse.writeHead (cognitive 18) · ×1
  • HandoffResponse.writeHead (cognitive 18) eng/canvas-error-handoff/runtime.mjs:404 — HandoffResponse.writeHead has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 7, if/else 3 (7 pts), loops 1 (3 pts), ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · clean-materialized-plugins.main (cognitive 18) · ×1
  • clean-materialized-plugins.main (cognitive 18) eng/clean-materialized-plugins.mjs:277 — clean-materialized-plugins.main has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 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.
D2 · Cognitive Complexity · extension-plugin-ownership.buildExtensionPluginOwners (cognitive 18) · ×1
  • extension-plugin-ownership.buildExtensionPluginOwners (cognitive 18) eng/extension-plugin-ownership.mjs:14 — extension-plugin-ownership.buildExtensionPluginOwners has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 3 (6 pts), ternaries 1 (2 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 · external-plugin-rereview.pluginMatchesSubmission (cognitive 18) · ×1
  • external-plugin-rereview.pluginMatchesSubmission (cognitive 18) REDACTED:94 — external-plugin-rereview.pluginMatchesSubmission has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 14, if/else 4. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · submission-gate.normalizeRouting (cognitive 18) · ×1
  • submission-gate.normalizeRouting (cognitive 18) REDACTED:237 — submission-gate.normalizeRouting has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 7). Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to one function item inside it that branches (add). 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 · apng.assembleApng (cognitive 18) · ×1
  • apng.assembleApng (cognitive 18) extensions/apng-studio/apng.mjs:207 — apng.assembleApng has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (5 pts), loops 3 (5 pts), boolean chains 4, ternaries 2 (4 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 · qr.buildCodewords (cognitive 18) · ×1
  • qr.buildCodewords (cognitive 18) extensions/apng-studio/qr.mjs:100 — qr.buildCodewords has cognitive complexity 18 (threshold 15). Drivers by points: loops 11 (15 pts), if/else 1 (3 pts) (nesting depth added 6). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · cards-core.niceScale (cognitive 18) · ×1
  • cards-core.niceScale (cognitive 18) REDACTED:718 — cards-core.niceScale has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app.phaseView (cognitive 18) · ×1
  • app.phaseView (cognitive 18) extensions/foundry-agentic-loop-canvas/public/app.js:1235 — app.phaseView has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app.$("send-prompt").onclick (cognitive 18) · ×1
  • app.$("send-prompt").onclick (cognitive 18) extensions/foundry-agentic-loop-canvas/public/app.js:2015 — app.$("send-prompt").onclick has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 4 (7 pts), boolean chains 1, error handling 1 (nesting depth added 6). None of this is in the body itself: all 18 points belong to one function literal inside it that branches (line 2015). 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 · graph-layout.layoutCommitGraph.rows (cognitive 18) · ×1
  • graph-layout.layoutCommitGraph.rows (cognitive 18) extensions/git-worktree-explorer/public/graph-layout.mjs:25 — graph-layout.layoutCommitGraph.rows has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 4). Of this number, 10 points are the body's own statements and 8 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-_8h8h3EK.Radio (cognitive 18) · ×1
  • index-_8h8h3EK.Radio (cognitive 18) REDACTED:19226 — index-_8h8h3EK.Radio has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9, boolean chains 7, ternaries 2. 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-_8h8h3EK.Checkbox (cognitive 18) · ×1
  • index-_8h8h3EK.Checkbox (cognitive 18) REDACTED:20258 — index-_8h8h3EK.Checkbox has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 7 (8 pts), boolean chains 5, if/else 5 (nesting depth added 1). Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 20295, handleOnChange, a function literal at line 20288). 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 · index-_8h8h3EK.calculateOverflow (cognitive 18) · ×1
  • index-_8h8h3EK.calculateOverflow (cognitive 18) REDACTED:26180 — index-_8h8h3EK.calculateOverflow has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 7, if/else 5 (7 pts), loops 1 (2 pts), ternaries 2 (nesting depth added 3). Of this number, 17 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · index-_8h8h3EK.createChildren (cognitive 18) · ×1
  • index-_8h8h3EK.createChildren (cognitive 18) REDACTED:33254 — index-_8h8h3EK.createChildren has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 3 (8 pts), if/else 3 (7 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index-_8h8h3EK.extension (cognitive 18) · ×1
  • index-_8h8h3EK.extension (cognitive 18) REDACTED:41914 — index-_8h8h3EK.extension has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (14 pts), match/switch 1 (3 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index-_8h8h3EK.visitParents · ×1
  • index-_8h8h3EK.visitParents::factory::visit (cognitive 18) REDACTED:43814 — index-_8h8h3EK.visitParents::factory::visit has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 5, loops 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index-_8h8h3EK.extname (cognitive 18) · ×1
  • index-_8h8h3EK.extname (cognitive 18) REDACTED:45159 — index-_8h8h3EK.extname has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (15 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 · app.updatePlayerPreference (cognitive 18) · ×1
  • app.updatePlayerPreference (cognitive 18) REDACTED:4884 — app.updatePlayerPreference has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 4 (5 pts), error handling 2 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · scan-cypress.matchParen (cognitive 18) · ×1
  • scan-cypress.matchParen (cognitive 18) skills/cypress-flake-fixer/scripts/scan-cypress.mjs:211 — scan-cypress.matchParen has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (16 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 · scan-cypress.countTopLevelCommas (cognitive 18) · ×1
  • scan-cypress.countTopLevelCommas (cognitive 18) skills/cypress-flake-fixer/scripts/scan-cypress.mjs:248 — scan-cypress.countTopLevelCommas has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 4, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · board.template.html.dayRecap (cognitive 18) · ×1
  • board.template.html.dayRecap (cognitive 18) skills/daily-focus-board/assets/board.template.html:427 — board.template.html.dayRecap has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, boolean chains 6, ternaries 2. Of this number, 12 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · REDACTED.renderSummaryMapLayers (cognitive 18) · ×1
  • REDACTED.renderSummaryMapLayers (cognitive 18) REDACTED:2094 — REDACTED.renderSummaryMapLayers has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 5). Most of this is not in the body itself: 4 of the 18 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 2110, 2148). 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 · napkin.html.finishDrawing (cognitive 18) · ×1
  • napkin.html.finishDrawing (cognitive 18) skills/napkin/assets/napkin.html:1402 — napkin.html.finishDrawing has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 6 (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 · cli.main (cognitive 18) · ×1
  • cli.main (cognitive 18) skills/azure-architecture-autopilot/scripts/cli.py:15 — cli.main has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · convert_excel_to_md.main (cognitive 18) · ×1
  • convert_excel_to_md.main (cognitive 18) skills/convert-excel-to-md/scripts/convert_excel_to_md.py:289 — convert_excel_to_md.main has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 4 (6 pts), boolean chains 1, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · convert_pdf_to_md.main (cognitive 18) · ×1
  • convert_pdf_to_md.main (cognitive 18) skills/convert-pdf-to-md/scripts/convert_pdf_to_md.py:254 — convert_pdf_to_md.main has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 4 (6 pts), boolean chains 1, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · convert_word_to_md.main (cognitive 18) · ×1
  • convert_word_to_md.main (cognitive 18) skills/convert-word-to-md/scripts/convert_word_to_md.py:236 — convert_word_to_md.main has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 4 (6 pts), boolean chains 1, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · convert-pdf.convert (cognitive 18) · ×1
  • convert-pdf.convert (cognitive 18) skills/publish-to-pages/scripts/convert-pdf.py:32 — convert-pdf.convert has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4, loops 1, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · quality_gate.check_reference_file_req_coverage (cognitive 18) · ×1
  • quality_gate.check_reference_file_req_coverage (cognitive 18) skills/quality-playbook/quality_gate.py:3017 — quality_gate.check_reference_file_req_coverage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), error handling 1 (2 pts), 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 · renderArtifact (cognitive 18) · ×1
  • renderArtifact (cognitive 18) REDACTED:5362 — renderArtifact has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 10, boolean chains 4, if/else 2, other 2. 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 · (anonymous) (cognitive 18) · ×1
  • (anonymous) (cognitive 18) REDACTED:5949 — (anonymous) 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). Of this number, 9 points are the body's own statements and 9 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 · initialRouteFromInput (cognitive 18) · ×1
  • initialRouteFromInput (cognitive 18) REDACTED:163 — initialRouteFromInput has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 5, other 2, ternaries 1 (2 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · parseByteRange (cognitive 18) · ×1
  • parseByteRange (cognitive 18) REDACTED:478 — parseByteRange has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · makeSimulationContext (cognitive 18) · ×1
  • makeSimulationContext (cognitive 18) skills/webmcpify/templates/webmcp-workbench.js:58 — makeSimulationContext has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 2, other 2, error handling 1, ternaries 1 (nesting depth added 1). None of this is in the body itself: all 18 points belong to 12 function items inside it that branch (registerTool, executeTool, a function literal at line 96, …). 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 · h (cognitive 18) · ×1
  • h (cognitive 18) REDACTED:56 — h has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 2 (5 pts), boolean chains 2, 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 · preferences (cognitive 18) · ×1
  • preferences (cognitive 18) extensions/foundry-agentic-loop-canvas/lib/model.mjs:201 — preferences has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 4, ternaries 2 (3 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · renderViewer (cognitive 18) · ×1
  • renderViewer (cognitive 18) .github/extensions/duplicate-review-board/public/app.js:23 — renderViewer has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 6 (7 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 4). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 7 function items inside it that branch (a function literal at line 59, a function literal at line 28, (anonymous)::activate, …). 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 · describeShare (cognitive 18) · ×1
  • describeShare (cognitive 18) REDACTED:480 — describeShare has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 5 (8 pts), boolean chains 4, if/else 3 (4 pts), other 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 · open (cognitive 18) · ×1
  • open (cognitive 18) extensions/foundry-agentic-loop-canvas/extension.mjs:233 — open has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), error handling 1 (3 pts), other 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 · parseArgs (cognitive 18) · ×1
  • parseArgs (cognitive 18) eng/generate-open-pr-report.mjs:57 — parseArgs has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, other 3, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · analyzeArtifact (cognitive 18) · ×1
  • analyzeArtifact (cognitive 18) extensions/pr-artifact-explorer/detector.mjs:134 — analyzeArtifact has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 5 (8 pts), loops 1, other 1 (nesting depth added 4). Of this number, 15 points are the body's own statements and 3 belong to 10 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 · createGitHubClient.request (cognitive 18) · ×1
  • createGitHubClient.request (cognitive 18) eng/lib/review-automation-github.mjs:20 — createGitHubClient.request has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 6, if/else 3 (6 pts), ternaries 2 (3 pts), loops 2, other 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 · startServer (cognitive 18) · ×1
  • startServer (cognitive 18) extensions/ai-credits-breakdown/server.mjs:21 — startServer has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6, error handling 3 (5 pts), boolean chains 4, ternaries 2, loops 1 (nesting depth added 2). Most of this is not in the body itself: 4 of the 18 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 35, authorized, reply, …). 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 · generate-website-data.buildResourceIndex (cognitive 17) · ×1
  • generate-website-data.buildResourceIndex (cognitive 17) REDACTED:469 — generate-website-data.buildResourceIndex has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (7 pts), boolean chains 4, loops 3 (4 pts), ternaries 1 (2 pts) (nesting depth added 6). Of this number, 12 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 · review-automation-github.createGitHubClient.request (cognitive 17) · ×1
  • review-automation-github.createGitHubClient.request (cognitive 17) eng/lib/review-automation-github.mjs:20 — review-automation-github.createGitHubClient.request has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 6, if/else 3 (6 pts), ternaries 2 (3 pts), loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · pr-risk-scan.scanLineRules (cognitive 17) · ×1
  • pr-risk-scan.scanLineRules (cognitive 17) eng/pr-risk-scan.mjs:188 — pr-risk-scan.scanLineRules has cognitive complexity 17 (threshold 15). Drivers by points: if/else 2 (6 pts), ternaries 2 (6 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · pr-risk-scan.toMarkdownReport (cognitive 17) · ×1
  • pr-risk-scan.toMarkdownReport (cognitive 17) eng/pr-risk-scan.mjs:254 — pr-risk-scan.toMarkdownReport has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 3 (10 pts), if/else 4 (5 pts), 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 · extension.issueMatchesFilters (cognitive 17) · ×1
  • extension.issueMatchesFilters (cognitive 17) REDACTED:140 — extension.issueMatchesFilters has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5 (nesting depth added 4). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.createDrawServer.handle (cognitive 17) · ×1
  • server.createDrawServer.handle (cognitive 17) REDACTED:411 — server.createDrawServer.handle has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 5, error handling 1, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · index-_8h8h3EK.getDefaultSettings (cognitive 17) · ×1
  • index-_8h8h3EK.getDefaultSettings (cognitive 17) REDACTED:13931 — index-_8h8h3EK.getDefaultSettings has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 8 (10 pts), boolean chains 7 (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 · index-_8h8h3EK.focusTrap (cognitive 17) · ×1
  • index-_8h8h3EK.focusTrap (cognitive 17) REDACTED:14123 — index-_8h8h3EK.focusTrap has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 4, loops 1, ternaries 1 (nesting depth added 1). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to 2 function items inside it that branch (ensureTrapZoneHasFocus, a function literal at line 14166). 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 · index-_8h8h3EK.apply (cognitive 17) · ×1
  • index-_8h8h3EK.apply (cognitive 17) REDACTED:15015 — index-_8h8h3EK.apply has cognitive complexity 17 (threshold 15). Drivers by points: if/else 26 (27 pts), boolean chains 20 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (index-_8h8h3EK.apply::applyPopoverInvokerElementMixin) 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 · index-_8h8h3EK.SkeletonBox (cognitive 17) · ×1
  • index-_8h8h3EK.SkeletonBox (cognitive 17) REDACTED:17095 — index-_8h8h3EK.SkeletonBox has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, boolean chains 3, ternaries 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · index-_8h8h3EK.calculateRangeImpl (cognitive 17) · ×1
  • index-_8h8h3EK.calculateRangeImpl (cognitive 17) REDACTED:21488 — index-_8h8h3EK.calculateRangeImpl has cognitive complexity 17 (threshold 15). Drivers by points: loops 4 (8 pts), boolean chains 5, if/else 4 (nesting depth added 4). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · index-_8h8h3EK.BannerActions (cognitive 17) · ×1
  • index-_8h8h3EK.BannerActions (cognitive 17) REDACTED:25762 — index-_8h8h3EK.BannerActions has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, if/else 6, ternaries 4. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · index-_8h8h3EK.SelectPanelMessage (cognitive 17) · ×1
  • index-_8h8h3EK.SelectPanelMessage (cognitive 17) REDACTED:26730 — index-_8h8h3EK.SelectPanelMessage has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, boolean chains 5. 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-_8h8h3EK.FindingDetailsContent (cognitive 17) · ×1
  • index-_8h8h3EK.FindingDetailsContent (cognitive 17) REDACTED:48211 — index-_8h8h3EK.FindingDetailsContent has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 6 (7 pts), if/else 4 (5 pts), boolean chains 4, error handling 1 (nesting depth added 2). Of this number, 11 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · RegExpSourceList.compileAG (cognitive 17) · ×1
  • RegExpSourceList.compileAG (cognitive 17) extensions/github-security/extension.mjs:2151 — RegExpSourceList.compileAG has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (17 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 · extension._scopePathMatchesParentScopes (cognitive 17) · ×1
  • extension._scopePathMatchesParentScopes (cognitive 17) extensions/github-security/extension.mjs:1047 — extension._scopePathMatchesParentScopes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 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 · extension.serializeAttributes (cognitive 17) · ×1
  • extension.serializeAttributes (cognitive 17) extensions/github-security/extension.mjs:6670 — extension.serializeAttributes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (3 pts), boolean chains 2, ternaries 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 · doctor.expandJavaHomeValue (cognitive 17) · ×1
  • doctor.expandJavaHomeValue (cognitive 17) extensions/java-modernization-studio/doctor.mjs:108 — doctor.expandJavaHomeValue has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 8 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · app.renderRoute (cognitive 17) · ×1
  • app.renderRoute (cognitive 17) REDACTED:5707 — app.renderRoute has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (13 pts), ternaries 1 (2 pts), boolean chains 1, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · browser.handleBrowserCommand (cognitive 17) · ×1
  • browser.handleBrowserCommand (cognitive 17) REDACTED:1099 — browser.handleBrowserCommand has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 1, match/switch 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 · sentry.searchPriority (cognitive 17) · ×1
  • sentry.searchPriority (cognitive 17) extensions/sentry-triage/sentry.mjs:378 — sentry.searchPriority has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 2 (7 pts), if/else 2 (6 pts), error handling 1 (2 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 · extension.renderSummaryBar (cognitive 17) · ×1
  • extension.renderSummaryBar (cognitive 17) REDACTED:860 — extension.renderSummaryBar has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 10 (15 pts), boolean chains 2 (nesting depth added 5). Of this number, 14 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 · data.listLocalProjects (cognitive 17) · ×1
  • data.listLocalProjects (cognitive 17) extensions/work-hub/data.mjs:272 — data.listLocalProjects has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 2 (3 pts), ternaries 1 (3 pts), error handling 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 · extension.requestItemSession (cognitive 17) · ×1
  • extension.requestItemSession (cognitive 17) extensions/work-hub/extension.mjs:82 — extension.requestItemSession has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7, ternaries 6, 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 · scan-cypress.walk (cognitive 17) · ×1
  • scan-cypress.walk (cognitive 17) skills/cypress-flake-fixer/scripts/scan-cypress.mjs:138 — scan-cypress.walk has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, error handling 1, 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 · REDACTED.initSummaryMap (cognitive 17) · ×1
  • REDACTED.initSummaryMap (cognitive 17) REDACTED:2016 — REDACTED.initSummaryMap has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8, boolean chains 5, ternaries 3, error handling 1. Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 2035). 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 · REDACTED.updatePagination (cognitive 17) · ×1
  • REDACTED.updatePagination (cognitive 17) REDACTED:2177 — REDACTED.updatePagination has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 6, loops 3 (4 pts) (nesting depth added 3). 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 · reading-catalog-regression.article (cognitive 17) · ×1
  • reading-catalog-regression.article (cognitive 17) website/scripts/reading-catalog-regression.mjs:118 — reading-catalog-regression.article has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8, ternaries 5, boolean chains 2, loops 1 (2 pts) (nesting depth added 1). 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, 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 · external-source.externalRepoUrl (cognitive 17) · ×1
  • external-source.externalRepoUrl (cognitive 17) website/src/lib/external-source.ts:59 — external-source.externalRepoUrl has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 3 (6 pts), boolean chains 5, if/else 3 (5 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · markdown-images.resolveMarkdownImage (cognitive 17) · ×1
  • markdown-images.resolveMarkdownImage (cognitive 17) website/src/lib/markdown-images.ts:11 — markdown-images.resolveMarkdownImage has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · InstructionsCatalog.InstructionsCatalog (cognitive 17) · ×1
  • InstructionsCatalog.InstructionsCatalog (cognitive 17) website/src/components/brand/InstructionsCatalog.tsx:110 — InstructionsCatalog.InstructionsCatalog has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, ternaries 6 (7 pts), if/else 3 (nesting depth added 1). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 258, 161, 160, …). 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 · PRVisualization.main (cognitive 17) · ×1
  • PRVisualization.main (cognitive 17) cookbook/copilot-sdk/java/recipe/PRVisualization.java:20 — PRVisualization.main has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · scan.detect_containers (cognitive 17) · ×1
  • scan.detect_containers (cognitive 17) skills/acquire-codebase-knowledge/scripts/scan.py:418 — scan.detect_containers has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), error handling 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · inventory_skills.main (cognitive 17) · ×1
  • inventory_skills.main (cognitive 17) skills/agent-skill-stack/scripts/inventory_skills.py:210 — inventory_skills.main has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 4 (5 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 · add-icon-to-diagram.main (cognitive 17) · ×1
  • add-icon-to-diagram.main (cognitive 17) skills/excalidraw-diagram-generator/scripts/add-icon-to-diagram.py:330 — add-icon-to-diagram.main has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (15 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 · retrieval_engine.retrieve (cognitive 17) · ×1
  • retrieval_engine.retrieve (cognitive 17) skills/mini-context-graph/scripts/tools/retrieval_engine.py:20 — retrieval_engine.retrieve has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · storedLessonForRestore (cognitive 17) · ×1
  • storedLessonForRestore (cognitive 17) REDACTED:2836 — storedLessonForRestore has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), error handling 1 (3 pts), ternaries 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · summarizeRepoStatus (cognitive 17) · ×1
  • summarizeRepoStatus (cognitive 17) extensions/work-hub/data.mjs:836 — summarizeRepoStatus has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10, boolean chains 5, ternaries 1 (2 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · loadProject (cognitive 17) · ×1
  • loadProject (cognitive 17) REDACTED:107 — loadProject has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), error handling 2 (4 pts), boolean chains 3, ternaries 2, loops 1 (nesting depth added 4). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 112). 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 · textToTable (cognitive 17) · ×1
  • textToTable (cognitive 17) REDACTED:349 — textToTable has cognitive complexity 17 (threshold 15). Drivers by points: other 6, if/else 3, loops 2 (3 pts), ternaries 2 (3 pts), boolean chains 2 (nesting depth added 2). Of this number, 14 points are the body's own statements and 3 belong to 7 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · loadBranchGraph (cognitive 17) · ×1
  • loadBranchGraph (cognitive 17) REDACTED:845 — loadBranchGraph has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 5, ternaries 2, error handling 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · declarativeTools (cognitive 17) · ×1
  • declarativeTools (cognitive 17) skills/webmcpify/templates/webmcp-workbench.js:192 — declarativeTools has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 3 (5 pts), other 2, boolean chains 1, loops 1 (nesting depth added 6). None of this is in the body itself: all 17 points belong to 3 function literals inside it that branch (lines 193, 199, 212). 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 · createWorkbench.applyArguments (cognitive 17) · ×1
  • createWorkbench.applyArguments (cognitive 17) skills/webmcpify/templates/webmcp-workbench.js:335 — createWorkbench.applyArguments has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 2 (5 pts), boolean chains 4, if/else 3 (4 pts), other 3, loops 1 (nesting depth added 4). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
D2 · Cognitive Complexity · createWorkbench.fieldFor (cognitive 17) · ×1
  • createWorkbench.fieldFor (cognitive 17) skills/webmcpify/templates/webmcp-workbench.js:367 — createWorkbench.fieldFor has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 3 (5 pts), boolean chains 2, loops 1 (2 pts), other 1 (nesting depth added 5). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
D2 · Cognitive Complexity · syncEnvProject (cognitive 17) · ×1
  • syncEnvProject (cognitive 17) extensions/foundry-agentic-loop-canvas/lib/model.mjs:288 — syncEnvProject has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 6, ternaries 2 (3 pts), other 1 (nesting depth added 3). Of this number, 14 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 · issueList (cognitive 17) · ×1
  • issueList (cognitive 17) extensions/sentry-triage/sentryClient.mjs:528 — issueList has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 5 (10 pts), boolean chains 4, if/else 1 (2 pts), loops 1 (nesting depth added 6). Of this number, 9 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createDrawServer.handle (cognitive 17) · ×1
  • createDrawServer.handle (cognitive 17) REDACTED:411 — createDrawServer.handle has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 5, error handling 1, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · delay · ×1
  • delay::searchPriority (cognitive 17) extensions/sentry-triage/sentry.mjs:378 — delay::searchPriority has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 2 (7 pts), if/else 2 (6 pts), error handling 1 (2 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 · normalizeFinding (cognitive 17) · ×1
  • normalizeFinding (cognitive 17) REDACTED:108 — normalizeFinding has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 4, ternaries 3 (4 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · computeOrdering (cognitive 17) · ×1
  • computeOrdering (cognitive 17) REDACTED:255 — computeOrdering has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 3, ternaries 1 (3 pts), loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · routeFor (cognitive 17) · ×1
  • routeFor (cognitive 17) REDACTED:414 — routeFor has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 3 (7 pts), match/switch 1, other 1 (nesting depth added 8). 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 · validateCanvasReadInput (cognitive 17) · ×1
  • validateCanvasReadInput (cognitive 17) .github/extensions/resource-staleness-board/lib/state.mjs:11 — validateCanvasReadInput has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4, ternaries 1 (nesting depth added 4). Of this number, 15 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 · #startScan (cognitive 17) · ×1
  • #startScan (cognitive 17) extensions/windows-app-storage-inspector-cleanup/src/core/storage-service.mjs:213 — #startScan has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 2 (4 pts), boolean chains 1, error handling 1 (nesting depth added 4). Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 294, (anonymous)::onProgress, a function literal at line 281, …). 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 · validatePlugin (cognitive 17) · ×1
  • validatePlugin (cognitive 17) eng/validate-plugins.mjs:321 — validatePlugin has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 1, error handling 1, loops 1, other 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · records (cognitive 17) · ×1
  • records (cognitive 17) extensions/foundry-agentic-loop-canvas/lib/live.mjs:359 — records has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (6 pts), boolean chains 5, other 4, loops 2 (nesting depth added 2). Of this number, 16 points are the body's own statements and 1 belongs 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 · discoverJavaHome (cognitive 17) · ×1
  • discoverJavaHome (cognitive 17) extensions/java-modernization-studio/doctor.mjs:157 — discoverJavaHome has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 5, if/else 4 (5 pts), error handling 2 (3 pts), ternaries 3, loops 1 (nesting depth added 2). 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: 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 · buildPrompt (cognitive 17) · ×1
  • buildPrompt (cognitive 17) extensions/foundry-agentic-loop-workflow/lib/prompts.mjs:133 — buildPrompt has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8, ternaries 5 (6 pts), other 2, boolean chains 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · resolveViewport (cognitive 17) · ×1
  • resolveViewport (cognitive 17) REDACTED:56 — resolveViewport has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 5, if/else 4 (5 pts), other 5, loops 1, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · updateStatus (cognitive 17) · ×1
  • updateStatus (cognitive 17) extensions/pr-review/client.js:95 — updateStatus has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (7 pts), boolean chains 6, if/else 3 (4 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · makeSeries (cognitive 17) · ×1
  • makeSeries (cognitive 17) extensions/chronicle-stats/analytics.mjs:144 — makeSeries has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 4 (6 pts), loops 2, boolean chains 1 (nesting depth added 4). Of this number, 15 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · start (cognitive 17) · ×1
  • start (cognitive 17) extensions/pr-artifact-explorer/jobs.mjs:75 — start has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), other 4, ternaries 1 (3 pts), error handling 2, loops 1 (nesting depth added 4). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 112, 103, 129, …). 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 · (anonymous).search (cognitive 17) · ×1
  • (anonymous).search (cognitive 17) extensions/flight-map-canvas/game/geocoder.js:254 — (anonymous).search has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 6, loops 2 (nesting depth added 2). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to 2 function items inside it that branch (success, failure). 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 · createSnapshotStore.coaching (cognitive 17) · ×1
  • createSnapshotStore.coaching (cognitive 17) extensions/chronicle-stats/snapshots.mjs:64 — createSnapshotStore.coaching has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 7, ternaries 1 (2 pts) (nesting depth added 3). Of this number, 15 points are the body's own statements and 2 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 · publish (cognitive 17) · ×1
  • publish (cognitive 17) .github/extensions/duplicate-review-board/lib/publish.mjs:55 — publish has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 6, error handling 1, ternaries 1. Of this number, 12 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · locked (cognitive 17) · ×1
  • locked (cognitive 17) extensions/foundry-agentic-loop-workflow/lib/lease.mjs:26 — locked has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), error handling 3 (6 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 · external-plugin-validation.validateKeywords (cognitive 16) · ×1
  • external-plugin-validation.validateKeywords (cognitive 16) eng/external-plugin-validation.mjs:136 — external-plugin-validation.validateKeywords has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · extension.shareRequest (cognitive 16) · ×1
  • extension.shareRequest (cognitive 16) REDACTED:869 — extension.shareRequest has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 5, ternaries 1 (2 pts), error handling 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · snapshots.createSnapshotStore.coaching (cognitive 16) · ×1
  • snapshots.createSnapshotStore.coaching (cognitive 16) extensions/chronicle-stats/snapshots.mjs:64 — snapshots.createSnapshotStore.coaching has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 6, ternaries 1 (2 pts) (nesting depth added 3). 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 · model.normalizeElements (cognitive 16) · ×1
  • model.normalizeElements (cognitive 16) extensions/draw/lib/model.mjs:225 — model.normalizeElements has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 4, ternaries 1 (2 pts), loops 1 (nesting depth added 3). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 236). 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 · Editor.cloneSet (cognitive 16) · ×1
  • Editor.cloneSet (cognitive 16) extensions/draw/public/editor.js:368 — Editor.cloneSet has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (13 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 · Editor.applyStyle (cognitive 16) · ×1
  • Editor.applyStyle (cognitive 16) extensions/draw/public/editor.js:436 — Editor.applyStyle has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 7). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 440). 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 · Sync.drainOps (cognitive 16) · ×1
  • Sync.drainOps (cognitive 16) extensions/draw/public/sync.js:189 — Sync.drainOps has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, ternaries 1 (2 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app.loadTab (cognitive 16) · ×1
  • app.loadTab (cognitive 16) extensions/foundry-agentic-loop-canvas/public/app.js:1741 — app.loadTab has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · deck.document.addEventListener("keydown") (cognitive 16) · ×1
  • deck.document.addEventListener("keydown") (cognitive 16) extensions/foundry-agentic-loop-canvas/public/deck.js:63 — deck.document.addEventListener("keydown") has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 2, match/switch 1, 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 · git-data.parseWorktreePorcelain (cognitive 16) · ×1
  • git-data.parseWorktreePorcelain (cognitive 16) extensions/git-worktree-explorer/git-data.mjs:43 — git-data.parseWorktreePorcelain has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 3). 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 45). 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 · Duration.constructor (cognitive 16) · ×1
  • Duration.constructor (cognitive 16) REDACTED:29890 — Duration.constructor has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 16. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · index-_8h8h3EK.r (cognitive 16) · ×1
  • index-_8h8h3EK.r (cognitive 16) REDACTED:12460 — index-_8h8h3EK.r has cognitive complexity 16 (threshold 15). Drivers by points: loops 2 (6 pts), boolean chains 5, if/else 4 (5 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 · index-_8h8h3EK.Chord (cognitive 16) · ×1
  • index-_8h8h3EK.Chord (cognitive 16) REDACTED:13541 — index-_8h8h3EK.Chord has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 4, ternaries 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · index-_8h8h3EK.useMenuInitialFocus (cognitive 16) · ×1
  • index-_8h8h3EK.useMenuInitialFocus (cognitive 16) REDACTED:22033 — index-_8h8h3EK.useMenuInitialFocus has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 12, if/else 4. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · index-_8h8h3EK.RadioGroup (cognitive 16) · ×1
  • index-_8h8h3EK.RadioGroup (cognitive 16) REDACTED:29574 — index-_8h8h3EK.RadioGroup has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, 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 · BeginEndRule._getCachedCompiledPatterns (cognitive 16) · ×1
  • BeginEndRule._getCachedCompiledPatterns (cognitive 16) extensions/github-security/extension.mjs:1805 — BeginEndRule._getCachedCompiledPatterns has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 2 (6 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Grammar._collectInjections (cognitive 16) · ×1
  • Grammar._collectInjections (cognitive 16) extensions/github-security/extension.mjs:2609 — Grammar._collectInjections has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 1 (3 pts) (nesting depth added 9). Of this number, 8 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · renderer.clientMain · ×1
  • renderer.clientMain::heroNext (cognitive 16) extensions/java-modernization-studio/renderer.mjs:389 — renderer.clientMain::heroNext has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (6 pts), ternaries 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · app.requestPullPayload (cognitive 16) · ×1
  • app.requestPullPayload (cognitive 16) REDACTED:2359 — app.requestPullPayload has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (6 pts), boolean chains 5, ternaries 4 (5 pts) (nesting depth added 2). Of this number, 8 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · app.artifactDownloadProgressHtml (cognitive 16) · ×1
  • app.artifactDownloadProgressHtml (cognitive 16) REDACTED:3208 — app.artifactDownloadProgressHtml has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 9 (11 pts), boolean chains 5 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · browser.copyText (cognitive 16) · ×1
  • browser.copyText (cognitive 16) REDACTED:69 — browser.copyText has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), ternaries 2 (4 pts), error handling 2 (3 pts), boolean chains 1 (nesting depth added 8). Of this number, 9 points are the body's own statements and 7 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 · sentry.categorize (cognitive 16) · ×1
  • sentry.categorize (cognitive 16) extensions/sentry-triage/sentry.mjs:190 — sentry.categorize has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 6 (7 pts), loops 1 (nesting depth added 1). Of this number, 12 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · extension.capturePluginMcpJson (cognitive 16) · ×1
  • extension.capturePluginMcpJson (cognitive 16) REDACTED:231 — extension.capturePluginMcpJson has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, error handling 2 (3 pts), ternaries 3, boolean chains 2 (nesting depth added 1). None of this is in the body itself: all 16 points belong to 4 function literals inside it that branch (lines 232, 256, 283, …). 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.buildRecommendations (cognitive 16) · ×1
  • data.buildRecommendations (cognitive 16) extensions/work-hub/data.mjs:1021 — data.buildRecommendations has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 3 (6 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 · latchshot.run (cognitive 16) · ×1
  • latchshot.run (cognitive 16) skills/latchshot-page-capture/scripts/latchshot.mjs:493 — latchshot.run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 5, ternaries 1 (2 pts), error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · napkin.html.container.addEventListener("pointerdown") (cognitive 16) · ×1
  • napkin.html.container.addEventListener("pointerdown") (cognitive 16) skills/napkin/assets/napkin.html:1288 — napkin.html.container.addEventListener("pointerdown") has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, match/switch 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 · TopNav.TopNav (cognitive 16) · ×1
  • TopNav.TopNav (cognitive 16) website/src/components/brand/TopNav.tsx:44 — TopNav.TopNav has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 5, ternaries 2. Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 75, 79, 89, …). 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 · DetailChassis.DetailChassis (cognitive 16) · ×1
  • DetailChassis.DetailChassis (cognitive 16) website/src/components/brand/DetailChassis.tsx:71 — DetailChassis.DetailChassis has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 10 (13 pts), boolean chains 3 (nesting depth added 3). Of this number, 12 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · LearningArticleLayout.LearningArticleLayoutBody (cognitive 16) · ×1
  • LearningArticleLayout.LearningArticleLayoutBody (cognitive 16) website/src/components/brand/LearningArticleLayout.tsx:165 — LearningArticleLayout.LearningArticleLayoutBody has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, ternaries 7. 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, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · validate_tour.main (cognitive 16) · ×1
  • validate_tour.main (cognitive 16) skills/code-tour/scripts/validate_tour.py:308 — validate_tour.main has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 2, loops 2, 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 · docs_drift.env_names_from_code (cognitive 16) · ×1
  • docs_drift.env_names_from_code (cognitive 16) skills/docs-sync-audit/scripts/docs_drift.py:167 — docs_drift.env_names_from_code has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 2 (4 pts), boolean chains 2 (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · markdown_to_word._inject_svg_parts (cognitive 16) · ×1
  • markdown_to_word._inject_svg_parts (cognitive 16) skills/markdown-to-word-mermaid/scripts/markdown_to_word.py:447 — markdown_to_word._inject_svg_parts has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · toCanvasState (cognitive 16) · ×1
  • toCanvasState (cognitive 16) extensions/github-security/extension.mjs:682 — toCanvasState has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 3 (4 pts), boolean chains 2, other 2 (nesting depth added 5). Of this number, 13 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 · tokenizeAnsiWithTheme (cognitive 16) · ×1
  • tokenizeAnsiWithTheme (cognitive 16) extensions/github-security/extension.mjs:7651 — tokenizeAnsiWithTheme has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 7, boolean chains 1 (nesting depth added 4). None of this is in the body itself: all 16 points belong to 3 function literals inside it that branch (lines 7659, 7654, 7659). 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 · codeToTokens (cognitive 16) · ×1
  • codeToTokens (cognitive 16) extensions/github-security/extension.mjs:7732 — codeToTokens has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 3 (6 pts), boolean chains 1 (nesting depth added 6). Of this number, 12 points are the body's own statements and 4 belong to 10 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 · seedPullAuthors (cognitive 16) · ×1
  • seedPullAuthors (cognitive 16) REDACTED:1823 — seedPullAuthors has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 3 (4 pts), other 2, boolean chains 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · setRunFilterPanelOpen (cognitive 16) · ×1
  • setRunFilterPanelOpen (cognitive 16) REDACTED:4116 — setRunFilterPanelOpen has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, loops 1, other 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 · renderRawPreview (cognitive 16) · ×1
  • renderRawPreview (cognitive 16) REDACTED:5004 — renderRawPreview has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 2 (4 pts), boolean chains 2, error handling 1 (nesting depth added 5). Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · accountCardHtml (cognitive 16) · ×1
  • accountCardHtml (cognitive 16) REDACTED:5561 — accountCardHtml has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 12, boolean chains 2, other 2. Of this number, 11 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · onInstallDependencies (cognitive 16) · ×1
  • onInstallDependencies (cognitive 16) REDACTED:1428 — onInstallDependencies has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 2 (6 pts), error handling 2 (4 pts), if/else 4, boolean chains 2 (nesting depth added 6). Of this number, 10 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · onAuthenticate (cognitive 16) · ×1
  • onAuthenticate (cognitive 16) REDACTED:1453 — onAuthenticate has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 2 (6 pts), error handling 2 (4 pts), if/else 4, boolean chains 2 (nesting depth added 6). Of this number, 10 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · buildMergedIntakeComment (cognitive 16) · ×1
  • buildMergedIntakeComment (cognitive 16) eng/external-plugin-intake.mjs:1285 — buildMergedIntakeComment has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 9, other 4, boolean chains 2, if/else 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · loadPersistedDecks (cognitive 16) · ×1
  • loadPersistedDecks (cognitive 16) REDACTED:165 — loadPersistedDecks has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (6 pts), ternaries 2 (4 pts), error handling 2 (3 pts), boolean chains 1, loops 1, other 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 · takePersistedDeck (cognitive 16) · ×1
  • takePersistedDeck (cognitive 16) REDACTED:309 — takePersistedDeck has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 3, loops 1 (2 pts), other 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · renderDrawer (cognitive 16) · ×1
  • renderDrawer (cognitive 16) REDACTED:416 — renderDrawer has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (6 pts), ternaries 4 (6 pts), boolean chains 3, loops 1 (nesting depth added 4). Of this number, 15 points are the body's own statements and 1 belongs 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 · cacheStates (cognitive 16) · ×1
  • cacheStates (cognitive 16) extensions/ai-credits-breakdown/collector.mjs:267 — cacheStates has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (6 pts), ternaries 2 (4 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 5). Of this number, 11 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · suggestRepositories (cognitive 16) · ×1
  • suggestRepositories (cognitive 16) extensions/pr-artifact-explorer/github.mjs:166 — suggestRepositories has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 2 (5 pts), other 3, 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 · renderFrames (cognitive 16) · ×1
  • renderFrames (cognitive 16) extensions/apng-studio/web/app.js:135 — renderFrames has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, ternaries 5, if/else 2, error handling 1. Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 9 function items inside it that branch (a function literal at line 141, (anonymous)::updateHint, (anonymous)::commit, …). 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 · postDecisionCommand (cognitive 16) · ×1
  • postDecisionCommand (cognitive 16) REDACTED:187 — postDecisionCommand has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 3, ternaries 3, error handling 1, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · validate (cognitive 16) · ×1
  • validate (cognitive 16) extensions/foundry-agentic-loop-canvas/extension.mjs:60 — validate has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 3 (5 pts), loops 2, other 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · startAutopilot (cognitive 16) · ×1
  • startAutopilot (cognitive 16) extensions/java-modernization-studio/server.mjs:93 — startAutopilot has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 5, ternaries 2, error handling 1 (nesting depth added 1). Of this number, 12 points are the body's own statements and 4 belong to 5 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · syncPullRequests (cognitive 16) · ×1
  • syncPullRequests (cognitive 16) .github/extensions/open-pr-board/lib/state.mjs:147 — syncPullRequests has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (6 pts), boolean chains 4, loops 3 (4 pts), other 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 · resolveAccounts (cognitive 16) · ×1
  • resolveAccounts (cognitive 16) extensions/pr-artifact-explorer/accounts.mjs:277 — resolveAccounts has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 6, loops 1, other 1 (nesting depth added 2). Of this number, 9 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 · (anonymous) (cognitive 16) · ×1
  • (anonymous) (cognitive 16) extensions/foundry-agentic-loop-canvas/public/deck.js:63 — (anonymous) has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 2, match/switch 1, 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 · splitTableRow (cognitive 16) · ×1
  • splitTableRow (cognitive 16) .github/extensions/duplicate-review-board/lib/report.mjs:9 — splitTableRow has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (6 pts), loops 3 (5 pts), boolean chains 3, ternaries 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · skillDrift (cognitive 16) · ×1
  • skillDrift (cognitive 16) extensions/foundry-agentic-loop-workflow/lib/skills.mjs:110 — skillDrift has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), other 6, loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Edited copy of a member (11 corresponding lines) · ×1
  • Edited copy of a member (11 corresponding lines) REDACTED:269 — REDACTED:269-285 | REDACTED:289-300 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (38–46 lines × 2) · ×1
  • Duplicated block (38–46 lines × 2) skills/datanalysis-credit-risk/references/analysis.py:532 — skills/datanalysis-credit-risk/references/analysis.py:532-577 | skills/datanalysis-credit-risk/references/analysis.py:891-928 — 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.
D4 · Code Duplication · Duplicated block (33–34 lines × 3) · ×1
  • Duplicated block (33–34 lines × 3) skills/convert-excel-to-md/scripts/convert_excel_to_md.py:290 — skills/convert-excel-to-md/scripts/convert_excel_to_md.py:290-322 | skills/convert-pdf-to-md/scripts/convert_pdf_to_md.py:255-288 | skills/convert-word-to-md/scripts/convert_word_to_md.py:237-269 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `skills/convert-pdf-to-md/scripts/convert_pdf_to_md.py:289` calls `_import_fitz` and `skills/convert-excel-to-md/scripts/convert_excel_to_md.py:323` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (25–32 lines × 2) · ×1
  • Duplicated block (25–32 lines × 2) skills/excalidraw-diagram-generator/scripts/add-arrow.py:272 — skills/excalidraw-diagram-generator/scripts/add-arrow.py:272-303 | skills/excalidraw-diagram-generator/scripts/add-icon-to-diagram.py:366-390 — before extracting anything, compare `skills/excalidraw-diagram-generator/scripts/add-arrow.py` and `skills/excalidraw-diagram-generator/scripts/add-icon-to-diagram.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `skills/excalidraw-diagram-generator/scripts/add-icon-to-diagram.py:392` calls `exists`, `exit` and `skills/excalidraw-diagram-generator/scripts/add-arrow.py:305` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (24 lines × 3) · ×1
  • Duplicated block (24 lines × 3) skills/quality-playbook/quality_gate.py:2620 — skills/quality-playbook/quality_gate.py:2620-2643 | skills/quality-playbook/quality_gate.py:2657-2680 | skills/quality-playbook/quality_gate.py:2754-2777 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×1
  • Duplicated block (22 lines × 2) skills/excalidraw-diagram-generator/scripts/add-arrow.py:34 — skills/excalidraw-diagram-generator/scripts/add-arrow.py:34-55 | skills/excalidraw-diagram-generator/scripts/add-icon-to-diagram.py:181-202 — before extracting anything, compare `skills/excalidraw-diagram-generator/scripts/add-arrow.py` and `skills/excalidraw-diagram-generator/scripts/add-icon-to-diagram.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×1
  • Duplicated block (21 lines × 2) skills/quality-playbook/quality_gate.py:1135 — skills/quality-playbook/quality_gate.py:1135-1155 | skills/quality-playbook/quality_gate.py:1210-1230 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×1
  • Duplicated block (18 lines × 2) skills/excalidraw-diagram-generator/scripts/add-arrow.py:211 — skills/excalidraw-diagram-generator/scripts/add-arrow.py:211-228 | skills/excalidraw-diagram-generator/scripts/add-icon-to-diagram.py:307-324 — before extracting anything, compare `skills/excalidraw-diagram-generator/scripts/add-arrow.py` and `skills/excalidraw-diagram-generator/scripts/add-icon-to-diagram.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (15–16 lines × 2) · ×1
  • Duplicated block (15–16 lines × 2) skills/docs-sync-audit/scripts/docs_drift.py:452 — skills/docs-sync-audit/scripts/docs_drift.py:452-466 | skills/test-gap-audit/scripts/coverage_map.py:393-408 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `skills/test-gap-audit/scripts/coverage_map.py:393` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (14 lines × 3) · ×1
  • Duplicated block (14 lines × 3) skills/convert-excel-to-md/scripts/convert_excel_to_md.py:331 — skills/convert-excel-to-md/scripts/convert_excel_to_md.py:331-344 | skills/convert-pdf-to-md/scripts/convert_pdf_to_md.py:298-311 | skills/convert-word-to-md/scripts/convert_word_to_md.py:278-291 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×1
  • Duplicated block (11–12 lines × 2) skills/eyeball/tools/eyeball.py:703 — skills/eyeball/tools/eyeball.py:703-714 | skills/eyeball/tools/eyeball.py:746-756 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×1
  • Duplicated block (12 lines × 2) skills/quality-playbook/quality_gate.py:914 — skills/quality-playbook/quality_gate.py:914-925 | skills/quality-playbook/quality_gate.py:1207-1218 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×1
  • Duplicated block (10–11 lines × 2) skills/datanalysis-credit-risk/references/analysis.py:1070 — skills/datanalysis-credit-risk/references/analysis.py:1070-1079 | skills/datanalysis-credit-risk/references/analysis.py:1095-1105 — 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (9–11 lines × 2) · ×1
  • Duplicated block (9–11 lines × 2) skills/docs-sync-audit/scripts/docs_drift.py:429 — skills/docs-sync-audit/scripts/docs_drift.py:429-437 | skills/test-gap-audit/scripts/coverage_map.py:368-378 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×1
  • Duplicated block (7–8 lines × 2) skills/datanalysis-credit-risk/references/analysis.py:384 — skills/datanalysis-credit-risk/references/analysis.py:384-391 | skills/datanalysis-credit-risk/references/analysis.py:393-399 — 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.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×1
  • Duplicated block (6 lines × 3) skills/datanalysis-credit-risk/references/analysis.py:54 — skills/datanalysis-credit-risk/references/analysis.py:54-59 | skills/datanalysis-credit-risk/references/analysis.py:203-208 | skills/datanalysis-credit-risk/references/analysis.py:687-692 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×1
  • Duplicated block (5 lines × 3) skills/agent-skill-stack/scripts/project_profile.py:47 — skills/agent-skill-stack/scripts/project_profile.py:47-51 | skills/agent-skill-stack/scripts/skill_index.py:69-73 | skills/agent-skill-stack/scripts/stage_install.py:95-99 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×1
  • Duplicated block (14 lines × 2) cookbook/copilot-sdk/go/recipe/managing-local-files.go:18 — cookbook/copilot-sdk/go/recipe/managing-local-files.go:18-31 | cookbook/copilot-sdk/go/recipe/multiple-sessions.go:15-28 — before extracting anything, compare `cookbook/copilot-sdk/go/recipe/managing-local-files.go` and `cookbook/copilot-sdk/go/recipe/multiple-sessions.go` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (10–12 lines × 3) · ×1
  • Duplicated block (10–12 lines × 3) cookbook/copilot-sdk/go/recipe/managing-local-files.go:14 — cookbook/copilot-sdk/go/recipe/managing-local-files.go:14-25 | cookbook/copilot-sdk/go/recipe/multiple-sessions.go:12-22 | cookbook/copilot-sdk/go/recipe/persisting-sessions.go:12-21 — before extracting anything, compare `cookbook/copilot-sdk/go/recipe/managing-local-files.go` and `cookbook/copilot-sdk/go/recipe/multiple-sessions.go` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `cookbook/copilot-sdk/go/recipe/managing-local-files.go:14` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×1
  • Duplicated block (9 lines × 3) cookbook/copilot-sdk/go/recipe/accessibility-report.go:39 — cookbook/copilot-sdk/go/recipe/accessibility-report.go:39-47 | cookbook/copilot-sdk/go/recipe/managing-local-files.go:17-25 | cookbook/copilot-sdk/go/recipe/multiple-sessions.go:13-22 — before extracting anything, compare `cookbook/copilot-sdk/go/recipe/managing-local-files.go` and `cookbook/copilot-sdk/go/recipe/multiple-sessions.go` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `cookbook/copilot-sdk/go/recipe/accessibility-report.go:39` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D8 · Code Coverage · Coverage not measured · ×1
  • Coverage not measured — .NET suite — Coverage NOT MEASURED: the .NET half could not be measured — the repository wires up no coverage collector for `--collect:"XPlat Code Coverage"` to use; the JavaScript/TypeScript half measured 98.2% (node:test via `npm ci --ignore-scripts` in extensions/foundry-agentic-loop-canvas/; node:test via `npm ci --ignore-scripts` in extensions/foundry-agentic-loop-workflow/; node:test via `npm ci --ignore-scripts` in extensions/signals-dashboard/). 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. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan. Alternatively, commit the lcov/Cobertura report your CI produces and it is read without a re-run.
R1 · Type Safety · Type Safety · ×1
  • Type Safety — 10 typed · 379 plain JS — the untyped files are eng/add-missing-contributors.mjs, eng/agent-plugin-schema.mjs, eng/board-bulk-actions.test.mjs, eng/board-column-order.test.mjs, eng/board-periodic-refresh.test.mjs, eng/board-preview.test.mjs (+373 more).
R10 · Code Duplication · Duplication concentrated across 35 sibling directories (88 clone groups) · ×1
  • Duplication concentrated across 35 sibling directories (88 clone groups) extensions/tiny-tool-town-submitter/extension.mjs:349 — 88 duplicated blocks under extensions/ have copies in at least two of the sibling directories accessibility-kanban, agent-radar, ai-credits-breakdown, apng-studio, arcade-canvas, backlog-swipe-triage (+29 more sibling(s) not listed) — 63 of them are reported below, and 25 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 88 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 88 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 88 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 4 sibling directories (7 clone groups) · ×1
  • Duplication concentrated across 4 sibling directories (7 clone groups) extensions/pr-review/github.mjs:86 — 7 duplicated blocks under the repository root have copies in at least two of the sibling directories cookbook, eng, extensions, skills — 3 of them are reported below, and 4 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 7 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 7 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 7 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 (484 lines × 2 locations) · ×1
  • Duplicated block (484 lines × 2 locations) REDACTED:30843 — REDACTED:30843 · extensions/github-security/extension.mjs:4031 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication · Duplicated block with local edits (446 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (446 matched lines × 2 locations) skills/webmcpify/templates/mutation-journal.js:71 — skills/webmcpify/templates/mutation-journal.js:71 · skills/webmcpify/templates/mutation-journal.ts:150 — the two spans are one implementation copied and then locally edited — 3604 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 (153 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (153 matched lines × 2 locations) skills/webmcpify/templates/webmcpify.js:89 — skills/webmcpify/templates/webmcpify.js:89 · skills/webmcpify/templates/webmcpify.ts:113 — the two spans are one implementation copied and then locally edited — 939 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 (122 lines × 2 locations) · ×1
  • Duplicated block (122 lines × 2 locations) REDACTED:23575 — REDACTED:23575 · extensions/github-security/extension.mjs:646 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (69 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (69 matched lines × 2 locations) extensions/tiny-tool-town-submitter/extension.mjs:349 — extensions/tiny-tool-town-submitter/extension.mjs:349 · extensions/windows-app-storage-inspector-cleanup/src/api/server.mjs:42 — the two spans are one implementation copied and then locally edited — 462 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 (64 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (64 matched lines × 2 locations) eng/external-plugin-quality-gates.mjs:662 — eng/external-plugin-quality-gates.mjs:662 · eng/external-plugin-quality-gates.mjs:871 — the two spans are one implementation copied and then locally edited — 335 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 (59 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (59 matched lines × 2 locations) REDACTED:466 — REDACTED:466 · REDACTED:53 — the two spans are one implementation copied and then locally edited — 490 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 (57 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (57 matched lines × 2 locations) eng/create-plugin.mjs:10 — eng/create-plugin.mjs:10 · eng/create-skill.mjs:9 — the two spans are one implementation copied and then locally edited — 386 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 (53 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (53 matched lines × 2 locations) extensions/backrooms-canvas/extension.mjs:225 — extensions/backrooms-canvas/extension.mjs:225 · REDACTED:377 — the two spans are one implementation copied and then locally edited — 354 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 (52 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (52 matched lines × 2 locations) extensions/arcade-canvas/extension.mjs:32 — extensions/arcade-canvas/extension.mjs:32 · extensions/backrooms-canvas/extension.mjs:74 — the two spans are one implementation copied and then locally edited — 272 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 (50 lines × 2 locations) · ×1
  • Duplicated block (50 lines × 2 locations) REDACTED:23439 — REDACTED:23439 · extensions/github-security/extension.mjs:311 — 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 (49 lines × 2 locations) · ×1
  • Duplicated block (49 lines × 2 locations) extensions/arcade-canvas/extension.mjs:358 — extensions/arcade-canvas/extension.mjs:358 · REDACTED:426 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (45 lines × 2 locations) · ×1
  • Duplicated block (45 lines × 2 locations) REDACTED:32088 — REDACTED:32088 · extensions/github-security/extension.mjs:5244 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (41 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (41 matched lines × 2 locations) extensions/windows-app-storage-inspector-cleanup/src/analyzers/npm-cache.mjs:34 — extensions/windows-app-storage-inspector-cleanup/src/analyzers/npm-cache.mjs:34 · extensions/windows-app-storage-inspector-cleanup/src/analyzers/uv-cache.mjs:37 — the two spans are one implementation copied and then locally edited — 186 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 (37 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (37 matched lines × 2 locations) extensions/windows-app-storage-inspector-cleanup/src/core/categorizers.mjs:86 — extensions/windows-app-storage-inspector-cleanup/src/core/categorizers.mjs:86 · extensions/windows-app-storage-inspector-cleanup/src/core/item-inspector.mjs:6 — the two spans are one implementation copied and then locally edited — 293 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (34 lines × 2 locations) · ×1
  • Duplicated block (34 lines × 2 locations) REDACTED:23517 — REDACTED:23517 · extensions/github-security/extension.mjs:428 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
R10 · Code Duplication · Duplicated block with local edits (31 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (31 matched lines × 2 locations) eng/validate-plugins.mjs:446 — eng/validate-plugins.mjs:446 · eng/validate-skills.mjs:129 — the two spans are one implementation copied and then locally edited — 176 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) extensions/backrooms-canvas/extension.mjs:74 — extensions/backrooms-canvas/extension.mjs:74 · REDACTED:82 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block with local edits (29 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (29 matched lines × 2 locations) extensions/pr-artifact-explorer/jobs.mjs:269 — extensions/pr-artifact-explorer/jobs.mjs:269 · extensions/pr-artifact-explorer/limits.mjs:134 — the two spans are one implementation copied and then locally edited — 199 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 (27 lines × 3 locations) · ×1
  • Duplicated block (27 lines × 3 locations) eng/update-readme.mjs:297 — eng/update-readme.mjs:297 · eng/update-readme.mjs:357 · eng/update-readme.mjs:414 — all 3 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 (26 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (26 matched lines × 2 locations) extensions/agent-radar/extension.mjs:49 — extensions/agent-radar/extension.mjs:49 · extensions/ai-credits-breakdown/server.mjs:21 — the two spans are one implementation copied and then locally edited — 275 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 (25 lines × 2 locations) · ×1
  • Duplicated block (25 lines × 2 locations) REDACTED:11922 — REDACTED:11922 · REDACTED:11947 — 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 (24 lines × 2 locations) · ×1
  • Duplicated block (24 lines × 2 locations) extensions/windows-app-storage-inspector-cleanup/src/analyzers/docker-images.mjs:24 — extensions/windows-app-storage-inspector-cleanup/src/analyzers/docker-images.mjs:24 · extensions/windows-app-storage-inspector-cleanup/src/analyzers/microsoft-scout.mjs: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.
R10 · Code Duplication · Duplicated block (23 lines × 3 locations) · ×1
  • Duplicated block (23 lines × 3 locations) extensions/arcade-canvas/extension.mjs:278 — extensions/arcade-canvas/extension.mjs:278 · extensions/backrooms-canvas/extension.mjs:225 · REDACTED:377 — 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.
R2 · Cyclomatic Complexity · Complex function handleApi (cyclomatic 230, cognitive 364) · ×1
  • Complex function handleApi (cyclomatic 230, cognitive 364) REDACTED:499 — handleApi has cyclomatic complexity 230 and cognitive complexity 364; 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 UnwrappedItem (cyclomatic 215, cognitive 184) · ×1
  • Complex function UnwrappedItem (cyclomatic 215, cognitive 184) REDACTED:19508 — UnwrappedItem has cyclomatic complexity 215 and cognitive complexity 184; 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 completeWork (cyclomatic 182, cognitive 326) · ×1
  • Complex function completeWork (cyclomatic 182, cognitive 326) REDACTED:5846 — completeWork has cyclomatic complexity 182 and cognitive complexity 326; 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 (anonymous) (cyclomatic 150, cognitive 149) · ×1
  • Complex function (anonymous) (cyclomatic 150, cognitive 149) REDACTED:8826 — (anonymous) has cyclomatic complexity 150 and cognitive complexity 149; 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 commitMutationEffectsOnFiber (cyclomatic 148, cognitive 244) · ×1
  • Complex function commitMutationEffectsOnFiber (cyclomatic 148, cognitive 244) REDACTED:7023 — commitMutationEffectsOnFiber has cyclomatic complexity 148 and cognitive complexity 244; 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 setProp (cyclomatic 148, cognitive 96) · ×1
  • Complex function setProp (cyclomatic 148, cognitive 96) REDACTED:9071 — setProp has cyclomatic complexity 148 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 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 updateProperties (cyclomatic 139, cognitive 163) · ×1
  • Complex function updateProperties (cyclomatic 139, cognitive 163) REDACTED:9464 — updateProperties has cyclomatic complexity 139 and cognitive complexity 163; 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 TextInputWithTokensInnerComponent (cyclomatic 132, cognitive 122) · ×1
  • Complex function TextInputWithTokensInnerComponent (cyclomatic 132, cognitive 122) REDACTED:27871 — TextInputWithTokensInnerComponent has cyclomatic complexity 132 and cognitive complexity 122; 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 inspectMapContract (cyclomatic 115, cognitive 179) · ×1
  • Complex function inspectMapContract (cyclomatic 115, cognitive 179) skills/build-evidence-map/scripts/contract.mjs:110 — inspectMapContract has cyclomatic complexity 115 and cognitive complexity 179; 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 applyEvent (cyclomatic 110, cognitive 146) · ×1
  • Complex function applyEvent (cyclomatic 110, cognitive 146) extensions/agent-radar/collector.mjs:278 — applyEvent has cyclomatic complexity 110 and cognitive complexity 146; 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 setInitialProperties (cyclomatic 91, cognitive 99) · ×1
  • Complex function setInitialProperties (cyclomatic 91, cognitive 99) REDACTED:9305 — setInitialProperties has cyclomatic complexity 91 and cognitive complexity 99; 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 beginWork (cyclomatic 86, cognitive 112) · ×1
  • Complex function beginWork (cyclomatic 86, cognitive 112) REDACTED:5657 — beginWork has cyclomatic complexity 86 and cognitive complexity 112; 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 updateClassComponent (cyclomatic 85, cognitive 86) · ×1
  • Complex function updateClassComponent (cyclomatic 85, cognitive 86) REDACTED:5257 — updateClassComponent has cyclomatic complexity 85 and cognitive complexity 86; 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 AutocompleteMenu (cyclomatic 84, cognitive 89) · ×1
  • Complex function AutocompleteMenu (cyclomatic 84, cognitive 89) REDACTED:24424 — AutocompleteMenu has cyclomatic complexity 84 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 onWorkSelected (cyclomatic 81, cognitive 127) · ×1
  • Complex function onWorkSelected (cyclomatic 81, cognitive 127) REDACTED:1472 — onWorkSelected has cyclomatic complexity 81 and cognitive complexity 127; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 77, cognitive 59) · ×1
  • Complex function (anonymous) (cyclomatic 77, cognitive 59) REDACTED:28439 — (anonymous) has cyclomatic complexity 77 and cognitive complexity 59; 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 (anonymous) (cyclomatic 70, cognitive 97) · ×1
  • Complex function (anonymous) (cyclomatic 70, cognitive 97) REDACTED:2555 — (anonymous) has cyclomatic complexity 70 and cognitive complexity 97; 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 (anonymous) (cyclomatic 70, cognitive 92) · ×1
  • Complex function (anonymous) (cyclomatic 70, cognitive 92) extensions/draw/public/keys.js:26 — (anonymous) has cyclomatic complexity 70 and cognitive complexity 92; 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 (anonymous) (cyclomatic 68, cognitive 78) · ×1
  • Complex function (anonymous) (cyclomatic 68, cognitive 78) REDACTED:29027 — (anonymous) has cyclomatic complexity 68 and cognitive complexity 78; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files · extensions/github-security/extension.mjs · ×1
  • extensions/github-security/extension.mjs: 10638 lines of code extensions/github-security/extension.mjs:1 — extensions/github-security/extension.mjs has 10638 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: 6411 lines of code REDACTED:1 — REDACTED has 6411 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 · extensions/jupyter-notebooks/notebook-canvas.mjs · ×1
  • extensions/jupyter-notebooks/notebook-canvas.mjs: 3791 lines of code extensions/jupyter-notebooks/notebook-canvas.mjs:1 — extensions/jupyter-notebooks/notebook-canvas.mjs has 3791 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: 2977 lines of code REDACTED:1 — REDACTED has 2977 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 · extensions/sentry-triage/components/page.mjs · ×1
  • extensions/sentry-triage/components/page.mjs: 2926 lines of code extensions/sentry-triage/components/page.mjs:1 — extensions/sentry-triage/components/page.mjs has 2926 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 · extensions/site-studio/extension.mjs · ×1
  • extensions/site-studio/extension.mjs: 2234 lines of code extensions/site-studio/extension.mjs:1 — extensions/site-studio/extension.mjs has 2234 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: 2232 lines of code REDACTED:1 — REDACTED has 2232 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: 2105 lines of code REDACTED:1 — REDACTED has 2105 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: 2097 lines of code REDACTED:1 — REDACTED has 2097 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 · extensions/release-notes-showcase/releaseNotesShowcase.mjs · ×1
  • extensions/release-notes-showcase/releaseNotesShowcase.mjs: 2071 lines of code extensions/release-notes-showcase/releaseNotesShowcase.mjs:1 — extensions/release-notes-showcase/releaseNotesShowcase.mjs has 2071 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 · extensions/foundry-agentic-loop-canvas/public/app.js · ×1
  • extensions/foundry-agentic-loop-canvas/public/app.js: 1972 lines of code extensions/foundry-agentic-loop-canvas/public/app.js:1 — extensions/foundry-agentic-loop-canvas/public/app.js has 1972 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 · eng/canvas-smoke-test.mjs · ×1
  • eng/canvas-smoke-test.mjs: 1689 lines of code eng/canvas-smoke-test.mjs:1 — eng/canvas-smoke-test.mjs has 1689 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 · extensions/repo-actions-hub/extension.mjs · ×1
  • extensions/repo-actions-hub/extension.mjs: 1671 lines of code extensions/repo-actions-hub/extension.mjs:1 — extensions/repo-actions-hub/extension.mjs has 1671 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: 1625 lines of code REDACTED:1 — REDACTED has 1625 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: 1525 lines of code REDACTED:1 — REDACTED has 1525 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: 1450 lines of code REDACTED:1 — REDACTED has 1450 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: 1357 lines of code REDACTED:1 — REDACTED has 1357 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 · eng/external-plugin-intake.mjs · ×1
  • eng/external-plugin-intake.mjs: 1315 lines of code eng/external-plugin-intake.mjs:1 — eng/external-plugin-intake.mjs has 1315 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 · extensions/sentry-triage/styles.mjs · ×1
  • extensions/sentry-triage/styles.mjs: 1315 lines of code extensions/sentry-triage/styles.mjs:1 — extensions/sentry-triage/styles.mjs has 1315 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: 1254 lines of code REDACTED:1 — REDACTED has 1254 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: 1193 lines of code REDACTED:1 — REDACTED has 1193 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: 1172 lines of code REDACTED:1 — REDACTED has 1172 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 · extensions/work-hub/data.mjs · ×1
  • extensions/work-hub/data.mjs: 1161 lines of code extensions/work-hub/data.mjs:1 — extensions/work-hub/data.mjs has 1161 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 · extensions/gesture-review/extension.mjs · ×1
  • extensions/gesture-review/extension.mjs: 1159 lines of code extensions/gesture-review/extension.mjs:1 — extensions/gesture-review/extension.mjs has 1159 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: 1146 lines of code REDACTED:1 — REDACTED has 1146 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: 1132 lines of code REDACTED:1 — REDACTED has 1132 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 · extensions/work-hub/renderer.mjs · ×1
  • extensions/work-hub/renderer.mjs: 1065 lines of code extensions/work-hub/renderer.mjs:1 — extensions/work-hub/renderer.mjs has 1065 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: 1014 lines of code REDACTED:1 — REDACTED has 1014 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 · extensions/java-modernization-studio/renderer.mjs · ×1
  • extensions/java-modernization-studio/renderer.mjs: 972 lines of code extensions/java-modernization-studio/renderer.mjs:1 — extensions/java-modernization-studio/renderer.mjs has 972 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 · eng/external-plugin-quality-gates.mjs · ×1
  • eng/external-plugin-quality-gates.mjs: 968 lines of code eng/external-plugin-quality-gates.mjs:1 — eng/external-plugin-quality-gates.mjs has 968 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 · extensions/agent-radar/collector.mjs · ×1
  • extensions/agent-radar/collector.mjs: 903 lines of code extensions/agent-radar/collector.mjs:1 — extensions/agent-radar/collector.mjs has 903 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 · extensions/pr-artifact-explorer/github.mjs · ×1
  • extensions/pr-artifact-explorer/github.mjs: 888 lines of code extensions/pr-artifact-explorer/github.mjs:1 — extensions/pr-artifact-explorer/github.mjs has 888 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 · extensions/flight-map-canvas/game/app.js · ×1
  • extensions/flight-map-canvas/game/app.js: 887 lines of code extensions/flight-map-canvas/game/app.js:1 — extensions/flight-map-canvas/game/app.js has 887 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 · extensions/chronicle-stats/insight-view.mjs · ×1
  • extensions/chronicle-stats/insight-view.mjs: 837 lines of code extensions/chronicle-stats/insight-view.mjs:1 — extensions/chronicle-stats/insight-view.mjs has 837 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 · eng/review-routing.mjs · ×1
  • eng/review-routing.mjs: 830 lines of code eng/review-routing.mjs:1 — eng/review-routing.mjs has 830 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 · extensions/arcade-canvas/game/hud.js · ×1
  • extensions/arcade-canvas/game/hud.js: 819 lines of code extensions/arcade-canvas/game/hud.js:1 — extensions/arcade-canvas/game/hud.js has 819 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 · eng/update-readme.mjs · ×1
  • eng/update-readme.mjs: 767 lines of code eng/update-readme.mjs:1 — eng/update-readme.mjs has 767 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 · extensions/ai-credits-breakdown/ui/app.js · ×1
  • extensions/ai-credits-breakdown/ui/app.js: 758 lines of code extensions/ai-credits-breakdown/ui/app.js:1 — extensions/ai-credits-breakdown/ui/app.js has 758 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 · extensions/pr-artifact-explorer/assets/trx-preview.js · ×1
  • extensions/pr-artifact-explorer/assets/trx-preview.js: 721 lines of code extensions/pr-artifact-explorer/assets/trx-preview.js:1 — extensions/pr-artifact-explorer/assets/trx-preview.js has 721 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 · extensions/ai-credits-breakdown/collector.mjs · ×1
  • extensions/ai-credits-breakdown/collector.mjs: 716 lines of code extensions/ai-credits-breakdown/collector.mjs:1 — extensions/ai-credits-breakdown/collector.mjs has 716 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R6 · Tooling · The declared test suite includes a file that cannot be loaded · ×1
  • The declared test suite includes a file that cannot be loaded eng/board-state-storage.test.mjs:10 — This repository declares test tooling, and the ✓ above records that declaration — but eng/board-state-storage.test.mjs and 7 other test file(s) in this workspace cannot be loaded at all: it imports a module that names no file in this repository, so the runner throws while collecting it and none of its cases execute. The wiring is present and the suite it points at does not run as written, which is why the tooling tick must not be read as a statement that the tests pass. Fix the unloadable file(s) — each one is reported with its failing import under Test Coverage — then the declared script exercises what it claims to.
R7 · Dead Code · Dead file (~10638 LoC) · ×1
  • Dead file (~10638 LoC) extensions/github-security/extension.mjs — no import path from any entry point (156 application, 33 tooling, 103 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 (~1234 LoC) · ×1
  • Dead file (~1234 LoC) REDACTED — no import path from any entry point (156 application, 33 tooling, 103 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 (~840 LoC) · ×1
  • Dead file (~840 LoC) extensions/chronicle-stats/insight-view.mjs — no import path from any entry point (156 application, 33 tooling, 103 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (extensions/chronicle-stats/renderer.mjs) — 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 (~719 LoC) · ×1
  • Dead file (~719 LoC) extensions/chronicle-stats/renderer.mjs — no import path from any entry point (156 application, 33 tooling, 103 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (extensions/chronicle-stats/server.mjs) — 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 (~658 LoC) · ×1
  • Dead file (~658 LoC) extensions/tiny-tool-town-submitter/lib/analyzer.mjs — no import path from any entry point (156 application, 33 tooling, 103 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (extensions/tiny-tool-town-submitter/extension.mjs) — 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 (~608 LoC) · ×1
  • Dead file (~608 LoC) extensions/tiny-tool-town-submitter/extension.mjs — no import path from any entry point (156 application, 33 tooling, 103 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 (~578 LoC) · ×1
  • Dead file (~578 LoC) extensions/tiny-tool-town-submitter/lib/renderer.mjs — no import path from any entry point (156 application, 33 tooling, 103 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (extensions/tiny-tool-town-submitter/extension.mjs) — 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 (~502 LoC) · ×1
  • Dead file (~502 LoC) extensions/arcade-canvas/extension.mjs — no import path from any entry point (156 application, 33 tooling, 103 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 (~455 LoC) · ×1
  • Dead file (~455 LoC) extensions/chronicle-stats/explorer.mjs — no import path from any entry point (156 application, 33 tooling, 103 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (extensions/chronicle-stats/renderer.mjs) — 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 (~438 LoC) · ×1
  • Dead file (~438 LoC) extensions/apng-studio/qr.mjs — no import path from any entry point (156 application, 33 tooling, 103 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 (~394 LoC) · ×1
  • Dead file (~394 LoC) extensions/chronicle-stats/server.mjs — no import path from any entry point (156 application, 33 tooling, 103 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (extensions/chronicle-stats/canvas.mjs) — 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 (~310 LoC) · ×1
  • Dead file (~310 LoC) extensions/apng-studio/apng.mjs — no import path from any entry point (156 application, 33 tooling, 103 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 (~307 LoC) · ×1
  • Dead file (~307 LoC) eng/add-missing-contributors.mjs — no import path from any entry point (156 application, 33 tooling, 103 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 (~280 LoC) · ×1
  • Dead file (~280 LoC) extensions/chronicle-stats/visuals.mjs — no import path from any entry point (156 application, 33 tooling, 103 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (extensions/chronicle-stats/explorer.mjs) — 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 (~238 LoC) · ×1
  • Dead file (~238 LoC) extensions/chronicle-stats/analytics.mjs — no import path from any entry point (156 application, 33 tooling, 103 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (extensions/chronicle-stats/db.mjs, extensions/chronicle-stats/snapshots.mjs) — 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 (~227 LoC) · ×1
  • Dead file (~227 LoC) extensions/modernization-workflow/lib/state.mjs — no import path from any entry point (156 application, 33 tooling, 103 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (extensions/modernization-workflow/extension.mjs, extensions/modernization-workflow/lib/server.mjs) — 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) extensions/chronicle-stats/db.mjs — no import path from any entry point (156 application, 33 tooling, 103 test roots considered), but 3 in-repo import(s) from 3 other file(s) do name it (extensions/chronicle-stats/canvas.mjs, extensions/chronicle-stats/server.mjs, extensions/chronicle-stats/snapshots.mjs) — 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 (~190 LoC) · ×1
  • Dead file (~190 LoC) extensions/modernization-workflow/lib/renderer.mjs — no import path from any entry point (156 application, 33 tooling, 103 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (extensions/modernization-workflow/lib/server.mjs) — 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) extensions/chronicle-stats/snapshots.mjs — no import path from any entry point (156 application, 33 tooling, 103 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (extensions/chronicle-stats/canvas.mjs, extensions/chronicle-stats/server.mjs) — 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 (~145 LoC) · ×1
  • Dead file (~145 LoC) extensions/chronicle-stats/canvas.mjs — no import path from any entry point (156 application, 33 tooling, 103 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (extensions/chronicle-stats/extension.mjs) — 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 (~122 LoC) · ×1
  • Dead file (~122 LoC) extensions/tiny-tool-town-submitter/lib/copy-generator.mjs — no import path from any entry point (156 application, 33 tooling, 103 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (extensions/tiny-tool-town-submitter/extension.mjs) — 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 (~104 LoC) · ×1
  • Dead file (~104 LoC) extensions/modernization-workflow/lib/server.mjs — no import path from any entry point (156 application, 33 tooling, 103 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (extensions/modernization-workflow/extension.mjs) — 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 (~103 LoC) · ×1
  • Dead file (~103 LoC) extensions/draw/extension.mjs — no import path from any entry point (156 application, 33 tooling, 103 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 (~96 LoC) · ×1
  • Dead file (~96 LoC) extensions/chronicle-stats/chronicle.mjs — no import path from any entry point (156 application, 33 tooling, 103 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (extensions/chronicle-stats/server.mjs) — 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 (~94 LoC) · ×1
  • Dead file (~94 LoC) extensions/git-worktree-explorer/extension.mjs — no import path from any entry point (156 application, 33 tooling, 103 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 (~79 LoC) · ×1
  • Dead file (~79 LoC) extensions/pr-review/extension.mjs — no import path from any entry point (156 application, 33 tooling, 103 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 (~75 LoC) · ×1
  • Dead file (~75 LoC) extensions/chronicle-stats/schemas.mjs — no import path from any entry point (156 application, 33 tooling, 103 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (extensions/chronicle-stats/canvas.mjs) — 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 (~73 LoC) · ×1
  • Dead file (~73 LoC) extensions/ai-credits-breakdown/extension.mjs — no import path from any entry point (156 application, 33 tooling, 103 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 (~39 LoC) · ×1
  • Dead file (~39 LoC) skills/adobe-illustrator-scripting/scripts/batch-export-png.jsx — no import path from any entry point (156 application, 33 tooling, 103 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 (~38 LoC) · ×1
  • Dead file (~38 LoC) skills/adobe-illustrator-scripting/scripts/create-color-grid.jsx — no import path from any entry point (156 application, 33 tooling, 103 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 (~32 LoC) · ×1
  • Dead file (~32 LoC) skills/adobe-illustrator-scripting/scripts/find-replace-text.jsx — no import path from any entry point (156 application, 33 tooling, 103 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 (~6 LoC) · ×1
  • Dead file (~6 LoC) extensions/chronicle-stats/extension.mjs — no import path from any entry point (156 application, 33 tooling, 103 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
R8 · Dependency Hygiene · Unused dependency 'ajv-formats' · ×1
  • Unused dependency 'ajv-formats' — 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.
S1 · Cryptographic Hygiene · Third-party script without Subresource Integrity · ×1
  • Third-party script without Subresource Integrity REDACTED:10 — `https://unpkg.com/leaflet@1.9.4/dist/leaflet.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. 2 such include(s) across the repository's markup.
SC1 · Supply-chain hygiene · NuGet dependencies are not locked · ×1
  • NuGet dependencies are not locked — No packages.lock.json and no central package management — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
X24 · Document value interpolated into markup unescaped · Document value reaches a markup attribute unescaped · ×1
  • Document value reaches a markup attribute unescaped skills/draw-io-diagram-generator/scripts/validate-drawio.py:146 — `cid` carries text this program read out of a document — an attribute or a text node, which the DOM hands back already decoded, so an entity its author wrote is a live character again — and it is written straight into the `id` attribute of markup built here with nothing escaping it on the way. The value is chosen by whoever authored that document, not by this program, so it can close the attribute or element it sits in and open another — a crafted document becomes markup in what this code renders. Escape `cid` at this site, or validate it against the shape the position accepts before interpolating it.
Minor — 132 finding(s)
D34 · Knowledge Freshness · Orphaned file · ×39
  • Orphaned file extensions/java-modernization-studio/doctor.mjs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file skills/datanalysis-credit-risk/scripts/example.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file extensions/apng-studio/qr.mjs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file extensions/java-modernization-studio/server.mjs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file skills/convert-excel-to-md/scripts/convert_excel_to_md.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file skills/code-tour/scripts/validate_tour.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file skills/mini-context-graph/scripts/contextgraph.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file skills/convert-pdf-to-md/scripts/convert_pdf_to_md.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file skills/convert-word-to-md/scripts/convert_word_to_md.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file skills/agent-skill-stack/scripts/inventory_skills.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file skills/agent-skill-stack/scripts/skill_index.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file extensions/apng-studio/apng.mjs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file skills/code-tour/scripts/generate_from_docs.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file eng/add-missing-contributors.mjs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file extensions/java-modernization-studio/prompts.mjs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file skills/mini-context-graph/scripts/tools/wiki_store.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file skills/datanalysis-credit-risk/references/func.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file skills/draw-io-diagram-generator/scripts/validate-drawio.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file skills/agent-skill-stack/scripts/stage_install.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file extensions/java-modernization-studio/catalog.mjs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file cookbook/copilot-sdk/python/recipe/error_recovery_hooks.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file skills/mini-context-graph/scripts/template_agent_workflow.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file skills/draw-io-diagram-generator/scripts/add-shape.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file skills/agent-skill-stack/scripts/render_stack_card.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file skills/mini-context-graph/scripts/tools/graph_store.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • + 14 more in this group — see findings.md.
X7 · Silent fallback defaults · Silent fallback default in catch · ×28
  • Silent fallback default in catch skills/winmd-api-search/scripts/cache-generator/Program.cs:1217 — `DecodeTypeSpecification` swallows every exception into `return "unknown";` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch skills/acquire-codebase-knowledge/scripts/scan.py:335 — `get_git_commits` 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 skills/acquire-codebase-knowledge/scripts/scan.py:356 — `get_git_churn` 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 skills/code-tour/scripts/validate_tour.py:45 — `_line_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 skills/code-tour/scripts/validate_tour.py:52 — `_file_content` 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 skills/eyeball/tools/eyeball.py:217 — `_convert_with_word_windows` swallows every exception into `return False` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch eng/canvas-error-handoff/runtime.mjs:65 — `sanitizeText` (in `redactError`) swallows every exception into `return "[redacted URL]"` — 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 extensions/agent-radar/collector.mjs:251 — `collectBackgroundShells` 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 extensions/agent-radar/collector.mjs:554 — `collectCopilotSessions` 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 extensions/agent-radar/collector.mjs:863 — `workspaceRoots` 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 extensions/agent-radar/collector.mjs:923 — `collectIDEs` 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:537 — `tokenMatches` swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch extensions/foundry-agentic-loop-canvas/lib/live.mjs:72 — `outcomeOf` 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 extensions/foundry-agentic-loop-workflow/lib/record.mjs:34 — `endpoints` 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 extensions/foundry-agentic-loop-workflow/lib/ownership.mjs:15 — `signature` swallows every exception into `return "missing"` — 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 extensions/foundry-agentic-loop-workflow/lib/skills.mjs:28 — `directories` 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 extensions/java-modernization-studio/doctor.mjs:72 — `augmentedEnv` 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:389 — `dirHasDockerfile` swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch REDACTED:58 — `decodeViewClient` 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 extensions/sentry-triage/server.mjs:45 — `parseJson` 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:300 — `hostFromRemote` 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:312 — `hostFromEnv` 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:320 — `gitRemoteUrl` 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:339 — `baseBranchFromPath` 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:587 — `readStash` 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.
  • + 3 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×25
  • Duplicated predicate eng/clean-materialized-plugins.mjs:266 — `!Array.isArray(left) || !Array.isArray(right) || left.length !== right.length` appears character-identically in 2 files — eng/clean-materialized-plugins.mjs, eng/validate-plugins.mjs. 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:485 — `!Number.isFinite(seconds) || seconds < 0` appears character-identically in 2 files — REDACTED, 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 skills/webmcpify/templates/mutation-journal.js:129 — `!Number.isInteger(entry.contractRevision) || entry.contractRevision < 1` appears character-identically in 2 files — skills/webmcpify/templates/mutation-journal.js, skills/webmcpify/templates/mutation-journal.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:182 — `!Number.isInteger(error?.status) || error.status >= 500` appears character-identically in 2 files — REDACTED, 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 skills/webmcpify/templates/mutation-journal.js:405 — `!Number.isInteger(input.contractRevision) || input.contractRevision < 1` appears character-identically in 2 files — skills/webmcpify/templates/mutation-journal.js, skills/webmcpify/templates/mutation-journal.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 .github/extensions/duplicate-review-board/lib/github.mjs:40 — `!Number.isSafeInteger(number) || number < 1` appears character-identically in 2 files — .github/extensions/duplicate-review-board/lib/github.mjs, .github/extensions/duplicate-review-board/lib/state.mjs. 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 extensions/pr-artifact-explorer/extension.mjs:34 — `!Number.isSafeInteger(number) || number <= 0` appears character-identically in 2 files — extensions/pr-artifact-explorer/extension.mjs, extensions/pr-artifact-explorer/github.mjs. 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:331 — `!active || isPrimary || kind !== "markdown" || text === undefined` appears character-identically in 2 files — REDACTED, 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 eng/validate-plugins.mjs:46 — `!description || typeof description !== "string"` appears character-identically in 2 files — eng/validate-plugins.mjs, eng/validate-skills.mjs. 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 .github/extensions/open-pr-board/public/app.js:837 — `!event.shiftKey && document.activeElement === last` appears character-identically in 2 files — .github/extensions/open-pr-board/public/app.js, website/src/components/brand/VideoCarousel.tsx. 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:88 — `!force && cached?.data && Date.now() - cached.at < DETAIL_TTL_MS` appears character-identically in 2 files — REDACTED, .github/extensions/open-pr-board/extension.mjs. 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 skills/webmcpify/templates/mutation-journal.js:523 — `!handleInfo.isFile() || handleInfo.nlink !== 1 || !pathInfo.isFile() || pathInfo.isSymbolicLink() || pathInfo.nlink !== 1 || handleInfo.dev …` appears character-identically in 2 files — skills/webmcpify/templates/mutation-journal.js, skills/webmcpify/templates/mutation-journal.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 .github/extensions/resource-staleness-board/lib/state.mjs:12 — `!input || typeof input !== "object" || Array.isArray(input)` appears character-identically in 4 files — .github/extensions/resource-staleness-board/lib/state.mjs, extensions/chronicle-stats/insights.mjs, extensions/chronicle-stats/server.mjs, extensions/signals-dashboard/launch-profile.mjs. 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 website/src/components/brand/AgentsCatalog.tsx:254 — `!mobileFiltersOpen && styles.filterBodyCollapsed` appears character-identically in 6 files — website/src/components/brand/AgentsCatalog.tsx, website/src/components/brand/ExtensionsCatalog.tsx, website/src/components/brand/InstructionsCatalog.tsx, website/src/components/brand/LearningHubIndex.tsx. 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 extensions/agent-radar/extension.mjs:54 — `!origin || req.headers.host !== new URL(origin).host` appears character-identically in 2 files — extensions/agent-radar/extension.mjs, extensions/ai-credits-breakdown/server.mjs. 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 skills/webmcpify/templates/mutation-journal.js:413 — `!owner || !Array.isArray(owner.mutationExecutions)` appears character-identically in 2 files — skills/webmcpify/templates/mutation-journal.js, skills/webmcpify/templates/mutation-journal.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 skills/webmcpify/templates/mutation-journal.js:154 — `!parent || parent.owner !== owner || parent.entry.parentExecutionId` appears character-identically in 2 files — skills/webmcpify/templates/mutation-journal.js, skills/webmcpify/templates/mutation-journal.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 skills/webmcpify/templates/mutation-journal.js:422 — `!parent || parentOwner !== owner || unrelated.length > 0` appears character-identically in 2 files — skills/webmcpify/templates/mutation-journal.js, skills/webmcpify/templates/mutation-journal.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 skills/webmcpify/templates/mutation-journal.js:213 — `!pathInfo.isFile() || pathInfo.isSymbolicLink() || pathInfo.nlink !== 1 || pathInfo.dev !== info.dev || pathInfo.ino !== info.ino` appears character-identically in 2 files — skills/webmcpify/templates/mutation-journal.js, skills/webmcpify/templates/mutation-journal.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 skills/webmcpify/templates/mutation-journal.js:446 — `!persisted || JSON.stringify(persisted) !== JSON.stringify(execution)` appears character-identically in 2 files — skills/webmcpify/templates/mutation-journal.js, skills/webmcpify/templates/mutation-journal.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 extensions/foundry-agentic-loop-workflow/lib/args.mjs:61 — `!raw || typeof raw !== "object" || Array.isArray(raw)` appears character-identically in 2 files — extensions/foundry-agentic-loop-workflow/lib/args.mjs, 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 eng/external-plugin-validation.mjs:352 — `!source || typeof source !== "object" || Array.isArray(source)` appears character-identically in 2 files — eng/external-plugin-validation.mjs, skills/build-evidence-map/scripts/contract.mjs. 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:119 — `!url.pathname.startsWith("/api/") && url.pathname !== "/events"` appears character-identically in 2 files — REDACTED, 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 eng/external-plugin-quality-gates.mjs:283 — `!value || typeof value !== "object" || Array.isArray(value)` appears character-identically in 6 files — eng/external-plugin-quality-gates.mjs, eng/external-plugin-validation.mjs, REDACTED, 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 eng/external-plugin-intake.mjs:711 — `/^[0-9a-f]+$/i.test(ref) && ref.length !== 40` appears character-identically in 2 files — eng/external-plugin-intake.mjs, eng/external-plugin-validation.mjs. 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.
D16 · Bus Factor · Off-boarding risk · ×4
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 9 significant file(s) lose their only recent owner: REDACTED, REDACTED, extensions/pr-artifact-explorer/github.mjs, extensions/pr-artifact-explorer/extension.mjs, extensions/pr-artifact-explorer/zip.mjs, extensions/pr-artifact-explorer/cache.mjs, extensions/pr-artifact-explorer/preview.mjs, extensions/pr-artifact-explorer/detector.mjs (+1 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 7 significant file(s) lose their only recent owner: eng/external-plugin-intake.mjs, eng/external-plugin-validation.mjs, eng/agent-plugin-schema.mjs, eng/pr-risk-scan.mjs, eng/materialize-plugins.mjs, eng/external-plugin-pr-quality-gates.mjs, eng/external-plugin-intake-state.mjs. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 5 significant file(s) lose their only recent owner: REDACTED, REDACTED, extensions/signals-dashboard/local-delegation.mjs, extensions/daily-focus-board/extension.mjs, extensions/signals-dashboard/launch-profile.mjs. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #4 — If anonymized user #4 becomes unavailable, 4 significant file(s) lose their only recent owner: REDACTED, cookbook/copilot-sdk/java/recipe/PRVisualization.java, cookbook/copilot-sdk/java/recipe/AccessibilityReport.java, cookbook/copilot-sdk/java/recipe/ManagingLocalFiles.java. Pair on, review, or document these before any departure.
D7 · Architectural Integrity · Classify ADR enforcement · ×4
  • Classify ADR enforcement: Step 9: Convergence verify skills/copilot-pr-autopilot/references/09-convergence.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: MOS Technology 6502 Microprocessor Specification skills/legacy-circuit-mockups/references/6502.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: MOS Technology 6522 Versatile Interface Adapter (VIA) skills/legacy-circuit-mockups/references/6522.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: 7400-Series Logic ICs Specification skills/legacy-circuit-mockups/references/7400-series.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
M4 · Documentation accuracy · README/code drift · ×4
  • README/code drift docs/README.agents.md:175 — docs/README.agents.md names React 16, but the manifest declares `react` ^19.2.8. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/README.agents.md:176 — docs/README.agents.md names React 18, but the manifest declares `react` ^19.2.8. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift plugins/fluentui-blazor/README.md:13 — plugins/fluentui-blazor/README.md names .NET 10, but the projects target .NET 8. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift skills/webmcpify/tests/README.md:4 — skills/webmcpify/tests/README.md names Node.js 20, but the repository declares engines `>=22`. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
X7 · Silent fallback defaults · Silent fallback default on parse failure · ×4
  • Silent fallback default on parse failure REDACTED:64 — `extract_python` returns `set()` when `(SyntaxError, ValueError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default on parse failure REDACTED:109 — `load_cache` returns `{}` when `(OSError, ValueError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default on parse failure skills/convert-word-to-md/scripts/convert_word_to_md.py:98 — `_document_order_media` returns `[]` when `ET.ParseError` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default on parse failure skills/poka-yoke/scripts/detect_hazards.py:392 — `scan_file` returns `[]` when `(OSError, UnicodeDecodeError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
P2 · Observability · Console output used as the logging channel · ×3
  • Console output used as the logging channel website/src/lib/detail-page.ts:136 — `website/src/lib/detail-page.ts` reports through `console.*` at line 136 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 website/src/lib/sanitize-html.ts:109 — `website/src/lib/sanitize-html.ts` reports through `console.*` at line 109 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 website/src/components/brand/pagefindSearch.ts:134 — `website/src/components/brand/pagefindSearch.ts` reports through `console.*` at line 134 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 18 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (48 single-owned of 272 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 272 of the 345 production source files in this repository met that bar). They are anonymized user #5 (3 file(s)), anonymized user #6 (2 file(s)), anonymized user #7 (2 file(s)), anonymized user #8 (2 file(s)), anonymized user #9 (1 file(s)), anonymized user #10 (1 file(s)) (+12 more) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: extensions/work-hub/data.mjs, extensions/work-hub/extension.mjs, extensions/where-was-i/git-context.mjs, skills/docs-sync-audit/scripts/docs_drift.py, skills/test-gap-audit/scripts/coverage_map.py, skills/publish-to-pages/scripts/convert-pptx.py, skills/publish-to-pages/scripts/convert-pdf.py, cookbook/copilot-sdk/nodejs/recipe/ralph-loop.ts (+15 more).
D24 · Comment Value · redundant comment · ×1
  • redundant comment skills/winmd-api-search/scripts/cache-generator/Program.cs:141 — "Find packages that contain WinMD files" repeats the code it sits on: 5 of its 6 words (find, packages, win, md, files) are already in `var packages = NuGetResolver.FindPackagesWithWinMd(projectDir, projectFile, winAppSdkRuntimePath);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
D34 · Knowledge Freshness · Further orphaned files (smaller) · ×1
  • Further orphaned files (smaller) — 39 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: extensions/java-modernization-studio/doctor.mjs, skills/datanalysis-credit-risk/scripts/example.py, extensions/apng-studio/qr.mjs, extensions/java-modernization-studio/server.mjs, skills/convert-excel-to-md/scripts/convert_excel_to_md.py, skills/code-tour/scripts/validate_tour.py, skills/mini-context-graph/scripts/contextgraph.py, skills/convert-pdf-to-md/scripts/convert_pdf_to_md.py (and 31 more) (49 orphaned of 272 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 272 of the 345 production source files in this repository met that bar). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M3 · Folder & project structure · No src/ separation · ×1
  • No src/ separation — Production code isn't grouped under a src/ folder — it's spread across several top-level directories, so there's no one place that says 'this is the product'.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 3/32 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `.`, `cookbook/copilot-sdk/python/recipe`, `extensions/accessibility-kanban`, `extensions/backlog-swipe-triage` and 24 more.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST .github/workflows/canvas-smoke-test.yml:8 — No static application security testing detected. For this repository's stack, add bandit, `semgrep --config=p/python`, or CodeQL's python pack as a CI step. What was searched, so you can tell an absence from a miss: the 1471707 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 skills/winmd-api-search/scripts/cache-generator/CacheGenerator.csproj:11 — `skills/winmd-api-search/scripts/cache-generator/CacheGenerator.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`.
R7 · Dead Code · Unused export 'EXTERNAL_PLUGIN_INTAKE_LABELS' · ×1
  • Unused export 'EXTERNAL_PLUGIN_INTAKE_LABELS' eng/external-plugin-intake-state.mjs:1 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'shapeAt' · ×1
  • Unused export 'shapeAt' extensions/draw/lib/geometry.mjs:617 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'boxContains' · ×1
  • Unused export 'boxContains' extensions/draw/lib/geometry.mjs:629 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'GRID' · ×1
  • Unused export 'GRID' extensions/draw/lib/model.mjs:4 — Nothing imports this binding — it is safe to review for removal.
X5 · Nullable reference types · Null-forgiving operator (`!`) suppressions reduce the NRT score · ×1
  • Null-forgiving operator (`!`) suppressions reduce the NRT score — ~0.9 `!` suppressions per 1k syntax nodes — 5 suppression(s) across the 5874 syntax node(s) in code where nullable warnings are ENABLED, which is the only code a `!` can suppress anything in (a `!` under `#nullable disable` is inert and is not counted, and its file's nodes are not in the denominator). Each one tells the compiler to trust you about null, suppressing the very safety NRTs provide.
X7 · Silent fallback defaults · Silent fallback default on error · ×1
  • Silent fallback default on error cookbook/copilot-sdk/go/recipe/pr-visualization.go:29 — `getGitHubRemote` turns a non-nil `err` into `return ""` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. 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 `if` or in the doc comment, and the row stops firing.
X9 · Subsumed condition operand · Subsumed condition operand · ×1
  • Subsumed condition operand eng/pr-risk-scan.mjs:23 — `value.startsWith("//")` can never decide this `||` — every value satisfying `value.startsWith("//")` also satisfies `value.startsWith("/")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Minor — 22 finding(s)
D10 · Test Quality · Skipped (documented) · ×21
  • Skipped (documented): does not dereference untracked symlinks extensions/where-was-i/git-context.test.mjs:193 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): preserves executable mode for untracked files extensions/where-was-i/git-context.test.mjs:220 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): real Chromium emulates the preset and saves a PNG extensions/pr-artifact-explorer/capture.test.mjs:49 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): controlled browser keeps real history, current state and viewport/zoom separation extensions/pr-artifact-explorer/capture.test.mjs:84 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): an explicit viewport applies to an already-open controlled session, and omitting it keeps the current one extensions/pr-artifact-explorer/capture.test.mjs:154 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): closing while the browser is still starting leaves nothing running extensions/pr-artifact-explorer/capture.test.mjs:180 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): JUnit viewer detects, aggregates, escapes and falls back in real Chromium extensions/pr-artifact-explorer/media-junit.test.mjs:114 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): late async responses cannot overwrite the selected mode or file extensions/pr-artifact-explorer/mode-race.test.mjs:33 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): breadcrumb Back/Forward keeps independent in-canvas route history extensions/pr-artifact-explorer/nav-history.test.mjs:30 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): owned artifact pages follow the CURRENT theme in controlled browsing and capture extensions/pr-artifact-explorer/owned-theme.test.mjs:31 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): PR detail loading covers header, summary, badge and table extensions/pr-artifact-explorer/pull-loading.test.mjs:26 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): report filter, query and details survive Preview/Raw toggles extensions/pr-artifact-explorer/report-state.test.mjs:29 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): Chromium dialog: cancel sends no POST, confirm sends one, failure keeps the cache and artifacts extensions/pr-artifact-explorer/rerun.test.mjs:211 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): canvas contract pin: foundry-agentic-loop-canvas reads what the workflow writes and accepts the same args extensions/foundry-agentic-loop-workflow/tests/workflow.test.mjs:731 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): readRegularFile and checkExtensionModules refuse symlinked files eng/canvas-smoke-test.test.mjs:526 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): preview rejects a final-component symlink eng/resource-staleness-preview.test.mjs:46 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): rejects an mcp.json symlink outside the plugin root eng/validate-plugins.test.mjs:44 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): reports a dangling mcp.json symlink eng/validate-plugins.test.mjs:60 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): rejects plugin-relative paths that traverse a symlink outside the root eng/validate-plugins.test.mjs:260 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): rejects command and PLUGIN_ROOT cwd paths through a dangling symlink eng/validate-plugins.test.mjs:283 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): accepts PLUGIN_DATA paths without checking unrelated plugin symlinks eng/validate-plugins.test.mjs:304 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
D12 · Dependency Hygiene · Dependency hygiene PARTLY measured · ×1
  • Dependency hygiene PARTLY measured — Python dependencies read, no exact pin to grade for currency — This repository's Python dependencies were read: 6 shipped distribution(s) across 5 manifest(s) (0 development or optional declaration(s) excluded, because a consumer does not install them). Whether any of them is behind its current release is the dependency-CURRENCY question, and no declaration here carries an EXACT pin to ask it about — every one is a floor or a range, which installs the newest release it admits and therefore cannot be behind one. That is a healthy declaration style, NOT a defect and NOT a gap in this analyzer; there is simply no currency question to answer. This is NOT a finding that these dependencies are current or healthy. Lockfiles are deliberately not read (poetry.lock, uv.lock, Pipfile.lock, pdm.lock): the four disagree about dev/optional membership, and misreading one would charge a test-only package a consumer never receives. Known CVEs in the same dependency graph are a separate question, reported under D30.

Appendix B — Reproduction & audit trail

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

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-5c882c4f1f8c44209bca6e453c0df446/history.json --exit-code 0 --source .3artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-5c882c4f1f8c44209bca6e453c0df446/tree.json --exit-code 0 --source .3artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --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 extensions/flight-map-canvas/game/vendor .103artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update5artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .0artifacts/raw/trivy-config.json
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 19 file(s) — `cookbook/copilot-sdk/dotnet/recipe/accessibility-report.cs`, `cookbook/copilot-sdk/dotnet/recipe/error-handling.cs`, `cookbook/copilot-sdk/dotnet/recipe/in-process-runtime.cs`, `cookbook/copilot-sdk/dotnet/recipe/managing-local-files.cs`, `cookbook/copilot-sdk/dotnet/recipe/multiple-sessions.cs`, … (+14 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update0artifacts/raw/trivy-fs.json

Run 01a18892-88e8-7684-95a3-beaf89b687e3 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Appendix C — Personal-data map

Every field, property and record parameter whose name is conventional personal data — 1 field(s) across 1 category, each with an exact repo-relative file:line. This is the data inventory a compliance review starts from — right-to-erasure, retention, minimisation. Detected by NAME, from the C# syntax tree, with a deliberately specific identifier classifier — the same one the C1–C5 compliance cards use to decide whether personal data is present, so CardDefinition or FileName don't trip. Two caveats stated rather than glossed: those cards additionally require corroboration (a persistence/account signal, or two distinct PII categories) that this inventory deliberately does not, so it lists more than they gate on; and D32 Data Compliance shares nothing with it — that dimension is a separate semgrep ruleset for personal data leaking into logs, URLs and browser storage, and a clean D32 result says nothing about this list. Informational — it feeds no score.

Name — 1 field(s)
  • WinMdTypeInfo.FullName skills/winmd-api-search/scripts/cache-generator/Program.cs:289

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