Public report of moeru-ai/airi, published 26 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 reportMeasured 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, 26 October 2026, 16:07 UTC · Survey ID cd_8bf1a99a8851499baff495340e556e92
moeru-ai/airi
Measured 26 October 2026, 15:45 UTC, at code version 003ab51
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.
Boundary Type-Coupling is not measured: Bounded contexts not declared.
CAI scoreAdequate
CriticalWeakAdequateStrongExemplary
Down 6 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: 353,713 lines of product code in 82 projects, tests not counted · Estimated rebuild effort: about 4.2 person-years · Weakest lens: Production Readiness, 39
Findings by how serious they are
320 critical1231 serious205 minor
9 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
26 October 2026, 15:45 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds Watchdog. It is open to any tool that
implements it, and today Watchdog is the only one that does.
The score is deterministic, which means the same code always gets the same score. Watchdog works it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
82of 82 dimensions measured by tools.
1717of 1756 findings point to an exact file and line, so you can open each one in the code. The other 39 concern the repository as a whole, such as missing documentation.
82dimensions across 7 lenses, read from 353,713 lines of product code in 82 projects.
moeru-ai/airi falls short of our standard for a preview release because two passwords or keys sit in the current code and we found no automated security scanning of the code, its secrets or its dependencies. It scores 48 out of 100 and is rated Adequate, and 264 of its 320 critical findings are security problems.
Production Readiness, at 39, is the weakest lens and counts most in the score. The best first step is replacing the two exposed passwords or keys and switching the old ones off, worth about 8 points. Making the three tests that check nothing check their results comes next, worth about 4 points. Raising Production Readiness to 62 would lift the score to about 56.
161 pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Forty-one known security holes in the packages the code depends on can be used by attackers, and thirty-nine secrets can leak from the build pipeline. Pinning each tool to an exact version, updating the vulnerable packages and limiting each secret to its own step would close these risks. Passing outside input through environment variables would fix the nine pipeline steps that put outside input straight into a shell command, and the seven unsafe settings in infrastructure or container files need changing to safe values. The 40 pieces of business logic tied to the database or web code need separating from the database and web code.
The product code is 353,713 lines, about €610,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 forThe 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.
If Production Readiness rose from 39 to 62, the lowest score rated Strong, the score would rise from 48 to about 56.
Code composition: what the lines of code are
Business logic 3%Supporting code 3%Tests 94%
New since the last survey: 326 findings
These 326 critical or serious findings weren't in the previous survey, on 12 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.
God Classes · FunctionTooLong: settings-search.createSettingsSearch packages/stage-pages/src/vite/settings-search.ts
God Classes · FunctionTooLong: render.renderMath packages/speech-transformer-math/src/render.ts
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: 1696 findings
These 1696 critical or serious findings were in the previous survey, on 12 October 2026, and are gone from this one. The first 100 are listed here.
God Classes · FunctionTooLong: expression-store.useExpressionStore packages/stage-ui-live2d/src/stores/expression-store.ts
God Classes · FunctionTooLong: runtime.createComputerUseRuntime apps/stage-tamagotchi/src/main/services/airi/computer-use/runtime.ts
God Classes · FunctionTooLong: expression-controller.useExpressionController packages/stage-ui-live2d/src/composables/live2d/expression-controller.ts
Test Quality · No assertions: returns from hearing to mobile settings without stacked dialogs apps/stage-tamagotchi-kirie/src-web/src/renderer/components/InteractiveArea.browser.test.ts
Test Quality · No assertions: shows the past revisions of a card and restores one packages/stage-pages/src/pages/settings/airi-card/components/CardDetailDialog.browser.test.ts
Code Duplication · Duplicated block with local edits (58 matched lines × 2 locations) apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/spotlight.vue
Rebuild cost: about €610,000 · Estimate
Cost to rebuild
€200,000 to €1,000,000, for 3,377 to 10,720 hours of work, about 4.2 person-years for 2 to 8 engineers
Difficulty of the problem
High, 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 48. 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.
Size
Large: 353,713 lines of product code
Comment lines
The estimate prices 352,808 lines. Comment lines count towards the size of 353,713 lines but aren't priced as work.
What it is not
Not 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 Leaked secret finding(s) in Secret Scanning — start with REDACTED, REDACTED.
Raises the score by about 8 points · Low effort · Secret Scanning
2
Resolve the 3 No assertions (empty test) finding(s) in Test Quality — start with audio-input.test.ts, home-assistant.browser.test.ts, chat-window-style-menu.browser.test.ts.
Raises the score by about 4 points · Low effort · Test Quality
3
Add a SAST step to CI running what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — so a security regression fails the build instead of landing.
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 €610,000 to build again, about 4.2 person-years of work. Its weakest lens is Production Readiness, at 39 (Weak). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 2 Leaked secret finding(s) in Secret Scanning. Of all the actions in this report, it raises the score most for the work it takes: about 8 points for low effort, because it clears the 2 Secret Scanning findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.
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.
1466 modules, with 1369 dependencies between them. 4 loops run through 12 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 1426 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.
4 pairs of types, where a type in apps.stage-tamagotchi-kirie.src-web.src.renderer.host-context uses a type in apps.stage-tamagotchi-kirie.src-web.src.shared.eventa.
apps.stage-tamagotchi-kirie.src-web.src.renderer.host-context uses apps.stage-tamagotchi-kirie.src-web.src.shared.eventa, so a change to apps.stage-tamagotchi-kirie.src-web.src.shared.eventa can break apps.stage-tamagotchi-kirie.src-web.src.renderer.host-context, while a change to apps.stage-tamagotchi-kirie.src-web.src.renderer.host-context can't break apps.stage-tamagotchi-kirie.src-web.src.shared.eventa.
Position
Below the diagonal: apps.stage-tamagotchi-kirie.src-web.src.renderer.host-context uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in apps.stage-tamagotchi-kirie.src-web.src.renderer.host-context uses a type in packages.stage-shared.src.global-shortcut.types.
apps.stage-tamagotchi-kirie.src-web.src.renderer.host-context uses packages.stage-shared.src.global-shortcut.types, so a change to packages.stage-shared.src.global-shortcut.types can break apps.stage-tamagotchi-kirie.src-web.src.renderer.host-context, while a change to apps.stage-tamagotchi-kirie.src-web.src.renderer.host-context can't break packages.stage-shared.src.global-shortcut.types.
Position
Below the diagonal: apps.stage-tamagotchi-kirie.src-web.src.renderer.host-context uses a module listed above it, which is the healthy direction.
apps.stage-tamagotchi.src.shared.eventa uses apps.stage-tamagotchi-kirie.src-web.src.shared.eventa, so a change to apps.stage-tamagotchi-kirie.src-web.src.shared.eventa can break apps.stage-tamagotchi.src.shared.eventa, while a change to apps.stage-tamagotchi.src.shared.eventa can't break apps.stage-tamagotchi-kirie.src-web.src.shared.eventa.
Position
Below the diagonal: apps.stage-tamagotchi.src.shared.eventa uses a module listed above it, which is the healthy direction.
integrations.minecraft.src.cognitive.types uses integrations.vscode.vscode-airi.src.airi, so a change to integrations.vscode.vscode-airi.src.airi can break integrations.minecraft.src.cognitive.types, while a change to integrations.minecraft.src.cognitive.types can't break integrations.vscode.vscode-airi.src.airi.
Position
Below the diagonal: integrations.minecraft.src.cognitive.types uses a module listed above it, which is the healthy direction.
19→31 integrations.minecraft.src.libs.mineflayer.core uses integrations.minecraft.src.libs.mineflayer.plugin-runtimepart of a loop✕
Connections
1 pair of types, where a type in integrations.minecraft.src.libs.mineflayer.core uses a type in integrations.minecraft.src.libs.mineflayer.plugin-runtime.
integrations.minecraft.src.libs.mineflayer.core uses integrations.minecraft.src.libs.mineflayer.plugin-runtime, so a change to integrations.minecraft.src.libs.mineflayer.plugin-runtime can break integrations.minecraft.src.libs.mineflayer.core, while a change to integrations.minecraft.src.libs.mineflayer.core can't break integrations.minecraft.src.libs.mineflayer.plugin-runtime.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
packages.core-agent.src.runtime uses packages.core-agent.src.messages.types, so a change to packages.core-agent.src.messages.types can break packages.core-agent.src.runtime, while a change to packages.core-agent.src.runtime can't break packages.core-agent.src.messages.types.
Position
Below the diagonal: packages.core-agent.src.runtime uses a module listed above it, which is the healthy direction.
packages.core-agent.src.runtime uses packages.plugin-protocol.src.types.events, so a change to packages.plugin-protocol.src.types.events can break packages.core-agent.src.runtime, while a change to packages.core-agent.src.runtime can't break packages.plugin-protocol.src.types.events.
Position
Below the diagonal: packages.core-agent.src.runtime uses a module listed above it, which is the healthy direction.
packages.core-agent.src.runtime uses packages.provider-inference.src.types, so a change to packages.provider-inference.src.types can break packages.core-agent.src.runtime, while a change to packages.core-agent.src.runtime can't break packages.provider-inference.src.types.
Position
Below the diagonal: packages.core-agent.src.runtime uses a module listed above it, which is the healthy direction.
packages.core-agent.src.voice.controller uses packages.core-agent.src.voice.input.types, so a change to packages.core-agent.src.voice.input.types can break packages.core-agent.src.voice.controller, while a change to packages.core-agent.src.voice.controller can't break packages.core-agent.src.voice.input.types.
Position
Below the diagonal: packages.core-agent.src.voice.controller uses a module listed above it, which is the healthy direction.
packages.core-agent.src.voice.controller uses packages.pipelines-audio.src.audio-input, so a change to packages.pipelines-audio.src.audio-input can break packages.core-agent.src.voice.controller, while a change to packages.core-agent.src.voice.controller can't break packages.pipelines-audio.src.audio-input.
Position
Below the diagonal: packages.core-agent.src.voice.controller uses a module listed above it, which is the healthy direction.
packages.pipelines-audio.src uses packages.pipelines-audio.src.audio-input, so a change to packages.pipelines-audio.src.audio-input can break packages.pipelines-audio.src, while a change to packages.pipelines-audio.src can't break packages.pipelines-audio.src.audio-input.
Position
Below the diagonal: packages.pipelines-audio.src uses a module listed above it, which is the healthy direction.
packages.stage-ui.src.composables uses packages.core-agent.src.voice.input.types, so a change to packages.core-agent.src.voice.input.types can break packages.stage-ui.src.composables, while a change to packages.stage-ui.src.composables can't break packages.core-agent.src.voice.input.types.
Position
Below the diagonal: packages.stage-ui.src.composables uses a module listed above it, which is the healthy direction.
packages.stage-ui.src.stores.chat uses packages.core-agent.src.messages.types, so a change to packages.core-agent.src.messages.types can break packages.stage-ui.src.stores.chat, while a change to packages.stage-ui.src.stores.chat can't break packages.core-agent.src.messages.types.
Position
Below the diagonal: packages.stage-ui.src.stores.chat uses a module listed above it, which is the healthy direction.
packages.stage-ui.src.stores.modules uses packages.provider-inference.src.types, so a change to packages.provider-inference.src.types can break packages.stage-ui.src.stores.modules, while a change to packages.stage-ui.src.stores.modules can't break packages.provider-inference.src.types.
Position
Below the diagonal: packages.stage-ui.src.stores.modules uses a module listed above it, which is the healthy direction.
server.apps.auth.src uses integrations.minecraft.src.libs.mineflayer.types, so a change to integrations.minecraft.src.libs.mineflayer.types can break server.apps.auth.src, while a change to server.apps.auth.src can't break integrations.minecraft.src.libs.mineflayer.types.
Position
Below the diagonal: server.apps.auth.src uses a module listed above it, which is the healthy direction.
services.computer-use-mcp.src.state uses services.computer-use-mcp.src.types, so a change to services.computer-use-mcp.src.types can break services.computer-use-mcp.src.state, while a change to services.computer-use-mcp.src.state can't break services.computer-use-mcp.src.types.
Position
Below the diagonal: services.computer-use-mcp.src.state uses a module listed above it, which is the healthy direction.
apps.stage-tamagotchi.src.renderer.composables uses packages.stage-shared.src.global-shortcut.types, so a change to packages.stage-shared.src.global-shortcut.types can break apps.stage-tamagotchi.src.renderer.composables, while a change to apps.stage-tamagotchi.src.renderer.composables can't break packages.stage-shared.src.global-shortcut.types.
Position
Below the diagonal: apps.stage-tamagotchi.src.renderer.composables uses a module listed above it, which is the healthy direction.
apps.stage-tamagotchi.src.renderer.composables uses apps.stage-tamagotchi.src.shared.eventa, so a change to apps.stage-tamagotchi.src.shared.eventa can break apps.stage-tamagotchi.src.renderer.composables, while a change to apps.stage-tamagotchi.src.renderer.composables can't break apps.stage-tamagotchi.src.shared.eventa.
Position
Below the diagonal: apps.stage-tamagotchi.src.renderer.composables uses a module listed above it, which is the healthy direction.
integrations.minecraft.src.cognitive.conscious uses integrations.minecraft.src.cognitive.types, so a change to integrations.minecraft.src.cognitive.types can break integrations.minecraft.src.cognitive.conscious, while a change to integrations.minecraft.src.cognitive.conscious can't break integrations.minecraft.src.cognitive.types.
Position
Below the diagonal: integrations.minecraft.src.cognitive.conscious uses a module listed above it, which is the healthy direction.
integrations.minecraft.src.cognitive.conscious uses integrations.minecraft.src.libs.mineflayer.core, so a change to integrations.minecraft.src.libs.mineflayer.core can break integrations.minecraft.src.cognitive.conscious, while a change to integrations.minecraft.src.cognitive.conscious can't break integrations.minecraft.src.libs.mineflayer.core.
Position
Below the diagonal: integrations.minecraft.src.cognitive.conscious uses a module listed above it, which is the healthy direction.
integrations.minecraft.src.cognitive.conscious.brain uses integrations.minecraft.src.cognitive.types, so a change to integrations.minecraft.src.cognitive.types can break integrations.minecraft.src.cognitive.conscious.brain, while a change to integrations.minecraft.src.cognitive.conscious.brain can't break integrations.minecraft.src.cognitive.types.
Position
Below the diagonal: integrations.minecraft.src.cognitive.conscious.brain uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in integrations.minecraft.src.libs.mineflayer.plugin-runtime uses a type in integrations.minecraft.src.libs.mineflayer.core.
integrations.minecraft.src.libs.mineflayer.plugin-runtime uses integrations.minecraft.src.libs.mineflayer.core, so a change to integrations.minecraft.src.libs.mineflayer.core can break integrations.minecraft.src.libs.mineflayer.plugin-runtime, while a change to integrations.minecraft.src.libs.mineflayer.plugin-runtime can't break integrations.minecraft.src.libs.mineflayer.core.
Position
Below the diagonal: integrations.minecraft.src.libs.mineflayer.plugin-runtime uses a module listed above it, which is the healthy direction.
packages.stage-ui.src.stores uses packages.core-agent.src.messages.types, so a change to packages.core-agent.src.messages.types can break packages.stage-ui.src.stores, while a change to packages.stage-ui.src.stores can't break packages.core-agent.src.messages.types.
Position
Below the diagonal: packages.stage-ui.src.stores uses a module listed above it, which is the healthy direction.
packages.stage-ui.src.stores uses packages.core-agent.src.voice.input.types, so a change to packages.core-agent.src.voice.input.types can break packages.stage-ui.src.stores, while a change to packages.stage-ui.src.stores can't break packages.core-agent.src.voice.input.types.
Position
Below the diagonal: packages.stage-ui.src.stores uses a module listed above it, which is the healthy direction.
packages.stage-ui.src.stores uses packages.pipelines-audio.src.audio-input, so a change to packages.pipelines-audio.src.audio-input can break packages.stage-ui.src.stores, while a change to packages.stage-ui.src.stores can't break packages.pipelines-audio.src.audio-input.
Position
Below the diagonal: packages.stage-ui.src.stores uses a module listed above it, which is the healthy direction.
packages.stage-ui.src.stores uses packages.provider-inference.src.types, so a change to packages.provider-inference.src.types can break packages.stage-ui.src.stores, while a change to packages.stage-ui.src.stores can't break packages.provider-inference.src.types.
Position
Below the diagonal: packages.stage-ui.src.stores uses a module listed above it, which is the healthy direction.
packages.stage-ui.src.stores uses packages.stage-ui.src.stores.chat, so a change to packages.stage-ui.src.stores.chat can break packages.stage-ui.src.stores, while a change to packages.stage-ui.src.stores can't break packages.stage-ui.src.stores.chat.
Position
Below the diagonal: packages.stage-ui.src.stores uses a module listed above it, which is the healthy direction.
services.computer-use-mcp.src.server.runtime uses services.computer-use-mcp.src.types, so a change to services.computer-use-mcp.src.types can break services.computer-use-mcp.src.server.runtime, while a change to services.computer-use-mcp.src.server.runtime can't break services.computer-use-mcp.src.types.
Position
Below the diagonal: services.computer-use-mcp.src.server.runtime uses a module listed above it, which is the healthy direction.
services.computer-use-mcp.src.server.runtime uses services.computer-use-mcp.src.state, so a change to services.computer-use-mcp.src.state can break services.computer-use-mcp.src.server.runtime, while a change to services.computer-use-mcp.src.server.runtime can't break services.computer-use-mcp.src.state.
Position
Below the diagonal: services.computer-use-mcp.src.server.runtime uses a module listed above it, which is the healthy direction.
integrations.minecraft.src.cognitive.container uses integrations.vscode.vscode-airi.src.airi, so a change to integrations.vscode.vscode-airi.src.airi can break integrations.minecraft.src.cognitive.container, while a change to integrations.minecraft.src.cognitive.container can't break integrations.vscode.vscode-airi.src.airi.
Position
Below the diagonal: integrations.minecraft.src.cognitive.container uses a module listed above it, which is the healthy direction.
integrations.minecraft.src.cognitive.container uses integrations.minecraft.src.cognitive.conscious.brain, so a change to integrations.minecraft.src.cognitive.conscious.brain can break integrations.minecraft.src.cognitive.container, while a change to integrations.minecraft.src.cognitive.container can't break integrations.minecraft.src.cognitive.conscious.brain.
Position
Below the diagonal: integrations.minecraft.src.cognitive.container uses a module listed above it, which is the healthy direction.
packages.plugin-sdk.src.plugin-host.shared.types uses packages.plugin-protocol.src.types.events, so a change to packages.plugin-protocol.src.types.events can break packages.plugin-sdk.src.plugin-host.shared.types, while a change to packages.plugin-sdk.src.plugin-host.shared.types can't break packages.plugin-protocol.src.types.events.
Position
Below the diagonal: packages.plugin-sdk.src.plugin-host.shared.types uses a module listed above it, which is the healthy direction.
3 pairs of types, where a type in packages.plugin-sdk.src.plugin-host.shared.types uses a type in integrations.minecraft.src.libs.mineflayer.plugin-runtime.
packages.plugin-sdk.src.plugin-host.shared.types uses integrations.minecraft.src.libs.mineflayer.plugin-runtime, so a change to integrations.minecraft.src.libs.mineflayer.plugin-runtime can break packages.plugin-sdk.src.plugin-host.shared.types, while a change to packages.plugin-sdk.src.plugin-host.shared.types can't break integrations.minecraft.src.libs.mineflayer.plugin-runtime.
Position
Below the diagonal: packages.plugin-sdk.src.plugin-host.shared.types uses a module listed above it, which is the healthy direction.
33 pairs of types, where a type in services.computer-use-mcp.src uses a type in services.computer-use-mcp.src.types. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
services.computer-use-mcp.src uses services.computer-use-mcp.src.types, so a change to services.computer-use-mcp.src.types can break services.computer-use-mcp.src, while a change to services.computer-use-mcp.src can't break services.computer-use-mcp.src.types.
Position
Below the diagonal: services.computer-use-mcp.src uses a module listed above it, which is the healthy direction.
services.computer-use-mcp.src uses services.computer-use-mcp.src.state, so a change to services.computer-use-mcp.src.state can break services.computer-use-mcp.src, while a change to services.computer-use-mcp.src can't break services.computer-use-mcp.src.state.
Position
Below the diagonal: services.computer-use-mcp.src uses a module listed above it, which is the healthy direction.
services.computer-use-mcp.src uses services.computer-use-mcp.src.server.runtime, so a change to services.computer-use-mcp.src.server.runtime can break services.computer-use-mcp.src, while a change to services.computer-use-mcp.src can't break services.computer-use-mcp.src.server.runtime.
Position
Below the diagonal: services.computer-use-mcp.src uses a module listed above it, which is the healthy direction.
26 pairs of types, where a type in services.computer-use-mcp.src.server uses a type in services.computer-use-mcp.src.types. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
services.computer-use-mcp.src.server uses services.computer-use-mcp.src.types, so a change to services.computer-use-mcp.src.types can break services.computer-use-mcp.src.server, while a change to services.computer-use-mcp.src.server can't break services.computer-use-mcp.src.types.
Position
Below the diagonal: services.computer-use-mcp.src.server uses a module listed above it, which is the healthy direction.
services.computer-use-mcp.src.server uses services.computer-use-mcp.src.state, so a change to services.computer-use-mcp.src.state can break services.computer-use-mcp.src.server, while a change to services.computer-use-mcp.src.server can't break services.computer-use-mcp.src.state.
Position
Below the diagonal: services.computer-use-mcp.src.server uses a module listed above it, which is the healthy direction.
services.computer-use-mcp.src.server uses services.computer-use-mcp.src.server.runtime, so a change to services.computer-use-mcp.src.server.runtime can break services.computer-use-mcp.src.server, while a change to services.computer-use-mcp.src.server can't break services.computer-use-mcp.src.server.runtime.
Position
Below the diagonal: services.computer-use-mcp.src.server uses a module listed above it, which is the healthy direction.
packages.plugin-sdk.src.plugin-host.core uses integrations.minecraft.src.libs.mineflayer.plugin-runtime, so a change to integrations.minecraft.src.libs.mineflayer.plugin-runtime can break packages.plugin-sdk.src.plugin-host.core, while a change to packages.plugin-sdk.src.plugin-host.core can't break integrations.minecraft.src.libs.mineflayer.plugin-runtime.
Position
Below the diagonal: packages.plugin-sdk.src.plugin-host.core uses a module listed above it, which is the healthy direction.
packages.plugin-sdk.src.plugin-host.core uses packages.plugin-sdk.src.plugin-host.shared.types, so a change to packages.plugin-sdk.src.plugin-host.shared.types can break packages.plugin-sdk.src.plugin-host.core, while a change to packages.plugin-sdk.src.plugin-host.core can't break packages.plugin-sdk.src.plugin-host.shared.types.
Position
Below the diagonal: packages.plugin-sdk.src.plugin-host.core uses a module listed above it, which is the healthy direction.
38→39 packages.plugin-sdk.src.plugin-host.core uses apps.stage-tamagotchi.src.main.services.airi.plugins.typespart of a loop✕
Connections
1 pair of types, where a type in packages.plugin-sdk.src.plugin-host.core uses a type in apps.stage-tamagotchi.src.main.services.airi.plugins.types.
packages.plugin-sdk.src.plugin-host.core uses apps.stage-tamagotchi.src.main.services.airi.plugins.types, so a change to apps.stage-tamagotchi.src.main.services.airi.plugins.types can break packages.plugin-sdk.src.plugin-host.core, while a change to packages.plugin-sdk.src.plugin-host.core can't break apps.stage-tamagotchi.src.main.services.airi.plugins.types.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
1 pair of types, where a type in apps.stage-tamagotchi.src.main.services.airi.plugins.types uses a type in packages.plugin-sdk.src.plugin-host.shared.types.
apps.stage-tamagotchi.src.main.services.airi.plugins.types uses packages.plugin-sdk.src.plugin-host.shared.types, so a change to packages.plugin-sdk.src.plugin-host.shared.types can break apps.stage-tamagotchi.src.main.services.airi.plugins.types, while a change to apps.stage-tamagotchi.src.main.services.airi.plugins.types can't break packages.plugin-sdk.src.plugin-host.shared.types.
Position
Below the diagonal: apps.stage-tamagotchi.src.main.services.airi.plugins.types uses a module listed above it, which is the healthy direction.
apps.stage-tamagotchi.src.main.services.airi.plugins.types uses packages.plugin-sdk.src.plugin-host.core, so a change to packages.plugin-sdk.src.plugin-host.core can break apps.stage-tamagotchi.src.main.services.airi.plugins.types, while a change to apps.stage-tamagotchi.src.main.services.airi.plugins.types can't break packages.plugin-sdk.src.plugin-host.core.
Position
Below the diagonal: apps.stage-tamagotchi.src.main.services.airi.plugins.types uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in apps.stage-tamagotchi.src.main.services.airi.plugins.host uses a type in packages.plugin-sdk.src.plugin-host.shared.types.
apps.stage-tamagotchi.src.main.services.airi.plugins.host uses packages.plugin-sdk.src.plugin-host.shared.types, so a change to packages.plugin-sdk.src.plugin-host.shared.types can break apps.stage-tamagotchi.src.main.services.airi.plugins.host, while a change to apps.stage-tamagotchi.src.main.services.airi.plugins.host can't break packages.plugin-sdk.src.plugin-host.shared.types.
Position
Below the diagonal: apps.stage-tamagotchi.src.main.services.airi.plugins.host uses a module listed above it, which is the healthy direction.
3 pairs of types, where a type in apps.stage-tamagotchi.src.main.services.airi.plugins.host uses a type in apps.stage-tamagotchi.src.main.services.airi.plugins.types.
apps.stage-tamagotchi.src.main.services.airi.plugins.host uses apps.stage-tamagotchi.src.main.services.airi.plugins.types, so a change to apps.stage-tamagotchi.src.main.services.airi.plugins.types can break apps.stage-tamagotchi.src.main.services.airi.plugins.host, while a change to apps.stage-tamagotchi.src.main.services.airi.plugins.host can't break apps.stage-tamagotchi.src.main.services.airi.plugins.types.
Position
Below the diagonal: apps.stage-tamagotchi.src.main.services.airi.plugins.host uses a module listed above it, which is the healthy direction.
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 category
Findings
Severity
A05:2025 — Injection
236
High / Critical
A03:2025 — Software Supply Chain Failures
69
High / Critical
A02:2025 — Security Misconfiguration
23
High / Critical
A07:2025 — Authentication Failures
2
High / Critical
Roadmap
Immediately resolve the two leaked secrets in REDACTED and REDACTED, then integrate a SAST step into CI to prevent future security regressions. Clean up the dependency tree by removing unused packages and explicitly declaring imports, while fixing the three empty tests in audio-input, home-assistant, and chat-window modules. Finally, enforce a strict boundary between domain logic and infrastructure by ensuring the ORM handles only data mapping, leaving domain entities framework-free.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 2 Leaked secret finding(s) in Secret Scanning — start with REDACTED, REDACTED.
Resolve the 3 No assertions (empty test) finding(s) in Test Quality — start with audio-input.test.ts, home-assistant.browser.test.ts, chat-window-style-menu.browser.test.ts.
Add a SAST step to CI running what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — so a security regression fails the build instead of landing.
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.
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 — 320
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 — 1231
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 — 205
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 9
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 82 of 82 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); none rely on LLM judgement. Overall confidence is 0.8 — 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 — 82 dimensions across the health lenses
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
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, 1717 of 1756 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.)
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.
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.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: the .NET half could not be measured — no coverage produced (collector absent, or test run exceeded the inline budget); the JavaScript/TypeScript half could not be measured — the dependency install for the repository root failed in the analyzer sandbox (throw new Error(), so the suite never ran. This repository's production source spans both ecosystems, and no partial figure is published as if it were the whole: coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo. In the meantime, commit (or publish into the working tree) the lcov/Cobertura report your CI produces and the real number is read on the next scan. You can widen what we reach: optional: commit the lcov/Cobertura report your CI produces, and the real number is read on the next scan.
D11 Test Reliability — 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. Test reliability NOT MEASURED: this repository's test suite spans .NET and JavaScript/TypeScript, and the JavaScript/TypeScript half could not be re-run — unit: measured (0 flaky); JavaScript/TypeScript (vitest via `pnpm install --frozen-lockfile --ignore-scripts` in the repository root; vitest via `pnpm install --frozen-lockfile --ignore-scripts` in apps/stage-web/; vitest via `pnpm install --frozen-lockfile --ignore-scripts` in evals/tts-speech-formula/; vitest via `pnpm install --frozen-lockfile --ignore-scripts` in integrations/minecraft/; vitest via `pnpm install --frozen-lockfile --ignore-scripts` in packages/agents/; vitest via `pnpm install --frozen-lockfile --ignore-scripts` in packages/better-ws/; vitest via `pnpm install --frozen-lockfile --ignore-scripts` in packages/cap-vite/; vitest via `pnpm install --frozen-lockfile --ignore-scripts` in packages/ccc/; vitest via `pnpm install --frozen-lockfile --ignore-scripts` in packages/i18n/; vitest via `pnpm install --frozen-lockfile --ignore-scripts` in packages/input-gamepad/; vitest via `pnpm install --frozen-lockfile --ignore-scripts` in packages/input-gamepad-vueuse/; vitest via `pnpm install --frozen-lockfile --ignore-scripts` in packages/input-playstation-dualsense-5/): not included — the dependency install for the repository root failed in the analyzer sandbox (throw new Error(), so the suite never ran. No partial figure is published as if it were the whole: reliability is excluded from the score rather than counted as a near-zero.
D11 Test Reliability — not measured this run — 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. Test reliability for the vitest suite in the repository root was NOT MEASURED: the dependency install for the repository root failed in the analyzer sandbox (throw new Error(), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D11 Test Reliability — not measured this run — 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. Test reliability for the vitest suite in apps/stage-web/ was NOT MEASURED: the dependency install for apps/stage-web/ failed in the analyzer sandbox (throw new Error(), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D11 Test Reliability — not measured this run — 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. Test reliability for the vitest suite in evals/tts-speech-formula/ was NOT MEASURED: the dependency install for evals/tts-speech-formula/ failed in the analyzer sandbox (throw new Error(), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D11 Test Reliability — not measured this run — 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. Test reliability for the vitest suite in integrations/minecraft/ was NOT MEASURED: the dependency install for integrations/minecraft/ failed in the analyzer sandbox (throw new Error(), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D11 Test Reliability — not measured this run — 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. Test reliability for the vitest suite in packages/agents/ was NOT MEASURED: the dependency install for packages/agents/ failed in the analyzer sandbox (throw new Error(), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D11 Test Reliability — not measured this run — 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. Test reliability for the vitest suite in packages/better-ws/ was NOT MEASURED: the dependency install for packages/better-ws/ failed in the analyzer sandbox (throw new Error(), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D11 Test Reliability — not measured this run — 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. Test reliability for the vitest suite in packages/cap-vite/ was NOT MEASURED: the dependency install for packages/cap-vite/ failed in the analyzer sandbox (throw new Error(), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D11 Test Reliability — not measured this run — 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. Test reliability for the vitest suite in packages/ccc/ was NOT MEASURED: the dependency install for packages/ccc/ failed in the analyzer sandbox (throw new Error(), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D11 Test Reliability — not measured this run — 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. Test reliability for the vitest suite in packages/i18n/ was NOT MEASURED: the dependency install for packages/i18n/ failed in the analyzer sandbox (throw new Error(), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D11 Test Reliability — not measured this run — 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. Test reliability for the vitest suite in packages/input-gamepad/ was NOT MEASURED: the dependency install for packages/input-gamepad/ failed in the analyzer sandbox (throw new Error(), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D11 Test Reliability — not measured this run — 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. Test reliability for the vitest suite in packages/input-gamepad-vueuse/ was NOT MEASURED: the dependency install for packages/input-gamepad-vueuse/ failed in the analyzer sandbox (throw new Error(), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D11 Test Reliability — not measured this run — 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. Test reliability for the vitest suite in packages/input-playstation-dualsense-5/ was NOT MEASURED: the dependency install for packages/input-playstation-dualsense-5/ failed in the analyzer sandbox (throw new Error(), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D12 Dependency Hygiene — 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. `dotnet list package` did not return usable output (restore or query failed); no outdated/vulnerable/deprecated data to assess. The tool said: `dotnet list package` exited 1 with no output.
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.2/KLoC density on this row were taken over this repository's .NET projects ALONE: .ts (232,334 lines, 95% of production source) went unread, because every marker collector on this path is reached through a C# workspace. A read-only sweep of that source finds at least 107 task marker(s) (TODO/FIXME/HACK/XXX) across 74 file(s) that this score does not count — a floor, since only line comments are read there and D17's other eight marker kinds (suppressions, NoWarn, editorconfig severities, empty catches, commented-out code, Obsolete, dead code, preprocessor branches) need a compiler we do not have for that language. The debt in that source is UNMEASURED — its absence from the score above is a gap in this analyzer's language coverage, not a finding that the code carries none.
D19 Documentation Quality — measured, with a gap in what it reached — 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.
D23 Boundary Type-Coupling — 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. Large codebase (353,104 production LoC in the .NET projects) with no declared bounded contexts — cross-boundary type coupling is unassessed Bounded contexts cannot be inferred from a codebase that is not physically organised by them (D-321), so with none declared there are no boundaries for the coupling pass to measure across. You can widen what we reach: name this codebase's bounded contexts (≥2 module groups, e.g. per subsystem) so cross-boundary type coupling can be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — 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. 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. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in 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. `apps/stage-tamagotchi-kirie/src-godot/scripts/AiriDesktopContracts.cs`, `apps/stage-tamagotchi-kirie/src-godot/scripts/auth-service.cs`, `apps/stage-tamagotchi-kirie/src-godot/scripts/widget-contracts.cs`, `apps/stage-tamagotchi-kirie/src-godot/scripts/widget-window-manager.cs`, `apps/stage-tamagotchi-kirie/src-web/src/renderer/components/chat-tool-renderers/weather-tool-call-widget.ts`, … (+119 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. Boot via AndroidApp (apps/stage-pocket/android/app). the Android app did not build — `./gradlew :app:assembleDebug` exited 1: Where:
Build file 'apps/stage-pocket/android/app/build.gradle.kts' line: 89
* What went wrong:
A problem occurred evaluating script.
> Could not r…; runtime evidence skipped (launch chosen because apps/stage-pocket/android/app/build.gradle.kts applies the Android application plugin and apps/stage-pocket/android/gradlew builds it).
DM6 Domain ↔ infrastructure boundary — 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. 23 further occurrence(s) are not listed individually; the score already reflects all 63.
DM9 Scattered domain decisions — 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. Arm two tells a construction that PRODUCES a measurement from one that merely passes it along, and this repository's frontend does not compute that fact. A measurement built independently in two places would not appear above.
DM9 Scattered domain decisions — measured, with a gap in what it reached — 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. Some of this repository's production types come from a frontend that does not bind comparison operands to the members they read, which arm one needs, and those types were not walked for this dimension. The counts above speak for the languages that declare it.
M4 Documentation accuracy — measured, with a gap in what it reached — 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). 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.
P8 Schema migrations — 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. The schema may be created by a runner, a deploy script or a config file outside what this check reads, so an absence here is our blind spot rather than a missing migration strategy. The card abstains instead of scoring. You can widen what we reach: if the schema is created and evolved by a tool this check does not name, naming it lets us teach the detector to read it.
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. 625 further occurrence(s) are not listed individually; the score already reflects all 665.
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. 110 further occurrence(s) are not listed individually; the score already reflects all 150.
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. 604 further occurrence(s) are not listed individually; the score already reflects all 644.
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. 559 further occurrence(s) are not listed individually; the score already reflects all 599.
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.
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.
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 REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
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.
DM6 Domain ↔ infrastructure boundary: Infrastructure reached through a hand-rolled wrapper, a domain-named facade, reflection, or a string-keyed service locator resolves to a non-infra type and isn't seen; the body scan is symbol resolution over syntax, not full dataflow. A clean result means "no resolved infra reference in a domain body", not a proof of purity.
M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
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.
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.
232 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was render.renderMath::render at 140. A further 10 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 PostProcessResources.AvatarGlowResourcesAreValid.get at 29 — they are counted neither in the figure above nor in this dimension's score. 4 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: integrations/minecraft/src/cognitive/conscious/llmlogic.ts (llmlogic.isLikelyRecoverableError at 18), services/computer-use-mcp/src/workflows/types.ts (types.resolveStepAction at 17), engines/stage-tamagotchi-godot/tools/dumpRenderStages.mjs (parseArgs at 16), engines/stage-tamagotchi-godot/tools/dumpRenderStages.mjs (dumpRenderStages.parseArgs 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.
+ 220 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 10 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with render.renderMath::render (cyclomatic 140), chat-orchestrator-runtime.createChatOrchestratorRuntime.performSend (cyclomatic 125), index.setupApp (cyclomatic 97). — 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 10 together lifts Cyclomatic Complexity from 5.7 to about 6.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
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.
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.
+ 281 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 4 bodies over 120 down to 120 or less in Cognitive Complexity — start with engine.executeWorkflow (cognitive 178), chat-orchestrator-runtime.createChatOrchestratorRuntime.performSend (cognitive 143), index.setupApp (cognitive 132). — 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 4 together lifts Cognitive Complexity from 4.9 to about 5.4/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
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.
Do you agree with this assessment?
D3 · God Classes7.8 / 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.
Resolve the 153 FunctionTooLong finding(s) in God Classes — start with REDACTED (25), router.ts (3), characters.ts (3). — One of this dimension's main actionable groups (153 warning-level).
Resolve the 24 FileTooLong finding(s) in God Classes — start with REDACTED (2), brain.ts, app.js. — One of this dimension's main actionable groups (24 warning-level).
Resolve the 8 MethodTooLong finding(s) in God Classes — start with brain.ts (2), StagePostProcessCompositorEffect.Resources.cs, mcp-adapter.ts. — One of this dimension's main actionable groups (8 warning-level).
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.
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.
1 duplicated block group(s) detected. Measured on part of this repository only: .ts (95% 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.
Resolve the 1 Duplicated block (16 lines × 3) finding(s) in Code Duplication — start with ChatWindow.cs. — One of this dimension's main actionable groups (1 warning-level).
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.
Do you agree with this assessment?
D5 · Coupling9.5 / 10Stronggated by 5 serious findings✓ 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.
82 production modules (Gradle+npm+SwiftPM), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; edges a convention plugin adds from buildSrc or build-logic are not visible there; 10 module(s) off the main sequence, with abstractness counted on 69 of the 82 (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).
Off the main sequence: @proj-airi/i18n · ×5
Off the main sequence: @proj-airi/auth-shared · ×5
What to do
Resolve the 5 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (5 warning-level).
Enforce Coupling in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
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.
Resolve the 40 Classify ADR enforcement finding(s) in Architectural Integrity — start with 2026-09-22-hosted-kit-registration.md, 2026-09-22-sherpaw-model-assets.md, 2026-09-23-voice-input-binding.md. — One of this dimension's main actionable groups (40 recommendation-level).
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.
Do you agree with this assessment?
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.
6240 test methods: 5966 unit, 264 integration, 0 BDD, 10 e2e. The JavaScript/TypeScript suite contributes 6240 `it`/`test` case(s) across 863 test file(s) declaring at least one; its tier split is read from package names and paths only.
✓ On the Gold path — maintain.
Detailed fixes: d9_recommendation.md.
Do you agree with this assessment?
D10 · Test Quality9.7 / 10Adequategated by 3 critical findings✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
13 skipped (10 with a documented reason), 126 zero-assertion, 3 synchronised by a fixed sleep, no mocking-framework packages referenced (hand-written doubles or no mocking) across 6240 tests.
No assertions (empty test): grows the first detector windows before switching to a sliding window · ×3packages/pipelines-audio/src/audio-input.test.ts:274
No assertions: should no-op if no session · ×123services/computer-use-mcp/src/desktop-session.test.ts:163
Skipped test: ALIYUN_AK_ID and ALIYUN_AK_SECRET must be set in environment to run this test · ×3packages/stage-ui/src/libs/providers/providers/aliyun-nls/token.test.ts:75
Fixed-sleep synchronisation: waits for the transcript of a submitted voice message instead of transcribing the file · ×3packages/stage-ui/src/stores/chat.contract.test.ts:418
Mock-dominated test: attributes Responses spans and first-token metrics to Responses · ×32server/apps/api/src/routes/openai/v1/middlewares/telemetry.test.ts:12
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 3 No assertions (empty test) finding(s) in Test Quality — start with audio-input.test.ts, home-assistant.browser.test.ts, chat-window-style-menu.browser.test.ts. — One of this dimension's main actionable groups (3 issue-level).
Resolve the 123 No assertions finding(s) in Test Quality — start with InteractiveArea.browser.test.ts (22), controls-island-overflow.browser.test.ts (10), index.browser.test.ts (6). — One of this dimension's main actionable groups (123 warning-level).
Resolve the 3 Skipped test finding(s) in Test Quality — start with widgets.test.ts (2), token.test.ts. — One of this dimension's main actionable groups (3 warning-level).
Enforce Test Quality in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
Resolve the 2 Leaked secret finding(s) in Secret Scanning — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
Enforce Secret Scanning in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
0 of 8 packages use a banned license. ★ DEPTH: this repository's MSBuild projects declare 3 direct `PackageReference`(s), and 5 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.
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.
Top hotspots: packages/core-agent/src/runtime/chat-orchestrator-runtime.ts (23×125=2875); packages/stage-ui/src/stores/chat.ts (41×49=2009); apps/stage-tamagotchi/src/main/windows/main/index.ts (18×41=738) Repeated repair below the complexity floor: apps/stage-web/src/App.vue (8 of 14 changes were fixes); packages/stage-ui/src/libs/providers/providers/official/index.ts (7 of 11 changes were fixes); packages/stage-pages/src/pages/settings/modules/consciousness.vue (6 of 11 changes were fixes)
Resolve the 48 Hotspot finding(s) in Churn × Complexity Hotspots — start with REDACTED (5), auth.ts (3), provider.ts (2). — One of this dimension's main actionable groups (48 warning-level).
Resolve the 18 Repeated repair finding(s) in Churn × Complexity Hotspots — start with REDACTED (4), App.vue (2), consciousness.vue. — One of this dimension's main actionable groups (18 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor9.1 / 10Exemplary✓ 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.
150 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is integrations/minecraft/src/cognitive/conscious/brain.ts. Counted over 1584 of the 3301 production source files in this repository: 1716 are under the ~2,400-byte size floor this dimension measures over, and the remaining 1 have no attributable history left to measure.
Off-boarding risk: anonymized user #1 · ×5
Further sole-owners (lower concentration)
✓ On the Gold path — maintain.
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
2 deducted debt markers + 3 dead symbols across 9381 LoC in the .NET projects (0.2/KLoC) → score 9.7. Measured on the .NET source only: .ts (95% of production source) was not read, and carries at least 107 uncounted task marker(s) in 74 file(s).
Resolve the 1 EmptyCatchBlock finding(s) in Explicit Debt — start with StageViewStateStore.cs. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 3 Dead code finding(s) in Explicit Debt — start with SpotlightWindow.cs (2), StageViewStateStore.cs. — One of this dimension's main actionable groups (3 warning-level).
Resolve the 1 TodoComment finding(s) in Explicit Debt — start with StageRoot.cs. — One of this dimension's main actionable groups (1 warning-level).
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.
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.
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.
0 of 40 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). How well each record argues its case is not measured.
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.
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).
236 finding(s): 0 critical, 214 high, 22 medium, 0 low. 161 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 191 file(s) — `apps/stage-pocket/android/gradlew` (line 74, line 180), `apps/stage-tamagotchi-kirie/src-godot/scripts/AiriDesktopContracts.cs` (lines 288–311), `apps/stage-tamagotchi-kirie/src-godot/scripts/auth-service.cs` (line 272, line 277, line 279, …), `apps/stage-tamagotchi-kirie/src-godot/scripts/widget-contracts.cs` (lines 66–71), `apps/stage-tamagotchi-kirie/src-godot/scripts/widget-window-manager.cs` (lines 71–72, line 144), … (+186 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. In 1 of those file(s) — `apps/stage-tamagotchi-kirie/src-godot/scripts/auth-service.cs` — the break is a C# primary constructor, which semgrep's grammar cannot parse and which hides the type from every rule scoped to it; those files were re-scanned from a shadow copy with the constructor's parameter list blanked (line and column preserving), which restores the type to the rules, and 0 additional row(s) came from that pass. Only the header's own parameter list is unread in 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
+ 9 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 37 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (6), REDACTED (6), REDACTED (3). — One of this dimension's main actionable groups (37 issue-level).
Resolve the 9 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (9). — One of this dimension's main actionable groups (9 issue-level).
No action in Static Analysis (SAST) — all 161 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (161 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
+ 2 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 26 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (26). — One of this dimension's main actionable groups (26 issue-level).
Resolve the 12 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (10), REDACTED (2). — One of this dimension's main actionable groups (12 issue-level).
Resolve the 2 High vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
Resolve the 7 High IaC finding(s) in IaC & Container Security — start with REDACTED (6), REDACTED. — One of this dimension's main actionable groups (7 issue-level).
Resolve the 11 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (6), REDACTED (5). — One of this dimension's main actionable groups (11 warning-level).
Resolve the 4 Low IaC finding(s) in IaC & Container Security — start with REDACTED (4). — One of this dimension's main actionable groups (4 recommendation-level).
Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
46 of 1585 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is engines/stage-tamagotchi-godot/scripts/visuals/StagePostProcessCompositorEffect.Resources.cs. Counted over 1585 of the 3301 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Resolve the 1 Orphaned knowledge finding(s) in Knowledge Freshness — start with StagePostProcessCompositorEffect.Resources.cs. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 45 Orphaned file finding(s) in Knowledge Freshness — start with StagePostProcessCompositorEffect.Shaders.cs, StageViewJson.cs, Comfy.vue. — One of this dimension's main actionable groups (45 recommendation-level).
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.
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.
Resolve the 10 Change coupling finding(s) in Change Coupling — start with REDACTED, task-executor.ts, api.ts. — One of this dimension's main actionable groups (10 warning-level).
Resolve the 1 Change-coupling hub finding(s) in Change Coupling — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
+ 2 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 3 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (3 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
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).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
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.
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.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 6 platform declaration(s) and 0 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.
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.
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.
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.
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.
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.
`ChatHookRegistry` declares 21 required operations: `onBeforeMessageComposed`, `onAfterMessageComposed`, `onBeforeSend`, `onAfterSend`, `onTokenLiteral`, `onTokenSpecial`, `onStreamEnd`, `onAssistantResponseEnd`, `onAssistantMessage`, `onChatTurnComplete`, `emitBeforeMessageComposedHooks`, `emitAfterMessageComposedHooks`, `emitBeforeSendHooks`, `emitAfterSendHooks`, `emitTokenLiteralHooks`, `emitTokenSpecialHooks`, `emitStreamEndHooks`, `emitAssistantResponseEndHooks`, `emitAssistantMessageHooks`, `emitChatTurnCompleteHooks`, `clearHooks`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — packages/core-agent/src/contracts/hook-types.ts:5
`AgentHookRegistry` declares 21 required operations: `onBeforeMessageComposed`, `onAfterMessageComposed`, `onBeforeSend`, `onAfterSend`, `onTokenLiteral`, `onTokenSpecial`, `onStreamEnd`, `onAssistantResponseEnd`, `onAssistantMessage`, `onChatTurnComplete`, `emitBeforeMessageComposedHooks`, `emitAfterMessageComposedHooks`, `emitBeforeSendHooks`, `emitAfterSendHooks`, `emitTokenLiteralHooks`, `emitTokenSpecialHooks`, `emitStreamEndHooks`, `emitAssistantResponseEndHooks`, `emitAssistantMessageHooks`, `emitChatTurnCompleteHooks`, `clearHooks`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — packages/core-agent/src/contracts/hook-types.ts:32
`MathLocale` declares 51 required operations: `join`, `number`, `letter`, `letterCase`, `clauses`, `cases`, `matrix`, `list`, `fraction`, `derivative`, `power`, `squared`, `cubed`, `degrees`, `prime`, `superscript`, `apply`, `upTo`, `numberIndex`, `index`, `subscript`, `root`, `inverse`, `given`, `modulo`, `congruent`, `ordinal`, `limit`, `arrow`, `norm`, `statistic`, `about`, `distributed`, `ceil`, `floor`, `tuple`, `bracket`, `mapping`, `bigOperator`, `absolute`, and 11 more. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — packages/speech-transformer-math/src/locale.ts:59
What to do
Split fat interfaces into focused role-interfaces so clients depend only on what they use.
Do you agree with this assessment?
DM10 · One transaction, one aggregate10.0 / 10Exemplary○ Nothing flagged
Other · Domain Modelling — Whether a single operation mutates more than one aggregate root. An aggregate is a consistency boundary, so saving two together fuses them into one — the second's invariants come to depend on the first's transaction, and the pair can no longer be separated. Reads of other aggregates are not counted.
Method: Neutral body surface (DDD-gated): every method body scanned for repository WRITE calls (Add/Update/Save/Remove/Delete/Insert/Store and their async forms), keyed on the ARGUMENT type rather than the repository type — three `IRepository<T>` writes collapse to one repository but are three distinct aggregates. Reads (Get/Find/Load/Query) are excluded, so loading another aggregate for context never counts. Score is offending methods over methods that write at all. Deterministic.
Other · Domain Modelling — Whether the domain layer stays free of infrastructure dependencies — a domain aggregate fused to a persistence ORM (TypeORM/Prisma/MikroORM/Sequelize/Mongoose) on its own declaration (active-record) couples the domain to infrastructure. The clean-architecture dependency rule.
Method: Roslyn (DDD-gated): domain-layer types scanned for infrastructure usage in member SIGNATURES and inside method/accessor BODIES — resolved calls and object-creations into EF/Marten/HTTP/Mongo/Redis/message-bus types (not just a namespace allowlist). Deterministic, symbol-resolved, exhaustive over domain-layer bodies, DDD-native.
Coverage: Domain layer identified by NAMESPACE heuristic; infrastructure then resolved by symbol in member SIGNATURES and method/accessor BODIES — rename the layer and the check evaporates.
`integrations/twitter-services/src/core/browser/context.ts` (domain layer) depends on `node:fs` (import) — a persistence module; the domain should own a port and let an infrastructure adapter implement it. — integrations/twitter-services/src/core/browser/context.ts:5
`server/apps/api/src/services/domain/billing/billing-service.ts` (domain layer) depends on `ioredis` (import) — a cache module; the domain should own a port and let an infrastructure adapter implement it. — server/apps/api/src/services/domain/billing/billing-service.ts:1
`server/apps/api/src/services/domain/billing/billing-service.ts` (domain layer) depends on `drizzle-orm` (import) — a persistence module; the domain should own a port and let an infrastructure adapter implement it. — server/apps/api/src/services/domain/billing/billing-service.ts:9
`server/apps/api/src/services/domain/billing/billing-service.ts` (domain layer) depends on `../../../libs/db` (import of `server/apps/api/src/libs/db.ts`) — a persistence module; the domain should own a port and let an infrastructure adapter implement it. — server/apps/api/src/services/domain/billing/billing-service.ts:3
`server/apps/api/src/services/domain/billing/billing-service.ts` (domain layer) depends on `../../../schemas/flux` (import of `server/apps/api/src/schemas/flux.ts`) — a persistence module; the domain should own a port and let an infrastructure adapter implement it. — server/apps/api/src/services/domain/billing/billing-service.ts:17
`server/apps/api/src/services/domain/billing/billing-service.ts` (domain layer) depends on `../../../schemas/flux-transaction` (import of `server/apps/api/src/schemas/flux-transaction.ts`) — a persistence module; the domain should own a port and let an infrastructure adapter implement it. — server/apps/api/src/services/domain/billing/billing-service.ts:18
`server/apps/api/src/services/domain/billing/billing-service.ts` (domain layer) depends on `../../../schemas/flux-usage` (import of `server/apps/api/src/schemas/flux-usage.ts`) — a persistence module; the domain should own a port and let an infrastructure adapter implement it. — server/apps/api/src/services/domain/billing/billing-service.ts:19
`server/apps/api/src/services/domain/billing/wallet-initialization.ts` (domain layer) depends on `../../../libs/db` (import of `server/apps/api/src/libs/db.ts`) — a persistence module; the domain should own a port and let an infrastructure adapter implement it. — server/apps/api/src/services/domain/billing/wallet-initialization.ts:1
`server/apps/api/src/services/domain/billing/wallet-initialization.ts` (domain layer) depends on `../../../schemas/flux` (import of `server/apps/api/src/schemas/flux.ts`) — a persistence module; the domain should own a port and let an infrastructure adapter implement it. — server/apps/api/src/services/domain/billing/wallet-initialization.ts:3
`server/apps/api/src/services/domain/billing/wallet-initialization.ts` (domain layer) depends on `../../../schemas/flux-transaction` (import of `server/apps/api/src/schemas/flux-transaction.ts`) — a persistence module; the domain should own a port and let an infrastructure adapter implement it. — server/apps/api/src/services/domain/billing/wallet-initialization.ts:4
`server/apps/api/src/services/domain/character-cards.ts` (domain layer) depends on `../../libs/db` (import of `server/apps/api/src/libs/db.ts`) — a persistence module; the domain should own a port and let an infrastructure adapter implement it. — server/apps/api/src/services/domain/character-cards.ts:1
`server/apps/api/src/services/domain/character-cards.ts` (domain layer) depends on `../../schemas/character-cards` (import of `server/apps/api/src/schemas/character-cards.ts`) — a persistence module; the domain should own a port and let an infrastructure adapter implement it. — server/apps/api/src/services/domain/character-cards.ts:8
`server/apps/api/src/services/domain/characters.ts` (domain layer) depends on `drizzle-orm` (import) — a persistence module; the domain should own a port and let an infrastructure adapter implement it. — server/apps/api/src/services/domain/characters.ts:5
`server/apps/api/src/services/domain/characters.ts` (domain layer) depends on `../../libs/db` (import of `server/apps/api/src/libs/db.ts`) — a persistence module; the domain should own a port and let an infrastructure adapter implement it. — server/apps/api/src/services/domain/characters.ts:1
`server/apps/api/src/services/domain/characters.ts` (domain layer) depends on `../../schemas/characters` (import of `server/apps/api/src/schemas/characters.ts`) — a persistence module; the domain should own a port and let an infrastructure adapter implement it. — server/apps/api/src/services/domain/characters.ts:7
`server/apps/api/src/services/domain/characters.ts` (domain layer) depends on `../../schemas/user-character` (import of `server/apps/api/src/schemas/user-character.ts`) — a persistence module; the domain should own a port and let an infrastructure adapter implement it. — server/apps/api/src/services/domain/characters.ts:8
`server/apps/api/src/services/domain/chats.ts` (domain layer) depends on `drizzle-orm` (import) — a persistence module; the domain should own a port and let an infrastructure adapter implement it. — server/apps/api/src/services/domain/chats.ts:8
`server/apps/api/src/services/domain/chats.ts` (domain layer) depends on `../../libs/db` (import of `server/apps/api/src/libs/db.ts`) — a persistence module; the domain should own a port and let an infrastructure adapter implement it. — server/apps/api/src/services/domain/chats.ts:3
`server/apps/api/src/services/domain/chats.ts` (domain layer) depends on `../../schemas/chats` (import of `server/apps/api/src/schemas/chats.ts`) — a persistence module; the domain should own a port and let an infrastructure adapter implement it. — server/apps/api/src/services/domain/chats.ts:13
`server/apps/api/src/services/domain/display-models.ts` (domain layer) depends on `drizzle-orm` (import) — a persistence module; the domain should own a port and let an infrastructure adapter implement it. — server/apps/api/src/services/domain/display-models.ts:11
`server/apps/api/src/services/domain/display-models.ts` (domain layer) depends on `../../libs/db` (import of `server/apps/api/src/libs/db.ts`) — a persistence module; the domain should own a port and let an infrastructure adapter implement it. — server/apps/api/src/services/domain/display-models.ts:3
`server/apps/api/src/services/domain/display-models.ts` (domain layer) depends on `../../schemas/display-models` (import of `server/apps/api/src/schemas/display-models.ts`) — a persistence module; the domain should own a port and let an infrastructure adapter implement it. (×2) — server/apps/api/src/services/domain/display-models.ts:4, server/apps/api/src/services/domain/display-models.ts:15
`server/apps/api/src/services/domain/field-sync/store.ts` (domain layer) depends on `drizzle-orm` (import) — a persistence module; the domain should own a port and let an infrastructure adapter implement it. — server/apps/api/src/services/domain/field-sync/store.ts:9
`server/apps/api/src/services/domain/field-sync/store.ts` (domain layer) depends on `../../../libs/db` (import of `server/apps/api/src/libs/db.ts`) — a persistence module; the domain should own a port and let an infrastructure adapter implement it. — server/apps/api/src/services/domain/field-sync/store.ts:1
`server/apps/api/src/services/domain/field-sync/tables.ts` (domain layer) depends on `drizzle-orm/pg-core` (import) — a persistence module; the domain should own a port and let an infrastructure adapter implement it. — server/apps/api/src/services/domain/field-sync/tables.ts:1
`server/apps/api/src/services/domain/field-sync/tables.ts` (domain layer) depends on `../../../libs/json-value` (import of `server/apps/api/src/libs/json-value.ts`) — a persistence module; the domain should own a port and let an infrastructure adapter implement it. — server/apps/api/src/services/domain/field-sync/tables.ts:3
`server/apps/api/src/services/domain/flux-cache.ts` (domain layer) depends on `ioredis` (import) — a cache module; the domain should own a port and let an infrastructure adapter implement it. — server/apps/api/src/services/domain/flux-cache.ts:1
`server/apps/api/src/services/domain/flux-cache.ts` (domain layer) depends on `../../libs/redis/cache` (import of `server/apps/api/src/libs/redis/cache.ts`) — a cache module; the domain should own a port and let an infrastructure adapter implement it. — server/apps/api/src/services/domain/flux-cache.ts:6
`server/apps/api/src/services/domain/flux-transaction.ts` (domain layer) depends on `drizzle-orm` (import) — a persistence module; the domain should own a port and let an infrastructure adapter implement it. — server/apps/api/src/services/domain/flux-transaction.ts:4
`server/apps/api/src/services/domain/flux-transaction.ts` (domain layer) depends on `../../libs/db` (import of `server/apps/api/src/libs/db.ts`) — a persistence module; the domain should own a port and let an infrastructure adapter implement it. — server/apps/api/src/services/domain/flux-transaction.ts:1
`server/apps/api/src/services/domain/flux-transaction.ts` (domain layer) depends on `../../schemas/flux-usage` (import of `server/apps/api/src/schemas/flux-usage.ts`) — a persistence module; the domain should own a port and let an infrastructure adapter implement it. — server/apps/api/src/services/domain/flux-transaction.ts:6
`server/apps/api/src/services/domain/flux-transaction.ts` (domain layer) depends on `../../schemas/flux-transaction` (import of `server/apps/api/src/schemas/flux-transaction.ts`) — a persistence module; the domain should own a port and let an infrastructure adapter implement it. — server/apps/api/src/services/domain/flux-transaction.ts:8
`server/apps/api/src/services/domain/flux.ts` (domain layer) depends on `ioredis` (import) — a cache module; the domain should own a port and let an infrastructure adapter implement it. — server/apps/api/src/services/domain/flux.ts:1
`server/apps/api/src/services/domain/flux.ts` (domain layer) depends on `drizzle-orm` (import) — a persistence module; the domain should own a port and let an infrastructure adapter implement it. — server/apps/api/src/services/domain/flux.ts:8
`server/apps/api/src/services/domain/flux.ts` (domain layer) depends on `../../libs/db` (import of `server/apps/api/src/libs/db.ts`) — a persistence module; the domain should own a port and let an infrastructure adapter implement it. — server/apps/api/src/services/domain/flux.ts:3
`server/apps/api/src/services/domain/flux.ts` (domain layer) depends on `../../schemas/flux` (import of `server/apps/api/src/schemas/flux.ts`) — a persistence module; the domain should own a port and let an infrastructure adapter implement it. — server/apps/api/src/services/domain/flux.ts:14
`server/apps/api/src/services/domain/llm-router/concurrency-ledger.ts` (domain layer) depends on `ioredis` (import) — a cache module; the domain should own a port and let an infrastructure adapter implement it. — server/apps/api/src/services/domain/llm-router/concurrency-ledger.ts:1
`server/apps/api/src/services/domain/llm-router/config-sync-subscriber.ts` (domain layer) depends on `ioredis` (import) — a cache module; the domain should own a port and let an infrastructure adapter implement it. — server/apps/api/src/services/domain/llm-router/config-sync-subscriber.ts:2
`server/apps/api/src/services/domain/llm-router/router.ts` (domain layer) depends on `ioredis` (import) — a cache module; the domain should own a port and let an infrastructure adapter implement it. — server/apps/api/src/services/domain/llm-router/router.ts:1
What to do
Keep the ORM/table mapping on a boundary data-model + mapper; leave the domain entity framework-free (map row↔domain through a repository).
Other · Domain Modelling — Whether one domain rule is decided — or one measurement produced — in more than one place, rather than living on the type that owns it.
Method: Neutral body surface plus Roslyn (DDD-gated), two arms. DECISION (Roslyn only): a predicate over a domain type's members judged in two or more types, where none of those decisions live on the owning type — operands of comparisons and relational property patterns only, so a member merely passed as an argument is not judged. DERIVATION: a plain all-numeric carrier of ≥2 members, with no base type and exactly one constructor, CONSTRUCTED as the result of a method (returned or assigned, never inline as an argument) in two or more types other than its own — the same measurement produced twice, which centralising the judgement does not fix. DERIVATION runs on every language whose frontend declares the produced-or-passed fact per construction (Roslyn and the Java sidecar today); a target with only the derivation arm carries an engine gap naming the decision arm as not assessed, and a frontend that declares nothing keeps the dimension not measured rather than clean. Single-member rules, test code and generated code are out of population for both. Advisory.
apps.stage-tamagotchi-kirie.src-web.src.renderer.pages.desktop-overlay-coordinates.Point's [x, y] are judged in apps.stage-tamagotchi-kirie.src-web.src.renderer.pages.desktop-overlay-coordinates, apps.stage-tamagotchi.src.renderer.pages.desktop-overlay-coordinates — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
apps.stage-tamagotchi-kirie.src-web.src.renderer.pages.desktop-overlay-coordinates.Rect's [x, y] are judged in apps.stage-tamagotchi-kirie.src-web.src.renderer.pages.desktop-overlay-coordinates, apps.stage-tamagotchi.src.renderer.pages.desktop-overlay-coordinates — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
integrations.minecraft.src.cognitive.types.BotEventSource's [id, type] are judged in integrations.minecraft.src.cognitive.conscious.brain, integrations.minecraft.src.cognitive.conscious.brain.Brain — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
services.computer-use-mcp.src.types.Bounds's [height, width] are judged in services.computer-use-mcp.src.preflight, services.computer-use-mcp.src.runtime-probes — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
services.computer-use-mcp.src.types.Bounds's [x, y] are judged in services.computer-use-mcp.src.chrome-semantic-adapter, services.computer-use-mcp.src.policy, services.computer-use-mcp.src.snap-resolver — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
What to do
Move each repeated judgement onto the type that owns the members it reads, so the rule has one home and cannot drift.
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.
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.
Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
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 3 project(s) that lack one — worth up to 0.7 pts.
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.
Only 1/3 projects share a common root namespace — the code's module identity is inconsistent.
What to do
Adopt a consistent root-namespace convention (a shared prefix, e.g. Acme.*); short project-file/directory names are fine as long as the RootNamespace is uniform.
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.fr.md links to `./.github/CONTRIBUTING.md`, but `docs/.github/CONTRIBUTING.md` does not exist. 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.fr.md:272
packages/ui/README.md links to `src/components/Animations/TransitionVertical.vue`, but `packages/ui/src/components/Animations/TransitionVertical.vue` does not exist. 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. — packages/ui/README.md:58
What to do
Reconcile the README with reality: docs/README.fr.md links to `./.github/CONTRIBUTING.md`, but `docs/.github/CONTRIBUTING.md` does not exist; packages/ui/README.md links to `src/components/Animations/TransitionVertical.vue`, but `packages/ui/src/components/Animations/TransitionVertical.vue` does not exist.
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.
Do you agree with this assessment?
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.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
No static application security testing detected. For this repository's stack, add CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security as a CI step. What was searched, so you can tell an absence from a miss: the 147927 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
What to do
Add a SAST step to CI running what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — 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.
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.
Do you agree with this assessment?
P5 · DR & Backup10.0 / 10Exemplary✓ Tool-verified
Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.
Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.
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.
No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
What to do
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
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.
`spawnSync` in `buildOutput` 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. — apps/stage-tamagotchi/scripts/check-reproducible-build.ts:68
`existsSync` 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. (×6) — apps/stage-tamagotchi/scripts/merge-latest-mac.ts:189, apps/stage-tamagotchi/scripts/merge-latest-mac.ts:190, apps/stage-tamagotchi/scripts/merge-latest-mac.ts:203, …
`statSync` 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. — apps/stage-tamagotchi/scripts/merge-latest-mac.ts:193
`existsSync` in `resolveFromWorkspace` 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) — apps/stage-tamagotchi/scripts/regenerate-windows-latest.ts:60, apps/stage-tamagotchi/scripts/regenerate-windows-latest.ts:67
`existsSync` in `writeHealingConfig` 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. — apps/stage-tamagotchi/src/main/libs/electron/persistence.ts:125
`writeFileSync` in `installCACertificate` 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) — apps/stage-tamagotchi/src/main/services/airi/channel-server/index.ts:262, apps/stage-tamagotchi/src/main/services/airi/channel-server/index.ts:275, apps/stage-tamagotchi/src/main/services/airi/channel-server/index.ts:284
`existsSync` in `installCACertificate` 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. — apps/stage-tamagotchi/src/main/services/airi/channel-server/index.ts:281
`existsSync` in `generateCertificate` 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. — apps/stage-tamagotchi/src/main/services/airi/channel-server/index.ts:302
`readFileSync` in `generateCertificate` 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) — apps/stage-tamagotchi/src/main/services/airi/channel-server/index.ts:304, apps/stage-tamagotchi/src/main/services/airi/channel-server/index.ts:305
`writeFileSync` in `generateCertificate` 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) — apps/stage-tamagotchi/src/main/services/airi/channel-server/index.ts:316, apps/stage-tamagotchi/src/main/services/airi/channel-server/index.ts:317
`existsSync` in `getOrCreateCertificate` 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) — apps/stage-tamagotchi/src/main/services/airi/channel-server/index.ts:340, apps/stage-tamagotchi/src/main/services/airi/channel-server/index.ts:344, apps/stage-tamagotchi/src/main/services/airi/channel-server/index.ts:353
`readFileSync` in `getOrCreateCertificate` 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) — apps/stage-tamagotchi/src/main/services/airi/channel-server/index.ts:341, apps/stage-tamagotchi/src/main/services/airi/channel-server/index.ts:342
`writeFileSync` in `getOrCreateCertificate` 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) — apps/stage-tamagotchi/src/main/services/airi/channel-server/index.ts:350, apps/stage-tamagotchi/src/main/services/airi/channel-server/index.ts:351
1 blocking call(s) on async work (.Wait()/.GetAwaiter().GetResult()) — these waste a thread and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
`.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one). — apps/stage-tamagotchi-kirie/src-godot/scripts/loopback-auth-server.cs:62
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.
Make the call chain async end-to-end and await it — never block on a Task with .Wait()/.GetAwaiter().GetResult().
Do you agree with this assessment?
R1 · Type Safety9.9 / 10Exemplary✓ Tool-verified
React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.
Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.
What to do
Migrate the remaining .js/.jsx files to TypeScript.
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.
168 duplicated blocks under apps/ have copies in at least two of the sibling directories stage-pocket, stage-tamagotchi, stage-tamagotchi-kirie, stage-web, ui-server-auth — 155 of them are reported below, and 13 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 168 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 168 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 168 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. — apps/stage-tamagotchi-kirie/src-web/src/renderer/stores/stage-three-runtime-diagnostics.ts:1
68 duplicated blocks under packages/ have copies in at least two of the sibling directories ccc, core-agent, font-chillroundm, font-cjkfonts-allseto, font-departure-mono, font-xiaolai (+22 more sibling(s) not listed) — 44 of them are reported below, and 24 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 68 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 68 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 68 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. — packages/pipelines-audio/src/processors/tts-chunker.ts:18
41 duplicated blocks under the repository root have copies in at least two of the sibling directories apps, evals, integrations, packages, plugins, server (+1 more sibling(s) not listed) — 26 of them are reported below, and 15 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 41 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 41 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 41 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. — apps/stage-pocket/src/workers/vad/vad.ts:1
15 duplicated blocks under packages/provider-inference/src/providers/cloud/ have copies in at least two of the sibling directories 302-ai, aihubmix, anthropic, atlascloud, azure-ai-foundry, azure-openai (+28 more sibling(s) not listed) — 14 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 15 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 15 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 15 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. — packages/provider-inference/src/providers/cloud/google-gemini-audio-speech/index.ts:62
13 duplicated blocks under server/apps/ have copies in at least two of the sibling directories api, auth — 12 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 13 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 13 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 13 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. — server/apps/api/instrumentation.ts:62
11 of the duplicated blocks reported below have copies in at least two of the sibling directories chat, speech, transcription, vision under packages/stage-pages/src/pages/settings/providers/. That concentration is one structural fact, not 11 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 11 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. — packages/stage-pages/src/pages/settings/providers/chat/ollama.vue:2
8 duplicated blocks under packages/stage-pages/src/pages/ have copies in at least two of the sibling directories devtools, settings — 6 of them are reported below, and 2 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 8 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 8 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 8 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. — packages/stage-pages/src/pages/devtools/providers-transcription-realtime-aliyun-nls.vue:301
8 duplicated blocks under server/apps/api/src/routes/ have copies in at least two of the sibling directories apple-iap, character-cards, characters, chats, display-models, flux (+3 more sibling(s) not listed) — 7 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 8 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 8 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 8 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. — server/apps/api/src/routes/character-cards/index.ts:14
7 duplicated blocks under packages/stage-ui/src/ have copies in at least two of the sibling directories composables, libs, stores, tools, workers — 4 of them are reported below, and 3 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 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. — packages/stage-ui/src/libs/workers/worker.ts:167
6 duplicated blocks under apps/stage-tamagotchi/src/main/windows/ have copies in at least two of the sibling directories about, dashboard, editor, main, settings, workspace — 5 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 6 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 6 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 6 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — apps/stage-tamagotchi/src/main/windows/dashboard/index.ts:26
5 duplicated blocks under server/apps/api/src/ have copies in at least two of the sibling directories routes, schemas, services — 4 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 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 5 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. — server/apps/api/src/schemas/character-cards.ts:16
5 duplicated blocks under services/computer-use-mcp/src/ have copies in at least two of the sibling directories accessibility, browser-dom, display, remote, server, utils — 4 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 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 5 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. — services/computer-use-mcp/src/display/enumerate.ts:158
apps/stage-tamagotchi-kirie/src-web/src/renderer/stores/stage-three-runtime-diagnostics.ts:1 · apps/stage-tamagotchi/src/renderer/stores/stage-three-runtime-diagnostics.ts:1 — these 2 files are line-for-line copies of one another — 313 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — apps/stage-tamagotchi-kirie/src-web/src/renderer/stores/stage-three-runtime-diagnostics.ts:1
apps/stage-tamagotchi-kirie/src-web/src/renderer/components/InteractiveArea.vue:2 · apps/stage-tamagotchi/src/renderer/components/InteractiveArea.vue:2 — these 2 files are line-for-line copies of one another — 209 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — apps/stage-tamagotchi-kirie/src-web/src/renderer/components/InteractiveArea.vue:2
apps/stage-tamagotchi-kirie/src-web/src/renderer/features/live2d/system-audio-lipsync.ts:1 · apps/stage-tamagotchi/src/renderer/features/live2d/system-audio-lipsync.ts:1 — these 2 files are line-for-line copies of one another — 209 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — apps/stage-tamagotchi-kirie/src-web/src/renderer/features/live2d/system-audio-lipsync.ts:1
apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/settings/modules/mcp.vue:2 · apps/stage-tamagotchi/src/renderer/pages/settings/modules/mcp.vue:2 — these 2 files are line-for-line copies of one another — 200 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/settings/modules/mcp.vue:2
apps/stage-tamagotchi-kirie/src-web/src/renderer/components/stage-islands/controls-island/index.vue:3 · apps/stage-tamagotchi/src/renderer/components/stage-islands/controls-island/index.vue:4 — these 2 files are line-for-line copies of one another — 198 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — apps/stage-tamagotchi-kirie/src-web/src/renderer/components/stage-islands/controls-island/index.vue:3
apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/desktop-overlay-polling.ts:8 · apps/stage-tamagotchi/src/renderer/pages/desktop-overlay-polling.ts:8 — these 2 files are line-for-line copies of one another — 197 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/desktop-overlay-polling.ts:8
apps/stage-tamagotchi-kirie/src-web/src/renderer/stores/tools/builtin/widgets.ts:1 · apps/stage-tamagotchi/src/renderer/stores/tools/builtin/widgets.ts:1 — these 2 files are line-for-line copies of one another — 197 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — apps/stage-tamagotchi-kirie/src-web/src/renderer/stores/tools/builtin/widgets.ts:1
apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/settings/models/index.vue:2 · apps/stage-tamagotchi/src/renderer/pages/settings/models/index.vue:2 — these 2 files are line-for-line copies of one another — 190 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/settings/models/index.vue:2
apps/stage-pocket/src/pages/devtools/performance-playground.vue:2 · apps/stage-web/src/pages/devtools/performance-playground.vue:2 — these 2 files are line-for-line copies of one another — 180 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — apps/stage-pocket/src/pages/devtools/performance-playground.vue:2
apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/devtools/widgets-calling.vue:3 · apps/stage-tamagotchi/src/renderer/pages/devtools/widgets-calling.vue:3 — these 2 files are line-for-line copies of one another — 166 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/devtools/widgets-calling.vue:3
packages/pipelines-audio/src/processors/tts-chunker.ts:18 · packages/stage-ui/src/utils/tts.ts:11 — the two spans are one implementation copied and then locally edited — 761 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. — packages/pipelines-audio/src/processors/tts-chunker.ts:18
packages/stage-ui/src/libs/inference/adapters/background-removal.ts:25 · packages/stage-ui/src/libs/inference/adapters/whisper.ts:49 — the two spans are one implementation copied and then locally edited — 975 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. — packages/stage-ui/src/libs/inference/adapters/background-removal.ts:25
apps/stage-tamagotchi-kirie/src-web/src/renderer/stores/tools/builtin/image-journal.ts:1 · apps/stage-tamagotchi/src/renderer/stores/tools/builtin/image-journal.ts:1 — these 2 files are line-for-line copies of one another — 149 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — apps/stage-tamagotchi-kirie/src-web/src/renderer/stores/tools/builtin/image-journal.ts:1
apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/widgets.vue:2 · apps/stage-tamagotchi/src/renderer/pages/widgets.vue:2 — these 2 files are line-for-line copies of one another — 140 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/widgets.vue:2
apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/settings/modules/mcp-config.ts:1 · apps/stage-tamagotchi/src/renderer/pages/settings/modules/mcp-config.ts:1 — these 2 files are line-for-line copies of one another — 139 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/settings/modules/mcp-config.ts:1
apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/devtools/vision.vue:2 · apps/stage-tamagotchi/src/renderer/pages/devtools/vision.vue:2 — these 2 files are line-for-line copies of one another — 138 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/devtools/vision.vue:2
packages/scenarios-stage-tamagotchi-electron/src/scenarios/plugin-chess-worker-smoke.ts:13 · packages/scenarios-stage-tamagotchi-electron/src/scenarios/plugin-widget-static-assets-local-address.ts:12 — the two spans are one implementation copied and then locally edited — 878 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. — packages/scenarios-stage-tamagotchi-electron/src/scenarios/plugin-chess-worker-smoke.ts:13
apps/stage-tamagotchi-kirie/src-web/src/renderer/stores/tools/builtin/weather-api.ts:3 · apps/stage-tamagotchi/src/renderer/stores/tools/builtin/weather-api.ts:3 — these 2 files are line-for-line copies of one another — 132 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — apps/stage-tamagotchi-kirie/src-web/src/renderer/stores/tools/builtin/weather-api.ts:3
apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/about.vue:2 · apps/stage-tamagotchi/src/renderer/pages/about.vue:2 — these 2 files are line-for-line copies of one another — 127 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/about.vue:2
apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/desktop-overlay.vue:2 · apps/stage-tamagotchi/src/renderer/pages/desktop-overlay.vue:2 — these 2 files are line-for-line copies of one another — 123 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/desktop-overlay.vue:2
apps/stage-pocket/src/workers/vad/vad.ts:1 · apps/stage-web/src/workers/vad/vad.ts:1 · packages/stage-ui/src/workers/vad/vad.ts:1 — these 3 files are line-for-line copies of one another — 119 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — apps/stage-pocket/src/workers/vad/vad.ts:1
apps/stage-pocket/src/pages/devtools/background-removal.vue:2 · apps/stage-web/src/pages/devtools/background-removal.vue:2 — these 2 files are line-for-line copies of one another — 113 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — apps/stage-pocket/src/pages/devtools/background-removal.vue:2
apps/stage-tamagotchi/src/main/windows/dashboard/index.ts:26 · apps/stage-tamagotchi/src/main/windows/main/index.ts:46 — the two spans are one implementation copied and then locally edited — 712 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. — apps/stage-tamagotchi/src/main/windows/dashboard/index.ts:26
packages/scenarios-stage-tamagotchi-electron/src/scenarios/plugin-chess-widget-flow.ts:5 · packages/scenarios-stage-tamagotchi-electron/src/scenarios/plugin-widget-static-assets-local-address.ts:5 — the two spans are one implementation copied and then locally edited — 780 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. — packages/scenarios-stage-tamagotchi-electron/src/scenarios/plugin-chess-widget-flow.ts:5
apps/stage-tamagotchi-kirie/src-web/src/shared/eventa/index.ts:211 · apps/stage-tamagotchi/src/shared/eventa/index.ts:423 — 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. — apps/stage-tamagotchi-kirie/src-web/src/shared/eventa/index.ts:211
apps/stage-tamagotchi-kirie/src-web/src/renderer/composables/use-vision-screen-capture.ts:1 · apps/stage-tamagotchi/src/renderer/composables/use-vision-screen-capture.ts:1 — these 2 files are line-for-line copies of one another — 98 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — apps/stage-tamagotchi-kirie/src-web/src/renderer/composables/use-vision-screen-capture.ts:1
apps/stage-tamagotchi-kirie/src-web/src/renderer/widgets/extension-ui/components/extension-ui-host.vue:2 · apps/stage-tamagotchi/src/renderer/widgets/extension-ui/components/extension-ui-host.vue:2 — these 2 files are line-for-line copies of one another — 94 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — apps/stage-tamagotchi-kirie/src-web/src/renderer/widgets/extension-ui/components/extension-ui-host.vue:2
apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/devtools/screen-capture.vue:2 · apps/stage-tamagotchi/src/renderer/pages/devtools/screen-capture.vue:2 — these 2 files are line-for-line copies of one another — 93 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/devtools/screen-capture.vue:2
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.
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.
packages/stage-pages/src/pages/v2/index.vue:10 reaches into another package with a relative path (../../../../stage-ui/src/components/menu/relu.avif) — import the package by name instead. — packages/stage-pages/src/pages/v2/index.vue:10
packages/stage-pages/src/pages/v2/index.vue:11 reaches into another package with a relative path (../../../../stage-ui/src/assets/live2d/models/hiyori/preview.png) — import the package by name instead. — packages/stage-pages/src/pages/v2/index.vue:11
packages/stage-ui-three/src/composables/vrm/animation.ts:8 imports three/src/math/MathUtils.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. — packages/stage-ui-three/src/composables/vrm/animation.ts:8
What to do
Fix the listed violations: import through public entries (package exports / slice index), never reach into another layer or package's internals.
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.
render has cyclomatic complexity 147 and cognitive complexity 110; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — packages/speech-transformer-math/src/render.ts:183
(anonymous) has cyclomatic complexity 93 and cognitive complexity 129; 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. — packages/server-runtime/src/index.ts:549
normalize has cyclomatic complexity 89 and cognitive complexity 128; 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:205
executeWorkflow has cyclomatic complexity 83 and cognitive complexity 191; 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. — services/computer-use-mcp/src/workflows/engine.ts:156
safeEnd has cyclomatic complexity 77 and cognitive complexity 134; 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. — packages/core-agent/src/voice/output/speech-transformation/segmenter.ts:88
performSend has cyclomatic complexity 76 and cognitive complexity 87; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/core-agent/src/runtime/chat-orchestrator-runtime.ts:637
poseToVrmTargets has cyclomatic complexity 68 and cognitive complexity 111; 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. — packages/model-driver-mediapipe/src/three/pose-to-vrm.ts:173
lowerScripts has cyclomatic complexity 65 and cognitive complexity 53; 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. — packages/speech-transformer-math/src/lower.ts:898
evaluate has cyclomatic complexity 63 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. — packages/stage-pages/src/vite/settings-search.ts:1195
lowerTerms has cyclomatic complexity 61 and cognitive complexity 98; 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. — packages/speech-transformer-math/src/lower.ts:601
(anonymous) has cyclomatic complexity 57 and cognitive complexity 61; 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. — services/computer-use-mcp/src/server/action-executor.ts:237
(anonymous) has cyclomatic complexity 54 and cognitive complexity 48; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — packages/server-sdk/src/client.ts:310
runArtistTask has cyclomatic complexity 52 and cognitive complexity 64; 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. — packages/stage-ui/src/stores/modules/artistry-autonomous.ts:50
evaluateStrategy has cyclomatic complexity 49 and cognitive complexity 47; 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. — services/computer-use-mcp/src/strategy.ts:204
planExtensionActivation has cyclomatic complexity 47 and cognitive complexity 81; 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. — packages/plugin-sdk/src/plugin-host/activation-plan.ts:118
walk has cyclomatic complexity 46 and cognitive complexity 95; 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. — packages/stage-pages/src/vite/settings-search.ts:1350
handleArtistryTrigger has cyclomatic complexity 46 and cognitive complexity 68; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/stage-tamagotchi/src/main/services/airi/widgets/artistry-bridge.ts:263
evaluateActionPolicy has cyclomatic complexity 46 and cognitive complexity 41; 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. — services/computer-use-mcp/src/policy.ts:100
chunkTtsInput has cyclomatic complexity 41 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. — packages/pipelines-audio/src/processors/tts-chunker.ts:56
(anonymous) has cyclomatic complexity 41 and cognitive complexity 66; 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. — server/apps/api/src/routes/openai/v1/operations/responses/index.ts:277
What to do
Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
Do you agree with this assessment?
R3 · Large Files8.0 / 10Strong✓ 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.
integrations/minecraft/src/cognitive/conscious/brain.ts has 2089 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — integrations/minecraft/src/cognitive/conscious/brain.ts:1
packages/stage-ui/src/stores/chat/session-store.ts has 1705 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/stage-ui/src/stores/chat/session-store.ts:1
packages/stage-pages/src/vite/settings-search.ts has 1539 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/stage-pages/src/vite/settings-search.ts:1
integrations/minecraft/src/debug/web/app.js has 1517 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — integrations/minecraft/src/debug/web/app.js:1
packages/plugin-protocol/src/types/events.ts has 1416 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/plugin-protocol/src/types/events.ts:1
packages/stage-ui/src/stores/chat.ts has 1416 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/stage-ui/src/stores/chat.ts:1
services/computer-use-mcp/src/workflows/engine.ts has 1376 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — services/computer-use-mcp/src/workflows/engine.ts:1
packages/core-agent/src/runtime/chat-orchestrator-runtime.ts has 1375 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/core-agent/src/runtime/chat-orchestrator-runtime.ts:1
packages/stage-ui/src/stores/modules/airi-card.ts has 1362 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/stage-ui/src/stores/modules/airi-card.ts:1
REDACTED has 1313 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
services/computer-use-mcp/src/server/register-tools.ts has 1249 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — services/computer-use-mcp/src/server/register-tools.ts:1
server/apps/api/src/services/domain/llm-router/router.ts has 1155 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — server/apps/api/src/services/domain/llm-router/router.ts:1
packages/stage-ui/src/stores/providers/provider.ts has 1105 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/stage-ui/src/stores/providers/provider.ts:1
packages/stage-ui/src/stores/mods/api/context-bridge.ts has 1052 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/stage-ui/src/stores/mods/api/context-bridge.ts:1
packages/speech-transformer-math/src/lower.ts has 1017 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/speech-transformer-math/src/lower.ts:1
packages/stage-pages/src/pages/settings/airi-card/components/CardEditor.vue has 1010 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/stage-pages/src/pages/settings/airi-card/components/CardEditor.vue:1
packages/server-runtime/src/index.ts has 996 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/server-runtime/src/index.ts:1
packages/stage-ui-three/src/components/Model/VRMModel.vue has 990 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/stage-ui-three/src/components/Model/VRMModel.vue:1
packages/stage-ui-three/src/components/ThreeScene.vue has 965 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/stage-ui-three/src/components/ThreeScene.vue:1
packages/stage-ui/src/composables/use-analytics.ts has 952 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/stage-ui/src/composables/use-analytics.ts:1
packages/stage-pages/src/pages/settings/modules/speech.vue has 922 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/stage-pages/src/pages/settings/modules/speech.vue:1
packages/stage-pages/src/pages/settings/account/account-settings-page.vue has 919 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/stage-pages/src/pages/settings/account/account-settings-page.vue:1
packages/plugin-sdk/src/plugin-host/core.ts has 907 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/plugin-sdk/src/plugin-host/core.ts:1
packages/stage-ui-live2d/src/components/scenes/live2d/Model.vue has 897 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/stage-ui-live2d/src/components/scenes/live2d/Model.vue:1
REDACTED has 846 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
packages/plugin-sdk/src/plugin-host/hosted-kits.ts has 839 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/plugin-sdk/src/plugin-host/hosted-kits.ts:1
packages/stage-ui/src/components/scenarios/settings/model-settings/live2d.vue has 821 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/stage-ui/src/components/scenarios/settings/model-settings/live2d.vue:1
apps/stage-tamagotchi/src/main/services/airi/plugins/host/index.ts has 806 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/stage-tamagotchi/src/main/services/airi/plugins/host/index.ts:1
server/apps/api/src/app.ts has 800 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — server/apps/api/src/app.ts:1
apps/stage-tamagotchi/src/renderer/pages/index.vue has 796 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/stage-tamagotchi/src/renderer/pages/index.vue:1
packages/stage-pages/src/pages/devtools/io-tracer/components/io-tracer-chart.vue has 791 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/stage-pages/src/pages/devtools/io-tracer/components/io-tracer-chart.vue:1
packages/better-ws/src/client/index.ts has 785 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/better-ws/src/client/index.ts:1
server/apps/auth/src/auth.ts has 775 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — server/apps/auth/src/auth.ts:1
packages/stage-ui/src/components/scenes/Stage.vue has 752 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/stage-ui/src/components/scenes/Stage.vue:1
services/computer-use-mcp/src/server/action-executor.ts has 736 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — services/computer-use-mcp/src/server/action-executor.ts:1
apps/stage-tamagotchi/src/shared/eventa/index.ts has 717 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/stage-tamagotchi/src/shared/eventa/index.ts:1
packages/stage-pages/src/pages/settings/flux.vue has 710 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/stage-pages/src/pages/settings/flux.vue:1
packages/stage-ui-live2d/src/composables/live2d/motion-manager.ts has 703 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/stage-ui-live2d/src/composables/live2d/motion-manager.ts:1
packages/stage-shared/src/screen-ambient-light/sampling.ts has 699 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/stage-shared/src/screen-ambient-light/sampling.ts:1
apps/stage-tamagotchi/src/main/windows/widgets/index.ts has 694 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/stage-tamagotchi/src/main/windows/widgets/index.ts:1
What to do
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Do you agree with this assessment?
R4 · Test Coverage7.6 / 10Strong✓ Tool-verified
React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.
Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.
server/apps/api/src/services/domain/billing/tests/flux-usage-migration.test.ts:10 imports '../../../../../drizzle', 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. — server/apps/api/src/services/domain/billing/tests/flux-usage-migration.test.ts:10
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. (×39) — integrations/minecraft/src/debug/web/app.js:1, services/computer-use-mcp/src/runner/service.ts:1, apps/stage-tamagotchi/src/renderer/pages/index.vue:1, …
What to do
Add tests that import the unreached modules (directly or through their public entry).
Do you agree with this assessment?
R6 · Tooling10.0 / 10Exemplary✓ Tool-verified
React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.
Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.
This repository declares test tooling, and the ✓ above records that declaration — but server/apps/api/src/services/domain/billing/tests/flux-usage-migration.test.ts 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. — server/apps/api/src/services/domain/billing/tests/flux-usage-migration.test.ts:10
Do you agree with this assessment?
R7 · Dead Code6.0 / 10Adequate✓ 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.
Unreachable from the 1391 application, 153 tooling and 918 test entry point(s) detected in this repo. Gate removals on `pnpm run build` — an undetected custom entry would make these reachable.
no import path from any entry point (1391 application, 153 tooling, 918 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 (×29) — services/computer-use-mcp/src/runner/service.ts, apps/component-calling/src/pages/index.vue, apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/index.vue, …
no import path from any entry point (1391 application, 153 tooling, 918 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (plugins/airi-plugin-web-extension/entrypoints/content.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — plugins/airi-plugin-web-extension/src/content/index.ts
no import path from any entry point (1391 application, 153 tooling, 918 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (apps/stage-tamagotchi/src/renderer/pages/devtools/live2d-motion.vue) — 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 — apps/stage-tamagotchi/src/renderer/features/live2d/system-audio-lipsync.ts
no import path from any entry point (1391 application, 153 tooling, 918 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (apps/stage-pocket/src/workers/vad/index.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — apps/stage-pocket/src/workers/vad/vad.ts
no import path from any entry point (1391 application, 153 tooling, 918 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (apps/stage-web/src/workers/vad/index.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — apps/stage-web/src/workers/vad/vad.ts
no import path from any entry point (1391 application, 153 tooling, 918 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (plugins/airi-plugin-web-extension/entrypoints/background.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — plugins/airi-plugin-web-extension/src/background/client.ts
no import path from any entry point (1391 application, 153 tooling, 918 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (apps/stage-web/src/pages/settings/characters/index.vue) — 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 — apps/stage-web/src/pages/settings/characters/components/CharacterDialog.vue
no import path from any entry point (1391 application, 153 tooling, 918 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (apps/stage-tamagotchi/src/renderer/pages/devtools/vision.vue) — 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 — apps/stage-tamagotchi/src/renderer/composables/use-vision-screen-capture.ts
no import path from any entry point (1391 application, 153 tooling, 918 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/devtools/vision.vue) — 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 — apps/stage-tamagotchi-kirie/src-web/src/renderer/composables/use-vision-screen-capture.ts
no import path from any entry point (1391 application, 153 tooling, 918 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/settings/models/index.vue) — 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 — apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/settings/models/godot-view-patch-queue.ts
no import path from any entry point (1391 application, 153 tooling, 918 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (apps/stage-tamagotchi/src/renderer/pages/settings/models/index.vue) — 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 — apps/stage-tamagotchi/src/renderer/pages/settings/models/godot-view-patch-queue.ts
What to do
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.
Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.
Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×3)
Every import is type-only — move it to devDependencies. — apps/component-calling/src/pages/index.vue:2
What to do
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
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.
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.
Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` wastes a thread and, if the task needs a context this one is holding, deadlocks. `Dispose()` returns void by contract, so it cannot simply `await`: signal the work to stop first (cancel its token, set its stop flag) so the wait is short, give the wait a TIMEOUT so a hung task cannot hang shutdown, and — where callers can use it — add an awaitable teardown (`DisposeAsync`/`StopAsync`) beside the synchronous one and let `Dispose()` remain the bounded fallback. — apps/stage-tamagotchi-kirie/src-godot/scripts/loopback-auth-server.cs:62
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.
Do you agree with this assessment?
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.
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.
Do you agree with this assessment?
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.
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.
Do you agree with this assessment?
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.
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.
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.
Other · Code Health — Whether async methods accept a CancellationToken so work can be cancelled (adoption curve).
Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.
Only 2/6 async methods accept a CancellationToken, so in-flight work can't be stopped early when the caller gives up — whatever ends it in your host (shutdown signal, timeout, abandoned request, user cancel). Thread a token through the call chain and honour it at each await and loop; where a method genuinely cannot be interrupted, omitting it is a deliberate choice — judge against your hosting model.
No CancellationToken parameter — the body observes an ambient token instead (a field or a context object), so the work does stop on cancellation, but a caller cannot cancel this call independently of the owner that created that token. (×2) — apps/stage-tamagotchi-kirie/src-godot/scripts/auth-service.cs:129, apps/stage-tamagotchi-kirie/src-godot/scripts/loopback-auth-server.cs:77
No CancellationToken parameter — this work can't be stopped early once started. (×2) — apps/stage-tamagotchi-kirie/src-godot/scripts/loopback-auth-server.cs:121, apps/stage-tamagotchi-kirie/src-godot/scripts/loopback-auth-server.cs:183
What to do
Thread a CancellationToken through async methods so work stops promptly on cancellation.
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.
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.
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.
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.
Do you agree with this assessment?
X24 · Document value interpolated into markup unescaped5.1 / 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.
`f` 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. — integrations/minecraft/src/debug/web/app.js:492
`time` 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. (×2) — integrations/minecraft/src/debug/web/app.js:551, integrations/minecraft/src/debug/web/app.js:1346
`log.level` 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. — integrations/minecraft/src/debug/web/app.js:552
`defaultValue` is text this program did not author, and it is written into an unquoted attribute 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. HTML text encoding does not help in an unquoted attribute — whitespace ends it; quote the attribute and encode the value. — integrations/minecraft/src/debug/web/app.js:1054
`this.results.map((result)=>{const isError=!!result.error const source=result.source==='llm'?'llm':'manual'const sourc…` 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. — integrations/minecraft/src/debug/web/app.js:1327
`Number.isFinite(result.durationMs)?`${result.durationMs}ms`:'-'` 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. — integrations/minecraft/src/debug/web/app.js:1347
`highlightTagToHtml(selectedCard.description)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` 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. — packages/stage-pages/src/pages/settings/airi-card/components/card-detail.vue:443
`highlightTagToHtml(selectedCard.notes)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` 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. — packages/stage-pages/src/pages/settings/airi-card/components/card-detail.vue:450
`highlightTagToHtml(value)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` 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. — packages/stage-pages/src/pages/settings/airi-card/components/card-detail.vue:463
`t('settings.pages.scene.tip.description')` is text this program did not author, and it is written into the text of an element through Vue's `v-html` 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. — packages/stage-pages/src/pages/settings/scene/index.vue:206
`safeOllamaConnectivityTroubleshootingHtml` is text this program did not author, and it is written into the text of an element through Vue's `v-html` 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. — packages/stage-pages/src/pages/v2/settings/providers/edit/[providerId]/index.vue:621
`processedContent` is text this program did not author, and it is written into the text of an element through Vue's `v-html` 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. — packages/stage-ui/src/components/markdown/markdown-renderer.vue:62
`favicon` is text this program did not author, and it is written into an unquoted attribute 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. HTML text encoding does not help in an unquoted attribute — whitespace ends it; quote the attribute and encode the value. — packages/stage-ui/src/tools/web-search.ts:119
`safeUrl` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme 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. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path. — server/apps/auth/src/email.ts:219
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.
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.
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.
Do you agree with this assessment?
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.
Do you agree with this assessment?
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.
Do you agree with this assessment?
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.
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. — engines/stage-tamagotchi-godot/scripts/view/StageViewStateStore.cs:95
What to do
Swallowed exception (empty catch)
Do you agree with this assessment?
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.
Do you agree with this assessment?
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.
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.
1/2 NRT-eligible project(s) enable <Nullable>enable</Nullable> (projects targeting a pre-C#-8 framework are excluded — NRTs aren't available there). NRTs catch a whole class of null-deref bugs at compile time.
~0.3 `!` suppressions per 1k syntax nodes — 6 suppression(s) across the 18231 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 `!`.
Do you agree with this assessment?
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.
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.
P12 CI test-gate honesty — 12 observation(s) recorded · Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
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 — 15 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not included — 55 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 Android app did not build — `./gradlew :app:assembleDebug` exited 1: Where:
Build file 'apps/stage-pocket/android/app/build.gradle.kts' line: 89
* What went wrong:
A problem occurred evaluating script.
> Could not r…; runtime evidence skipped (launch chosen because apps/stage-pocket/android/app/build.gradle.kts applies the Android application plugin and apps/stage-pocket/android/gradlew builds it) This is a statement about this run, not a statement about your application: nothing here says the app is inaccessible, only that it was never run.
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.
D11 Test Reliability — Test reliability not measured — polyglot suite, one half not re-run
D12 Dependency Hygiene — Dependency hygiene not measured
D18 Solution Shape — D18 scores the shape of a C#/VB .NET solution, but this repository's production source is mostly .gd, .kt, .mm, .py, .swift, .ts, which the C#/VB workspace does not load — the projects that loaded are an immaterial minority, so solution shape was not assessed for this repository. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
D21 Naming Consistency — Naming consistency is measured on C# only; JavaScript, Kotlin, Python, Swift, TypeScript not measured.
D22 Internal API Consistency — API consistency is measured on C# only; the exposed TypeScript surface was not measured.
D23 Boundary Type-Coupling — Cross-context type coupling could not be assessed — this codebase's bounded contexts are neither declared nor inferable.
D24 Comment Value — D24 reads C# and Visual Basic comments only; comments in this repository's .kt, .py, .swift, .ts source were not judged.
D25 ADR Conformance — None of 32 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 counts a call into the standard library or a dependency as unresolved for this repository's language (.ts), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D32 Data Compliance (PII/GDPR) — 124 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 — .NET and JavaScript/TypeScript suite
DM1 Aggregate boundaries — no aggregates detected — aggregate-boundary check not applicable
DM11 Constructible invalid state — no entities detected — construction-time invariants not assessable
DM2 Strongly-typed ids — no id-bearing domain types detected — strongly-typed-id adoption not assessable
DM3 Integration-event coupling — no integration events detected — coupling check not applicable
DM4 Rich vs anemic model — no data-bearing entities detected — rich-vs-anemic model not assessable
DM5 Encapsulated state — no domain entities found — DM5 grades how entities protect their state, and this repository declares none
DM7 Repository granularity — no repository abstraction detected (e.g. uses a document session)
ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and this analysis resolves a call's owner only where the receiver's type is written down in the source. Reported as guidance rather than measured
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
P2 Observability — This repo is a library, not a deployed service — it has no process to operate, so production observability (structured logging, tracing/metrics, health checks) is N/A. A library may log via an injected ILogger, but the absence of operational telemetry is not a defect here. If it grows a host (web API, worker), the dimension reactivates.
P7 Outbound HTTP resilience — not applicable — this isn't a service/API/worker
P8 Schema migrations — Drizzle is declared, but the schema-migration mechanism could not be identified. Our limit, not a verdict on this repository.
P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (lcov — `vitest --coverage --coverage.reporter=lcovonly`) 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.
R5 Dependency Freshness — uses a pnpm lockfile — dependency freshness not measured here; JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
S1 Web-Security Posture — No web surface detected in the analyzed source — no HTTP API or web-UI project (no controllers/minimal-API endpoints, no Razor/Blazor views) and no web middleware (HTTPS redirection, HSTS, security headers, cookies). Transport security, security headers, secure cookies, CSRF/input-validation and middleware-order controls are therefore N/A here — this is a library/CLI/worker, not a web app. Crypto hygiene was still checked and found nothing to flag. If this codebase becomes web-facing, the dimension reactivates automatically.
X4 Structured logging — This check asks whether log calls keep a message's values apart from its text, which needs a logger that can carry them as fields. This repository's C# was read, and every log call in it goes through a logger that takes one finished message — its own wrapper, log4net, Console or Debug — so an interpolated message there loses nothing the API could have kept. Calls through Microsoft.Extensions.Logging, Serilog, NLog or ZLogger, or any logger with a message-template overload, would be judged.
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
Domain depends on infrastructure: context integrations/twitter-services/src/core/browser/context.ts:5— `integrations/twitter-services/src/core/browser/context.ts` (domain layer) depends on `node:fs` (import) — a persistence module; the domain should own a port and let an infrastructure adapter implement it.
Domain depends on infrastructure: billing-service server/apps/api/src/services/domain/billing/billing-service.ts:1— `server/apps/api/src/services/domain/billing/billing-service.ts` (domain layer) depends on `ioredis` (import) — a cache module; the domain should own a port and let an infrastructure adapter implement it.
Domain depends on infrastructure: billing-service server/apps/api/src/services/domain/billing/billing-service.ts:9— `server/apps/api/src/services/domain/billing/billing-service.ts` (domain layer) depends on `drizzle-orm` (import) — a persistence module; the domain should own a port and let an infrastructure adapter implement it.
Domain depends on infrastructure: billing-service server/apps/api/src/services/domain/billing/billing-service.ts:3— `server/apps/api/src/services/domain/billing/billing-service.ts` (domain layer) depends on `../../../libs/db` (import of `server/apps/api/src/libs/db.ts`) — a persistence module; the domain should own a port and let an infrastructure adapter implement it.
Domain depends on infrastructure: billing-service server/apps/api/src/services/domain/billing/billing-service.ts:17— `server/apps/api/src/services/domain/billing/billing-service.ts` (domain layer) depends on `../../../schemas/flux` (import of `server/apps/api/src/schemas/flux.ts`) — a persistence module; the domain should own a port and let an infrastructure adapter implement it.
Domain depends on infrastructure: billing-service server/apps/api/src/services/domain/billing/billing-service.ts:18— `server/apps/api/src/services/domain/billing/billing-service.ts` (domain layer) depends on `../../../schemas/flux-transaction` (import of `server/apps/api/src/schemas/flux-transaction.ts`) — a persistence module; the domain should own a port and let an infrastructure adapter implement it.
Domain depends on infrastructure: billing-service server/apps/api/src/services/domain/billing/billing-service.ts:19— `server/apps/api/src/services/domain/billing/billing-service.ts` (domain layer) depends on `../../../schemas/flux-usage` (import of `server/apps/api/src/schemas/flux-usage.ts`) — a persistence module; the domain should own a port and let an infrastructure adapter implement it.
Domain depends on infrastructure: wallet-initialization server/apps/api/src/services/domain/billing/wallet-initialization.ts:1— `server/apps/api/src/services/domain/billing/wallet-initialization.ts` (domain layer) depends on `../../../libs/db` (import of `server/apps/api/src/libs/db.ts`) — a persistence module; the domain should own a port and let an infrastructure adapter implement it.
Domain depends on infrastructure: wallet-initialization server/apps/api/src/services/domain/billing/wallet-initialization.ts:3— `server/apps/api/src/services/domain/billing/wallet-initialization.ts` (domain layer) depends on `../../../schemas/flux` (import of `server/apps/api/src/schemas/flux.ts`) — a persistence module; the domain should own a port and let an infrastructure adapter implement it.
Domain depends on infrastructure: wallet-initialization server/apps/api/src/services/domain/billing/wallet-initialization.ts:4— `server/apps/api/src/services/domain/billing/wallet-initialization.ts` (domain layer) depends on `../../../schemas/flux-transaction` (import of `server/apps/api/src/schemas/flux-transaction.ts`) — a persistence module; the domain should own a port and let an infrastructure adapter implement it.
Domain depends on infrastructure: character-cards server/apps/api/src/services/domain/character-cards.ts:1— `server/apps/api/src/services/domain/character-cards.ts` (domain layer) depends on `../../libs/db` (import of `server/apps/api/src/libs/db.ts`) — a persistence module; the domain should own a port and let an infrastructure adapter implement it.
Domain depends on infrastructure: character-cards server/apps/api/src/services/domain/character-cards.ts:8— `server/apps/api/src/services/domain/character-cards.ts` (domain layer) depends on `../../schemas/character-cards` (import of `server/apps/api/src/schemas/character-cards.ts`) — a persistence module; the domain should own a port and let an infrastructure adapter implement it.
Domain depends on infrastructure: characters server/apps/api/src/services/domain/characters.ts:5— `server/apps/api/src/services/domain/characters.ts` (domain layer) depends on `drizzle-orm` (import) — a persistence module; the domain should own a port and let an infrastructure adapter implement it.
Domain depends on infrastructure: characters server/apps/api/src/services/domain/characters.ts:1— `server/apps/api/src/services/domain/characters.ts` (domain layer) depends on `../../libs/db` (import of `server/apps/api/src/libs/db.ts`) — a persistence module; the domain should own a port and let an infrastructure adapter implement it.
Domain depends on infrastructure: characters server/apps/api/src/services/domain/characters.ts:7— `server/apps/api/src/services/domain/characters.ts` (domain layer) depends on `../../schemas/characters` (import of `server/apps/api/src/schemas/characters.ts`) — a persistence module; the domain should own a port and let an infrastructure adapter implement it.
Domain depends on infrastructure: characters server/apps/api/src/services/domain/characters.ts:8— `server/apps/api/src/services/domain/characters.ts` (domain layer) depends on `../../schemas/user-character` (import of `server/apps/api/src/schemas/user-character.ts`) — a persistence module; the domain should own a port and let an infrastructure adapter implement it.
Domain depends on infrastructure: chats server/apps/api/src/services/domain/chats.ts:8— `server/apps/api/src/services/domain/chats.ts` (domain layer) depends on `drizzle-orm` (import) — a persistence module; the domain should own a port and let an infrastructure adapter implement it.
Domain depends on infrastructure: chats server/apps/api/src/services/domain/chats.ts:3— `server/apps/api/src/services/domain/chats.ts` (domain layer) depends on `../../libs/db` (import of `server/apps/api/src/libs/db.ts`) — a persistence module; the domain should own a port and let an infrastructure adapter implement it.
Domain depends on infrastructure: chats server/apps/api/src/services/domain/chats.ts:13— `server/apps/api/src/services/domain/chats.ts` (domain layer) depends on `../../schemas/chats` (import of `server/apps/api/src/schemas/chats.ts`) — a persistence module; the domain should own a port and let an infrastructure adapter implement it.
Domain depends on infrastructure: display-models server/apps/api/src/services/domain/display-models.ts:11— `server/apps/api/src/services/domain/display-models.ts` (domain layer) depends on `drizzle-orm` (import) — a persistence module; the domain should own a port and let an infrastructure adapter implement it.
Domain depends on infrastructure: display-models server/apps/api/src/services/domain/display-models.ts:3— `server/apps/api/src/services/domain/display-models.ts` (domain layer) depends on `../../libs/db` (import of `server/apps/api/src/libs/db.ts`) — a persistence module; the domain should own a port and let an infrastructure adapter implement it.
Domain depends on infrastructure: display-models server/apps/api/src/services/domain/display-models.ts:4— `server/apps/api/src/services/domain/display-models.ts` (domain layer) depends on `../../schemas/display-models` (import of `server/apps/api/src/schemas/display-models.ts`) — a persistence module; the domain should own a port and let an infrastructure adapter implement it.
Domain depends on infrastructure: display-models server/apps/api/src/services/domain/display-models.ts:15— `server/apps/api/src/services/domain/display-models.ts` (domain layer) depends on `../../schemas/display-models` (import of `server/apps/api/src/schemas/display-models.ts`) — a persistence module; the domain should own a port and let an infrastructure adapter implement it.
Domain depends on infrastructure: store server/apps/api/src/services/domain/field-sync/store.ts:9— `server/apps/api/src/services/domain/field-sync/store.ts` (domain layer) depends on `drizzle-orm` (import) — a persistence module; the domain should own a port and let an infrastructure adapter implement it.
Domain depends on infrastructure: store server/apps/api/src/services/domain/field-sync/store.ts:1— `server/apps/api/src/services/domain/field-sync/store.ts` (domain layer) depends on `../../../libs/db` (import of `server/apps/api/src/libs/db.ts`) — a persistence module; the domain should own a port and let an infrastructure adapter implement it.
D10 · Test Quality· No assertions (empty test) · ×3
No assertions (empty test): grows the first detector windows before switching to a sliding window packages/pipelines-audio/src/audio-input.test.ts:274— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): holds the reload action while a save owns the picker (PR #2903) apps/stage-tamagotchi/src/renderer/pages/settings/modules/home-assistant.browser.test.ts:235— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): shows the saved style again when a switch fails apps/stage-tamagotchi/src/renderer/components/chat-window/chat-window-style-menu.browser.test.ts:175— Test method has an empty body — it asserts nothing and exercises no code.
EmptyCatchBlock engines/stage-tamagotchi-godot/scripts/view/StageViewStateStore.cs:95— 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.
Orphaned knowledge engines/stage-tamagotchi-godot/scripts/visuals/StagePostProcessCompositorEffect.Resources.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.
FunctionTooLong: airi-card.useAiriCardStore packages/stage-ui/src/stores/modules/airi-card.ts:128— FunctionTooLong — useAiriCardStore runs 872 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 772 over it, 8.72× 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: chat.useChatStore packages/stage-ui/src/stores/chat.ts:259— FunctionTooLong — useChatStore runs 856 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 756 over it, 8.56× 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: register-tools.registerComputerUseTools services/computer-use-mcp/src/server/register-tools.ts:138— FunctionTooLong — registerComputerUseTools runs 821 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 721 over it, 8.21× 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: context-bridge.useContextBridgeStore packages/stage-ui/src/stores/mods/api/context-bridge.ts:45— FunctionTooLong — useContextBridgeStore runs 766 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 666 over it, 7.66× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: provider.useProviderStore packages/stage-ui/src/stores/providers/provider.ts:98— FunctionTooLong — useProviderStore runs 757 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 657 over it, 7.57× 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: chat-orchestrator-runtime.createChatOrchestratorRuntime packages/core-agent/src/runtime/chat-orchestrator-runtime.ts:517— FunctionTooLong — createChatOrchestratorRuntime runs 714 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 614 over it, 7.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: router.createLlmRouterService server/apps/api/src/services/domain/llm-router/router.ts:246— FunctionTooLong — createLlmRouterService runs 637 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 537 over it, 6.37× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: settings-search.createSettingsSearch packages/stage-pages/src/vite/settings-search.ts:775— FunctionTooLong — createSettingsSearch runs 628 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 528 over it, 6.28× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: use-analytics.useAnalytics packages/stage-ui/src/composables/use-analytics.ts:114— FunctionTooLong — useAnalytics runs 610 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 510 over it, 6.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: index.setupApp packages/server-runtime/src/index.ts:215— FunctionTooLong — setupApp runs 601 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 501 over it, 6.01× 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: chat-orchestrator-runtime.createChatOrchestratorRuntime.performSend packages/core-agent/src/runtime/chat-orchestrator-runtime.ts:637— FunctionTooLong — createChatOrchestratorRuntime.performSend runs 518 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 418 over it, 5.18× 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: engine.executeWorkflow services/computer-use-mcp/src/workflows/engine.ts:156— FunctionTooLong — executeWorkflow runs 514 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 414 over it, 5.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: index.setupExtensionHostServiceInternal apps/stage-tamagotchi/src/main/services/airi/plugins/host/index.ts:273— FunctionTooLong — setupExtensionHostServiceInternal runs 418 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 318 over it, 4.18× 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: action-executor.createExecuteAction services/computer-use-mcp/src/server/action-executor.ts:236— FunctionTooLong — createExecuteAction runs 414 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 314 over it, 4.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: voice.useVoiceStore packages/stage-ui/src/stores/voice.ts:52— FunctionTooLong — useVoiceStore runs 369 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 269 over it, 3.69× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: config.useProviderConfigStore packages/stage-ui/src/stores/providers/config.ts:49— FunctionTooLong — useProviderConfigStore runs 344 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 244 over it, 3.44× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: index.createGodotStageManager REDACTED:149— FunctionTooLong — createGodotStageManager runs 343 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 243 over it, 3.43× 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: context-bridge.useContextBridgeStore.initialize packages/stage-ui/src/stores/mods/api/context-bridge.ts:603— FunctionTooLong — useContextBridgeStore.initialize runs 340 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 240 over it, 3.40× 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: display-models.useDisplayModelsStore packages/stage-ui/src/stores/display-models.ts:85— FunctionTooLong — useDisplayModelsStore runs 315 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 215 over it, 3.15× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: index.createClientWithConnector packages/better-ws/src/client/index.ts:370— FunctionTooLong — createClientWithConnector 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: floating.setupFloatingChatWindow apps/stage-tamagotchi/src/main/windows/chat/floating.ts:102— FunctionTooLong — setupFloatingChatWindow runs 301 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 201 over it, 3.01× 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: speech-pipeline.createSpeechPipeline packages/pipelines-audio/src/speech-pipeline.ts:65— FunctionTooLong — createSpeechPipeline runs 300 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 200 over it, 3.00× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: billing-service.createBillingService server/apps/api/src/services/domain/billing/billing-service.ts:33— FunctionTooLong — createBillingService runs 294 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 194 over it, 2.94× 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: auth.useAuthStore packages/stage-ui/src/stores/auth.ts:71— FunctionTooLong — useAuthStore runs 283 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 183 over it, 2.83× 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: use-screen-ambient-light.useScreenAmbientLight apps/stage-tamagotchi/src/renderer/composables/use-screen-ambient-light.ts:81— FunctionTooLong — useScreenAmbientLight 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.
No assertions: should no-op if no session services/computer-use-mcp/src/desktop-session.test.ts:163— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: all product-supported entries satisfy the verification triple services/computer-use-mcp/src/support-matrix.test.ts:21— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: all product-supported entries point at a strict release gate services/computer-use-mcp/src/support-matrix.test.ts:29— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: uses the ConfigKV schema as the key type server/apps/api/src/services/adapters/config-kv/index.test.ts:24— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: should bill per character with minimum charge server/apps/api/src/routes/openai/v1/route.test.ts:1386— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: should not charge when input is empty server/apps/api/src/routes/openai/v1/route.test.ts:1714— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: runs a recipe with every registered tool packages/stage-ui/src/stores/chat-background-tasks.browser.test.ts:154— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: stores the catalog default when a follower selects a vision provider packages/stage-ui/src/stores/modules/airi-card-inheritance.browser.test.ts:66— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: shows final transcription work and reports a provider failure through the host snapshot packages/stage-ui/src/stores/modules/hearing-status.browser.test.ts:18— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: exposes a closed provider id union to stage-ui consumers packages/stage-ui/src/libs/providers/providers/provider-definitions.test.ts:44— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: releases a late provider stream after the owning input was cancelled packages/stage-ui/src/libs/audio/hearing-transcriber.test.ts:45— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: takes its width from its own box in a narrow window packages/stage-ui/src/components/scenes/screen-size.browser.test.ts:49— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: says that this device cannot load the model of the card packages/stage-ui/src/components/scenes/stage-avatar-model-missing.browser.test.ts:32— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: explains a denied request in place packages/stage-ui/src/components/scenarios/settings/microphone-picker.browser.test.ts:77— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: says when access is granted but no microphone is connected packages/stage-ui/src/components/scenarios/settings/microphone-picker.browser.test.ts:95— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: lists the microphones as rows on a narrow screen packages/stage-ui/src/components/scenarios/settings/microphone-picker.browser.test.ts:101— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: keeps a select on a wide screen packages/stage-ui/src/components/scenarios/settings/microphone-picker.browser.test.ts:108— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: shows character expressions and updates their policy and preview state packages/stage-ui/src/components/scenarios/settings/model-settings/live2d.browser.test.ts:28— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: loads the voice catalogue for a reachable engine packages/stage-ui/src/components/scenarios/providers/voicevox-family-settings.browser.test.ts:111— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: persists voice settings through the provider record (Issue #2449) packages/stage-ui/src/components/scenarios/providers/voicevox-family-settings.browser.test.ts:144— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: persists AivisSpeech voice settings through the provider record (Issue #2449) packages/stage-ui/src/components/scenarios/providers/voicevox-family-settings.browser.test.ts:149— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: allows opening focus on the drawer without highlighting an action packages/stage-ui/src/components/scenarios/dialogs/bottom-drawer.browser.test.ts:35— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: keeps action clicks independent of drag dismissal for Issue #2085 packages/stage-ui/src/components/scenarios/dialogs/bottom-drawer.browser.test.ts:55— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: restores trigger focus and reports dismissal once packages/stage-ui/src/components/scenarios/dialogs/bottom-drawer.browser.test.ts:68— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: publishes the onboarding login click on the leader packages/stage-ui/src/components/scenarios/dialogs/onboarding/onboarding.browser.test.ts:95— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
Hotspot: packages/core-agent/src/runtime/chat-orchestrator-runtime.ts packages/core-agent/src/runtime/chat-orchestrator-runtime.ts:637— packages/core-agent/src/runtime/chat-orchestrator-runtime.ts changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 125 in chat-orchestrator-runtime.createChatOrchestratorRuntime.performSend at line 637. 9 of those changes were fix/bug commits, and the other 14 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:16:00 +07:00' --until='2026-10-26 22:16:00 +07:00' --full-history --no-merges -- packages/core-agent/src/runtime/chat-orchestrator-runtime.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: packages/stage-ui/src/stores/chat.ts packages/stage-ui/src/stores/chat.ts:652— packages/stage-ui/src/stores/chat.ts changed 41 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 49 in chat.useChatStore.streamWithStageAdapters at line 652. 13 of those changes were fix/bug commits, and the other 28 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:16:00 +07:00' --until='2026-10-26 22:16:00 +07:00' --full-history --no-merges -- packages/stage-ui/src/stores/chat.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: apps/stage-tamagotchi/src/main/windows/main/index.ts apps/stage-tamagotchi/src/main/windows/main/index.ts:59— apps/stage-tamagotchi/src/main/windows/main/index.ts changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in index.setupMainWindow at line 59. 8 of those changes were fix/bug commits, and the other 10 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:16:00 +07:00' --until='2026-10-26 22:16:00 +07:00' --full-history --no-merges -- apps/stage-tamagotchi/src/main/windows/main/index.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: packages/stage-ui/src/stores/chat/session-store.ts packages/stage-ui/src/stores/chat/session-store.ts:835— packages/stage-ui/src/stores/chat/session-store.ts changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in session-store.useChatSessionStore.reconcileCloudSessions at line 835. 9 of those changes were fix/bug commits, and the other 10 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:16:00 +07:00' --until='2026-10-26 22:16:00 +07:00' --full-history --no-merges -- packages/stage-ui/src/stores/chat/session-store.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: packages/stage-ui/src/stores/mods/api/context-bridge.ts packages/stage-ui/src/stores/mods/api/context-bridge.ts:603— packages/stage-ui/src/stores/mods/api/context-bridge.ts changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 45 in context-bridge.useContextBridgeStore.initialize at line 603. 5 of those changes were fix/bug commits, and the other 10 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:16:00 +07:00' --until='2026-10-26 22:16:00 +07:00' --full-history --no-merges -- packages/stage-ui/src/stores/mods/api/context-bridge.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: server/apps/api/src/app.ts server/apps/api/src/app.ts:150— server/apps/api/src/app.ts changed 30 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in app.buildApp at line 150. 8 of those changes were fix/bug commits, and the other 22 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:16:00 +07:00' --until='2026-10-26 22:16:00 +07:00' --full-history --no-merges -- server/apps/api/src/app.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: server/apps/api/src/routes/openai/v1/operations/responses/index.ts server/apps/api/src/routes/openai/v1/operations/responses/index.ts:106— server/apps/api/src/routes/openai/v1/operations/responses/index.ts changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in index.responsesCreate at line 106. 3 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:16:00 +07:00' --until='2026-10-26 22:16:00 +07:00' --full-history --no-merges -- server/apps/api/src/routes/openai/v1/operations/responses/index.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: packages/stage-ui/src/stores/modules/hearing.ts packages/stage-ui/src/stores/modules/hearing.ts:425— packages/stage-ui/src/stores/modules/hearing.ts changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in hearing.useHearingStore.transcription at line 425. 9 of those changes were fix/bug commits, and the other 12 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:16:00 +07:00' --until='2026-10-26 22:16:00 +07:00' --full-history --no-merges -- packages/stage-ui/src/stores/modules/hearing.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: server/apps/api/src/routes/openai/v1/operations/chat-completions/index.ts server/apps/api/src/routes/openai/v1/operations/chat-completions/index.ts:183— server/apps/api/src/routes/openai/v1/operations/chat-completions/index.ts changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in index.streamChatCompletion at line 183. 2 of those changes were fix/bug commits, and the other 9 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:16:00 +07:00' --until='2026-10-26 22:16:00 +07:00' --full-history --no-merges -- server/apps/api/src/routes/openai/v1/operations/chat-completions/index.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: packages/stage-ui/src/stores/providers/provider.ts packages/stage-ui/src/stores/providers/provider.ts:716— packages/stage-ui/src/stores/providers/provider.ts changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in provider.useProviderStore.listProviderVoices at line 716. 14 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:16:00 +07:00' --until='2026-10-26 22:16:00 +07:00' --full-history --no-merges -- packages/stage-ui/src/stores/providers/provider.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: packages/core-agent/src/runtime/llm-service.ts packages/core-agent/src/runtime/llm-service.ts:75— packages/core-agent/src/runtime/llm-service.ts changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in llm-service.streamOnce at line 75. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:16:00 +07:00' --until='2026-10-26 22:16:00 +07:00' --full-history --no-merges -- packages/core-agent/src/runtime/llm-service.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: server/apps/auth/src/auth.ts server/apps/auth/src/auth.ts:436— server/apps/auth/src/auth.ts changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in auth.createAuth at line 436. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:16:00 +07:00' --until='2026-10-26 22:16:00 +07:00' --full-history --no-merges -- server/apps/auth/src/auth.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: packages/stage-ui/src/stores/voice.ts packages/stage-ui/src/stores/voice.ts:310— packages/stage-ui/src/stores/voice.ts changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in voice.useVoiceStore.connectOutput at line 310. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:16:00 +07:00' --until='2026-10-26 22:16:00 +07:00' --full-history --no-merges -- packages/stage-ui/src/stores/voice.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: server/apps/api/src/services/domain/llm-router/router.ts server/apps/api/src/services/domain/llm-router/router.ts:460— server/apps/api/src/services/domain/llm-router/router.ts changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 37 in router.createLlmRouterService.route at line 460. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:16:00 +07:00' --until='2026-10-26 22:16:00 +07:00' --full-history --no-merges -- server/apps/api/src/services/domain/llm-router/router.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: packages/stage-ui/src/stores/modules/airi-card.ts packages/stage-ui/src/stores/modules/airi-card.ts:1173— packages/stage-ui/src/stores/modules/airi-card.ts changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in airi-card.useAiriCardStore.initialize at line 1173. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:16:00 +07:00' --until='2026-10-26 22:16:00 +07:00' --full-history --no-merges -- packages/stage-ui/src/stores/modules/airi-card.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: packages/stage-ui-live2d/src/components/scenes/live2d/Model.vue packages/stage-ui-live2d/src/components/scenes/live2d/Model.vue:309— packages/stage-ui-live2d/src/components/scenes/live2d/Model.vue changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in performModelLoad at line 309. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:16:00 +07:00' --until='2026-10-26 22:16:00 +07:00' --full-history --no-merges -- packages/stage-ui-live2d/src/components/scenes/live2d/Model.vue`: 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: apps/stage-tamagotchi/src/main/windows/widgets/index.ts apps/stage-tamagotchi/src/main/windows/widgets/index.ts:283— apps/stage-tamagotchi/src/main/windows/widgets/index.ts changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in index.setupWidgetsWindowManager at line 283. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:16:00 +07:00' --until='2026-10-26 22:16:00 +07:00' --full-history --no-merges -- apps/stage-tamagotchi/src/main/windows/widgets/index.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: apps/stage-tamagotchi/src/renderer/components/stage-islands/controls-island/index.vue apps/stage-tamagotchi/src/renderer/components/stage-islands/controls-island/index.vue:297— apps/stage-tamagotchi/src/renderer/components/stage-islands/controls-island/index.vue changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in (anonymous) at line 297. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:16:00 +07:00' --until='2026-10-26 22:16:00 +07:00' --full-history --no-merges -- apps/stage-tamagotchi/src/renderer/components/stage-islands/controls-island/index.vue`: 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: packages/stage-ui/src/stores/modules/artistry-autonomous.ts packages/stage-ui/src/stores/modules/artistry-autonomous.ts:50— packages/stage-ui/src/stores/modules/artistry-autonomous.ts changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 51 in artistry-autonomous.useAutonomousArtistryStore.runArtistTask at line 50. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:16:00 +07:00' --until='2026-10-26 22:16:00 +07:00' --full-history --no-merges -- packages/stage-ui/src/stores/modules/artistry-autonomous.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: REDACTED REDACTED:545— REDACTED changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in speech.useSpeechStore.createOutput at line 545. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:16:00 +07:00' --until='2026-10-26 22:16:00 +07: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: packages/pipelines-audio/src/processors/tts-chunker.ts packages/pipelines-audio/src/processors/tts-chunker.ts:56— packages/pipelines-audio/src/processors/tts-chunker.ts changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in tts-chunker.chunkTtsInput at line 56. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:16:00 +07:00' --until='2026-10-26 22:16:00 +07:00' --full-history --no-merges -- packages/pipelines-audio/src/processors/tts-chunker.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: packages/stage-ui/src/components/scenarios/chat/composables/use-chat-history-scroll.ts packages/stage-ui/src/components/scenarios/chat/composables/use-chat-history-scroll.ts:34— packages/stage-ui/src/components/scenarios/chat/composables/use-chat-history-scroll.ts changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in use-chat-history-scroll.useChatHistoryScroll at line 34. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:16:00 +07:00' --until='2026-10-26 22:16:00 +07:00' --full-history --no-merges -- packages/stage-ui/src/components/scenarios/chat/composables/use-chat-history-scroll.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: server/apps/api/src/services/domain/openai-speech/index.ts server/apps/api/src/services/domain/openai-speech/index.ts:108— server/apps/api/src/services/domain/openai-speech/index.ts changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in index.createOpenAiSpeechService.handleSpeechRequest at line 108. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:16:00 +07:00' --until='2026-10-26 22:16:00 +07:00' --full-history --no-merges -- server/apps/api/src/services/domain/openai-speech/index.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: server/apps/api/src/routes/stripe/operations/webhook.ts server/apps/api/src/routes/stripe/operations/webhook.ts:20— server/apps/api/src/routes/stripe/operations/webhook.ts changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in webhook.createWebhookOperation at line 20. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:16:00 +07:00' --until='2026-10-26 22:16:00 +07:00' --full-history --no-merges -- server/apps/api/src/routes/stripe/operations/webhook.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: packages/provider-inference/src/validators/openai-compatible.ts packages/provider-inference/src/validators/openai-compatible.ts:107— packages/provider-inference/src/validators/openai-compatible.ts changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 46 in openai-compatible.createOpenAICompatibleValidators at line 107. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:16:00 +07:00' --until='2026-10-26 22:16:00 +07:00' --full-history --no-merges -- packages/provider-inference/src/validators/openai-compatible.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.
+ 23 more in this group — see findings.md.
R4 · Test Coverage· No test reaches this file · ×39
No test reaches this file integrations/minecraft/src/debug/web/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 services/computer-use-mcp/src/runner/service.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file apps/stage-tamagotchi/src/renderer/pages/index.vue: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 engines/stage-tamagotchi-godot/tools/dumpRenderStages.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 services/computer-use-mcp/chrome-extension/background.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 integrations/twitter-services/src/adapters/mcp-adapter.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file integrations/discord-bot/src/bots/discord/commands/summon.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file integrations/telegram-bot/src/bots/telegram/index.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/ui-loading-screens/src/components/LoadingSciFiCircle/index.vue: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 integrations/minecraft/src/libs/mineflayer/core.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file apps/component-calling/src/pages/index.vue: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 integrations/twitter-services/src/adapters/airi-adapter.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file scripts/list-module-loc.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 apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/index.vue: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 packages/model-driver-mediapipe/src/three/apply-pose-to-vrm.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/settings/models/index.vue: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 apps/stage-tamagotchi/src/renderer/pages/settings/models/index.vue: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 packages/scenarios-stage-tamagotchi-electron/src/scenarios/plugin-chess-worker-smoke.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/model-driver-mediapipe/src/three/pose-to-vrm.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file integrations/satori-bot/src/core/loop/scheduler.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/settings/modules/mcp.vue: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 apps/stage-tamagotchi/src/renderer/pages/settings/modules/mcp.vue: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 plugins/airi-plugin-web-extension/src/content/index.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file integrations/twitter-services/src/core/services/tweet.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
Sync-over-async blocking apps/stage-tamagotchi/scripts/check-reproducible-build.ts:68— `spawnSync` in `buildOutput` 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 apps/stage-tamagotchi/scripts/merge-latest-mac.ts:189— `existsSync` 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 apps/stage-tamagotchi/scripts/merge-latest-mac.ts:190— `existsSync` 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 apps/stage-tamagotchi/scripts/merge-latest-mac.ts:193— `statSync` 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 apps/stage-tamagotchi/scripts/merge-latest-mac.ts:203— `existsSync` 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 apps/stage-tamagotchi/scripts/merge-latest-mac.ts:215— `existsSync` 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 apps/stage-tamagotchi/scripts/regenerate-windows-latest.ts:60— `existsSync` in `resolveFromWorkspace` 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 apps/stage-tamagotchi/scripts/regenerate-windows-latest.ts:67— `existsSync` in `resolveFromWorkspace` 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 apps/stage-tamagotchi/src/main/libs/electron/persistence.ts:125— `existsSync` in `writeHealingConfig` 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 apps/stage-tamagotchi/src/main/services/airi/channel-server/index.ts:262— `writeFileSync` in `installCACertificate` 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 apps/stage-tamagotchi/src/main/services/airi/channel-server/index.ts:275— `writeFileSync` in `installCACertificate` 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 apps/stage-tamagotchi/src/main/services/airi/channel-server/index.ts:281— `existsSync` in `installCACertificate` 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 apps/stage-tamagotchi/src/main/services/airi/channel-server/index.ts:284— `writeFileSync` in `installCACertificate` 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 apps/stage-tamagotchi/src/main/services/airi/channel-server/index.ts:302— `existsSync` in `generateCertificate` 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 apps/stage-tamagotchi/src/main/services/airi/channel-server/index.ts:304— `readFileSync` in `generateCertificate` 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 apps/stage-tamagotchi/src/main/services/airi/channel-server/index.ts:305— `readFileSync` in `generateCertificate` 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 apps/stage-tamagotchi/src/main/services/airi/channel-server/index.ts:316— `writeFileSync` in `generateCertificate` 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 apps/stage-tamagotchi/src/main/services/airi/channel-server/index.ts:317— `writeFileSync` in `generateCertificate` 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 apps/stage-tamagotchi/src/main/services/airi/channel-server/index.ts:340— `existsSync` in `getOrCreateCertificate` 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 apps/stage-tamagotchi/src/main/services/airi/channel-server/index.ts:341— `readFileSync` in `getOrCreateCertificate` 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 apps/stage-tamagotchi/src/main/services/airi/channel-server/index.ts:342— `readFileSync` in `getOrCreateCertificate` 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 apps/stage-tamagotchi/src/main/services/airi/channel-server/index.ts:344— `existsSync` in `getOrCreateCertificate` 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 apps/stage-tamagotchi/src/main/services/airi/channel-server/index.ts:350— `writeFileSync` in `getOrCreateCertificate` 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 apps/stage-tamagotchi/src/main/services/airi/channel-server/index.ts:351— `writeFileSync` in `getOrCreateCertificate` 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 apps/stage-tamagotchi/src/main/services/airi/channel-server/index.ts:353— `existsSync` in `getOrCreateCertificate` 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.
FileTooLong: conscious/brain.ts integrations/minecraft/src/cognitive/conscious/brain.ts— FileTooLong — 1690 significant lines (blank, comment-only and punctuation-only lines excluded), about 88% of them inside a single declaration: Brain (279-2329). The bar is 500 significant lines; this is 1190 over it, 3.38× 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: web/app.js integrations/minecraft/src/debug/web/app.js— FileTooLong — 1161 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 661 over it, 2.32× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: chat/session-store.ts packages/stage-ui/src/stores/chat/session-store.ts— FileTooLong — 1106 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: useChatSessionStore (67-1898). The bar is 500 significant lines; this is 606 over it, 2.21× 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: vite/settings-search.ts packages/stage-pages/src/vite/settings-search.ts— FileTooLong — 1096 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 596 over it, 2.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: stores/chat.ts packages/stage-ui/src/stores/chat.ts— FileTooLong — 1022 significant lines (blank, comment-only and punctuation-only lines excluded), about 84% of them inside a single declaration: useChatStore (259-1589). The bar is 500 significant lines; this is 522 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 — 1018 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 518 over it, 2.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: workflows/engine.ts services/computer-use-mcp/src/workflows/engine.ts— FileTooLong — 1005 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 505 over it, 2.01× 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: runtime/chat-orchestrator-runtime.ts packages/core-agent/src/runtime/chat-orchestrator-runtime.ts— FileTooLong — 991 significant lines (blank, comment-only and punctuation-only lines excluded), about 72% of them inside a single declaration: createChatOrchestratorRuntime (517-1493). The bar is 500 significant lines; this is 491 over it, 1.98× 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: modules/airi-card.ts packages/stage-ui/src/stores/modules/airi-card.ts— FileTooLong — 955 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: useAiriCardStore (128-1519). The bar is 500 significant lines; this is 455 over it, 1.91× 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: server/register-tools.ts services/computer-use-mcp/src/server/register-tools.ts— FileTooLong — 925 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: registerComputerUseTools (138-1364). The bar is 500 significant lines; this is 425 over it, 1.85× 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: providers/provider.ts packages/stage-ui/src/stores/providers/provider.ts— FileTooLong — 813 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: useProviderStore (98-1263). The bar is 500 significant lines; this is 313 over it, 1.63× 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: api/context-bridge.ts packages/stage-ui/src/stores/mods/api/context-bridge.ts— FileTooLong — 801 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: useContextBridgeStore (45-1151). The bar is 500 significant lines; this is 301 over it, 1.60× 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: llm-router/router.ts server/apps/api/src/services/domain/llm-router/router.ts— FileTooLong — 749 significant lines (blank, comment-only and punctuation-only lines excluded), about 85% of them inside a single declaration: createLlmRouterService (246-1257). The bar is 500 significant lines; this is 249 over it, 1.50× 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: visuals/StagePostProcessCompositorEffect.Resources.cs engines/stage-tamagotchi-godot/scripts/visuals/StagePostProcessCompositorEffect.Resources.cs— FileTooLong — 742 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 242 over it, 1.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: types/events.ts packages/plugin-protocol/src/types/events.ts— FileTooLong — 741 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 241 over it, 1.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: src/index.ts packages/server-runtime/src/index.ts— FileTooLong — 713 significant lines (blank, comment-only and punctuation-only lines excluded), about 84% of them inside a single declaration: setupApp (215-1177). The bar is 500 significant lines; this is 213 over it, 1.43× 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: composables/use-analytics.ts packages/stage-ui/src/composables/use-analytics.ts— FileTooLong — 683 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: useAnalytics (114-1083). The bar is 500 significant lines; this is 183 over it, 1.37× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/lower.ts packages/speech-transformer-math/src/lower.ts— FileTooLong — 675 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 175 over it, 1.35× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: plugin-host/core.ts packages/plugin-sdk/src/plugin-host/core.ts— FileTooLong — 619 significant lines (blank, comment-only and punctuation-only lines excluded), about 82% of them inside a single declaration: ExtensionHost (225-1025). The bar is 500 significant lines; this is 119 over it, 1.24× 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 — 611 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 111 over it, 1.22× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: plugin-host/hosted-kits.ts packages/plugin-sdk/src/plugin-host/hosted-kits.ts— FileTooLong — 596 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 96 over it, 1.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: server/action-executor.ts services/computer-use-mcp/src/server/action-executor.ts— FileTooLong — 591 significant lines (blank, comment-only and punctuation-only lines excluded), about 70% of them inside a single declaration: createExecuteAction (236-795). The bar is 500 significant lines; this is 91 over it, 1.18× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/app.ts server/apps/api/src/app.ts— FileTooLong — 582 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 82 over it, 1.16× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: formula-speech/cases.ts evals/tts-speech-formula/eval/cases/formula-speech/cases.ts— FileTooLong — 523 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 23 over it, 1.05× 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.
Repeated repair: apps/stage-web/src/App.vue apps/stage-web/src/App.vue:181— apps/stage-web/src/App.vue changed 14 times in last 90 days and 8 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is (anonymous) at line 181), 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(stage-ui): inherit global settings for default card (#2332)”; “fix(stage-ui): remove the chat session initialization race (#2394)”; “fix(stage-ui): align module provider visibility with auth (#2353)”; “fix(stage-ui,stage-tamagotchi,stage-web,stage-pocket): incorrectly initialized”. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:16:00 +07:00' --until='2026-10-26 22:16:00 +07:00' --full-history --no-merges -- apps/stage-web/src/App.vue`: 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: packages/stage-ui/src/libs/providers/providers/official/index.ts packages/stage-ui/src/libs/providers/providers/official/index.ts:433— packages/stage-ui/src/libs/providers/providers/official/index.ts changed 11 times in last 90 days and 7 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 index.pickOfficialSpeechVoice at line 433), 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(stage-ui): enable official web search by default (#2602)”; “fix(stage-ui): restore official chat default (#2587)”; “fix(stage-ui): restore TTS after first login (#2490)”; “fix(stage-ui): inherit global settings for default card (#2332)”. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:16:00 +07:00' --until='2026-10-26 22:16:00 +07:00' --full-history --no-merges -- packages/stage-ui/src/libs/providers/providers/official/index.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: packages/stage-pages/src/pages/settings/modules/consciousness.vue packages/stage-pages/src/pages/settings/modules/consciousness.vue:57— packages/stage-pages/src/pages/settings/modules/consciousness.vue changed 11 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is selectModel at line 57), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(stage-ui): enforce required OpenRouter reasoning (#2818)”; “fix(stage-ui): make custom sampling parameters opt-in (#2650)”; “fix(stage-ui): inherit global settings for default card (#2332)”; “fix(stage-ui): align module provider visibility with auth (#2353)”. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:16:00 +07:00' --until='2026-10-26 22:16:00 +07:00' --full-history --no-merges -- packages/stage-pages/src/pages/settings/modules/consciousness.vue`: 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: apps/stage-pocket/src/App.vue apps/stage-pocket/src/App.vue:149— apps/stage-pocket/src/App.vue changed 10 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is (anonymous) at line 149), 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(stage-ui): inherit global settings for default card (#2332)”; “fix(stage-ui): align module provider visibility with auth (#2353)”; “fix(stage-ui,stage-tamagotchi,stage-web,stage-pocket): incorrectly initialized”; “fix(stage-ui,stage-tamagotchi,stage-web): infinite write config causing forever loading”. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:16:00 +07:00' --until='2026-10-26 22:16:00 +07:00' --full-history --no-merges -- apps/stage-pocket/src/App.vue`: 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: packages/stage-ui/src/stores/providers/config.ts packages/stage-ui/src/stores/providers/config.ts:405— packages/stage-ui/src/stores/providers/config.ts changed 9 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is config.useProviderConfigStore.pushProviders at line 405), 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(stage-ui): synchronize speech settings across windows (#2467)”; “fix(stage-ui): persist speech provider settings (#2497)”; “fix(speech): synchronize streaming catalog state (#2445)”; “fix(stage-ui): align module provider visibility with auth (#2353)”. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:16:00 +07:00' --until='2026-10-26 22:16:00 +07:00' --full-history --no-merges -- packages/stage-ui/src/stores/providers/config.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: packages/stage-ui/src/stores/modules/consciousness.ts packages/stage-ui/src/stores/modules/consciousness.ts:130— packages/stage-ui/src/stores/modules/consciousness.ts changed 9 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is consciousness.useConsciousnessStore.getChatProviderInstance at line 130), 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(stage-ui): enforce required OpenRouter reasoning (#2818)”; “fix(stage-tamagotchi): improve provider setup recovery (#2144)”; “fix(stage-ui): make custom sampling parameters opt-in (#2650)”; “fix(stage-ui,stage-tamagotchi,stage-web,stage-pocket): incorrectly initialized”. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:16:00 +07:00' --until='2026-10-26 22:16:00 +07:00' --full-history --no-merges -- packages/stage-ui/src/stores/modules/consciousness.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: packages/stage-ui-live2d/src/components/scenes/live2d/Canvas.vue packages/stage-ui-live2d/src/components/scenes/live2d/Canvas.vue:133— packages/stage-ui-live2d/src/components/scenes/live2d/Canvas.vue changed 7 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is syncBackground at line 133), 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(stage-ui-live2d): draw the resized frame before the compositor takes it (#2646)”; “fix(stage-ui): paint the scene into the canvas each renderer already draws (#2581)”; “fix(stage): unify mobile keyboard avoidance (#2426)”; “fix(stage-ui-live2d): avoid proxying renderer instances (#2386)”. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:16:00 +07:00' --until='2026-10-26 22:16:00 +07:00' --full-history --no-merges -- packages/stage-ui-live2d/src/components/scenes/live2d/Canvas.vue`: 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: apps/ui-server-auth/vite.config.ts apps/ui-server-auth/vite.config.ts:63— apps/ui-server-auth/vite.config.ts changed 6 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 2 (its worst body is chunkFileNames at line 63), 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(auth): return API and verification browser visits to AIRI (#2733)”; “fix(ui-server-auth): exclude stage inference assets (#2379)”; “fix(ui-server-auth): bust poisoned asset caches (#2196)”; “fix(stage-ui,stage-pocket,stage-web,stage-tamagotchi,ui-server-auth): analytics import not deferred or lazied”. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:16:00 +07:00' --until='2026-10-26 22:16:00 +07:00' --full-history --no-merges -- apps/ui-server-auth/vite.config.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: packages/stage-ui/src/components/scenarios/providers/speech-provider-settings.vue packages/stage-ui/src/components/scenarios/providers/speech-provider-settings.vue:91— packages/stage-ui/src/components/scenarios/providers/speech-provider-settings.vue changed 7 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is reconcileSettings at line 91), 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(stage-pages): add the MiniMax Speech settings page (#2703)”; “fix(stage-ui): synchronize speech settings across windows (#2467)”; “fix(stage-ui): persist speech provider settings (#2497)”; “fix(stage-ui): restore TTS after first login (#2490)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:16:00 +07:00' --until='2026-10-26 22:16:00 +07:00' --full-history --no-merges -- packages/stage-ui/src/components/scenarios/providers/speech-provider-settings.vue`: 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: apps/stage-tamagotchi/src/main/services/electron/auto-updater.ts apps/stage-tamagotchi/src/main/services/electron/auto-updater.ts:194— apps/stage-tamagotchi/src/main/services/electron/auto-updater.ts 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 10 (its worst body is auto-updater.extractReleaseTagsFromAtom at line 194), 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(stage-tamagotchi): run window IPC once per request (#3087)”; “fix(stage-tamagotchi): disable the updater in Nix packages (#3084)”; “fix(stage-tamagotchi): disable the updater in Flatpak (#3081)”; “fix(stage-tamagotchi): run updater IPC once per request (#3083)”. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:16:00 +07:00' --until='2026-10-26 22:16:00 +07:00' --full-history --no-merges -- apps/stage-tamagotchi/src/main/services/electron/auto-updater.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: packages/stage-ui/src/libs/auth.ts packages/stage-ui/src/libs/auth.ts:104— packages/stage-ui/src/libs/auth.ts 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 4 (its worst body is auth.completeOIDCSignIn at line 104), 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(auth): support confirmed account deletion with recent sign-in (#2895)”; “fix(stage-pages): keep the Flux spinner until sign-in leaves the page (#2807)”; “fix(stage-pocket): use system browser for authentication (#2355)”; “fix(stage-ui): synchronize auth state across windows (#2256)”. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:16:00 +07:00' --until='2026-10-26 22:16:00 +07:00' --full-history --no-merges -- packages/stage-ui/src/libs/auth.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: packages/stage-ui/src/libs/providers/stream-transcription/index.ts packages/stage-ui/src/libs/providers/stream-transcription/index.ts:109— packages/stage-ui/src/libs/providers/stream-transcription/index.ts 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 10 (its worst body is index.streamTranscription at line 109), 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(stage-ui): buffer Safari transcription stream uploads (#2610)”; “fix(stage-ui): normalize streaming transcription audio chunks (#2285)”; “fix(stage-ui): make streaming transcription requests half-duplex (#2283)”; “fix(stage-ui): preserve streaming transcript corrections (#2261)”. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:16:00 +07:00' --until='2026-10-26 22:16:00 +07:00' --full-history --no-merges -- packages/stage-ui/src/libs/providers/stream-transcription/index.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: apps/stage-tamagotchi/src/main/windows/dashboard/index.ts apps/stage-tamagotchi/src/main/windows/dashboard/index.ts:39— apps/stage-tamagotchi/src/main/windows/dashboard/index.ts changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is index.setupDashboardWindow at line 39), 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(stage-tamagotchi): run window IPC once per request (#3087)”; “fix(stage-tamagotchi): prevent auxiliary renderer request storms (#2304)”; “fix(stage-tamagotchi): let AIRI start on Linux ARM64 (#2253)”. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:16:00 +07:00' --until='2026-10-26 22:16:00 +07:00' --full-history --no-merges -- apps/stage-tamagotchi/src/main/windows/dashboard/index.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: packages/stage-ui/src/components/misc/profile-switcher-popover.vue packages/stage-ui/src/components/misc/profile-switcher-popover.vue:61— packages/stage-ui/src/components/misc/profile-switcher-popover.vue changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is (anonymous) at line 61), 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(stage-ui): open Save as New Profile form (#2397)”; “fix(stage-tamagotchi): prevent controls island overflow in small windows with scroll (#2474)”; “fix(stage-ui,stage-tamagotchi,stage-web): infinite write config causing forever loading”. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:16:00 +07:00' --until='2026-10-26 22:16:00 +07:00' --full-history --no-merges -- packages/stage-ui/src/components/misc/profile-switcher-popover.vue`: 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: apps/stage-tamagotchi/src/main/windows/onboarding/index.ts apps/stage-tamagotchi/src/main/windows/onboarding/index.ts:38— apps/stage-tamagotchi/src/main/windows/onboarding/index.ts changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is index.setupOnboardingWindowManager.reusableWindow at line 38), 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(stage-tamagotchi): run window IPC once per request (#3087)”; “fix(stage-tamagotchi): prevent auxiliary renderer request storms (#2304)”; “fix(stage-ui): synchronize auth state across windows (#2256)”. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:16:00 +07:00' --until='2026-10-26 22:16:00 +07:00' --full-history --no-merges -- apps/stage-tamagotchi/src/main/windows/onboarding/index.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: apps/stage-tamagotchi/src/main/windows/shared/display.ts apps/stage-tamagotchi/src/main/windows/shared/display.ts:266— apps/stage-tamagotchi/src/main/windows/shared/display.ts changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is display.widthFrom at line 266), 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: “revert(stage-tamagotchi): remove off-screen window recovery”; “fix(desktop): restore off-screen main window (#2203)”; “fix(stage-tamagotchi): fix window visibility and ozone flags on wayland (#2288)”. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:16:00 +07:00' --until='2026-10-26 22:16:00 +07:00' --full-history --no-merges -- apps/stage-tamagotchi/src/main/windows/shared/display.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: packages/stage-ui/src/libs/pinia/setup-synced.ts packages/stage-ui/src/libs/pinia/setup-synced.ts:23— packages/stage-ui/src/libs/pinia/setup-synced.ts changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 2 (its worst body is setup-synced.setupSynced at line 23), 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(stage-ui): run chat actions in the tab that has the Stage (#3101)”; “fix(stage-ui): restore TTS after first login (#2490)”; “fix(stage-tamagotchi): prevent auxiliary renderer request storms (#2304)”. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:16:00 +07:00' --until='2026-10-26 22:16:00 +07:00' --full-history --no-merges -- packages/stage-ui/src/libs/pinia/setup-synced.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: apps/stage-tamagotchi/src/main/libs/electron/persistence.ts apps/stage-tamagotchi/src/main/libs/electron/persistence.ts:137— apps/stage-tamagotchi/src/main/libs/electron/persistence.ts changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is persistence.createConfig.setup at line 137), 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(stage-tamagotchi): keep a deferred config write in its own root (#2913)”; “revert(stage-tamagotchi): remove configuration write isolation”; “fix(stage-tamagotchi): isolate configuration writes across host lifecycles (#2776)”. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 22:16:00 +07:00' --until='2026-10-26 22:16:00 +07:00' --full-history --no-merges -- apps/stage-tamagotchi/src/main/libs/electron/persistence.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.
D30 · Dependency Vulnerabilities· Medium CVE · ×16
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
X24 · Document value interpolated into markup unescaped· Untrusted text written into markup unescaped · ×15
Untrusted text written into markup unescaped integrations/minecraft/src/debug/web/app.js:492— `f` 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 integrations/minecraft/src/debug/web/app.js:551— `time` 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 integrations/minecraft/src/debug/web/app.js:552— `log.level` 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 integrations/minecraft/src/debug/web/app.js:1054— `defaultValue` is text this program did not author, and it is written into an unquoted attribute 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. HTML text encoding does not help in an unquoted attribute — whitespace ends it; quote the attribute and encode the value.
Untrusted text written into markup unescaped integrations/minecraft/src/debug/web/app.js:1327— `this.results.map((result)=>{const isError=!!result.error const source=result.source==='llm'?'llm':'manual'const sourc…` 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 integrations/minecraft/src/debug/web/app.js:1346— `time` 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 integrations/minecraft/src/debug/web/app.js:1347— `Number.isFinite(result.durationMs)?`${result.durationMs}ms`:'-'` 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 packages/stage-pages/src/pages/settings/airi-card/components/card-detail.vue:443— `highlightTagToHtml(selectedCard.description)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` 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 packages/stage-pages/src/pages/settings/airi-card/components/card-detail.vue:450— `highlightTagToHtml(selectedCard.notes)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` 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 packages/stage-pages/src/pages/settings/airi-card/components/card-detail.vue:463— `highlightTagToHtml(value)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` 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 packages/stage-pages/src/pages/settings/scene/index.vue:206— `t('settings.pages.scene.tip.description')` is text this program did not author, and it is written into the text of an element through Vue's `v-html` 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 packages/stage-pages/src/pages/v2/settings/providers/edit/[providerId]/index.vue:621— `safeOllamaConnectivityTroubleshootingHtml` is text this program did not author, and it is written into the text of an element through Vue's `v-html` 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 packages/stage-ui/src/components/markdown/markdown-renderer.vue:62— `processedContent` is text this program did not author, and it is written into the text of an element through Vue's `v-html` 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 packages/stage-ui/src/tools/web-search.ts:119— `favicon` is text this program did not author, and it is written into an unquoted attribute 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. HTML text encoding does not help in an unquoted attribute — whitespace ends it; quote the attribute and encode the value.
Untrusted text written into markup unescaped server/apps/auth/src/email.ts:219— `safeUrl` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme 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. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path.
P12 · CI test-gate honesty· Runner config excludes tests no gate runs · ×11
Runner config excludes tests no gate runs apps/stage-tamagotchi-kirie/vitest.config.ts:25— `src-web/src/renderer/host-context/**/*.browser.test.ts` removes 6 test(s) in 2 file(s) (e.g. `apps/stage-tamagotchi-kirie/src-web/src/renderer/host-context/external-navigation.browser.test.ts`, `apps/stage-tamagotchi-kirie/src-web/src/renderer/host-context/locale.browser.test.ts`) from what vitest collects, and no other runner or CI command runs them — they are dead tests. Run them (another runner, project or job), or delete them.
Runner config excludes tests no gate runs apps/stage-tamagotchi/vitest.config.ts:51— `src/**/*.browser.test.ts` removes 174 test(s) in 24 file(s) (e.g. `apps/stage-tamagotchi/src/renderer/app.browser.test.ts`, `apps/stage-tamagotchi/src/renderer/electron-mouse.browser.test.ts`) from what vitest collects, and no other runner or CI command runs them — they are dead tests. Run them (another runner, project or job), or delete them.
Runner config excludes tests no gate runs apps/stage-web/vite.config.ts:172— `**/components/**` removes 4 test(s) in 3 file(s) (e.g. `apps/stage-web/src/components/Devtools/fps-history.browser.test.ts`, `apps/stage-web/src/components/Devtools/orbit-controls.browser.test.ts`) from what vitest collects, and no other runner or CI command runs them — they are dead tests. Run them (another runner, project or job), or delete them.
Runner config excludes tests no gate runs apps/stage-web/vitest.config.ts:18— `src/**/*.browser.test.ts` removes 7 test(s) in 4 file(s) (e.g. `apps/stage-web/src/pages/official-provider-chat.browser.test.ts`, `apps/stage-web/src/pages/official-provider-speech-streaming.browser.test.ts`) from what vitest collects, and no other runner or CI command runs them — they are dead tests. Run them (another runner, project or job), or delete them.
Runner config excludes tests no gate runs packages/audio/vitest.config.ts:7— `src/**/*.browser.test.ts` removes 7 test(s) in 2 file(s) (e.g. `packages/audio/src/browser.browser.test.ts`, `packages/audio/src/encoding/pcm-stream.browser.test.ts`) from what vitest collects, and no other runner or CI command runs them — they are dead tests. Run them (another runner, project or job), or delete them.
Runner config excludes tests no gate runs packages/provider-inference/vitest.config.ts:11— `src/**/*.browser.test.ts` removes 9 test(s) in 3 file(s) (e.g. `packages/provider-inference/src/responses.browser.test.ts`, `packages/provider-inference/src/providers/runtime-matrix.browser.test.ts`) from what vitest collects, and no other runner or CI command runs them — they are dead tests. Run them (another runner, project or job), or delete them.
Runner config excludes tests no gate runs packages/scenarios-stage-tamagotchi-browser/vite.config.ts:18— `**/components/**` removes 10 test(s) in 4 file(s) (e.g. `packages/scenarios-stage-tamagotchi-browser/src/components/platforms/macos-26/PlatformRoot.test.ts`, `packages/scenarios-stage-tamagotchi-browser/src/components/platforms/macos-26/containers/window/WindowRoot.test.ts`) from what vitest collects, and no other runner or CI command runs them — they are dead tests. Run them (another runner, project or job), or delete them.
Runner config excludes tests no gate runs packages/stage-pages/vitest.config.ts:22— `**/*.test.ts` removes 56 test(s) in 16 file(s) (e.g. `packages/stage-pages/src/pages/devtools/polaroid.browser.test.ts`, `packages/stage-pages/src/pages/settings/flux.browser.test.ts`) from what vitest collects, and no other runner or CI command runs them — they are dead tests. Run them (another runner, project or job), or delete them.
Runner config excludes tests no gate runs packages/stage-ui-live2d/vitest.config.ts:12— `src/**/*.browser.test.ts` removes 25 test(s) in 2 file(s) (e.g. `packages/stage-ui-live2d/src/filters/screen-ambient-light.browser.test.ts`, `packages/stage-ui-live2d/src/utils/ambient-light-test-card.browser.test.ts`) from what vitest collects, and no other runner or CI command runs them — they are dead tests. Run them (another runner, project or job), or delete them.
Runner config excludes tests no gate runs packages/stage-ui-mmd/vitest.config.ts:11— `src/**/*.browser.test.ts` removes 1 test(s) in 1 file(s) (e.g. `packages/stage-ui-mmd/src/utils/mmd-loader.browser.test.ts`) from what vitest collects, and no other runner or CI command runs them — they are dead tests. Run them (another runner, project or job), or delete them.
Runner config excludes tests no gate runs packages/stage-ui/vitest.config.ts:61— `src/**/*.browser.test.ts` removes 468 test(s) in 91 file(s) (e.g. `packages/stage-ui/src/composables/capacitor-settings-page.browser.test.ts`, `packages/stage-ui/src/composables/cloud.browser.test.ts`) from what vitest collects, and no other runner or CI command runs them — they are dead tests. Run them (another runner, project or job), or delete them.
Change coupling: REDACTED ↔ REDACTED server/apps/api/src/routes/audio-speech-ws/session.ts:1— `server/apps/api/src/routes/audio-speech-ws/session.ts` and `server/apps/api/src/services/domain/openai-speech/index.ts` change together 73% of the time (8 of the 11 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 `87230a0d` fix(api): stop writing TTS requests to llm_request_log (#2791); `e20e2893` refactor(api): drop the request-log Flux column and the settlement ar…; `0040675e` feat(server): group TTS billing history by chat round (#2491) — run `git show` on any of them.
Change coupling: task-executor.ts ↔ brain-prompt.ts integrations/minecraft/src/cognitive/action/task-executor.ts:1— `integrations/minecraft/src/cognitive/action/task-executor.ts` and `integrations/minecraft/src/cognitive/conscious/prompts/brain-prompt.ts` change together 73% of the time (8 of the 11 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 `9e31bf33` refactor(minecraft): change action return types from string to unknow… (at that commit the files were still `services/minecraft/src/cognitive/action/task-executor.ts` and `services/minecraft/src/cognitive/conscious/prompts/brain-prompt.ts`); `b02d4a9b` feat(minecraft): run conscious brain in js repl with runtime globals (at that commit the files were still `services/minecraft/src/cognitive/action/task-executor.ts` and `services/minecraft/src/cognitive/conscious/prompts/brain-prompt.ts`); `54b3bfdc` refactor(minecraft): remove legacy action adapter and simplify execut… (at that commit the files were still `services/minecraft/src/cognitive/action/task-executor.ts` and `services/minecraft/src/cognitive/conscious/prompts/brain-prompt.ts`) — run `git show` on any of them.
Change coupling: api.ts ↔ auth.ts packages/stage-ui/src/composables/api.ts:1— `packages/stage-ui/src/composables/api.ts` and `packages/stage-ui/src/libs/auth.ts` change together 70% of the time (7 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 7 shared commits counted here, the most recent 3 are `bef15981` fix(stage-ui): refresh token concurrency; `bdb01d30` feat(auth): Bearer token handling and OAuth token extraction (#1501); `fc517382` feat(server): stripe integration and credits system (#1024) — run `git show` on any of them.
Change coupling: instrumentation.ts ↔ REDACTED server/apps/api/instrumentation.ts:1— `server/apps/api/instrumentation.ts` and `server/apps/api/src/otel/index.ts` change together 64% of the time (7 of the 11 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 7 shared commits counted here, the most recent 3 are `272cdae0` feat(server/otel): restructure observability metrics and add active s… (at that commit the files were still `apps/server/instrumentation.ts` and `apps/server/src/otel/index.ts`); `d24b22a5` refactor(server/otel): hono otel integrate (at that commit the files were still `apps/server/instrumentation.mjs` and `apps/server/src/libs/otel.ts`); `21b180ce` refactor(server/otel): enhance otel setup with improved SDK lifecycle… (at that commit the files were still `apps/server/instrumentation.mjs` and `apps/server/src/libs/otel.ts`) — run `git show` on any of them.
Change coupling: brain.ts ↔ pipeline.ts integrations/minecraft/src/cognitive/conscious/brain.ts:1— `integrations/minecraft/src/cognitive/conscious/brain.ts` and `integrations/minecraft/src/cognitive/perception/pipeline.ts` change together 58% of the time (7 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 — 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 7 shared commits counted here, the most recent 3 are `f3486005` refactor(minecraft): simplify EventBus by removing history and trace … (at that commit the files were still `services/minecraft/src/cognitive/conscious/brain.ts` and `services/minecraft/src/cognitive/perception/pipeline.ts`); `d53031ff` feat(minecraft): accept system message (at that commit the files were still `services/minecraft/src/cognitive/conscious/brain.ts` and `services/minecraft/src/cognitive/perception/pipeline.ts`); `ca822900` refactor(minecraft): migrate from EventManager to unified EventBus fo… (at that commit the files were still `services/minecraft/src/cognitive/conscious/brain.ts` and `services/minecraft/src/cognitive/perception/pipeline.ts`) — run `git show` on any of them.
Change coupling: chats.ts ↔ auth.ts server/apps/api/src/services/domain/chats.ts:1— `server/apps/api/src/services/domain/chats.ts` and `server/apps/auth/src/auth.ts` change together 55% of the time (6 of the 11 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 `07b26b53` fix(analytics): remove TS product events table (#2306); `7ac69db4` feat(server): add product analytics events (#1941) (at that commit the files were still `apps/server/src/services/domain/chats.ts` and `apps/server/src/libs/auth.ts`); `272cdae0` feat(server/otel): restructure observability metrics and add active s… (at that commit the files were still `apps/server/src/services/chats.ts` and `apps/server/src/libs/auth.ts`) — run `git show` on any of them.
Change coupling: auto-updater.ts ↔ about.vue apps/stage-tamagotchi/src/main/services/electron/auto-updater.ts:1— `apps/stage-tamagotchi/src/main/services/electron/auto-updater.ts` and `apps/stage-tamagotchi/src/renderer/pages/about.vue` change together 50% of the time (9 of the 18 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 9 shared commits counted here, the most recent 3 are `55507a9b` fix(stage-tamagotchi): disable the updater in Nix packages (#3084); `a3e06e4d` fix(stage-tamagotchi): disable the updater in Flatpak (#3081); `9164ca1b` ci(stage-tamagotchi): add Steam desktop deployment workflow (#1827) — run `git show` on any of them.
Change coupling: env.ts ↔ origin.ts server/apps/api/src/libs/env.ts:1— `server/apps/api/src/libs/env.ts` and `server/apps/api/src/utils/origin.ts` change together 50% of the time (7 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 7 shared commits counted here, the most recent 3 are `c1ca39f1` feat(server): add Apple sign-in (#2158) (at that commit the files were still `apps/server/src/libs/env.ts` and `apps/server/src/utils/origin.ts`); `a331d3a4` feat(auth): update AUTH_UI_URL to point to accounts.airi.build (at that commit the files were still `apps/server/src/libs/env.ts` and `apps/server/src/utils/origin.ts`); `11b820a7` feat(admin-ui): implement standalone admin UI with Cloudflare Pages d… (at that commit the files were still `apps/server/src/libs/env.ts` and `apps/server/src/utils/origin.ts`) — run `git show` on any of them.
Change coupling: definitions.ts ↔ redis-keys.ts server/apps/api/src/services/adapters/config-kv/definitions.ts:1— `server/apps/api/src/services/adapters/config-kv/definitions.ts` and `server/apps/api/src/utils/redis-keys.ts` change together 50% of the time (5 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 5 shared commits counted here, the most recent 3 are `88625a8d` feat(api): hot-reload ConfigKV from Postgres (#2289); `81b8a4d5` feat(server): add grouped provider fallback routing (#2170) (at that commit the files were still `apps/server/src/services/adapters/config-kv.ts` and `apps/server/src/utils/redis-keys.ts`); `8967bbe2` feat(server): add TTS support with per-character billing (at that commit the files were still `apps/server/src/services/config-kv.ts` and `apps/server/src/utils/redis-keys.ts`) — run `git show` on any of them.
Change coupling: REDACTED ↔ widgets.vue apps/stage-tamagotchi/src/main/windows/widgets/index.ts:1— `apps/stage-tamagotchi/src/main/windows/widgets/index.ts` and `apps/stage-tamagotchi/src/renderer/pages/widgets.vue` change together 50% of the time (5 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 5 shared commits counted here, the most recent 3 are `99ce4bdc` fix(stage-tamagotchi): enforce widget window lifecycle (#2409); `8930211d` feat(stage-tamagotchi): widget with pin (#1993); `a406ffb6` feat(stage-tamagotchi): widget now supports customizable ui from plug… — run `git show` on any of them.
MethodTooLong: Brain.processEvent integrations/minecraft/src/cognitive/conscious/brain.ts:1764— MethodTooLong — processEvent runs 343 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 243 over it, 3.43× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: StagePostProcessCompositorEffect.EnsureResources engines/stage-tamagotchi-godot/scripts/visuals/StagePostProcessCompositorEffect.Resources.cs:129— MethodTooLong — EnsureResources runs 210 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 110 over it, 2.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: MCPAdapter.configureServer integrations/twitter-services/src/adapters/mcp-adapter.ts:65— MethodTooLong — configureServer runs 197 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 97 over it, 1.97× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Brain.runControlActionWorker integrations/minecraft/src/cognitive/conscious/brain.ts:1223— MethodTooLong — runControlActionWorker runs 140 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 40 over it, 1.40× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: JavaScriptPlanner.buildBootstrapScript REDACTED:1177— MethodTooLong — buildBootstrapScript runs 134 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 34 over it, 1.34× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: McpReplServer.constructor REDACTED:39— MethodTooLong — constructor runs 132 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 32 over it, 1.32× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: AiriDesktopContracts.Register apps/stage-tamagotchi-kirie/src-godot/scripts/AiriDesktopContracts.cs:163— MethodTooLong — Register runs 121 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 21 over it, 1.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: DiscordAdapter.setupEventHandlers integrations/discord-bot/src/adapters/airi-adapter.ts:95— MethodTooLong — setupEventHandlers runs 117 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 17 over it, 1.17× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
TooManyMethods: Brain integrations/minecraft/src/cognitive/conscious/brain.ts:279— TooManyMethods — 64 methods. The bar is 30 methods; this is 34 over it, 2.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: RunStateManager services/computer-use-mcp/src/state.ts:216— TooManyMethods — 63 methods. The bar is 30 methods; this is 33 over it, 2.10× 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: ExtensionHost packages/plugin-sdk/src/plugin-host/core.ts:225— TooManyMethods — 51 methods. The bar is 30 methods; this is 21 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.
TooManyMethods: StagePostProcessCompositorEffect engines/stage-tamagotchi-godot/scripts/visuals/StagePostProcessCompositorEffect.Resources.cs— TooManyMethods — 878 significant lines (blank, comment-only and punctuation-only lines excluded), 43 methods, declared across 3 files: visuals/StagePostProcessCompositorEffect.Resources.cs (28), visuals/StagePostProcessCompositorEffect.Pipeline.cs (9), visuals/StagePostProcessCompositorEffect.cs (6). The bar is 30 methods; this is 13 over it, 1.43× 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: StageRoot engines/stage-tamagotchi-godot/scripts/StageRoot.cs— TooManyMethods — 376 significant lines (blank, comment-only and punctuation-only lines excluded), 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Off the main sequence: @proj-airi/i18n — @proj-airi/i18n: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 7 project(s), so it's rigid to change.
Off the main sequence: @proj-airi/mathjson — @proj-airi/mathjson: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 4 project(s), so it's rigid to change.
Off the main sequence: @proj-airi/plugin-protocol — @proj-airi/plugin-protocol: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 4 project(s), so it's rigid to change.
Off the main sequence: @proj-airi/audio — @proj-airi/audio: abstractness 0.00, instability 0.22, distance 0.78 — zone of pain — concrete and depended on by 7 project(s), so it's rigid to change.
Off the main sequence: @proj-airi/motion-driver-magic — @proj-airi/motion-driver-magic: abstractness 0.22, instability 0.00, distance 0.78 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
Skipped test: ALIYUN_AK_ID and ALIYUN_AK_SECRET must be set in environment to run this test packages/stage-ui/src/libs/providers/providers/aliyun-nls/token.test.ts:75— Skipped — switched off by test.skip
Skipped test: aIHUBMIX_API_KEY must be set in apps/stage-tamagotchi/.env.local to run this test apps/stage-tamagotchi-kirie/src-web/src/renderer/stores/tools/builtin/widgets.test.ts:261— Skipped — switched off by it.skip
Skipped test: aIHUBMIX_API_KEY must be set in apps/stage-tamagotchi/.env.local to run this test apps/stage-tamagotchi/src/renderer/stores/tools/builtin/widgets.test.ts:261— Skipped — switched off by it.skip
D10 · Test Quality· Fixed-sleep synchronisation · ×3
Fixed-sleep synchronisation: waits for the transcript of a submitted voice message instead of transcribing the file packages/stage-ui/src/stores/chat.contract.test.ts:418— This test starts work it did not wait for (`store`, still running when the sleep starts) and then orders itself against it with `new Promise(resolve => setTimeout(resolve, 10))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
Fixed-sleep synchronisation: routes automatic voice selection to the leader without follower proposals packages/stage-ui/src/stores/modules/speech.browser.test.ts:496— This test starts work it did not wait for (`leader`, still running when the sleep starts) and then orders itself against it with `new Promise(resolve => setTimeout(resolve, 100))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
Fixed-sleep synchronisation: rejects old recommendation side effects together with the old catalog packages/stage-ui/src/stores/modules/speech.test.ts:745— This test starts work it did not wait for (`speech`, still running when the sleep starts) and then orders itself against it with `new Promise(resolve => setTimeout(resolve, 20))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
Dead code: StageViewStateStore engines/stage-tamagotchi-godot/scripts/view/StageViewStateStore.cs:12— NamedType StageViewStateStore — Roslyn's SymbolFinder walked every project the solution loads, including stage-tamagotchi-godot, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: FocusWebView apps/stage-tamagotchi-kirie/src-godot/scripts/SpotlightWindow.cs:128— Method FocusWebView — Roslyn's SymbolFinder walked every project the solution loads, including StageTamagotchiKirie, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
Dead code: HideIfUnfocused apps/stage-tamagotchi-kirie/src-godot/scripts/SpotlightWindow.cs:179— Method HideIfUnfocused — Roslyn's SymbolFinder walked every project the solution loads, including StageTamagotchiKirie, and found no reference to it. That walk cannot see three kinds of caller, so check them before removing it: code outside the solution file (a solution is a curated list, not the repository — a sibling test tree with its own .sln is invisible), a call resolved by reflection or dependency injection from the symbol's name, and any project the workspace could not load. This is 'no caller found by this walk', not a verdict that the symbol is unused.
ClassTooLong: Brain integrations/minecraft/src/cognitive/conscious/brain.ts:279— ClassTooLong — 1484 significant lines (blank, comment-only and punctuation-only lines excluded), 64 methods. The bar is 400 significant lines; this is 1084 over it, 3.71× 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: JavaScriptPlanner REDACTED:694— ClassTooLong — 600 significant lines (blank, comment-only and punctuation-only lines excluded), 19 methods. The bar is 400 significant lines; this is 200 over it, 1.50× 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: ExtensionHost packages/plugin-sdk/src/plugin-host/core.ts:225— ClassTooLong — 505 significant lines (blank, comment-only and punctuation-only lines excluded), 51 methods. The bar is 400 significant lines; this is 105 over it, 1.26× 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.
Boundary violation [package:relative-cross-package] packages/stage-pages/src/pages/v2/index.vue:10— packages/stage-pages/src/pages/v2/index.vue:10 reaches into another package with a relative path (../../../../stage-ui/src/components/menu/relu.avif) — import the package by name instead.
Boundary violation [package:relative-cross-package] packages/stage-pages/src/pages/v2/index.vue:11— packages/stage-pages/src/pages/v2/index.vue:11 reaches into another package with a relative path (../../../../stage-ui/src/assets/live2d/models/hiyori/preview.png) — import the package by name instead.
Boundary violation [package:third-party-deep-import] packages/stage-ui-three/src/composables/vrm/animation.ts:8— packages/stage-ui-three/src/composables/vrm/animation.ts:8 imports three/src/math/MathUtils.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.
Dead file (~232 LoC) apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/about.vue— no import path from any entry point (1391 application, 153 tooling, 918 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 (~232 LoC) apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/desktop-overlay.vue— no import path from any entry point (1391 application, 153 tooling, 918 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 (~232 LoC) apps/stage-tamagotchi/src/renderer/pages/desktop-overlay.vue— no import path from any entry point (1391 application, 153 tooling, 918 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
image-journal.executeCreateImageJournalEntry (cyclomatic 31) apps/stage-tamagotchi-kirie/src-web/src/renderer/stores/tools/builtin/image-journal.ts:72— image-journal.executeCreateImageJournalEntry 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.
image-journal.executeCreateImageJournalEntry (cyclomatic 31) apps/stage-tamagotchi/src/renderer/stores/tools/builtin/image-journal.ts:72— image-journal.executeCreateImageJournalEntry 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.
image-journal.executeSetAsBackground (cyclomatic 17) apps/stage-tamagotchi-kirie/src-web/src/renderer/stores/tools/builtin/image-journal.ts:177— image-journal.executeSetAsBackground has cyclomatic complexity 17 (threshold 15). 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
image-journal.executeSetAsBackground (cyclomatic 17) apps/stage-tamagotchi/src/renderer/stores/tools/builtin/image-journal.ts:177— image-journal.executeSetAsBackground has cyclomatic complexity 17 (threshold 15). 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
widgets.normalizeNullableAnyOf (cyclomatic 17) apps/stage-tamagotchi-kirie/src-web/src/renderer/stores/tools/builtin/widgets.ts:126— widgets.normalizeNullableAnyOf has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
widgets.normalizeNullableAnyOf (cyclomatic 17) apps/stage-tamagotchi/src/renderer/stores/tools/builtin/widgets.ts:126— widgets.normalizeNullableAnyOf has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
image-journal.executeCreateImageJournalEntry (cognitive 40) apps/stage-tamagotchi-kirie/src-web/src/renderer/stores/tools/builtin/image-journal.ts:72— image-journal.executeCreateImageJournalEntry has cognitive complexity 40 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 16, error handling 2 (3 pts), ternaries 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.
image-journal.executeCreateImageJournalEntry (cognitive 40) apps/stage-tamagotchi/src/renderer/stores/tools/builtin/image-journal.ts:72— image-journal.executeCreateImageJournalEntry has cognitive complexity 40 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 16, error handling 2 (3 pts), ternaries 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.
image-journal.executeSetAsBackground (cognitive 26) apps/stage-tamagotchi-kirie/src-web/src/renderer/stores/tools/builtin/image-journal.ts:177— image-journal.executeSetAsBackground has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 6, error handling 1 (2 pts), ternaries 1 (nesting depth added 10). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
image-journal.executeSetAsBackground (cognitive 26) apps/stage-tamagotchi/src/renderer/stores/tools/builtin/image-journal.ts:177— image-journal.executeSetAsBackground has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 6, error handling 1 (2 pts), ternaries 1 (nesting depth added 10). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
strict-tool-schema.collectSchemaIssues (cognitive 22) apps/stage-tamagotchi-kirie/src-web/src/renderer/stores/tools/testing/strict-tool-schema.ts:30— strict-tool-schema.collectSchemaIssues has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 3 (8 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.
strict-tool-schema.collectSchemaIssues (cognitive 22) apps/stage-tamagotchi/src/renderer/stores/tools/testing/strict-tool-schema.ts:30— strict-tool-schema.collectSchemaIssues has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 3 (8 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.
widgets.normalizeNullableAnyOf (cognitive 17) apps/stage-tamagotchi-kirie/src-web/src/renderer/stores/tools/builtin/widgets.ts:126— widgets.normalizeNullableAnyOf has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
widgets.normalizeNullableAnyOf (cognitive 17) apps/stage-tamagotchi/src/renderer/stores/tools/builtin/widgets.ts:126— widgets.normalizeNullableAnyOf has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Wholesale file copy (209 identical lines × 2 files) apps/stage-tamagotchi-kirie/src-web/src/renderer/components/InteractiveArea.vue:2— apps/stage-tamagotchi-kirie/src-web/src/renderer/components/InteractiveArea.vue:2 · apps/stage-tamagotchi/src/renderer/components/InteractiveArea.vue:2 — these 2 files are line-for-line copies of one another — 209 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
Wholesale file copy (209 identical lines × 2 files) apps/stage-tamagotchi-kirie/src-web/src/renderer/features/live2d/system-audio-lipsync.ts:1— apps/stage-tamagotchi-kirie/src-web/src/renderer/features/live2d/system-audio-lipsync.ts:1 · apps/stage-tamagotchi/src/renderer/features/live2d/system-audio-lipsync.ts:1 — these 2 files are line-for-line copies of one another — 209 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
Wholesale file copy (197 identical lines × 2 files) apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/desktop-overlay-polling.ts:8— apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/desktop-overlay-polling.ts:8 · apps/stage-tamagotchi/src/renderer/pages/desktop-overlay-polling.ts:8 — these 2 files are line-for-line copies of one another — 197 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
Wholesale file copy (197 identical lines × 2 files) apps/stage-tamagotchi-kirie/src-web/src/renderer/stores/tools/builtin/widgets.ts:1— apps/stage-tamagotchi-kirie/src-web/src/renderer/stores/tools/builtin/widgets.ts:1 · apps/stage-tamagotchi/src/renderer/stores/tools/builtin/widgets.ts:1 — these 2 files are line-for-line copies of one another — 197 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication· Duplicated block with local edits (112 matched lines × 2 locations) · ×2
Duplicated block with local edits (112 matched lines × 2 locations) apps/stage-tamagotchi/src/main/windows/dashboard/index.ts:26— apps/stage-tamagotchi/src/main/windows/dashboard/index.ts:26 · apps/stage-tamagotchi/src/main/windows/main/index.ts:46 — the two spans are one implementation copied and then locally edited — 712 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 (112 matched lines × 2 locations) packages/scenarios-stage-tamagotchi-electron/src/scenarios/plugin-chess-widget-flow.ts:5— packages/scenarios-stage-tamagotchi-electron/src/scenarios/plugin-chess-widget-flow.ts:5 · packages/scenarios-stage-tamagotchi-electron/src/scenarios/plugin-widget-static-assets-local-address.ts:5 — the two spans are one implementation copied and then locally edited — 780 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.
Dead file (~359 LoC) apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/settings/models/index.vue— no import path from any entry point (1391 application, 153 tooling, 918 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 (~359 LoC) apps/stage-tamagotchi/src/renderer/pages/settings/models/index.vue— no import path from any entry point (1391 application, 153 tooling, 918 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 (~339 LoC) apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/settings/modules/mcp.vue— no import path from any entry point (1391 application, 153 tooling, 918 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 (~339 LoC) apps/stage-tamagotchi/src/renderer/pages/settings/modules/mcp.vue— no import path from any entry point (1391 application, 153 tooling, 918 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 (~325 LoC) apps/stage-tamagotchi-kirie/src-web/src/renderer/features/live2d/system-audio-lipsync.ts— no import path from any entry point (1391 application, 153 tooling, 918 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 (~325 LoC) apps/stage-tamagotchi/src/renderer/features/live2d/system-audio-lipsync.ts— no import path from any entry point (1391 application, 153 tooling, 918 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (apps/stage-tamagotchi/src/renderer/pages/devtools/live2d-motion.vue) — 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
Dead file (~294 LoC) integrations/twitter-services/src/parsers/profile-parser.ts— no import path from any entry point (1391 application, 153 tooling, 918 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 (~294 LoC) packages/stage-ui/src/components/scenarios/chat/components/history.story.vue— no import path from any entry point (1391 application, 153 tooling, 918 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 (~277 LoC) apps/stage-pocket/src/workers/vad/vad.ts— no import path from any entry point (1391 application, 153 tooling, 918 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (apps/stage-pocket/src/workers/vad/index.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~277 LoC) apps/stage-web/src/workers/vad/vad.ts— no import path from any entry point (1391 application, 153 tooling, 918 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (apps/stage-web/src/workers/vad/index.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~268 LoC) apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/devtools/widgets-calling.vue— no import path from any entry point (1391 application, 153 tooling, 918 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 (~268 LoC) apps/stage-tamagotchi/src/renderer/pages/devtools/widgets-calling.vue— no import path from any entry point (1391 application, 153 tooling, 918 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 (~265 LoC) apps/stage-pocket/src/pages/devtools/performance-playground.vue— no import path from any entry point (1391 application, 153 tooling, 918 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 (~265 LoC) apps/stage-web/src/pages/devtools/performance-playground.vue— no import path from any entry point (1391 application, 153 tooling, 918 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 (~262 LoC) apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/devtools/vision.vue— no import path from any entry point (1391 application, 153 tooling, 918 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 (~262 LoC) apps/stage-tamagotchi/src/renderer/pages/devtools/vision.vue— no import path from any entry point (1391 application, 153 tooling, 918 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 (~238 LoC) apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/widgets.vue— no import path from any entry point (1391 application, 153 tooling, 918 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 (~238 LoC) apps/stage-tamagotchi/src/renderer/pages/about.vue— no import path from any entry point (1391 application, 153 tooling, 918 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 (~192 LoC) apps/stage-pocket/src/pages/devtools/background-removal.vue— no import path from any entry point (1391 application, 153 tooling, 918 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 (~192 LoC) apps/stage-web/src/pages/devtools/background-removal.vue— no import path from any entry point (1391 application, 153 tooling, 918 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 (~174 LoC) apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/settings/models/godot-view-patch-queue.ts— no import path from any entry point (1391 application, 153 tooling, 918 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/settings/models/index.vue) — 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
Dead file (~174 LoC) apps/stage-tamagotchi/src/renderer/pages/settings/models/godot-view-patch-queue.ts— no import path from any entry point (1391 application, 153 tooling, 918 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (apps/stage-tamagotchi/src/renderer/pages/settings/models/index.vue) — 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
X2 · Cancellation propagation· Async method without CancellationToken · ×2
Async method without CancellationToken: HandleAsync apps/stage-tamagotchi-kirie/src-godot/scripts/loopback-auth-server.cs:121— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: WriteHtmlAsync apps/stage-tamagotchi-kirie/src-godot/scripts/loopback-auth-server.cs:183— No CancellationToken parameter — this work can't be stopped early once started.
render.renderMath::render (cyclomatic 140) packages/speech-transformer-math/src/render.ts:183— render.renderMath::render has cyclomatic complexity 140 (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.
chat-orchestrator-runtime.createChatOrchestratorRuntime.performSend (cyclomatic 125) packages/core-agent/src/runtime/chat-orchestrator-runtime.ts:637— chat-orchestrator-runtime.createChatOrchestratorRuntime.performSend has cyclomatic complexity 125 (threshold 15). Of this number, 73 points are the body's own statements and 52 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.
index.setupApp (cyclomatic 97) packages/server-runtime/src/index.ts:215— index.setupApp has cyclomatic complexity 97 (threshold 15). Most of this is not in the body itself: 5 of the 97 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 549, 532, 1049, …). 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.
parse.normalize (cyclomatic 78) REDACTED:205— parse.normalize has cyclomatic complexity 78 (threshold 15). Of this number, 72 points are the body's own statements and 6 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.
MarkdownSegmenter.safeEnd (cyclomatic 73) packages/core-agent/src/voice/output/speech-transformation/segmenter.ts:88— MarkdownSegmenter.safeEnd has cyclomatic complexity 73 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
engine.executeWorkflow (cyclomatic 73) services/computer-use-mcp/src/workflows/engine.ts:156— engine.executeWorkflow has cyclomatic complexity 73 (threshold 15). Of this number, 71 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.
lower.lowerScripts (cyclomatic 67) packages/speech-transformer-math/src/lower.ts:898— lower.lowerScripts has cyclomatic complexity 67 (threshold 15). Of this number, 65 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.
pose-to-vrm.poseToVrmTargets (cyclomatic 65) packages/model-driver-mediapipe/src/three/pose-to-vrm.ts:173— pose-to-vrm.poseToVrmTargets has cyclomatic complexity 65 (threshold 15). Of this number, 62 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.
settings-search.createSettingsSearch.evaluate (cyclomatic 63) packages/stage-pages/src/vite/settings-search.ts:1195— settings-search.createSettingsSearch.evaluate has cyclomatic complexity 63 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
lower.lowerTerms (cyclomatic 62) packages/speech-transformer-math/src/lower.ts:601— lower.lowerTerms has cyclomatic complexity 62 (threshold 15). Of this number, 61 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.
index.responsesCreate (cyclomatic 58) server/apps/api/src/routes/openai/v1/operations/responses/index.ts:106— index.responsesCreate has cyclomatic complexity 58 (threshold 15). Most of this is not in the body itself: 1 of the 58 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 277, 111, 184, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
register-tools.registerComputerUseTools (cyclomatic 57) services/computer-use-mcp/src/server/register-tools.ts:138— register-tools.registerComputerUseTools has cyclomatic complexity 57 (threshold 15). Most of this is not in the body itself: 3 of the 57 points are its own statements and the rest belongs to 21 function literals inside it that branch (lines 1009, 435, 596, …). 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.
background.handleCommand (cyclomatic 56) services/computer-use-mcp/chrome-extension/background.js:417— background.handleCommand has cyclomatic complexity 56 (threshold 15). Of this number, 42 points are the body's own statements and 14 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.
action-executor.createExecuteAction (cyclomatic 52) services/computer-use-mcp/src/server/action-executor.ts:236— action-executor.createExecuteAction has cyclomatic complexity 52 (threshold 15). Most of this is not in the body itself: 1 of the 52 points is its own statement and the rest belongs to one function literal inside it that branches (line 237). 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.
artistry-autonomous.useAutonomousArtistryStore.runArtistTask (cyclomatic 51) packages/stage-ui/src/stores/modules/artistry-autonomous.ts:50— artistry-autonomous.useAutonomousArtistryStore.runArtistTask has cyclomatic complexity 51 (threshold 15). Of this number, 49 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.
chem.lowerChemistry (cyclomatic 49) packages/speech-transformer-chem/src/chem.ts:72— chem.lowerChemistry has cyclomatic complexity 49 (threshold 15). Of this number, 39 points are the body's own statements and 10 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.
artistry-bridge.handleArtistryTrigger (cyclomatic 48) apps/stage-tamagotchi/src/main/services/airi/widgets/artistry-bridge.ts:263— artistry-bridge.handleArtistryTrigger has cyclomatic complexity 48 (threshold 15). Of this number, 45 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.
use-screen-ambient-light.useScreenAmbientLight (cyclomatic 48) apps/stage-tamagotchi/src/renderer/composables/use-screen-ambient-light.ts:81— use-screen-ambient-light.useScreenAmbientLight has cyclomatic complexity 48 (threshold 15). Most of this is not in the body itself: 1 of the 48 points is its own statement and the rest belongs to 16 function items inside it that branch (start, restart, sample, …). 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.
strategy.evaluateStrategy (cyclomatic 48) services/computer-use-mcp/src/strategy.ts:204— strategy.evaluateStrategy has cyclomatic complexity 48 (threshold 15). Of this number, 47 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.
openai-compatible.createOpenAICompatibleValidators (cyclomatic 46) packages/provider-inference/src/validators/openai-compatible.ts:107— openai-compatible.createOpenAICompatibleValidators has cyclomatic complexity 46 (threshold 15). Most of this is not in the body itself: 4 of the 46 points are its own statements and the rest belongs to 6 function items inside it that branch (runChatCheck, a function literal at line 232, a function literal at line 267, …). 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.
settings-search.createSettingsSearch (cyclomatic 46) packages/stage-pages/src/vite/settings-search.ts:775— settings-search.createSettingsSearch has cyclomatic complexity 46 (threshold 15). Of this number, 43 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.
policy.evaluateActionPolicy (cyclomatic 46) services/computer-use-mcp/src/policy.ts:100— policy.evaluateActionPolicy 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.
rules.createSpeechActivityRule (cyclomatic 45) packages/core-agent/src/voice/policy/rules.ts:92— rules.createSpeechActivityRule has cyclomatic complexity 45 (threshold 15). Of this number, 35 points are the body's own statements and 10 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.
context-bridge.useContextBridgeStore.initialize (cyclomatic 45) packages/stage-ui/src/stores/mods/api/context-bridge.ts:603— context-bridge.useContextBridgeStore.initialize has cyclomatic complexity 45 (threshold 15). Most of this is not in the body itself: 4 of the 45 points are its own statements and the rest belongs to 21 function items inside it that branch (a function literal at line 835, a function literal at line 689, a function literal at line 672, …). 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.
activation-plan.planExtensionActivation (cyclomatic 44) packages/plugin-sdk/src/plugin-host/activation-plan.ts:118— activation-plan.planExtensionActivation has cyclomatic complexity 44 (threshold 15). Of this number, 42 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.
settings-search.createSettingsSearch.scanComponent::walk (cyclomatic 43) packages/stage-pages/src/vite/settings-search.ts:1350— settings-search.createSettingsSearch.scanComponent::walk 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.
index.streamChatCompletion (cyclomatic 43) server/apps/api/src/routes/openai/v1/operations/chat-completions/index.ts:183— index.streamChatCompletion has cyclomatic complexity 43 (threshold 15). Most of this is not in the body itself: 1 of the 43 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 267, 218, 238). 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.
index.setupMainWindow (cyclomatic 41) apps/stage-tamagotchi/src/main/windows/main/index.ts:59— index.setupMainWindow has cyclomatic complexity 41 (threshold 15). Most of this is not in the body itself: 7 of the 41 points are its own statements and the rest belongs to 20 function items inside it that branch (handleNewBounds, a function literal at line 354, openFullscreen, …). 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.
browser-probe.stubForBrowser (cyclomatic 41) packages/testing-audio/src/setup/browser-probe.ts:39— browser-probe.stubForBrowser has cyclomatic complexity 41 (threshold 15). Of this number, 17 points are the body's own statements and 24 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.
index.compile (cyclomatic 40) packages/core-agent/src/voice/output/speech-transformation/index.ts:75— index.compile has cyclomatic complexity 40 (threshold 15). Most of this is not in the body itself: 1 of the 40 points is its own statement and the rest belongs to 11 function items inside it that branch (inline, block, isOperator, …). 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.
tts-chunker.chunkTtsInput (cyclomatic 40) packages/pipelines-audio/src/processors/tts-chunker.ts:56— tts-chunker.chunkTtsInput has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
index.setupWidgetsWindowManager (cyclomatic 39) apps/stage-tamagotchi/src/main/windows/widgets/index.ts:283— index.setupWidgetsWindowManager has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 1 of the 39 points is its own statement and the rest belongs to 18 function items inside it that branch (destroyWidget, updateWidget, openWindow, …). 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.
voice.useVoiceStore.connectOutput (cyclomatic 39) packages/stage-ui/src/stores/voice.ts:310— voice.useVoiceStore.connectOutput has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 2 of the 39 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 337, 415, 327, …). 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.
tts.chunkTTSInput (cyclomatic 39) packages/stage-ui/src/utils/tts.ts:42— tts.chunkTTSInput 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.
ComfyUIProvider.pollForResult (cyclomatic 38) apps/stage-tamagotchi/src/main/services/airi/widgets/providers/comfyui.ts:86— ComfyUIProvider.pollForResult has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
llm-service.streamOnce (cyclomatic 38) packages/core-agent/src/runtime/llm-service.ts:75— llm-service.streamOnce has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 11 of the 38 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 154, 130, 110, …). 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.
live2d-validator.validateLive2DZip (cyclomatic 38) packages/stage-ui-live2d/src/utils/live2d-validator.ts:302— live2d-validator.validateLive2DZip has cyclomatic complexity 38 (threshold 15). Of this number, 37 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.
session-store.useChatSessionStore.reconcileCloudSessions (cyclomatic 38) packages/stage-ui/src/stores/chat/session-store.ts:835— session-store.useChatSessionStore.reconcileCloudSessions has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 2 of the 38 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 844, 1042, 869, …). 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.
workflow-prep-tools.createWorkflowPrepToolExecutor (cyclomatic 38) services/computer-use-mcp/src/server/workflow-prep-tools.ts:39— workflow-prep-tools.createWorkflowPrepToolExecutor has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 1 of the 38 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 40, 157). 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.
expression.useVRMEmote.update (cyclomatic 37) packages/stage-ui-three/src/composables/vrm/expression.ts:233— expression.useVRMEmote.update 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.
router.createLlmRouterService.route (cyclomatic 37) server/apps/api/src/services/domain/llm-router/router.ts:460— router.createLlmRouterService.route has cyclomatic complexity 37 (threshold 15). Of this number, 25 points are the body's own statements and 12 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.
use-playback-keys.useLive2DMotionPlaybackKeys (cyclomatic 36) packages/stage-ui/src/features/devtools/motion/live2d/composables/use-playback-keys.ts:36— use-playback-keys.useLive2DMotionPlaybackKeys has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 4 of the 36 points are its own statements and the rest belongs to 13 function items inside it that branch (updateDirection, a function literal at line 54, a function literal at line 59, …). 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.
lower.lowerFence (cyclomatic 35) packages/speech-transformer-math/src/lower.ts:855— lower.lowerFence has cyclomatic complexity 35 (threshold 15). Of this number, 32 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.
context-bridge.useContextBridgeStore.watchRemoteStreams (cyclomatic 35) packages/stage-ui/src/stores/mods/api/context-bridge.ts:480— context-bridge.useContextBridgeStore.watchRemoteStreams has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 1 of the 35 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 491, 481, 486). 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.
register-vscode.registerVscodeTools (cyclomatic 35) services/computer-use-mcp/src/server/register-vscode.ts:91— register-vscode.registerVscodeTools has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 1 of the 35 points is its own statement and the rest belongs to 6 function items inside it that branch (a function literal at line 364, a function literal at line 229, a function literal at line 165, …). 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.
DiscordAdapter.setupEventHandlers (cyclomatic 34) integrations/discord-bot/src/adapters/airi-adapter.ts:95— DiscordAdapter.setupEventHandlers 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 4 function literals inside it that branch (lines 159, 97, 210, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
router.createLlmRouterService.routeTts (cyclomatic 34) server/apps/api/src/services/domain/llm-router/router.ts:922— router.createLlmRouterService.routeTts has cyclomatic complexity 34 (threshold 15). Of this number, 23 points are the body's own statements and 11 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.
crafting.craftRecipe (cyclomatic 33) integrations/minecraft/src/skills/crafting.ts:22— crafting.craftRecipe has cyclomatic complexity 33 (threshold 15). Of this number, 19 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.
use-settings-search.useSettingsSearchReveal (cyclomatic 33) packages/stage-ui/src/composables/use-settings-search.ts:287— use-settings-search.useSettingsSearchReveal 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 8 function items inside it that branch (outlineFitsOutside, a function literal at line 376, a function literal at line 418, …). 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.
artistry-bridge.generateHeadless (cyclomatic 32) apps/stage-tamagotchi/src/main/services/airi/widgets/artistry-bridge.ts:110— artistry-bridge.generateHeadless has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 6 of the 32 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 146, 229). 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.
Brain.processEvent (cyclomatic 31) integrations/minecraft/src/cognitive/conscious/brain.ts:1764— Brain.processEvent has cyclomatic complexity 31 (threshold 15). Of this number, 27 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
tts-chunker.createTtsSegmentStream (cyclomatic 31) packages/pipelines-audio/src/processors/tts-chunker.ts:411— tts-chunker.createTtsSegmentStream has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 1 of the 31 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 422, 507). 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.
speech-pipeline.createSpeechPipeline.runIntent (cyclomatic 31) packages/pipelines-audio/src/speech-pipeline.ts:126— speech-pipeline.createSpeechPipeline.runIntent has cyclomatic complexity 31 (threshold 15). Of this number, 18 points are the body's own statements and 13 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.
lower.isCallee (cyclomatic 31) packages/speech-transformer-math/src/lower.ts:487— lower.isCallee has cyclomatic complexity 31 (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.
channel-server.useModsServerChannelStore.initialize (cyclomatic 31) packages/stage-ui/src/stores/mods/api/channel-server.ts:101— channel-server.useModsServerChannelStore.initialize has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 13 of the 31 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 195, 132, 223, …). 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.
desktop-grounding-actions.executeDesktopClickTarget (cyclomatic 31) services/computer-use-mcp/src/server/desktop-grounding-actions.ts:20— desktop-grounding-actions.executeDesktopClickTarget has cyclomatic complexity 31 (threshold 15). Of this number, 23 points are the body's own statements and 8 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.
crafting.smeltItem (cyclomatic 30) integrations/minecraft/src/skills/crafting.ts:211— crafting.smeltItem has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 8 of the 30 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 267, cleanupPlacedFurnace, a function literal at line 284). 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.
chat-completions.renderEntry (cyclomatic 30) packages/core-agent/src/messages/chat-completions.ts:99— chat-completions.renderEntry has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 13 of the 30 points are its own statements and the rest belongs to 5 function items inside it that branch (flush, a function literal at line 109, a function literal at line 120, …). 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.
background.pickBestChildAnchor (cyclomatic 30) services/computer-use-mcp/chrome-extension/background.js:262— background.pickBestChildAnchor 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.
index.dispatchAction (cyclomatic 29) integrations/telegram-bot/src/bots/telegram/index.ts:23— index.dispatchAction has cyclomatic complexity 29 (threshold 15). Of this number, 28 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
settings-search.bindingsOf (cyclomatic 29) packages/stage-pages/src/vite/settings-search.ts:415— settings-search.bindingsOf has cyclomatic complexity 29 (threshold 15). Of this number, 27 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.
settings-search.readName (cyclomatic 29) packages/stage-pages/src/vite/settings-search.ts:546— settings-search.readName 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.
settings-search.createSettingsSearch.declarationOf (cyclomatic 29) packages/stage-pages/src/vite/settings-search.ts:1008— settings-search.createSettingsSearch.declarationOf has cyclomatic complexity 29 (threshold 15). Of this number, 20 points are the body's own statements and 9 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.
register-pty.registerPtyTools (cyclomatic 29) services/computer-use-mcp/src/server/register-pty.ts:227— register-pty.registerPtyTools has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 1 of the 29 points is its own statement and the rest belongs to 7 function items inside it that branch (a function literal at line 408, a function literal at line 278, a function literal at line 240, …). 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.
projector.projectTranscript (cyclomatic 29) services/computer-use-mcp/src/transcript/projector.ts:54— projector.projectTranscript 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.
directory-import.inspectExtensionDirectory (cyclomatic 28) apps/stage-tamagotchi/src/main/services/airi/plugins/host/directory-import.ts:152— directory-import.inspectExtensionDirectory 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.
scheduler.onMessageArrival (cyclomatic 28) integrations/satori-bot/src/core/loop/scheduler.ts:218— scheduler.onMessageArrival has cyclomatic complexity 28 (threshold 15). Of this number, 27 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Transcript.accept (cyclomatic 28) packages/core-agent/src/voice/input/transcript.ts:162— Transcript.accept has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 7 of the 28 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 177, 183). 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.
chem.speakChemistry (cyclomatic 28) packages/speech-transformer-chem/src/chem.ts:224— chem.speakChemistry has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 7 of the 28 points are its own statements and the rest belongs to 7 function items inside it that branch (term, a function literal at line 253, side, …). 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.
config.resolveComputerUseConfig (cyclomatic 28) services/computer-use-mcp/src/config.ts:154— config.resolveComputerUseConfig 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.
StagePostProcessCompositorEffect.EnsureResources (cyclomatic 27) engines/stage-tamagotchi-godot/scripts/visuals/StagePostProcessCompositorEffect.Resources.cs:129— StagePostProcessCompositorEffect.EnsureResources 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 is NOT this file's highest cyclomatic complexity: PostProcessResources.AvatarGlowResourcesAreValid.get (cyclomatic 29) 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.
ComfyUIProvider.applyOverrides (cyclomatic 27) apps/stage-tamagotchi/src/main/services/airi/widgets/providers/comfyui.ts:260— ComfyUIProvider.applyOverrides 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.
ReflexRuntime.tick (cyclomatic 27) integrations/minecraft/src/cognitive/reflex/runtime.ts:131— ReflexRuntime.tick has cyclomatic complexity 27 (threshold 15). Of this number, 20 points are the body's own statements and 7 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.
map-renderer.renderTopDown (cyclomatic 27) integrations/minecraft/src/cognitive/conscious/map-renderer.ts:298— map-renderer.renderTopDown 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.
responses.streamResponses (cyclomatic 27) packages/core-agent/src/runtime/responses.ts:166— responses.streamResponses has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 3 of the 27 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 195, 256, 189, …). 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.
live2d-structure-report.generateReport (cyclomatic 27) packages/stage-ui-live2d/src/utils/live2d-structure-report.ts:14— live2d-structure-report.generateReport has cyclomatic complexity 27 (threshold 15). Of this number, 21 points are the body's own statements and 6 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.
smoke-stdio.main (cyclomatic 27) services/computer-use-mcp/src/bin/smoke-stdio.ts:57— smoke-stdio.main has cyclomatic complexity 27 (threshold 15). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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.
Mineflayer.setupBotEventHandlers (cyclomatic 26) integrations/minecraft/src/libs/mineflayer/core.ts:216— Mineflayer.setupBotEventHandlers has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to 10 function items inside it that branch (a function literal at line 243, a function literal at line 300, a function literal at line 276, …). 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.
MCPAdapter.configureServer (cyclomatic 26) integrations/twitter-services/src/adapters/mcp-adapter.ts:65— MCPAdapter.configureServer has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to 11 function literals inside it that branch (lines 351, 83, 134, …). 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.
index.createClientWithConnector::connectInternal (cyclomatic 26) packages/better-ws/src/client/index.ts:446— index.createClientWithConnector::connectInternal 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.
peers.createPeers (cyclomatic 26) packages/better-ws/src/server/peers.ts:87— peers.createPeers has cyclomatic complexity 26 (threshold 15). Of this number, 15 points are the body's own statements and 11 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.
settings-search.namesOf (cyclomatic 26) packages/stage-pages/src/vite/settings-search.ts:603— settings-search.namesOf has cyclomatic complexity 26 (threshold 15). Of this number, 21 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
motion-manager.useMotionUpdatePluginAutoEyeBlink (cyclomatic 26) packages/stage-ui-live2d/src/composables/live2d/motion-manager.ts:292— motion-manager.useMotionUpdatePluginAutoEyeBlink has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to 2 function items inside it that branch (a function literal at line 374, updateForcedBlink). 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.
tachie-archive.inspectTachieArchive (cyclomatic 26) packages/stage-ui-tachie/src/utils/tachie-archive.ts:297— tachie-archive.inspectTachieArchive has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
use-chat-history-scroll.useChatHistoryScroll (cyclomatic 26) packages/stage-ui/src/components/scenarios/chat/composables/use-chat-history-scroll.ts:34— use-chat-history-scroll.useChatHistoryScroll has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to 8 function items inside it that branch (a function literal at line 122, findMessageItem, a function literal at line 77, …). 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.
use-settings-search.useSettingsSearch (cyclomatic 26) packages/stage-ui/src/composables/use-settings-search.ts:85— use-settings-search.useSettingsSearch has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to 6 function items inside it that branch (a function literal at line 127, a function literal at line 107, loadItems, …). 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.
transparency.summarizeRunState (cyclomatic 26) services/computer-use-mcp/src/transparency.ts:331— transparency.summarizeRunState 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.
lower.lowerBigOperator (cyclomatic 25) packages/speech-transformer-math/src/lower.ts:799— lower.lowerBigOperator has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
merge-latest-mac.main (cyclomatic 24) apps/stage-tamagotchi/scripts/merge-latest-mac.ts:173— merge-latest-mac.main has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
auth.createAuthService (cyclomatic 24) apps/stage-tamagotchi/src/main/services/airi/auth.ts:73— auth.createAuthService has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 7 function literals inside it that branch (lines 94, 105, 183, …). 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.
McpReplServer.start (cyclomatic 24) REDACTED:249— McpReplServer.start has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 10 of the 24 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 255, 285, 321). 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.
index.createServer (cyclomatic 24) packages/better-ws/src/server/index.ts:198— index.createServer has cyclomatic complexity 24 (threshold 15). Of this number, 15 points are the body's own statements and 9 belong to 7 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.
tts-chunker.processNarrative (cyclomatic 24) packages/pipelines-audio/src/processors/tts-chunker.ts:321— tts-chunker.processNarrative 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.
provider.startRealtimeSession (cyclomatic 24) packages/stage-ui/src/libs/providers/providers/aliyun-nls/provider.ts:123— provider.startRealtimeSession has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 3 of the 24 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 276, onTranscriptionStarted, a function literal at line 218, …). 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.
list-module-loc.main (cyclomatic 24) scripts/list-module-loc.mjs:215— list-module-loc.main has cyclomatic complexity 24 (threshold 15). Of this number, 14 points are the body's own statements and 10 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.
stepfun.buildExtraBody (cyclomatic 24) server/apps/api/src/services/adapters/tts/stepfun.ts:72— stepfun.buildExtraBody 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.
auth.createAuth (cyclomatic 24) server/apps/auth/src/auth.ts:436— auth.createAuth has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 8 of the 24 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 749, 734, 809). 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.
utils.getFilenames (cyclomatic 23) apps/stage-tamagotchi/scripts/utils.ts:143— utils.getFilenames 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.
brain-prompt.getZodTypeName (cyclomatic 23) integrations/minecraft/src/cognitive/conscious/prompts/brain-prompt.ts:45— brain-prompt.getZodTypeName 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.
index.createMimoSpeechProvider.speech (cyclomatic 23) packages/provider-inference/src/providers/cloud/mimo-audio/index.ts:64— index.createMimoSpeechProvider.speech 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 67). 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.
lower.callArguments (cyclomatic 23) packages/speech-transformer-math/src/lower.ts:551— lower.callArguments 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, 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.
merge.mergeProviderSync (cyclomatic 23) packages/stage-ui/src/stores/providers/merge.ts:47— merge.mergeProviderSync 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.
hearing.useHearingStore.transcription (cyclomatic 23) packages/stage-ui/src/stores/modules/hearing.ts:425— hearing.useHearingStore.transcription 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.
chat.useChatStore (cyclomatic 23) packages/stage-ui/src/stores/chat.ts:259— chat.useChatStore 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 8 function literals inside it that branch (lines 1039, 1017, 1059, …). 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.
webhook.createWebhookOperation (cyclomatic 23) server/apps/api/src/routes/stripe/operations/webhook.ts:20— webhook.createWebhookOperation 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 27). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
collect-block.collectBlock (cyclomatic 22) integrations/minecraft/src/skills/actions/collect-block.ts:22— collect-block.collectBlock 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.
Transcript.patch (cyclomatic 22) packages/core-agent/src/voice/input/transcript.ts:104— Transcript.patch has cyclomatic complexity 22 (threshold 15). Of this number, 18 points are the body's own statements and 4 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.
lower.lowerClause (cyclomatic 22) packages/speech-transformer-math/src/lower.ts:211— lower.lowerClause 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.
settings-search.chainsOf (cyclomatic 22) packages/stage-pages/src/vite/settings-search.ts:259— settings-search.chainsOf has cyclomatic complexity 22 (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.
use-chat-images.useChatImages.addFiles (cyclomatic 22) packages/stage-ui/src/components/scenarios/chat/composables/use-chat-images.ts:86— use-chat-images.useChatImages.addFiles 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.
router.createLlmRouterService.dispatchOneUpstream (cyclomatic 22) server/apps/api/src/services/domain/llm-router/router.ts:295— router.createLlmRouterService.dispatchOneUpstream 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.
steam.steam (cyclomatic 22) REDACTED:104— steam.steam has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 4 function items inside it that branch (a function literal at line 239, readSignupProfile, verifyOpenIdCallback, …). 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.
transparency.explainActionIntent (cyclomatic 22) services/computer-use-mcp/src/transparency.ts:29— transparency.explainActionIntent has cyclomatic complexity 22 (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.
transparency.explainActionOutcome (cyclomatic 22) services/computer-use-mcp/src/transparency.ts:126— transparency.explainActionOutcome has cyclomatic complexity 22 (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.
ReplicateProvider.runGeneration (cyclomatic 21) apps/stage-tamagotchi/src/main/services/airi/widgets/providers/replicate.ts:130— ReplicateProvider.runGeneration 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.
WindowBackdrop.region (cyclomatic 21) apps/stage-tamagotchi/src/renderer/composables/use-window-backdrop.ts:300— WindowBackdrop.region has cyclomatic complexity 21 (threshold 15). Of this number, 17 points are the body's own statements and 4 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.
widgets.executeWidgetAction (cyclomatic 21) apps/stage-tamagotchi/src/renderer/stores/tools/builtin/widgets.ts:248— widgets.executeWidgetAction 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.
patched-goto.patchedGoto (cyclomatic 21) integrations/minecraft/src/skills/patched-goto.ts:148— patched-goto.patchedGoto 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 9 function literals inside it that branch (lines 239, 273, 168, …). 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.
world-interactions.placeBlock (cyclomatic 21) integrations/minecraft/src/skills/actions/world-interactions.ts:29— world-interactions.placeBlock 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.
Pcm16Encoder.pull (cyclomatic 21) packages/audio/src/encoding/pcm-stream.ts:35— Pcm16Encoder.pull 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.
streaming-session.streamingSynthesize (cyclomatic 21) packages/stage-ui/src/libs/speech/streaming-session.ts:88— streaming-session.streamingSynthesize has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 2 of the 21 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 167, 109, 104, …). 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.
io-tracer.useIOTracerStore.handleSpan (cyclomatic 21) packages/stage-ui/src/stores/devtools/io-tracer.ts:71— io-tracer.useIOTracerStore.handleSpan 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, 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.
app.buildApp (cyclomatic 21) server/apps/api/src/app.ts:150— app.buildApp has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 4 of the 21 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 353, 262, 373, …). 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.
preflight.getRuntimePreflight (cyclomatic 21) services/computer-use-mcp/src/preflight.ts:47— preflight.getRuntimePreflight 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.
widgets.executeWidgetAction (cyclomatic 20) apps/stage-tamagotchi-kirie/src-web/src/renderer/stores/tools/builtin/widgets.ts:252— widgets.executeWidgetAction 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.
index.setupExtensionHostServiceInternal.executeActivationPlan (cyclomatic 20) apps/stage-tamagotchi/src/main/services/airi/plugins/host/index.ts:485— index.setupExtensionHostServiceInternal.executeActivationPlan has cyclomatic complexity 20 (threshold 15). Of this number, 14 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.
ReplicateProvider.generate (cyclomatic 20) apps/stage-tamagotchi/src/main/services/airi/widgets/providers/replicate.ts:53— ReplicateProvider.generate has cyclomatic complexity 20 (threshold 15). Of this number, 11 points are the body's own statements and 9 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.
JavaScriptPlanner.handleBridgeRequest (cyclomatic 20) REDACTED:825— JavaScriptPlanner.handleBridgeRequest 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.
index.handleLoopStep (cyclomatic 20) integrations/telegram-bot/src/bots/telegram/index.ts:174— index.handleLoopStep has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
hosted-kits.captureExtensionProviderSessionInput (cyclomatic 20) packages/plugin-sdk/src/plugin-host/hosted-kits.ts:417— hosted-kits.captureExtensionProviderSessionInput 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.
match-expression.matchesRouteExpression (cyclomatic 20) REDACTED:66— match-expression.matchesRouteExpression has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
lower.derivativeOf (cyclomatic 20) packages/speech-transformer-math/src/lower.ts:830— lower.derivativeOf has cyclomatic complexity 20 (threshold 15). Of this number, 17 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.
render.fractionPart (cyclomatic 20) packages/speech-transformer-math/src/render.ts:68— render.fractionPart 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.
settings-search.providerViewImportsOf::visit (cyclomatic 20) packages/stage-pages/src/vite/settings-search.ts:471— settings-search.providerViewImportsOf::visit 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.
background.useBackgroundStore.initializeStore (cyclomatic 20) packages/stage-ui/src/stores/background.ts:88— background.useBackgroundStore.initializeStore has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 9 of the 20 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 112, 97, 172, …). 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.
chat.useChatStore.streamWithStageAdapters::prepareTextOnlyAudioContext (cyclomatic 20) packages/stage-ui/src/stores/chat.ts:749— chat.useChatStore.streamWithStageAdapters::prepareTextOnlyAudioContext 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.
NativeWindowResizeController.ResolveResizeEdge (cyclomatic 19) apps/stage-tamagotchi-kirie/src-godot/scripts/native-window-resize-controller.cs:37— NativeWindowResizeController.ResolveResizeEdge 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.
runtime.createComputerUseRuntime.run (cyclomatic 19) apps/stage-tamagotchi/src/main/services/airi/computer-use/runtime.ts:59— runtime.createComputerUseRuntime.run 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 one function literal inside it that branches (line 69). 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.
directory-import.copyExtensionDirectory (cyclomatic 19) apps/stage-tamagotchi/src/main/services/airi/plugins/host/directory-import.ts:288— directory-import.copyExtensionDirectory 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.
devtools-lag.useDevtoolsLagStore.ensureSampler (cyclomatic 19) apps/stage-web/src/stores/devtools-lag.ts:202— devtools-lag.useDevtoolsLagStore.ensureSampler has cyclomatic complexity 19 (threshold 15). 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, 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.
world-interactions.breakBlockAt (cyclomatic 19) integrations/minecraft/src/skills/actions/world-interactions.ts:220— world-interactions.breakBlockAt 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.
matcher.matchCondition (cyclomatic 19) integrations/minecraft/src/cognitive/perception/rules/matcher.ts:12— matcher.matchCondition 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.
PluginInstallation.setup (cyclomatic 19) packages/core-agent/src/voice/plugins/registry.ts:120— PluginInstallation.setup 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 9 function literals inside it that branch (lines 193, 156, 168, …). 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.
windows.classifyWindow (cyclomatic 19) packages/scenarios-stage-tamagotchi-electron/src/runtime/windows.ts:57— windows.classifyWindow 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.
use-context-flow-formatters.buildPreviewItems (cyclomatic 19) packages/stage-pages/src/pages/devtools/context-flow/composables/use-context-flow-formatters.ts:97— use-context-flow-formatters.buildPreviewItems 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.
spine-preview.loadSpineModelPreview (cyclomatic 19) packages/stage-ui-spine/src/utils/spine-preview.ts:19— spine-preview.loadSpineModelPreview 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 6 function literals inside it that branch (lines 111, 81, 102, …). 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.
session-store.useChatSessionStore.loadSession (cyclomatic 19) packages/stage-ui/src/stores/chat/session-store.ts:411— session-store.useChatSessionStore.loadSession has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 9 of the 19 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 431, needsCloudHydration). 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.
OpfsModelAssetStorage.install (cyclomatic 19) packages/stage-ui/src/libs/inference/model-assets-opfs.ts:52— OpfsModelAssetStorage.install 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.
provider.useProviderStore.listProviderVoices (cyclomatic 19) packages/stage-ui/src/stores/providers/provider.ts:716— provider.useProviderStore.listProviderVoices 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 2 function literals inside it that branch (lines 733, 763). 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.
speech.useSpeechStore.createOutput (cyclomatic 19) REDACTED:545— speech.useSpeechStore.createOutput has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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.
Analytics.initialize (cyclomatic 19) packages/stage-ui/src/libs/product-signals/index.ts:65— Analytics.initialize 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 3 function literals inside it that branch (lines 93, 133, 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.
session.createSessionState.handleClientMessage (cyclomatic 19) server/apps/api/src/routes/audio-speech-ws/session.ts:229— session.createSessionState.handleClientMessage has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
router.createLlmRouterService.routeTtsAcrossPools (cyclomatic 19) server/apps/api/src/services/domain/llm-router/router.ts:794— router.createLlmRouterService.routeTtsAcrossPools has cyclomatic complexity 19 (threshold 15). Of this number, 16 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
session.createAliyunNlsStreamResponse (cyclomatic 19) REDACTED:185— session.createAliyunNlsStreamResponse 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 6 function literals inside it that branch (lines 211, 224, 255, …). 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.
checkout.createCheckoutOperation (cyclomatic 19) server/apps/api/src/routes/stripe/operations/checkout.ts:16— checkout.createCheckoutOperation 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 25). 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.
background.buildFrameOffsets (cyclomatic 19) services/computer-use-mcp/chrome-extension/background.js:313— background.buildFrameOffsets 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 one function item inside it that branches (resolve). 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.
strategy.buildRecoveryPlan (cyclomatic 19) services/computer-use-mcp/src/strategy.ts:452— strategy.buildRecoveryPlan 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.
engine.executePtyStepFamily (cyclomatic 19) services/computer-use-mcp/src/workflows/engine.ts:1003— engine.executePtyStepFamily 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.
smoke-remote.main (cyclomatic 19) services/computer-use-mcp/src/bin/smoke-remote.ts:62— smoke-remote.main has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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.
readInputValue (cyclomatic 19) REDACTED:251— readInputValue 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.
renderResults (cyclomatic 19) integrations/minecraft/src/debug/web/app.js:1318— renderResults 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 2 function literals inside it that branch (lines 1327, 1332). 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.
attention-handler.createAttentionHandler (cyclomatic 18) integrations/telegram-bot/src/bots/telegram/agent/attention-handler.ts:5— attention-handler.createAttentionHandler has cyclomatic complexity 18 (threshold 15). Of this number, 9 points are the body's own statements and 9 belong to 4 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
xsai-events.toAiriStreamEvent (cyclomatic 18) packages/core-agent/src/runtime/xsai-events.ts:12— xsai-events.toAiriStreamEvent has cyclomatic complexity 18 (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.
tex.fence (cyclomatic 18) packages/speech-transformer-math/src/tex.ts:35— tex.fence 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.
lower.lowerNode (cyclomatic 18) packages/speech-transformer-math/src/lower.ts:1052— lower.lowerNode 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.
settings-search.createSettingsSearch.propsOf (cyclomatic 18) packages/stage-pages/src/vite/settings-search.ts:952— settings-search.createSettingsSearch.propsOf has cyclomatic complexity 18 (threshold 15). Of this number, 16 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.
beat-sync.createBeatSyncController.scheduleBeat (cyclomatic 18) packages/stage-ui-live2d/src/composables/live2d/beat-sync.ts:185— beat-sync.createBeatSyncController.scheduleBeat 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.
motion-manager.useMotionUpdatePluginLightSquint (cyclomatic 18) packages/stage-ui-live2d/src/composables/live2d/motion-manager.ts:513— motion-manager.useMotionUpdatePluginLightSquint 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 3 function items inside it that branch (a function literal at line 591, releaseEyes, baseFor). 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.
synchronize.synchronize (cyclomatic 18) packages/stage-ui/src/libs/document-sync/synchronize.ts:80— synchronize.synchronize 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.
airi-card-import-export.sanitizeAiri (cyclomatic 18) packages/stage-ui/src/services/airi-card-import-export.ts:236— airi-card-import-export.sanitizeAiri 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.
generation-usage.extractUsageFromBody (cyclomatic 18) server/apps/api/src/services/domain/generation-usage.ts:60— generation-usage.extractUsageFromBody 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.
oidc-jwt-bearer.oidcJwtBearer (cyclomatic 18) server/apps/auth/src/plugins/oidc-jwt-bearer.ts:65— oidc-jwt-bearer.oidcJwtBearer has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 4 function items inside it that branch (a function literal at line 139, a function literal at line 88, a function literal at line 82, …). 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.
smoke-chrome-grounding.runDesktopV3Smoke (cyclomatic 18) services/computer-use-mcp/src/bin/smoke-chrome-grounding.ts:326— smoke-chrome-grounding.runDesktopV3Smoke 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.
StagePostProcessCompositorEffect._RenderCallback (cyclomatic 17) engines/stage-tamagotchi-godot/scripts/visuals/StagePostProcessCompositorEffect.cs:147— StagePostProcessCompositorEffect._RenderCallback 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.
window.createWindowService (cyclomatic 17) apps/stage-tamagotchi/src/main/services/electron/window.ts:21— window.createWindowService 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 9 function literals inside it that branch (lines 108, 81, 87, …). 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.
RecipePlanner.buildDependencyTree (cyclomatic 17) integrations/minecraft/src/utils/recipe-planner.ts:165— RecipePlanner.buildDependencyTree has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
ReflexRuntime.reconcileAutoFollow (cyclomatic 17) integrations/minecraft/src/cognitive/reflex/runtime.ts:265— ReflexRuntime.reconcileAutoFollow 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.
scheduler.handleLoopStep (cyclomatic 17) integrations/satori-bot/src/core/loop/scheduler.ts:26— scheduler.handleLoopStep 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.
chat-completions.streamChatCompletions (cyclomatic 17) packages/core-agent/src/runtime/chat-completions.ts:18— chat-completions.streamChatCompletions 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 3 function literals inside it that branch (lines 47, 41, 110). 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.
bare-latex.findBareLatex (cyclomatic 17) packages/core-agent/src/voice/output/speech-transformation/preprocessor/math/bare-latex.ts:33— bare-latex.findBareLatex 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.
tool-schema.collapseToolSchemaPrimitiveAnyOf (cyclomatic 17) packages/provider-inference/src/providers/tool-schema.ts:27— tool-schema.collapseToolSchemaPrimitiveAnyOf has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
lower.lowerSetPrefix (cyclomatic 17) packages/speech-transformer-math/src/lower.ts:760— lower.lowerSetPrefix 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.
provider.useProviderStore.validateProvider (cyclomatic 17) packages/stage-ui/src/stores/providers/provider.ts:380— provider.useProviderStore.validateProvider has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 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.
speech.useSpeechStore.loadVoiceCatalog (cyclomatic 17) REDACTED:235— speech.useSpeechStore.loadVoiceCatalog 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.
default.configureAsDefaultsIfEmpty (cyclomatic 17) packages/stage-ui/src/stores/modules/default.ts:28— default.configureAsDefaultsIfEmpty 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.
airi-card.useAiriCardStore.initialize (cyclomatic 17) packages/stage-ui/src/stores/modules/airi-card.ts:1173— airi-card.useAiriCardStore.initialize 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.
use-gamepad-actions.useLive2DMotionGamepadActions::runEdgeActions (cyclomatic 17) packages/stage-ui/src/features/devtools/motion/live2d/composables/use-gamepad-actions.ts:113— use-gamepad-actions.useLive2DMotionGamepadActions::runEdgeActions 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.
store.createFieldSyncStore.push (cyclomatic 17) server/apps/api/src/services/domain/field-sync/store.ts:279— store.createFieldSyncStore.push has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to one function literal inside it that branches (line 282). 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.
chats.createChatService.pushMessages (cyclomatic 17) server/apps/api/src/services/domain/chats.ts:231— chats.createChatService.pushMessages 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 3 function literals inside it that branch (lines 235, 273, 302). 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.
index.createPaymentService.claimExistingOrder (cyclomatic 17) server/apps/api/src/services/domain/payment/index.ts:93— index.createPaymentService.claimExistingOrder 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 one function literal inside it that branches (line 94). 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.
request.enforceResponsesSecurity (cyclomatic 17) server/apps/api/src/routes/openai/v1/operations/responses/request.ts:82— request.enforceResponsesSecurity 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.
chrome-semantic-adapter.captureViaExtension (cyclomatic 17) services/computer-use-mcp/src/chrome-semantic-adapter.ts:163— chrome-semantic-adapter.captureViaExtension 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.
engine.resumeWorkflow (cyclomatic 17) services/computer-use-mcp/src/workflows/engine.ts:921— engine.resumeWorkflow 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.
engine.extractDisplayInfo (cyclomatic 17) services/computer-use-mcp/src/workflows/engine.ts:1239— engine.extractDisplayInfo 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 one function literal inside it that branches (line 1249). 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.
registry.loadManifestsFrom (cyclomatic 16) apps/stage-tamagotchi/src/main/services/airi/plugins/host/registry.ts:57— registry.loadManifestsFrom 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.
asset-url.rewriteWidgetModuleAssetUrl (cyclomatic 16) apps/stage-tamagotchi/src/main/services/airi/plugins/kits/widget/asset-url.ts:97— asset-url.rewriteWidgetModuleAssetUrl 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.
FileModelAssetStorage.install (cyclomatic 16) apps/stage-tamagotchi/src/main/services/electron/model-asset-storage.ts:48— FileModelAssetStorage.install 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.
use-chat-floating-click-through.useChatFloatingClickThrough.takesPointer (cyclomatic 16) apps/stage-tamagotchi/src/renderer/composables/use-chat-floating-click-through.ts:154— use-chat-floating-click-through.useChatFloatingClickThrough.takesPointer 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.
js-planner-sandbox-runner.executeSandboxWorker (cyclomatic 16) integrations/minecraft/src/cognitive/conscious/js-planner-sandbox-runner.ts:53— js-planner-sandbox-runner.executeSandboxWorker 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 5 function literals inside it that branch (lines 165, 99, 82, …). 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.
damage-taken.inferDamageSource (cyclomatic 16) integrations/minecraft/src/cognitive/perception/events/definitions/damage-taken.ts:21— damage-taken.inferDamageSource 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.
ConversationPanel.summarizeEvent (cyclomatic 16) integrations/minecraft/src/debug/web/app.js:773— ConversationPanel.summarizeEvent 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: ReplPanel.renderResults (cyclomatic 19) 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.
common.telegramMessageToOneLine (cyclomatic 16) integrations/telegram-bot/src/models/common.ts:26— common.telegramMessageToOneLine 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.
response-categoriser.createStreamingCategorizer.filterToSpeech (cyclomatic 16) packages/core-agent/src/runtime/response-categoriser.ts:370— response-categoriser.createStreamingCategorizer.filterToSpeech 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
apply-pose-to-vrm.createVrmPoseApplier.applyOne (cyclomatic 16) packages/model-driver-mediapipe/src/three/apply-pose-to-vrm.ts:249— apply-pose-to-vrm.createVrmPoseApplier.applyOne 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.
lower.nest (cyclomatic 16) packages/speech-transformer-math/src/lower.ts:296— lower.nest has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 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.
lower.statisticOf (cyclomatic 16) packages/speech-transformer-math/src/lower.ts:379— lower.statisticOf 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.
lower.lowerRows (cyclomatic 16) packages/speech-transformer-math/src/lower.ts:984— lower.lowerRows has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 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.
AdaptiveInput.measure (cyclomatic 16) packages/stage-layouts/src/browser/adaptive-input.ts:179— AdaptiveInput.measure 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.
tachie-archive.resolveTachieArchiveLayout (cyclomatic 16) packages/stage-ui-tachie/src/utils/tachie-archive.ts:158— tachie-archive.resolveTachieArchiveLayout 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.
wire-message.extractMessageText (cyclomatic 16) packages/stage-ui/src/libs/chat-sync/wire-message.ts:21— wire-message.extractMessageText has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 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.
session-store.useChatSessionStore (cyclomatic 16) packages/stage-ui/src/stores/chat/session-store.ts:67— session-store.useChatSessionStore 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 6 function literals inside it that branch (lines 1767, 1478, 1791, …). 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.
auth.useAuthStore.refreshTokenNow (cyclomatic 16) packages/stage-ui/src/stores/auth.ts:167— auth.useAuthStore.refreshTokenNow 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 178, 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.
tool-call-widget-reading.collectRest (cyclomatic 16) packages/stage-ui/src/components/scenarios/chat/components/tool-call-widget-reading.ts:23— tool-call-widget-reading.collectRest 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
canvas-alpha.isCanvasRegionTransparent (cyclomatic 16) packages/stage-ui/src/composables/canvas-alpha.ts:19— canvas-alpha.isCanvasRegionTransparent 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.
queues.useEmotionsMessageQueue (cyclomatic 16) packages/stage-ui/src/composables/queues.ts:9— queues.useEmotionsMessageQueue 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 items inside it that branch (parseActEmotion, normalizeIntensity, a function literal at line 56, …). 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.
chat.retryContentFrom (cyclomatic 16) packages/stage-ui/src/stores/chat.ts:182— chat.retryContentFrom has cyclomatic complexity 16 (threshold 15). 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: 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.
home-assistant.createHomeAssistantTools (cyclomatic 16) packages/stage-ui/src/tools/home-assistant.ts:104— home-assistant.createHomeAssistantTools 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 5 function items inside it that branch (a function literal at line 155, a function literal at line 215, assertInstanceHeld, …). 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.
streaming-control.useLlmStreamingControlStore.dispatchWith::observe (cyclomatic 16) packages/stage-ui/src/stores/ai/chat-llm/streaming-control.ts:63— streaming-control.useLlmStreamingControlStore.dispatchWith::observe 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.
voice-messages.useVoiceMessagesStore.connect (cyclomatic 16) packages/stage-ui/src/stores/voice-messages.ts:101— voice-messages.useVoiceMessagesStore.connect 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 104, 133, 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.
index.createOpenAiSpeechService.handleSpeechRequest (cyclomatic 16) server/apps/api/src/services/domain/openai-speech/index.ts:108— index.createOpenAiSpeechService.handleSpeechRequest 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.
merge.applyExtraction (cyclomatic 16) services/computer-use-mcp/src/task-memory/merge.ts:158— merge.applyExtraction 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: merge.hasMeaningfulTaskMemoryExtraction (cyclomatic 18) 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.
browser-agent.runBrowserAgentTask (cyclomatic 16) services/computer-use-mcp/src/server/browser-agent.ts:78— browser-agent.runBrowserAgentTask 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 3 function literals inside it that branch (lines 143, 111, 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.
TodoComment engines/stage-tamagotchi-godot/scripts/StageRoot.cs:251— // TODO: — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
engine.executeWorkflow (cognitive 178) services/computer-use-mcp/src/workflows/engine.ts:156— engine.executeWorkflow has cognitive complexity 178 (threshold 15). Drivers by points: if/else 40 (121 pts), ternaries 9 (25 pts), boolean chains 17, loops 4 (10 pts), error handling 2 (5 pts) (nesting depth added 106). Of this number, 176 points are the body's own statements and 2 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.
chat-orchestrator-runtime.createChatOrchestratorRuntime.performSend (cognitive 143) packages/core-agent/src/runtime/chat-orchestrator-runtime.ts:637— chat-orchestrator-runtime.createChatOrchestratorRuntime.performSend has cognitive complexity 143 (threshold 15). Drivers by points: if/else 68 (98 pts), boolean chains 21, ternaries 15 (19 pts), error handling 2, loops 1 (2 pts), match/switch 1 (nesting depth added 35). Of this number, 83 points are the body's own statements and 60 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.
index.setupApp (cognitive 132) packages/server-runtime/src/index.ts:215— index.setupApp has cognitive complexity 132 (threshold 15). Drivers by points: if/else 49 (88 pts), boolean chains 21, ternaries 9 (12 pts), error handling 3 (5 pts), loops 3 (5 pts), match/switch 1 (nesting depth added 46). Most of this is not in the body itself: 4 of the 132 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 549, 532, 1049, …). 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.
MarkdownSegmenter.safeEnd (cognitive 125) packages/core-agent/src/voice/output/speech-transformation/segmenter.ts:88— MarkdownSegmenter.safeEnd has cognitive complexity 125 (threshold 15). Drivers by points: if/else 39 (93 pts), boolean chains 18, loops 5 (11 pts), ternaries 1 (3 pts) (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.
parse.normalize (cognitive 117) REDACTED:205— parse.normalize has cognitive complexity 117 (threshold 15). Drivers by points: if/else 21 (54 pts), ternaries 15 (41 pts), boolean chains 18, loops 2, match/switch 1 (2 pts) (nesting depth added 60). Of this number, 110 points are the body's own statements and 7 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
render.renderMath::render (cognitive 106) packages/speech-transformer-math/src/render.ts:183— render.renderMath::render has cognitive complexity 106 (threshold 15). Drivers by points: ternaries 19 (43 pts), if/else 24 (37 pts), boolean chains 23, loops 1 (2 pts), match/switch 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.
lower.lowerTerms (cognitive 97) packages/speech-transformer-math/src/lower.ts:601— lower.lowerTerms has cognitive complexity 97 (threshold 15). Drivers by points: if/else 24 (52 pts), ternaries 7 (21 pts), boolean chains 20, loops 2 (4 pts) (nesting depth added 44). Of this number, 95 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.
pose-to-vrm.poseToVrmTargets (cognitive 94) packages/model-driver-mediapipe/src/three/pose-to-vrm.ts:173— pose-to-vrm.poseToVrmTargets has cognitive complexity 94 (threshold 15). Drivers by points: if/else 34 (63 pts), boolean chains 16, ternaries 7 (15 pts) (nesting depth added 37). Of this number, 91 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tts-chunker.chunkTtsInput (cognitive 88) packages/pipelines-audio/src/processors/tts-chunker.ts:56— tts-chunker.chunkTtsInput has cognitive complexity 88 (threshold 15). Drivers by points: if/else 19 (57 pts), ternaries 4 (19 pts), boolean chains 8, match/switch 1 (3 pts), loops 1 (nesting depth added 55). 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.
index.responsesCreate (cognitive 86) server/apps/api/src/routes/openai/v1/operations/responses/index.ts:106— index.responsesCreate has cognitive complexity 86 (threshold 15). Drivers by points: if/else 27 (47 pts), ternaries 10 (21 pts), boolean chains 12, error handling 4 (5 pts), loops 1 (nesting depth added 32). None of this is in the body itself: all 86 points belong to 4 function literals inside it that branch (lines 277, 111, 184, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
settings-search.bindingsOf (cognitive 82) packages/stage-pages/src/vite/settings-search.ts:415— settings-search.bindingsOf has cognitive complexity 82 (threshold 15). Drivers by points: ternaries 13 (53 pts), if/else 5 (16 pts), loops 4 (7 pts), boolean chains 6 (nesting depth added 54). Of this number, 80 points are the body's own statements and 2 belong 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.
tts.chunkTTSInput (cognitive 81) packages/stage-ui/src/utils/tts.ts:42— tts.chunkTTSInput has cognitive complexity 81 (threshold 15). Drivers by points: if/else 17 (49 pts), ternaries 5 (20 pts), boolean chains 8, match/switch 1 (3 pts), loops 1 (nesting depth added 49). 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.
settings-search.createSettingsSearch.evaluate (cognitive 78) packages/stage-pages/src/vite/settings-search.ts:1195— settings-search.createSettingsSearch.evaluate has cognitive complexity 78 (threshold 15). Drivers by points: if/else 15 (34 pts), ternaries 13 (31 pts), boolean chains 12, match/switch 1 (nesting depth added 37). 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.
activation-plan.planExtensionActivation (cognitive 77) packages/plugin-sdk/src/plugin-host/activation-plan.ts:118— activation-plan.planExtensionActivation has cognitive complexity 77 (threshold 15). Drivers by points: if/else 20 (46 pts), loops 13 (15 pts), ternaries 4 (12 pts), boolean chains 4 (nesting depth added 36). Of this number, 76 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.
artistry-bridge.handleArtistryTrigger (cognitive 73) apps/stage-tamagotchi/src/main/services/airi/widgets/artistry-bridge.ts:263— artistry-bridge.handleArtistryTrigger has cognitive complexity 73 (threshold 15). Drivers by points: if/else 18 (44 pts), boolean chains 19, ternaries 2 (5 pts), loops 1 (3 pts), error handling 1 (2 pts) (nesting depth added 32). Of this number, 67 points are the body's own statements and 6 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.
settings-search.createSettingsSearch.scanComponent::walk (cognitive 73) packages/stage-pages/src/vite/settings-search.ts:1350— settings-search.createSettingsSearch.scanComponent::walk has cognitive complexity 73 (threshold 15). Drivers by points: if/else 16 (34 pts), ternaries 8 (18 pts), loops 6 (14 pts), boolean chains 7 (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.
chem.lowerChemistry (cognitive 72) packages/speech-transformer-chem/src/chem.ts:72— chem.lowerChemistry has cognitive complexity 72 (threshold 15). Drivers by points: if/else 21 (40 pts), boolean chains 17, ternaries 6 (13 pts), error handling 1, loops 1 (nesting depth added 26). Of this number, 62 points are the body's own statements and 10 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.
ComfyUIProvider.pollForResult (cognitive 71) apps/stage-tamagotchi/src/main/services/airi/widgets/providers/comfyui.ts:86— ComfyUIProvider.pollForResult has cognitive complexity 71 (threshold 15). Drivers by points: if/else 15 (43 pts), boolean chains 15, error handling 4 (6 pts), loops 2 (5 pts), ternaries 1 (2 pts) (nesting depth added 34). 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.
settings-search.createSettingsSearch.declarationOf (cognitive 70) packages/stage-pages/src/vite/settings-search.ts:1008— settings-search.createSettingsSearch.declarationOf has cognitive complexity 70 (threshold 15). Drivers by points: if/else 12 (30 pts), ternaries 8 (29 pts), loops 4 (7 pts), boolean chains 4 (nesting depth added 42). Of this number, 51 points are the body's own statements and 19 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.
DiscordAdapter.setupEventHandlers (cognitive 69) integrations/discord-bot/src/adapters/airi-adapter.ts:95— DiscordAdapter.setupEventHandlers has cognitive complexity 69 (threshold 15). Drivers by points: if/else 21 (49 pts), ternaries 4 (8 pts), boolean chains 5, loops 1 (4 pts), error handling 2, match/switch 1 (nesting depth added 35). None of this is in the body itself: all 69 points belong to 4 function literals inside it that branch (lines 159, 97, 210, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
settings-search.createSettingsSearch (cognitive 69) packages/stage-pages/src/vite/settings-search.ts:775— settings-search.createSettingsSearch has cognitive complexity 69 (threshold 15). Drivers by points: ternaries 13 (30 pts), if/else 17 (25 pts), boolean chains 8, loops 6 (nesting depth added 25). Of this number, 64 points are the body's own statements and 5 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.
tts-chunker.createTtsSegmentStream (cognitive 65) packages/pipelines-audio/src/processors/tts-chunker.ts:411— tts-chunker.createTtsSegmentStream has cognitive complexity 65 (threshold 15). Drivers by points: if/else 16 (46 pts), boolean chains 8, loops 2 (5 pts), ternaries 1 (4 pts), error handling 2 (nesting depth added 36). None of this is in the body itself: all 65 points belong to 2 function literals inside it that branch (lines 422, 507). 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.
openai-compatible.createOpenAICompatibleValidators (cognitive 65) packages/provider-inference/src/validators/openai-compatible.ts:107— openai-compatible.createOpenAICompatibleValidators has cognitive complexity 65 (threshold 15). Drivers by points: ternaries 14 (26 pts), if/else 18 (24 pts), boolean chains 8, error handling 4 (7 pts) (nesting depth added 21). Most of this is not in the body itself: 3 of the 65 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 232, runChatCheck, a function literal at line 267, …). 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.
live2d-validator.validateLive2DZip (cognitive 64) packages/stage-ui-live2d/src/utils/live2d-validator.ts:302— live2d-validator.validateLive2DZip has cognitive complexity 64 (threshold 15). Drivers by points: if/else 26 (42 pts), loops 4 (8 pts), boolean chains 6, ternaries 2 (6 pts), error handling 1 (2 pts) (nesting depth added 25). Of this number, 63 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
expression.useVRMEmote.update (cognitive 63) packages/stage-ui-three/src/composables/vrm/expression.ts:233— expression.useVRMEmote.update has cognitive complexity 63 (threshold 15). Drivers by points: if/else 19 (39 pts), loops 4 (9 pts), boolean chains 8, ternaries 3 (7 pts) (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
artistry-autonomous.useAutonomousArtistryStore.runArtistTask (cognitive 63) packages/stage-ui/src/stores/modules/artistry-autonomous.ts:50— artistry-autonomous.useAutonomousArtistryStore.runArtistTask has cognitive complexity 63 (threshold 15). Drivers by points: if/else 17 (25 pts), boolean chains 17, error handling 3 (9 pts), ternaries 8 (9 pts), match/switch 1 (3 pts) (nesting depth added 17). Of this number, 61 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.
router.createLlmRouterService.routeTts (cognitive 63) server/apps/api/src/services/domain/llm-router/router.ts:922— router.createLlmRouterService.routeTts has cognitive complexity 63 (threshold 15). Drivers by points: if/else 25 (47 pts), loops 4 (8 pts), boolean chains 4, ternaries 2 (4 pts) (nesting depth added 28). Of this number, 48 points are the body's own statements and 15 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.
register-tools.registerComputerUseTools (cognitive 62) services/computer-use-mcp/src/server/register-tools.ts:138— register-tools.registerComputerUseTools has cognitive complexity 62 (threshold 15). Drivers by points: if/else 30 (31 pts), ternaries 13 (18 pts), boolean chains 8, error handling 4 (5 pts) (nesting depth added 7). Most of this is not in the body itself: 2 of the 62 points are its own statements and the rest belongs to 21 function literals inside it that branch (lines 1009, 923, 435, …). 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.
context-bridge.useContextBridgeStore.initialize (cognitive 59) packages/stage-ui/src/stores/mods/api/context-bridge.ts:603— context-bridge.useContextBridgeStore.initialize has cognitive complexity 59 (threshold 15). Drivers by points: if/else 31 (40 pts), ternaries 5 (8 pts), loops 3 (5 pts), boolean chains 3, error handling 2 (3 pts) (nesting depth added 15). Most of this is not in the body itself: 4 of the 59 points are its own statements and the rest belongs to 21 function items inside it that branch (a function literal at line 835, a function literal at line 689, a function literal at line 672, …). 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.
rules.createSpeechActivityRule (cognitive 57) packages/core-agent/src/voice/policy/rules.ts:92— rules.createSpeechActivityRule has cognitive complexity 57 (threshold 15). Drivers by points: if/else 18 (27 pts), ternaries 9 (17 pts), boolean chains 12, loops 1 (nesting depth added 17). Of this number, 46 points are the body's own statements and 11 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.
router.createLlmRouterService.route (cognitive 57) server/apps/api/src/services/domain/llm-router/router.ts:460— router.createLlmRouterService.route has cognitive complexity 57 (threshold 15). Drivers by points: if/else 24 (40 pts), loops 5 (8 pts), ternaries 4 (6 pts), boolean chains 3 (nesting depth added 21). Of this number, 41 points are the body's own statements and 16 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.
handleCommand (cognitive 57) services/computer-use-mcp/chrome-extension/background.js:417— handleCommand has cognitive complexity 57 (threshold 15). Drivers by points: boolean chains 29, if/else 9 (16 pts), error handling 3 (7 pts), ternaries 2 (4 pts), match/switch 1 (nesting depth added 13). Of this number, 27 points are the body's own statements and 30 belong to 10 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.
directory-import.inspectExtensionDirectory (cognitive 56) apps/stage-tamagotchi/src/main/services/airi/plugins/host/directory-import.ts:152— directory-import.inspectExtensionDirectory has cognitive complexity 56 (threshold 15). Drivers by points: if/else 19 (41 pts), loops 6 (9 pts), ternaries 1 (4 pts), boolean chains 1, error handling 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
crafting.craftRecipe (cognitive 56) integrations/minecraft/src/skills/crafting.ts:22— crafting.craftRecipe has cognitive complexity 56 (threshold 15). Drivers by points: if/else 20 (39 pts), boolean chains 7, error handling 2 (4 pts), loops 2 (4 pts), ternaries 1 (2 pts) (nesting depth added 24). Of this number, 34 points are the body's own statements and 22 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.
action-executor.createExecuteAction (cognitive 56) services/computer-use-mcp/src/server/action-executor.ts:236— action-executor.createExecuteAction has cognitive complexity 56 (threshold 15). Drivers by points: if/else 14 (25 pts), ternaries 7 (12 pts), boolean chains 9, error handling 3 (9 pts), match/switch 1 (nesting depth added 22). None of this is in the body itself: all 56 points belong to one function literal inside it that branches (line 237). 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.
map-renderer.renderTopDown (cognitive 55) integrations/minecraft/src/cognitive/conscious/map-renderer.ts:298— map-renderer.renderTopDown has cognitive complexity 55 (threshold 15). Drivers by points: if/else 15 (29 pts), ternaries 4 (14 pts), loops 6 (9 pts), boolean chains 3 (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.
ComfyUIProvider.applyOverrides (cognitive 54) apps/stage-tamagotchi/src/main/services/airi/widgets/providers/comfyui.ts:260— ComfyUIProvider.applyOverrides has cognitive complexity 54 (threshold 15). Drivers by points: if/else 13 (35 pts), loops 7 (14 pts), boolean chains 5 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
session-store.useChatSessionStore.reconcileCloudSessions (cognitive 54) packages/stage-ui/src/stores/chat/session-store.ts:835— session-store.useChatSessionStore.reconcileCloudSessions has cognitive complexity 54 (threshold 15). Drivers by points: if/else 26 (41 pts), boolean chains 6, loops 5 (6 pts), error handling 1 (nesting depth added 16). Most of this is not in the body itself: 1 of the 54 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 844, 1042, 869, …). 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.
index.streamChatCompletion (cognitive 54) server/apps/api/src/routes/openai/v1/operations/chat-completions/index.ts:183— index.streamChatCompletion has cognitive complexity 54 (threshold 15). Drivers by points: if/else 16 (27 pts), boolean chains 10, error handling 5 (9 pts), ternaries 4 (6 pts), loops 2 (nesting depth added 17). None of this is in the body itself: all 54 points belong to 3 function literals inside it that branch (lines 267, 218, 238). 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.
workflow-prep-tools.createWorkflowPrepToolExecutor (cognitive 54) services/computer-use-mcp/src/server/workflow-prep-tools.ts:39— workflow-prep-tools.createWorkflowPrepToolExecutor has cognitive complexity 54 (threshold 15). Drivers by points: if/else 9 (21 pts), error handling 8 (19 pts), boolean chains 7, ternaries 3 (6 pts), match/switch 1 (nesting depth added 26). None of this is in the body itself: all 54 points belong to 2 function literals inside it that branch (lines 40, 157). 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.
live2d-structure-report.generateReport (cognitive 53) packages/stage-ui-live2d/src/utils/live2d-structure-report.ts:14— live2d-structure-report.generateReport has cognitive complexity 53 (threshold 15). Drivers by points: if/else 27 (44 pts), ternaries 2 (4 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 20). Of this number, 39 points are the body's own statements and 14 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.
use-screen-ambient-light.useScreenAmbientLight (cognitive 51) apps/stage-tamagotchi/src/renderer/composables/use-screen-ambient-light.ts:81— use-screen-ambient-light.useScreenAmbientLight has cognitive complexity 51 (threshold 15). Drivers by points: if/else 30 (32 pts), boolean chains 9, ternaries 6 (8 pts), error handling 2 (nesting depth added 4). None of this is in the body itself: all 51 points belong to 16 function items inside it that branch (start, restart, a function literal at line 261, …). 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.
router.createLlmRouterService.dispatchOneUpstream (cognitive 50) server/apps/api/src/services/domain/llm-router/router.ts:295— router.createLlmRouterService.dispatchOneUpstream has cognitive complexity 50 (threshold 15). Drivers by points: if/else 12 (27 pts), ternaries 6 (18 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
lower.lowerScripts (cognitive 49) packages/speech-transformer-math/src/lower.ts:898— lower.lowerScripts has cognitive complexity 49 (threshold 15). Drivers by points: boolean chains 25, if/else 15 (16 pts), ternaries 4 (8 pts) (nesting depth added 5). Of this number, 47 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.
chat.useChatStore.streamWithStageAdapters::prepareTextOnlyAudioContext (cognitive 49) packages/stage-ui/src/stores/chat.ts:749— chat.useChatStore.streamWithStageAdapters::prepareTextOnlyAudioContext has cognitive complexity 49 (threshold 15). Drivers by points: if/else 10 (30 pts), loops 3 (7 pts), ternaries 2 (7 pts), boolean chains 5 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tts-chunker.processNarrative (cognitive 48) packages/pipelines-audio/src/processors/tts-chunker.ts:321— tts-chunker.processNarrative has cognitive complexity 48 (threshold 15). Drivers by points: if/else 16 (37 pts), loops 4 (6 pts), boolean chains 5 (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.
collect-block.collectBlock (cognitive 47) integrations/minecraft/src/skills/actions/collect-block.ts:22— collect-block.collectBlock has cognitive complexity 47 (threshold 15). Drivers by points: if/else 13 (35 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (3 pts), error handling 1 (2 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.
directory-import.copyExtensionDirectory (cognitive 45) apps/stage-tamagotchi/src/main/services/airi/plugins/host/directory-import.ts:288— directory-import.copyExtensionDirectory has cognitive complexity 45 (threshold 15). Drivers by points: if/else 11 (32 pts), loops 3 (6 pts), ternaries 1 (4 pts), boolean chains 3 (nesting depth added 27). Of this number, 29 points are the body's own statements and 16 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.
Brain.processEvent (cognitive 45) integrations/minecraft/src/cognitive/conscious/brain.ts:1764— Brain.processEvent has cognitive complexity 45 (threshold 15). Drivers by points: if/else 19 (32 pts), ternaries 4 (6 pts), boolean chains 3, error handling 2 (3 pts), loops 1 (nesting depth added 16). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
strategy.evaluateStrategy (cognitive 45) services/computer-use-mcp/src/strategy.ts:204— strategy.evaluateStrategy has cognitive complexity 45 (threshold 15). Drivers by points: if/else 19 (23 pts), boolean chains 18, ternaries 2 (4 pts) (nesting depth added 6). Of this number, 44 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: 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.
artistry-bridge.generateHeadless (cognitive 44) apps/stage-tamagotchi/src/main/services/airi/widgets/artistry-bridge.ts:110— artistry-bridge.generateHeadless has cognitive complexity 44 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 9, ternaries 5 (8 pts), error handling 2 (4 pts), loops 1 (2 pts) (nesting depth added 14). Most of this is not in the body itself: 4 of the 44 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 146, 229). 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.
use-settings-search.useSettingsSearch (cognitive 44) packages/stage-ui/src/composables/use-settings-search.ts:85— use-settings-search.useSettingsSearch has cognitive complexity 44 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 9 (12 pts), ternaries 4 (10 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 19). None of this is in the body itself: all 44 points belong to 6 function items inside it that branch (a function literal at line 127, a function literal at line 107, loadItems, …). 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.
index.createClientWithConnector::connectInternal (cognitive 43) packages/better-ws/src/client/index.ts:446— index.createClientWithConnector::connectInternal has cognitive complexity 43 (threshold 15). Drivers by points: if/else 18 (34 pts), boolean chains 6, error handling 2, ternaries 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.
voice.useVoiceStore.connectOutput (cognitive 43) packages/stage-ui/src/stores/voice.ts:310— voice.useVoiceStore.connectOutput has cognitive complexity 43 (threshold 15). Drivers by points: if/else 20 (33 pts), ternaries 2 (5 pts), loops 2, match/switch 2, boolean chains 1 (nesting depth added 16). Most of this is not in the body itself: 1 of the 43 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 337, 415, 327, …). 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.
browser-probe.stubForBrowser (cognitive 43) packages/testing-audio/src/setup/browser-probe.ts:39— browser-probe.stubForBrowser has cognitive complexity 43 (threshold 15). Drivers by points: if/else 21 (26 pts), boolean chains 11, ternaries 2 (3 pts), error handling 1 (2 pts), loops 1 (nesting depth added 7). Most of this is not in the body itself: 15 of the 43 points are its own statements and the rest belongs to 6 function items inside it that branch (captureFetch, capturePcmAudio, a function literal at line 139, …). 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.
index.dispatchAction (cognitive 42) integrations/telegram-bot/src/bots/telegram/index.ts:23— index.dispatchAction has cognitive complexity 42 (threshold 15). Drivers by points: if/else 20 (37 pts), boolean chains 2, error handling 1 (2 pts), match/switch 1 (nesting depth added 18). Of this number, 41 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.
Pcm16Encoder.pull (cognitive 42) packages/audio/src/encoding/pcm-stream.ts:35— Pcm16Encoder.pull has cognitive complexity 42 (threshold 15). Drivers by points: if/else 12 (30 pts), loops 3 (6 pts), boolean chains 3, ternaries 1 (2 pts), error handling 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
desktop-grounding-actions.executeDesktopClickTarget (cognitive 42) services/computer-use-mcp/src/server/desktop-grounding-actions.ts:20— desktop-grounding-actions.executeDesktopClickTarget has cognitive complexity 42 (threshold 15). Drivers by points: if/else 18 (23 pts), ternaries 5 (8 pts), boolean chains 7, error handling 2 (4 pts) (nesting depth added 10). Of this number, 32 points are the body's own statements and 10 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.
speech-pipeline.createSpeechPipeline.runIntent (cognitive 41) packages/pipelines-audio/src/speech-pipeline.ts:126— speech-pipeline.createSpeechPipeline.runIntent has cognitive complexity 41 (threshold 15). Drivers by points: if/else 20 (29 pts), boolean chains 6, loops 3 (4 pts), error handling 2 (nesting depth added 10). Of this number, 26 points are the body's own statements and 15 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.
policy.evaluateActionPolicy (cognitive 41) services/computer-use-mcp/src/policy.ts:100— policy.evaluateActionPolicy has cognitive complexity 41 (threshold 15). Drivers by points: if/else 22 (29 pts), boolean chains 12 (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.
transparency.summarizeRunState (cognitive 41) services/computer-use-mcp/src/transparency.ts:331— transparency.summarizeRunState has cognitive complexity 41 (threshold 15). Drivers by points: if/else 21 (31 pts), ternaries 4 (8 pts), boolean chains 2 (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.
index.setupMainWindow (cognitive 40) apps/stage-tamagotchi/src/main/windows/main/index.ts:59— index.setupMainWindow has cognitive complexity 40 (threshold 15). Drivers by points: if/else 21, boolean chains 11, error handling 2 (4 pts), ternaries 4 (nesting depth added 2). Most of this is not in the body itself: 7 of the 40 points are its own statements and the rest belongs to 20 function items inside it that branch (handleNewBounds, openFullscreen, a function literal at line 354, …). 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.
scheduler.onMessageArrival (cognitive 40) integrations/satori-bot/src/core/loop/scheduler.ts:218— scheduler.onMessageArrival has cognitive complexity 40 (threshold 15). Drivers by points: if/else 14 (26 pts), boolean chains 10, error handling 2 (3 pts), loops 1 (nesting depth added 13). Of this number, 38 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.
synchronize.synchronize (cognitive 40) packages/stage-ui/src/libs/document-sync/synchronize.ts:80— synchronize.synchronize has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (29 pts), loops 4 (7 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
use-settings-search.useSettingsSearchReveal (cognitive 39) packages/stage-ui/src/composables/use-settings-search.ts:287— use-settings-search.useSettingsSearchReveal has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 7, loops 5 (6 pts), ternaries 3 (4 pts) (nesting depth added 8). None of this is in the body itself: all 39 points belong to 8 function items inside it that branch (a function literal at line 376, outlineFitsOutside, gatesOf, …). 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.
index.setupWidgetsWindowManager (cognitive 38) apps/stage-tamagotchi/src/main/windows/widgets/index.ts:283— index.setupWidgetsWindowManager has cognitive complexity 38 (threshold 15). Drivers by points: if/else 23 (24 pts), boolean chains 6, ternaries 5, loops 2, error handling 1 (nesting depth added 1). None of this is in the body itself: all 38 points belong to 18 function items inside it that branch (destroyWidget, updateWidget, createWindowForContext, …). 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.
merge-latest-mac.main (cognitive 37) apps/stage-tamagotchi/scripts/merge-latest-mac.ts:173— merge-latest-mac.main has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (19 pts), ternaries 3 (8 pts), boolean chains 7, 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.
llm-service.streamOnce (cognitive 37) packages/core-agent/src/runtime/llm-service.ts:75— llm-service.streamOnce has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (17 pts), ternaries 7 (8 pts), boolean chains 7, error handling 5 (nesting depth added 3). Most of this is not in the body itself: 10 of the 37 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 154, 130, 110, …). 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.
settings-search.readName (cognitive 37) packages/stage-pages/src/vite/settings-search.ts:546— settings-search.readName has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 10 (16 pts), if/else 10 (13 pts), boolean chains 8 (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.
register-vscode.registerVscodeTools (cognitive 37) services/computer-use-mcp/src/server/register-vscode.ts:91— register-vscode.registerVscodeTools has cognitive complexity 37 (threshold 15). Drivers by points: if/else 18 (21 pts), ternaries 8 (9 pts), boolean chains 5, loops 2 (nesting depth added 4). 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 364, a function literal at line 229, a function literal at line 165, …). 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.
registry.loadManifestsFrom (cognitive 36) apps/stage-tamagotchi/src/main/services/airi/plugins/host/registry.ts:57— registry.loadManifestsFrom has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (30 pts), error handling 2 (4 pts), loops 2 (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.
crafting.smeltItem (cognitive 36) integrations/minecraft/src/skills/crafting.ts:211— crafting.smeltItem has cognitive complexity 36 (threshold 15). Drivers by points: if/else 18 (27 pts), boolean chains 7, error handling 1, loops 1 (nesting depth added 9). Most of this is not in the body itself: 11 of the 36 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 267, cleanupPlacedFurnace, a function literal at line 284). 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.
lower.lowerBigOperator (cognitive 36) packages/speech-transformer-math/src/lower.ts:799— lower.lowerBigOperator has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 8 (19 pts), if/else 6 (9 pts), boolean chains 8 (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.
settings-search.createSettingsSearch.resolveExport (cognitive 36) packages/stage-pages/src/vite/settings-search.ts:875— settings-search.createSettingsSearch.resolveExport has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (20 pts), ternaries 3 (11 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
context-bridge.useContextBridgeStore.watchRemoteStreams (cognitive 36) packages/stage-ui/src/stores/mods/api/context-bridge.ts:480— context-bridge.useContextBridgeStore.watchRemoteStreams has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (28 pts), boolean chains 6, error handling 1, match/switch 1 (nesting depth added 12). None of this is in the body itself: all 36 points belong to 3 function literals inside it that branch (lines 491, 481, 486). 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.
merge.mergeProviderSync (cognitive 35) packages/stage-ui/src/stores/providers/merge.ts:47— merge.mergeProviderSync has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (25 pts), boolean chains 9, 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.
StagePostProcessCompositorEffect.EnsureResources (cognitive 33) engines/stage-tamagotchi-godot/scripts/visuals/StagePostProcessCompositorEffect.Resources.cs:129— StagePostProcessCompositorEffect.EnsureResources has cognitive complexity 33 (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.
list-module-loc.main (cognitive 33) scripts/list-module-loc.mjs:215— list-module-loc.main has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 8, loops 5 (6 pts), boolean chains 3 (nesting depth added 8). Of this number, 23 points are the body's own statements and 10 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.
scheduler.handleLoopStep (cognitive 32) integrations/satori-bot/src/core/loop/scheduler.ts:26— scheduler.handleLoopStep has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (22 pts), ternaries 2 (4 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (nesting depth added 15). Of this number, 30 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
response-categoriser.createStreamingCategorizer.processChunkIncrementally (cognitive 32) packages/core-agent/src/runtime/response-categoriser.ts:253— response-categoriser.createStreamingCategorizer.processChunkIncrementally has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (27 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
channel-gateway.createChannelGateway.dispatch (cognitive 32) packages/stage-ui/src/stores/mods/api/channel-gateway.ts:35— channel-gateway.createChannelGateway.dispatch has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (24 pts), loops 3 (6 pts), boolean chains 2 (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.
router.createLlmRouterService.dispatchOneTtsUpstream (cognitive 32) server/apps/api/src/services/domain/llm-router/router.ts:645— router.createLlmRouterService.dispatchOneTtsUpstream has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (24 pts), ternaries 1 (3 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
register-pty.registerPtyTools (cognitive 32) services/computer-use-mcp/src/server/register-pty.ts:227— register-pty.registerPtyTools has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (14 pts), ternaries 8 (10 pts), boolean chains 4, error handling 3, loops 1 (nesting depth added 4). None of this is in the body itself: all 32 points belong to 7 function items inside it that branch (a function literal at line 408, a function literal at line 278, a function literal at line 240, …). 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.
pickBestChildAnchor (cognitive 32) services/computer-use-mcp/chrome-extension/background.js:262— pickBestChildAnchor has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 9, ternaries 5 (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.
collect-block.findVeinBlocks (cognitive 31) integrations/minecraft/src/skills/actions/collect-block.ts:132— collect-block.findVeinBlocks has cognitive complexity 31 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 4 (10 pts), boolean chains 3 (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.
ReflexRuntime.tick (cognitive 31) integrations/minecraft/src/cognitive/reflex/runtime.ts:131— ReflexRuntime.tick has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 6, ternaries 3, error handling 2, loops 1 (nesting depth added 5). Of this number, 24 points are the body's own statements and 7 belong to 2 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
responses.streamResponses (cognitive 31) packages/core-agent/src/runtime/responses.ts:166— responses.streamResponses has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 8, ternaries 6 (7 pts), loops 1 (2 pts) (nesting depth added 6). Most of this is not in the body itself: 2 of the 31 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 195, 256, 189, …). 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.
bare-latex.findBareLatex (cognitive 31) packages/core-agent/src/voice/output/speech-transformation/preprocessor/math/bare-latex.ts:33— bare-latex.findBareLatex has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 5 (9 pts), boolean chains 4 (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.
utils.getFilenames (cognitive 30) apps/stage-tamagotchi/scripts/utils.ts:143— utils.getFilenames has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 8, match/switch 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.
widgets.executeWidgetAction (cognitive 30) apps/stage-tamagotchi/src/renderer/stores/tools/builtin/widgets.ts:248— widgets.executeWidgetAction has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 11 (22 pts), if/else 3 (6 pts), boolean chains 1, match/switch 1 (nesting depth added 14). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
tachie-archive.inspectTachieArchive (cognitive 30) packages/stage-ui-tachie/src/utils/tachie-archive.ts:297— tachie-archive.inspectTachieArchive has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 5, ternaries 3 (4 pts), error handling 2 (3 pts), loops 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
OpfsModelAssetStorage.install (cognitive 30) packages/stage-ui/src/libs/inference/model-assets-opfs.ts:52— OpfsModelAssetStorage.install has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 4 (6 pts), ternaries 2 (4 pts), boolean chains 3, error handling 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.
engine.executePtyStepFamily (cognitive 30) services/computer-use-mcp/src/workflows/engine.ts:1003— engine.executePtyStepFamily has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (21 pts), ternaries 1 (4 pts), loops 1 (2 pts), boolean chains 1, error handling 1, match/switch 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.
block-parser.parseTranscriptBlocks (cognitive 30) services/computer-use-mcp/src/transcript/block-parser.ts:35— block-parser.parseTranscriptBlocks has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 2 (5 pts), boolean chains 3 (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.
index.setupExtensionHostServiceInternal.executeActivationPlan (cognitive 29) apps/stage-tamagotchi/src/main/services/airi/plugins/host/index.ts:485— index.setupExtensionHostServiceInternal.executeActivationPlan has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 5 (7 pts), error handling 2 (3 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 10). Of this number, 21 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.
index.compile (cognitive 29) packages/core-agent/src/voice/output/speech-transformation/index.ts:75— index.compile has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 11 (15 pts), if/else 5 (6 pts), boolean chains 5, match/switch 2, loops 1 (nesting depth added 5). None of this is in the body itself: all 29 points belong to 11 function items inside it that branch (block, inline, speakFormula, …). 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.
ar-hmm.initializeAssignments (cognitive 29) packages/motion-driver-magic/src/ar-hmm.ts:110— ar-hmm.initializeAssignments has cognitive complexity 29 (threshold 15). Drivers by points: loops 9 (17 pts), if/else 4 (12 pts) (nesting depth added 16). 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.
calculate-rounded-square-map.calculateRoundedSquareMap (cognitive 29) packages/scenarios-stage-tamagotchi-browser/src/components/platforms/macos-26/graphics/liquid-glass/maps/calculate-rounded-square-map.ts:61— calculate-rounded-square-map.calculateRoundedSquareMap has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 5 (18 pts), boolean chains 4, if/else 2 (4 pts), 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.
motion-manager.useMotionUpdatePluginAutoEyeBlink (cognitive 29) packages/stage-ui-live2d/src/composables/live2d/motion-manager.ts:292— motion-manager.useMotionUpdatePluginAutoEyeBlink has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 8 (nesting depth added 5). None of this is in the body itself: all 29 points belong to 2 function items inside it that branch (a function literal at line 374, updateForcedBlink). 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.
webhook.createWebhookOperation (cognitive 29) server/apps/api/src/routes/stripe/operations/webhook.ts:20— webhook.createWebhookOperation has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 4, ternaries 1 (3 pts), error handling 1, match/switch 1 (nesting depth added 11). None of this is in the body itself: all 29 points belong to one function literal inside it that branches (line 27). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
projector.projectTranscript (cognitive 29) services/computer-use-mcp/src/transcript/projector.ts:54— projector.projectTranscript has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 5 (7 pts), ternaries 4 (5 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
widgets.executeWidgetAction (cognitive 28) apps/stage-tamagotchi-kirie/src-web/src/renderer/stores/tools/builtin/widgets.ts:252— widgets.executeWidgetAction has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 10 (20 pts), if/else 3 (6 pts), boolean chains 1, 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.
index.handleLoopStep (cognitive 28) integrations/telegram-bot/src/bots/telegram/index.ts:174— index.handleLoopStep has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 4, loops 2 (4 pts), error handling 1 (nesting depth added 9). Of this number, 27 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
activation-plan.buildLoadedDependencyGraph (cognitive 28) packages/plugin-sdk/src/plugin-host/activation-plan.ts:431— activation-plan.buildLoadedDependencyGraph has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 5 (9 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.
lower.lowerFence (cognitive 28) packages/speech-transformer-math/src/lower.ts:855— lower.lowerFence has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 13, if/else 9 (10 pts), ternaries 3 (5 pts) (nesting depth added 3). Of this number, 26 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.
preflight.getRuntimePreflight (cognitive 28) services/computer-use-mcp/src/preflight.ts:47— preflight.getRuntimePreflight has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 9 (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.
ensure.ensureTool (cognitive 27) integrations/minecraft/src/skills/actions/ensure.ts:339— ensure.ensureTool has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (19 pts), error handling 2 (6 pts), boolean chains 1, 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.
chem.speakChemistry (cognitive 27) packages/speech-transformer-chem/src/chem.ts:224— chem.speakChemistry has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 9 (11 pts), if/else 8 (9 pts), boolean chains 7 (nesting depth added 3). Most of this is not in the body itself: 4 of the 27 points are its own statements and the rest belongs to 7 function items inside it that branch (term, a function literal at line 253, side, …). 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.
settings-search.providerViewImportsOf::visit (cognitive 27) packages/stage-pages/src/vite/settings-search.ts:471— settings-search.providerViewImportsOf::visit has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 5 (11 pts), if/else 5 (8 pts), boolean chains 5, loops 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.
hearing.useHearingStore.transcription (cognitive 27) packages/stage-ui/src/stores/modules/hearing.ts:425— hearing.useHearingStore.transcription has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 7, ternaries 2, error handling 1 (nesting depth added 6). Of this number, 26 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.
background.useBackgroundStore.initializeStore (cognitive 27) packages/stage-ui/src/stores/background.ts:88— background.useBackgroundStore.initializeStore has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 5, error handling 2 (4 pts), loops 3 (4 pts) (nesting depth added 8). Most of this is not in the body itself: 11 of the 27 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 112, 97, 172, …). 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.
audit-ui-components.resolveImport (cognitive 27) scripts/audit-ui-components.mjs:53— audit-ui-components.resolveImport has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 4, ternaries 2 (4 pts), loops 1 (3 pts) (nesting depth added 13). 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.
router.createLlmRouterService.routeTtsAcrossPools (cognitive 27) server/apps/api/src/services/domain/llm-router/router.ts:794— router.createLlmRouterService.routeTtsAcrossPools has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 2, ternaries 2, loops 1 (nesting depth added 11). Of this number, 24 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.
smoke-stdio.main (cognitive 27) services/computer-use-mcp/src/bin/smoke-stdio.ts:57— smoke-stdio.main has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 12, if/else 11 (12 pts), ternaries 2, loops 1 (nesting depth added 1). 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: 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.
FileModelAssetStorage.install (cognitive 26) apps/stage-tamagotchi/src/main/services/electron/model-asset-storage.ts:48— FileModelAssetStorage.install has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 5 (8 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
world-interactions.breakBlockAt (cognitive 26) integrations/minecraft/src/skills/actions/world-interactions.ts:220— world-interactions.breakBlockAt has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 6, ternaries 1 (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.
ToolsPanel.executeTool (cognitive 26) integrations/minecraft/src/debug/web/app.js:1060— ToolsPanel.executeTool has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (25 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.
peers.createPeers (cognitive 26) packages/better-ws/src/server/peers.ts:87— peers.createPeers has cognitive complexity 26 (threshold 15). Drivers by points: if/else 19, ternaries 3, error handling 1 (2 pts), loops 2 (nesting depth added 1). Of this number, 15 points are the body's own statements and 11 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.
chat-completions.renderEntry (cognitive 26) packages/core-agent/src/messages/chat-completions.ts:99— chat-completions.renderEntry has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16 (31 pts), ternaries 9 (28 pts), boolean chains 6, loops 1 (nesting depth added 34). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (chat-completions.renderEntry::flush) 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.
calculate-circle-map.calculateCircleMap (cognitive 26) packages/scenarios-stage-tamagotchi-browser/src/components/platforms/macos-26/graphics/liquid-glass/maps/calculate-circle-map.ts:11— calculate-circle-map.calculateCircleMap has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 6 (19 pts), if/else 1 (3 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
lower.isCallee (cognitive 26) packages/speech-transformer-math/src/lower.ts:487— lower.isCallee has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 13, if/else 6 (12 pts), match/switch 1 (nesting depth added 6). 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.
settings-search.createSettingsSearch.propsOf (cognitive 26) packages/stage-pages/src/vite/settings-search.ts:952— settings-search.createSettingsSearch.propsOf has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 3 (8 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 12). Of this number, 25 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tool-call-widget-reading.collectRest (cognitive 26) packages/stage-ui/src/components/scenarios/chat/components/tool-call-widget-reading.ts:23— tool-call-widget-reading.collectRest has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 7 (14 pts), if/else 6 (9 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 11). Of this number, 16 points are the body's own statements and 10 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.
steam.steam (cognitive 26) REDACTED:104— steam.steam has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (16 pts), ternaries 4 (5 pts), boolean chains 2, error handling 2, loops 1 (nesting depth added 4). None of this is in the body itself: all 26 points belong to 4 function items inside it that branch (a function literal at line 239, readSignupProfile, verifyOpenIdCallback, …). 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.
summarizeEvent (cognitive 26) integrations/minecraft/src/debug/web/app.js:773— summarizeEvent has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 8 (17 pts), if/else 5 (6 pts), error handling 1 (2 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.
world-interactions.placeBlock (cognitive 25) integrations/minecraft/src/skills/actions/world-interactions.ts:29— world-interactions.placeBlock has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 5, error handling 1, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
matcher.matchCondition (cognitive 25) integrations/minecraft/src/cognitive/perception/rules/matcher.ts:12— matcher.matchCondition has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 7 (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.
MCPAdapter.configureServer (cognitive 25) integrations/twitter-services/src/adapters/mcp-adapter.ts:65— MCPAdapter.configureServer has cognitive complexity 25 (threshold 15). Drivers by points: error handling 11, boolean chains 7, ternaries 5, if/else 2. None of this is in the body itself: all 25 points belong to 11 function literals inside it that branch (lines 351, 83, 134, …). 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.
chat-completions.renderEntry::flush (cognitive 25) packages/core-agent/src/messages/chat-completions.ts:105— chat-completions.renderEntry::flush has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 3 (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. This shape REPEATS in the file: one other method here (chat-completions.renderEntry) 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.
settings-search.namesOf (cognitive 25) packages/stage-pages/src/vite/settings-search.ts:603— settings-search.namesOf has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 6, ternaries 3 (5 pts), loops 2 (3 pts) (nesting depth added 7). Of this number, 20 points are the body's own statements and 5 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.
settings-search.scopeOf (cognitive 25) packages/stage-pages/src/vite/settings-search.ts:657— settings-search.scopeOf has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 3, loops 2 (3 pts), ternaries 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.
reconcile.reconcile (cognitive 25) packages/stage-ui/src/libs/document-sync/reconcile.ts:155— reconcile.reconcile has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 4, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
use-chat-history-scroll.useChatHistoryScroll (cognitive 25) packages/stage-ui/src/components/scenarios/chat/composables/use-chat-history-scroll.ts:34— use-chat-history-scroll.useChatHistoryScroll has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16 (17 pts), boolean chains 6, ternaries 2 (nesting depth added 1). None of this is in the body itself: all 25 points belong to 8 function items inside it that branch (a function literal at line 122, a function literal at line 77, findMessageItem, …). 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.
session.createSessionState.handleClientMessage (cognitive 25) server/apps/api/src/routes/audio-speech-ws/session.ts:229— session.createSessionState.handleClientMessage has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 3 (6 pts), boolean chains 5, error handling 2 (3 pts) (nesting depth added 7). Of this number, 22 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.
StagePostProcessCompositorEffect._RenderCallback (cognitive 24) engines/stage-tamagotchi-godot/scripts/visuals/StagePostProcessCompositorEffect.cs:147— StagePostProcessCompositorEffect._RenderCallback has cognitive complexity 24 (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.
Mineflayer.setupBotEventHandlers (cognitive 24) integrations/minecraft/src/libs/mineflayer/core.ts:216— Mineflayer.setupBotEventHandlers has cognitive complexity 24 (threshold 15). Drivers by points: if/else 19, boolean chains 3, ternaries 1 (2 pts) (nesting depth added 1). None of this is in the body itself: all 24 points belong to 10 function items inside it that branch (a function literal at line 243, a function literal at line 276, a function literal at line 300, …). 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.
ensure.ensurePlanks (cognitive 24) integrations/minecraft/src/skills/actions/ensure.ts:31— ensure.ensurePlanks has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (16 pts), error handling 1 (3 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.
ToolExecutor.getZodDef (cognitive 24) integrations/minecraft/src/debug/tool-executor.ts:128— ToolExecutor.getZodDef has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 10). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
index.onMessageArrival (cognitive 24) integrations/telegram-bot/src/bots/telegram/index.ts:366— index.onMessageArrival has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (19 pts), match/switch 1 (3 pts), error handling 1, 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.
response-categoriser.createStreamingCategorizer.filterToSpeech (cognitive 24) packages/core-agent/src/runtime/response-categoriser.ts:370— response-categoriser.createStreamingCategorizer.filterToSpeech has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 4, error handling 1 (2 pts), loops 1 (nesting depth added 9). Of this number, 12 points are the body's own statements and 12 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.
use-context-flow-formatters.buildPreviewItems (cognitive 24) packages/stage-pages/src/pages/devtools/context-flow/composables/use-context-flow-formatters.ts:97— use-context-flow-formatters.buildPreviewItems has cognitive complexity 24 (threshold 15). Drivers by points: if/else 17 (23 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
io-tracer.useIOTracerStore.handleSpan (cognitive 24) packages/stage-ui/src/stores/devtools/io-tracer.ts:71— io-tracer.useIOTracerStore.handleSpan has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 3, ternaries 2 (nesting depth added 4). Of this number, 21 points are the body's own statements and 3 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.
model-routing.routeModelAliasCandidates (cognitive 24) server/apps/api/src/routes/openai/v1/model-routing.ts:45— model-routing.routeModelAliasCandidates has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (16 pts), boolean chains 5, error handling 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReplicateProvider.generate (cognitive 23) apps/stage-tamagotchi/src/main/services/airi/widgets/providers/replicate.ts:53— ReplicateProvider.generate has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 7, ternaries 1 (3 pts), loops 1 (2 pts) (nesting depth added 5). Most of this is not in the body itself: 9 of the 23 points are its own statements and the rest belongs to one function item inside it that branches (replacePlaceholders). 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.
WindowBackdrop.sample (cognitive 23) apps/stage-tamagotchi/src/renderer/composables/use-window-backdrop.ts:262— WindowBackdrop.sample has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 5 (10 pts), boolean chains 1, error handling 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.
Brain.runControlActionWorker (cognitive 23) integrations/minecraft/src/cognitive/conscious/brain.ts:1223— Brain.runControlActionWorker has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4, ternaries 1 (4 pts), error handling 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Brain.buildUserMessage (cognitive 23) integrations/minecraft/src/cognitive/conscious/brain.ts:2220— Brain.buildUserMessage has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (16 pts), ternaries 3 (6 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Transcript.patch (cognitive 23) packages/core-agent/src/voice/input/transcript.ts:104— Transcript.patch has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (9 pts), ternaries 2 (4 pts), loops 1 (nesting depth added 6). Of this number, 19 points are the body's own statements and 4 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.
tool-schema.collapseToolSchemaPrimitiveAnyOf (cognitive 23) packages/provider-inference/src/providers/tool-schema.ts:27— tool-schema.collapseToolSchemaPrimitiveAnyOf has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 10). Of this number, 21 points are the body's own statements and 2 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.
beat-sync.createBeatSyncController.scheduleBeat (cognitive 23) packages/stage-ui-live2d/src/composables/live2d/beat-sync.ts:185— beat-sync.createBeatSyncController.scheduleBeat has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 6 (10 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
spine-zip-loader.resolveAtlasTextures (cognitive 23) packages/stage-ui-spine/src/utils/spine-zip-loader.ts:174— spine-zip-loader.resolveAtlasTextures has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3 (5 pts), boolean chains 4 (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.
voice-messages.useVoiceMessagesStore.connect (cognitive 23) packages/stage-ui/src/stores/voice-messages.ts:101— voice-messages.useVoiceMessagesStore.connect has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 2 (4 pts), loops 2, match/switch 1 (nesting depth added 10). None of this is in the body itself: all 23 points belong to 4 function literals inside it that branch (lines 104, 133, 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.
stepfun.buildExtraBody (cognitive 23) server/apps/api/src/services/adapters/tts/stepfun.ts:72— stepfun.buildExtraBody has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15, boolean chains 8. 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.
config.resolveComputerUseConfig (cognitive 23) services/computer-use-mcp/src/config.ts:154— config.resolveComputerUseConfig has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 20, ternaries 2 (3 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.
auth.createAuthService (cognitive 22) apps/stage-tamagotchi/src/main/services/airi/auth.ts:73— auth.createAuthService has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 5, ternaries 2, error handling 1 (nesting depth added 1). None of this is in the body itself: all 22 points belong to 7 function literals inside it that branch (lines 105, 183, 78, …). 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.
ReplicateProvider.runGeneration (cognitive 22) apps/stage-tamagotchi/src/main/services/airi/widgets/providers/replicate.ts:130— ReplicateProvider.runGeneration has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 3 (6 pts), boolean chains 5, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WindowBackdrop.region (cognitive 22) apps/stage-tamagotchi/src/renderer/composables/use-window-backdrop.ts:300— WindowBackdrop.region has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 5, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dumpRenderStages.readFrames (cognitive 22) engines/stage-tamagotchi-godot/tools/dumpRenderStages.mjs:325— dumpRenderStages.readFrames has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (4 pts), ternaries 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.
patched-goto.patchedGoto (cognitive 22) integrations/minecraft/src/skills/patched-goto.ts:148— patched-goto.patchedGoto has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (15 pts), error handling 3 (4 pts), boolean chains 3 (nesting depth added 2). None of this is in the body itself: all 22 points belong to 9 function literals inside it that branch (lines 273, 239, 168, …). 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.
brain-prompt.getZodConstraintHint (cognitive 22) integrations/minecraft/src/cognitive/conscious/prompts/brain-prompt.ts:82— brain-prompt.getZodConstraintHint has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 4 (8 pts), boolean chains 4, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
turns.readRound (cognitive 22) packages/core-agent/src/messages/turns.ts:12— turns.readRound has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (18 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.
responses.renderMessage (cognitive 22) packages/core-agent/src/runtime/responses.ts:34— responses.renderMessage has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 4 (8 pts), boolean chains 1, loops 1 (nesting depth added 7). Of this number, 13 points are the body's own statements and 9 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.
apply-pose-to-vrm.createVrmPoseApplier.applyOne (cognitive 22) packages/model-driver-mediapipe/src/three/apply-pose-to-vrm.ts:249— apply-pose-to-vrm.createVrmPoseApplier.applyOne has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 3, 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.
lower.lowerClause (cognitive 22) packages/speech-transformer-math/src/lower.ts:211— lower.lowerClause has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 8, loops 2 (nesting depth added 3). Of this number, 20 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
wire-message.extractMessageText (cognitive 22) packages/stage-ui/src/libs/chat-sync/wire-message.ts:21— wire-message.extractMessageText has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 10). Of this number, 17 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.
store.createFieldSyncStore.push (cognitive 22) server/apps/api/src/services/domain/field-sync/store.ts:279— store.createFieldSyncStore.push has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 6, ternaries 1 (2 pts), loops 1 (nesting depth added 6). None of this is in the body itself: all 22 points belong to one function literal inside it that branches (line 282). 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.
demo-hello-world.printResult (cognitive 22) services/computer-use-mcp/src/bin/demo-hello-world.ts:122— demo-hello-world.printResult has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 4, 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.
location.load (cognitive 21) apps/stage-tamagotchi/src/main/libs/electron/location.ts:57— location.load has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 5, 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.
RecipePlanner.buildDependencyTree (cognitive 21) integrations/minecraft/src/utils/recipe-planner.ts:165— RecipePlanner.buildDependencyTree has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 7, if/else 6 (7 pts), loops 2 (6 pts), 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.
RecipePlanner.describe (cognitive 21) integrations/minecraft/src/utils/recipe-planner.ts:253— RecipePlanner.describe has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 3 (8 pts), loops 3 (6 pts), if/else 5, 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.
brain-prompt.getZodTypeName (cognitive 21) integrations/minecraft/src/cognitive/conscious/prompts/brain-prompt.ts:45— brain-prompt.getZodTypeName has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 12, if/else 9. 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.
Transcript.accept (cognitive 21) packages/core-agent/src/voice/input/transcript.ts:162— Transcript.accept has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 11, if/else 7 (9 pts), loops 1 (nesting depth added 2). Most of this is not in the body itself: 7 of the 21 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 177, 183). 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.
permissions.intersectPermissionScopes (cognitive 21) packages/plugin-sdk/src/plugin-host/runtimes/shared/services/permissions.ts:72— permissions.intersectPermissionScopes has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 4 (9 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.
index.createMimoSpeechProvider.speech (cognitive 21) packages/provider-inference/src/providers/cloud/mimo-audio/index.ts:64— index.createMimoSpeechProvider.speech has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 9, loops 1, ternaries 1 (nesting depth added 1). None of this is in the body itself: all 21 points belong to one function literal inside it that branches (line 67). 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.
motion-manager.useMotionUpdatePluginLightSquint (cognitive 21) packages/stage-ui-live2d/src/composables/live2d/motion-manager.ts:513— motion-manager.useMotionUpdatePluginLightSquint has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 4 (6 pts), boolean chains 3, loops 2 (nesting depth added 3). None of this is in the body itself: all 21 points belong to 3 function items inside it that branch (a function literal at line 591, releaseEyes, baseFor). 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.
spine-preview.loadSpineModelPreview (cognitive 21) packages/stage-ui-spine/src/utils/spine-preview.ts:19— spine-preview.loadSpineModelPreview has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 3, error handling 3, ternaries 2 (nesting depth added 1). Most of this is not in the body itself: 4 of the 21 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 111, 102, 81, …). 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.
chat.useChatStore (cognitive 21) packages/stage-ui/src/stores/chat.ts:259— chat.useChatStore has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 6, ternaries 2, loops 1 (nesting depth added 2). None of this is in the body itself: all 21 points belong to 8 function literals inside it that branch (lines 1039, 1017, 1059, …). 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.
use-chat-images.useChatImages.addFiles (cognitive 21) packages/stage-ui/src/components/scenarios/chat/composables/use-chat-images.ts:86— use-chat-images.useChatImages.addFiles has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 3, loops 3, 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.
audit-ui-components.imports (cognitive 21) scripts/audit-ui-components.mjs:110— audit-ui-components.imports has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (6 pts), ternaries 1 (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.
app.buildApp (cognitive 21) server/apps/api/src/app.ts:150— app.buildApp has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6, ternaries 5 (nesting depth added 1). Most of this is not in the body itself: 3 of the 21 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 353, 262, 373, …). 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.
chrome-semantic-adapter.captureViaExtension (cognitive 21) services/computer-use-mcp/src/chrome-semantic-adapter.ts:163— chrome-semantic-adapter.captureViaExtension has cognitive complexity 21 (threshold 15). Drivers by points: if/else 3 (6 pts), ternaries 2 (6 pts), boolean chains 5, loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
use-stage-painted-mask.useStagePaintedMask.subjectBoundsOf (cognitive 20) apps/stage-tamagotchi/src/renderer/composables/use-stage-painted-mask.ts:187— use-stage-painted-mask.useStagePaintedMask.subjectBoundsOf has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 2 (3 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.
ReflexRuntime.reconcileAutoFollow (cognitive 20) integrations/minecraft/src/cognitive/reflex/runtime.ts:265— ReflexRuntime.reconcileAutoFollow has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 4, 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.
damage-taken.inferDamageSource (cognitive 20) integrations/minecraft/src/cognitive/perception/events/definitions/damage-taken.ts:21— damage-taken.inferDamageSource has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
lower.lowerRows (cognitive 20) packages/speech-transformer-math/src/lower.ts:984— lower.lowerRows has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 5, ternaries 3 (5 pts), loops 2 (3 pts) (nesting depth added 5). Of this number, 13 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
settings-search.createSettingsSearch.staticsOf (cognitive 20) packages/stage-pages/src/vite/settings-search.ts:921— settings-search.createSettingsSearch.staticsOf has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (13 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.
spine-zip-loader.detectAllSpineLayouts (cognitive 20) packages/stage-ui-spine/src/utils/spine-zip-loader.ts:115— spine-zip-loader.detectAllSpineLayouts has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 3 (6 pts), boolean chains 2, 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.
tachie-archive.resolveTachieArchiveLayout (cognitive 20) packages/stage-ui-tachie/src/utils/tachie-archive.ts:158— tachie-archive.resolveTachieArchiveLayout has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 4 (7 pts), boolean chains 3, loops 2 (nesting depth added 5). 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.
session-store.useChatSessionStore.loadSession (cognitive 20) packages/stage-ui/src/stores/chat/session-store.ts:411— session-store.useChatSessionStore.loadSession has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 5, error handling 1 (nesting depth added 5). 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 items inside it that branch (a function literal at line 431, needsCloudHydration). 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.
session-store.useChatSessionStore.deleteSession (cognitive 20) packages/stage-ui/src/stores/chat/session-store.ts:589— session-store.useChatSessionStore.deleteSession has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 2, ternaries 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.
hearing-transcriber.createHearingTranscriber.transcribe (cognitive 20) packages/stage-ui/src/libs/audio/hearing-transcriber.ts:35— hearing-transcriber.createHearingTranscriber.transcribe has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 1 (2 pts), boolean chains 1, error handling 1 (nesting depth added 7). None of this is in the body itself: all 20 points belong to 4 function literals inside it that branch (lines 63, 46, 68, …). 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.
keyframes.parseLive2DMotionProject (cognitive 20) packages/stage-ui/src/features/devtools/motion/live2d/composables/keyframes.ts:441— keyframes.parseLive2DMotionProject has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (4 pts), boolean chains 3, 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.
use-playback-keys.useLive2DMotionPlaybackKeys (cognitive 20) packages/stage-ui/src/features/devtools/motion/live2d/composables/use-playback-keys.ts:36— use-playback-keys.useLive2DMotionPlaybackKeys has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 9 (nesting depth added 1). Most of this is not in the body itself: 2 of the 20 points are its own statements and the rest belongs to 13 function items inside it that branch (updateDirection, a function literal at line 52, a function literal at line 53, …). 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.
index.createPaymentService.claimExistingOrder (cognitive 20) server/apps/api/src/services/domain/payment/index.ts:93— index.createPaymentService.claimExistingOrder has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 3, match/switch 1 (nesting depth added 6). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to one function literal inside it that branches (line 94). 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.
strategy.buildRecoveryPlan (cognitive 20) services/computer-use-mcp/src/strategy.ts:452— strategy.buildRecoveryPlan has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 7, 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.
turns.readTurns (cognitive 19) packages/core-agent/src/messages/turns.ts:45— turns.readTurns has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, ternaries 1 (3 pts), loops 1 (nesting depth added 8). Of this number, 17 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.
chat-completions.streamChatCompletions (cognitive 19) packages/core-agent/src/runtime/chat-completions.ts:18— chat-completions.streamChatCompletions has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 4, ternaries 4, loops 1 (2 pts) (nesting depth added 3). 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 47, 41, 110). 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.
observe.observe.read (cognitive 19) packages/pipelines-audio/src/observe.ts:175— observe.observe.read has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 2 (5 pts), boolean chains 3, error handling 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tex.fence (cognitive 19) packages/speech-transformer-math/src/tex.ts:35— tex.fence has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (7 pts), boolean chains 6, ternaries 2 (5 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AdaptiveInput.measure (cognitive 19) packages/stage-layouts/src/browser/adaptive-input.ts:179— AdaptiveInput.measure has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 6 (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.
cloud-mapper.reconcileLocalAndRemote (cognitive 19) packages/stage-ui/src/libs/chat-sync/cloud-mapper.ts:251— cloud-mapper.reconcileLocalAndRemote has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 5, boolean chains 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.
airi-card.useAiriCardStore.removeDeletedAvatarModels (cognitive 19) packages/stage-ui/src/stores/modules/airi-card.ts:548— airi-card.useAiriCardStore.removeDeletedAvatarModels has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (5 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.
streaming-session.streamingSynthesize (cognitive 19) packages/stage-ui/src/libs/speech/streaming-session.ts:88— streaming-session.streamingSynthesize has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (10 pts), error handling 3 (4 pts), boolean chains 2, match/switch 1 (2 pts), ternaries 1 (nesting depth added 3). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 167, 109, 104, …). 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.
session.createAliyunNlsStreamResponse (cognitive 19) REDACTED:185— session.createAliyunNlsStreamResponse has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 2, ternaries 1 (2 pts), error handling 1, match/switch 1 (nesting depth added 3). Most of this is not in the body itself: 5 of the 19 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 211, 224, 255, …). 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.
auth.createAuth (cognitive 19) server/apps/auth/src/auth.ts:436— auth.createAuth has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 6 (nesting depth added 2). Most of this is not in the body itself: 5 of the 19 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 749, 734, 809). 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.
buildFrameOffsets (cognitive 19) services/computer-use-mcp/chrome-extension/background.js:313— buildFrameOffsets has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, if/else 7 (8 pts), loops 2 (nesting depth added 1). Most of this is not in the body itself: 6 of the 19 points are its own statements and the rest belongs to 3 function items inside it that branch (resolve, a function literal at line 314, a function literal at line 315). 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.
idle-gaze.findGazeTarget (cognitive 18) integrations/minecraft/src/cognitive/reflex/behaviors/idle-gaze.ts:71— idle-gaze.findGazeTarget 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.
send-message.sendMessage (cognitive 18) integrations/telegram-bot/src/bots/telegram/agent/actions/send-message.ts:51— send-message.sendMessage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), error handling 2 (4 pts), ternaries 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 5). Of this number, 10 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
index.createServer (cognitive 18) packages/better-ws/src/server/index.ts:198— index.createServer has cognitive complexity 18 (threshold 15). Drivers by points: loops 7, boolean chains 4, if/else 4, ternaries 2 (3 pts) (nesting depth added 1). Of this number, 9 points are the body's own statements and 9 belong to 7 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PluginInstallation.setup (cognitive 18) packages/core-agent/src/voice/plugins/registry.ts:120— PluginInstallation.setup has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, boolean chains 3, error handling 2, ternaries 1. Most of this is not in the body itself: 4 of the 18 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 193, 156, 168, …). 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.
locale.finalConsonant (cognitive 18) packages/speech-transformer-math/src/locale.ts:354— locale.finalConsonant has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 4 (9 pts), if/else 4 (5 pts), boolean chains 4 (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.
lower.nest (cognitive 18) packages/speech-transformer-math/src/lower.ts:296— lower.nest has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 3 (4 pts), loops 3, boolean chains 2 (nesting depth added 5). Of this number, 13 points are the body's own statements and 5 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.
parse.liftRaw (cognitive 18) REDACTED:109— parse.liftRaw has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reconcile.reconcileParts (cognitive 18) packages/stage-ui/src/libs/document-sync/reconcile.ts:87— reconcile.reconcileParts has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 2 (4 pts), loops 1 (nesting depth added 8). Of this number, 12 points are the body's own statements and 6 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.
provider.startRealtimeSession (cognitive 18) packages/stage-ui/src/libs/providers/providers/aliyun-nls/provider.ts:123— provider.startRealtimeSession has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), error handling 3, boolean chains 1, loops 1, match/switch 1, ternaries 1 (nesting depth added 3). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to 6 function items inside it that branch (onTranscriptionStarted, requestStop, cleanup, …). 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.
provider.useProviderStore.validateProvider (cognitive 18) packages/stage-ui/src/stores/providers/provider.ts:380— provider.useProviderStore.validateProvider has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 5 (nesting depth added 3). Of this number, 13 points are the body's own statements and 5 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.
provider.useProviderStore.listProviderVoices (cognitive 18) packages/stage-ui/src/stores/providers/provider.ts:716— provider.useProviderStore.listProviderVoices has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 4, ternaries 2, error handling 1 (nesting depth added 1). 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 733, 763). 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.
speech.useSpeechStore.createOutput (cognitive 18) REDACTED:545— speech.useSpeechStore.createOutput has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (5 pts), ternaries 3 (4 pts) (nesting depth added 2). 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.
airi-card.useAiriCardStore.initialize (cognitive 18) packages/stage-ui/src/stores/modules/airi-card.ts:1173— airi-card.useAiriCardStore.initialize has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 5, loops 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
canvas-alpha.isCanvasRegionTransparent (cognitive 18) packages/stage-ui/src/composables/canvas-alpha.ts:19— canvas-alpha.isCanvasRegionTransparent has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 4, loops 2 (3 pts), error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
queues.useEmotionsMessageQueue (cognitive 18) packages/stage-ui/src/composables/queues.ts:9— queues.useEmotionsMessageQueue has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 4, error handling 1 (nesting depth added 4). None of this is in the body itself: all 18 points belong to 4 function items inside it that branch (parseActEmotion, normalizeIntensity, a function literal at line 56, …). 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.
chat.retryContentFrom (cognitive 18) packages/stage-ui/src/stores/chat.ts:182— chat.retryContentFrom has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8, ternaries 5 (8 pts), boolean chains 2 (nesting depth added 3). Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 205, 194). 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.
worker.loadModel (cognitive 18) packages/stage-ui/src/workers/kokoro/worker.ts:120— worker.loadModel has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), error handling 2 (3 pts), loops 3, boolean chains 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.
audit-ui-components.resolveExport (cognitive 18) scripts/audit-ui-components.mjs:83— audit-ui-components.resolveExport has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 2, loops 1 (nesting depth added 7). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
revenuecat-subscriber.createRevenuecatSubscriberClient.fetchEntitlements (cognitive 18) server/apps/api/src/services/adapters/revenuecat-subscriber.ts:167— revenuecat-subscriber.createRevenuecatSubscriberClient.fetchEntitlements has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 2 (6 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 7). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
request.enforceResponsesSecurity (cognitive 18) server/apps/api/src/routes/openai/v1/operations/responses/request.ts:82— request.enforceResponsesSecurity has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 8 (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.
smoke-remote.main (cognitive 18) services/computer-use-mcp/src/bin/smoke-remote.ts:62— smoke-remote.main has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 7, loops 1 (nesting depth added 1). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: 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.
readInputValue (cognitive 18) REDACTED:251— readInputValue has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, if/else 4, ternaries 3 (4 pts), error handling 1, other 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.
renderResults (cognitive 18) integrations/minecraft/src/debug/web/app.js:1318— renderResults has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 11, boolean chains 5, if/else 2. Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1327, 1332). 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.
window.createWindowService (cognitive 17) apps/stage-tamagotchi/src/main/services/electron/window.ts:21— window.createWindowService has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 5 (nesting depth added 1). None of this is in the body itself: all 17 points belong to 9 function literals inside it that branch (lines 93, 81, 87, …). 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.
asset-url.rewriteWidgetModuleAssetUrl (cognitive 17) apps/stage-tamagotchi/src/main/services/airi/plugins/kits/widget/asset-url.ts:97— asset-url.rewriteWidgetModuleAssetUrl has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 7 (10 pts), if/else 6, boolean chains 1 (nesting depth added 3). 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: 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.
world.getNearestFreeSpace (cognitive 17) integrations/minecraft/src/skills/world.ts:22— world.getNearestFreeSpace has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 9). 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.
movement.goToBed (cognitive 17) integrations/minecraft/src/skills/movement.ts:287— movement.goToBed has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (3 pts), error handling 1 (2 pts), boolean chains 1, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
history-query.createHistoryRuntime.turns (cognitive 17) integrations/minecraft/src/cognitive/conscious/history-query.ts:79— history-query.createHistoryRuntime.turns has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3, boolean chains 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.
common.telegramMessageToOneLine (cognitive 17) integrations/telegram-bot/src/models/common.ts:26— common.telegramMessageToOneLine has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 7, 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.
attention-handler.createAttentionHandler (cognitive 17) integrations/telegram-bot/src/bots/telegram/agent/attention-handler.ts:5— attention-handler.createAttentionHandler has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 7, error handling 1. Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to 4 function items inside it that branch (calculateNewResponseRate, checkTriggerWords, checkIgnoreWords, …). 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.
actions.imagineAnAction (cognitive 17) integrations/telegram-bot/src/llm/actions.ts:18— actions.imagineAnAction has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 2, loops 1 (2 pts), error handling 1 (nesting depth added 4). None of this is in the body itself: all 17 points belong to 3 function literals inside it that branch (lines 107, 67, 31). 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.
chat-completions.chatMessagesToProjectionEntries (cognitive 17) packages/core-agent/src/messages/chat-completions.ts:45— chat-completions.chatMessagesToProjectionEntries has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 2 (4 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 6). None of this is in the body itself: all 17 points belong to 2 function literals inside it that branch (lines 46, 55). 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.
llm-marker-parser.createLlmMarkerParser.consume (cognitive 17) packages/core-agent/src/runtime/llm-marker-parser.ts:84— llm-marker-parser.createLlmMarkerParser.consume has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
llm-service.streamFrom (cognitive 17) packages/core-agent/src/runtime/llm-service.ts:279— llm-service.streamFrom has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), error handling 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SpeechStream.deliver (cognitive 17) packages/core-agent/src/voice/output/response.ts:302— SpeechStream.deliver has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 3 (7 pts), boolean chains 2, loops 1 (nesting depth added 7). Most of this is not in the body itself: 7 of the 17 points are its own statements 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.
match-expression.matchesRouteExpression (cognitive 17) REDACTED:66— match-expression.matchesRouteExpression has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 7 (14 pts), boolean chains 2, match/switch 1 (nesting depth added 7). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
sampling.sampleScreenAmbientLight (cognitive 17) packages/stage-shared/src/screen-ambient-light/sampling.ts:169— sampling.sampleScreenAmbientLight has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (4 pts), ternaries 1 (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.
default.configureAsDefaultsIfEmpty (cognitive 17) packages/stage-ui/src/stores/modules/default.ts:28— default.configureAsDefaultsIfEmpty has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6, 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.
Analytics.initialize (cognitive 17) packages/stage-ui/src/libs/product-signals/index.ts:65— Analytics.initialize has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, boolean chains 6. Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 93, 133, 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.
utils.getChatHistoryItemCopyText (cognitive 17) packages/stage-ui/src/components/scenarios/chat/utils.ts:24— utils.getChatHistoryItemCopyText has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 7). Of this number, 13 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.
whisper.useWhisper (cognitive 17) packages/stage-ui/src/composables/whisper.ts:20— whisper.useWhisper has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 2, match/switch 1 (nesting depth added 8). None of this is in the body itself: all 17 points belong to one function literal inside it that branches (line 41). 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.
airi-card-import-export.sanitizeAiri (cognitive 17) packages/stage-ui/src/services/airi-card-import-export.ts:236— airi-card-import-export.sanitizeAiri has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 15, boolean chains 1, 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.
generation-usage.extractUsageFromBody (cognitive 17) server/apps/api/src/services/domain/generation-usage.ts:60— generation-usage.extractUsageFromBody has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 13 (15 pts), boolean chains 1, if/else 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.
checkout.createCheckoutOperation (cognitive 17) server/apps/api/src/routes/stripe/operations/checkout.ts:16— checkout.createCheckoutOperation has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8, boolean chains 6, ternaries 2, error handling 1. None of this is in the body itself: all 17 points belong to one function literal inside it that branches (line 25). 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.
oidc-jwt-bearer.oidcJwtBearer (cognitive 17) server/apps/auth/src/plugins/oidc-jwt-bearer.ts:65— oidc-jwt-bearer.oidcJwtBearer has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, ternaries 6, boolean chains 2. None of this is in the body itself: all 17 points belong to 4 function items inside it that branch (a function literal at line 139, a function literal at line 88, a function literal at line 82, …). 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.
chrome-session-manager.createChromeSessionManager.ensureAgentWindow (cognitive 17) services/computer-use-mcp/src/chrome-session-manager.ts:295— chrome-session-manager.createChromeSessionManager.ensureAgentWindow has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 1, 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.
desktop-grounding.formatGroundingForAgent (cognitive 17) services/computer-use-mcp/src/desktop-grounding.ts:217— desktop-grounding.formatGroundingForAgent has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 2 (6 pts), loops 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.
register-desktop-grounding.registerDesktopGroundingTools (cognitive 17) services/computer-use-mcp/src/server/register-desktop-grounding.ts:38— register-desktop-grounding.registerDesktopGroundingTools has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 4, ternaries 2 (4 pts), error handling 2 (nesting depth added 3). None of this is in the body itself: all 17 points belong to one function literal inside it that branches (line 56). 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.
index.createExtensionAutoReloadFeature.sync (cognitive 16) apps/stage-tamagotchi/src/main/services/airi/plugins/features/auto-reload/index.ts:105— index.createExtensionAutoReloadFeature.sync has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 3 (4 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 7). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WindowBackdrop.flush (cognitive 16) apps/stage-tamagotchi/src/renderer/composables/use-window-backdrop.ts:355— WindowBackdrop.flush has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), loops 1 (2 pts), boolean chains 1, error handling 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.
world-interactions.tillAndSow (cognitive 16) integrations/minecraft/src/skills/actions/world-interactions.ts:366— world-interactions.tillAndSow has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 4 (nesting depth added 3). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
escape-hazard.findNearestSafeStand (cognitive 16) integrations/minecraft/src/cognitive/reflex/behaviors/escape-hazard.ts:46— escape-hazard.findNearestSafeStand has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (9 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
llm-client.imagineAnAction (cognitive 16) integrations/satori-bot/src/core/planner/llm-client.ts:18— llm-client.imagineAnAction has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, error handling 1, ternaries 1 (nesting depth added 2). Of this number, 13 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
projection.projectProjection (cognitive 16) packages/core-agent/src/messages/projection.ts:140— projection.projectProjection has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 9 (12 pts), if/else 4 (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.
activation-plan.collectRestartClosure (cognitive 16) packages/plugin-sdk/src/plugin-host/activation-plan.ts:392— activation-plan.collectRestartClosure has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 4 (6 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.
index.createBedrockConverseProvider.chat (cognitive 16) packages/provider-inference/src/providers/cloud/amazon-bedrock/index.ts:74— index.createBedrockConverseProvider.chat has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, ternaries 4 (7 pts), if/else 2 (nesting depth added 3). None of this is in the body itself: all 16 points belong to 3 function literals inside it that branch (lines 78, 98, 101). 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.
windows.classifyWindow (cognitive 16) packages/scenarios-stage-tamagotchi-electron/src/runtime/windows.ts:57— windows.classifyWindow has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 8. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
index.getLocalIPs (cognitive 16) packages/server-runtime/src/server/index.ts:57— index.getLocalIPs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (3 pts), ternaries 1 (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.
render.fractionPart (cognitive 16) packages/speech-transformer-math/src/render.ts:68— render.fractionPart has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 6, 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.
settings-search.chainsOf (cognitive 16) packages/stage-pages/src/vite/settings-search.ts:259— settings-search.chainsOf has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 3, loops 1 (2 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.
expressions.createLive2DExpressionsContext.rebuildParameters (cognitive 16) packages/stage-ui-live2d/src/contexts/expressions.ts:103— expressions.createLive2DExpressionsContext.rebuildParameters has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (10 pts), if/else 1 (3 pts), loops 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.
kokoro.waitForWorkerMessage (cognitive 16) packages/stage-ui/src/libs/inference/adapters/kokoro.ts:90— kokoro.waitForWorkerMessage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 4). None of this is in the body itself: all 16 points belong to 4 function literals inside it that branch (lines 110, 98, 102, …). 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.
chat-assets.chatAssetIdsOf (cognitive 16) packages/stage-ui/src/libs/chat-assets.ts:118— chat-assets.chatAssetIdsOf has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 2 (7 pts), if/else 2 (5 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
stage-model.useSettingsStageModel.updateStageModel (cognitive 16) packages/stage-ui/src/stores/settings/stage-model.ts:115— stage-model.useSettingsStageModel.updateStageModel has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (15 pts), error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WakeWordDetector.recognize (cognitive 16) packages/stage-ui/src/libs/voice/wake-word-detector.ts:325— WakeWordDetector.recognize has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 2, 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.
speech.useSpeechStore.loadVoiceCatalog (cognitive 16) REDACTED:235— speech.useSpeechStore.loadVoiceCatalog has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6 (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.
auth.useAuthStore.refreshTokenNow (cognitive 16) packages/stage-ui/src/stores/auth.ts:167— auth.useAuthStore.refreshTokenNow has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 5, error handling 1, ternaries 1 (nesting depth added 1). 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 178, 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.
whisper.createWhisperAdapter.waitForMessage (cognitive 16) packages/stage-ui/src/libs/inference/adapters/whisper.ts:233— whisper.createWhisperAdapter.waitForMessage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 4). None of this is in the body itself: all 16 points belong to 4 function literals inside it that branch (lines 254, 241, 245, …). 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.
home-assistant.createHomeAssistantTools (cognitive 16) packages/stage-ui/src/tools/home-assistant.ts:104— home-assistant.createHomeAssistantTools has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 11 (12 pts), if/else 3, boolean chains 1 (nesting depth added 1). None of this is in the body itself: all 16 points belong to 5 function items inside it that branch (a function literal at line 215, a function literal at line 155, assertInstanceHeld, …). 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.
VoiceEnrollment.run (cognitive 16) packages/stage-ui/src/libs/voice/voice-enrollment.ts:100— VoiceEnrollment.run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2, boolean chains 1, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
streaming-control.useLlmStreamingControlStore.dispatchWith (cognitive 16) packages/stage-ui/src/stores/ai/chat-llm/streaming-control.ts:52— streaming-control.useLlmStreamingControlStore.dispatchWith has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 3 (6 pts), boolean chains 1, match/switch 1 (nesting depth added 7). 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 item inside it that branches (observe). 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.
use-gamepad-actions.useLive2DMotionGamepadActions::runEdgeActions (cognitive 16) packages/stage-ui/src/features/devtools/motion/live2d/composables/use-gamepad-actions.ts:113— use-gamepad-actions.useLive2DMotionGamepadActions::runEdgeActions has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 8. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
background-removal.createBackgroundRemovalAdapter.waitForMessage (cognitive 16) packages/stage-ui/src/libs/inference/adapters/background-removal.ts:102— background-removal.createBackgroundRemovalAdapter.waitForMessage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 4). None of this is in the body itself: all 16 points belong to 4 function literals inside it that branch (lines 122, 110, 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.
index.createOpenAiSpeechService.handleSpeechRequest (cognitive 16) server/apps/api/src/services/domain/openai-speech/index.ts:108— index.createOpenAiSpeechService.handleSpeechRequest has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 4, error handling 3, boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
index.observeOpenRouterEvent (cognitive 16) server/apps/api/src/routes/openai/v1/operations/responses/index.ts:47— index.observeOpenRouterEvent has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 4 (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.
browser-agent.runBrowserAgentTask (cognitive 16) services/computer-use-mcp/src/server/browser-agent.ts:78— browser-agent.runBrowserAgentTask has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 6, error handling 1 (2 pts) (nesting depth added 2). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 143, 111, 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.
Change-coupling hub: REDACTED → definitions.ts, billing-service.ts, flux.ts, router.ts server/apps/api/src/routes/openai/v1/index.ts— `server/apps/api/src/routes/openai/v1/index.ts` changes together with 4 other files — `server/apps/api/src/services/adapters/config-kv/definitions.ts`, `server/apps/api/src/services/domain/billing/billing-service.ts`, `server/apps/api/src/services/domain/flux.ts`, `server/apps/api/src/services/domain/llm-router/router.ts` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
Duplicated block (16 lines × 3) apps/stage-tamagotchi-kirie/src-godot/scripts/ChatWindow.cs:94— apps/stage-tamagotchi-kirie/src-godot/scripts/ChatWindow.cs:94-110 | apps/stage-tamagotchi-kirie/src-godot/scripts/OnboardingWindow.cs:110-125 | apps/stage-tamagotchi-kirie/src-godot/scripts/SettingsWindow.cs:144-160 — 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.
P12 · CI test-gate honesty· Coverage collected but not gated · ×1
Coverage collected but not gated — CI collects a coverage report but no step enforces a minimum — coverage could halve and CI stays green. Add a step that fails the build when coverage drops below a floor (your coverage tool's minimum-threshold flag, or a coverage-gate action) so the number guards something. What was searched, so you can tell an absence from a miss: this repository's CI files AND its coverage configuration — the well-known coverage and test-runner config files, read at the repository root and inside workspace package directories two levels down, so a floor declared beside the tests rather than in the pipeline is credited — matched against the threshold settings this check knows by name. A floor set in your coverage service's web UI rather than in a committed file, or under a setting whose name is not one of those, is not seen here.
Duplication concentrated across 5 sibling directories (168 clone groups) apps/stage-tamagotchi-kirie/src-web/src/renderer/stores/stage-three-runtime-diagnostics.ts:1— 168 duplicated blocks under apps/ have copies in at least two of the sibling directories stage-pocket, stage-tamagotchi, stage-tamagotchi-kirie, stage-web, ui-server-auth — 155 of them are reported below, and 13 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 168 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 168 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 168 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.
Duplication concentrated across 28 sibling directories (68 clone groups) packages/pipelines-audio/src/processors/tts-chunker.ts:18— 68 duplicated blocks under packages/ have copies in at least two of the sibling directories ccc, core-agent, font-chillroundm, font-cjkfonts-allseto, font-departure-mono, font-xiaolai (+22 more sibling(s) not listed) — 44 of them are reported below, and 24 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 68 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 68 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 68 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.
Duplication concentrated across 7 sibling directories (41 clone groups) apps/stage-pocket/src/workers/vad/vad.ts:1— 41 duplicated blocks under the repository root have copies in at least two of the sibling directories apps, evals, integrations, packages, plugins, server (+1 more sibling(s) not listed) — 26 of them are reported below, and 15 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 41 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 41 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 41 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.
Duplication concentrated across 34 sibling directories (15 clone groups) packages/provider-inference/src/providers/cloud/google-gemini-audio-speech/index.ts:62— 15 duplicated blocks under packages/provider-inference/src/providers/cloud/ have copies in at least two of the sibling directories 302-ai, aihubmix, anthropic, atlascloud, azure-ai-foundry, azure-openai (+28 more sibling(s) not listed) — 14 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 15 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 15 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 15 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.
Duplication concentrated across 2 sibling directories (13 clone groups) server/apps/api/instrumentation.ts:62— 13 duplicated blocks under server/apps/ have copies in at least two of the sibling directories api, auth — 12 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 13 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 13 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 13 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.
Duplication concentrated across 4 sibling directories (11 clone groups) packages/stage-pages/src/pages/settings/providers/chat/ollama.vue:2— 11 of the duplicated blocks reported below have copies in at least two of the sibling directories chat, speech, transcription, vision under packages/stage-pages/src/pages/settings/providers/. That concentration is one structural fact, not 11 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 11 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.
Duplication concentrated across 2 sibling directories (8 clone groups) packages/stage-pages/src/pages/devtools/providers-transcription-realtime-aliyun-nls.vue:301— 8 duplicated blocks under packages/stage-pages/src/pages/ have copies in at least two of the sibling directories devtools, settings — 6 of them are reported below, and 2 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 8 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 8 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 8 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.
Duplication concentrated across 9 sibling directories (8 clone groups) server/apps/api/src/routes/character-cards/index.ts:14— 8 duplicated blocks under server/apps/api/src/routes/ have copies in at least two of the sibling directories apple-iap, character-cards, characters, chats, display-models, flux (+3 more sibling(s) not listed) — 7 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 8 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 8 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 8 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.
Duplication concentrated across 5 sibling directories (7 clone groups) packages/stage-ui/src/libs/workers/worker.ts:167— 7 duplicated blocks under packages/stage-ui/src/ have copies in at least two of the sibling directories composables, libs, stores, tools, workers — 4 of them are reported below, and 3 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 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.
Duplication concentrated across 6 sibling directories (6 clone groups) apps/stage-tamagotchi/src/main/windows/dashboard/index.ts:26— 6 duplicated blocks under apps/stage-tamagotchi/src/main/windows/ have copies in at least two of the sibling directories about, dashboard, editor, main, settings, workspace — 5 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 6 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 6 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 6 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Duplication concentrated across 3 sibling directories (5 clone groups) server/apps/api/src/schemas/character-cards.ts:16— 5 duplicated blocks under server/apps/api/src/ have copies in at least two of the sibling directories routes, schemas, services — 4 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 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 5 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.
Duplication concentrated across 6 sibling directories (5 clone groups) services/computer-use-mcp/src/display/enumerate.ts:158— 5 duplicated blocks under services/computer-use-mcp/src/ have copies in at least two of the sibling directories accessibility, browser-dom, display, remote, server, utils — 4 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 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 5 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.
Wholesale file copy (313 identical lines × 2 files) apps/stage-tamagotchi-kirie/src-web/src/renderer/stores/stage-three-runtime-diagnostics.ts:1— apps/stage-tamagotchi-kirie/src-web/src/renderer/stores/stage-three-runtime-diagnostics.ts:1 · apps/stage-tamagotchi/src/renderer/stores/stage-three-runtime-diagnostics.ts:1 — these 2 files are line-for-line copies of one another — 313 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
Wholesale file copy (200 identical lines × 2 files) apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/settings/modules/mcp.vue:2— apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/settings/modules/mcp.vue:2 · apps/stage-tamagotchi/src/renderer/pages/settings/modules/mcp.vue:2 — these 2 files are line-for-line copies of one another — 200 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
Wholesale file copy (198 identical lines × 2 files) apps/stage-tamagotchi-kirie/src-web/src/renderer/components/stage-islands/controls-island/index.vue:3— apps/stage-tamagotchi-kirie/src-web/src/renderer/components/stage-islands/controls-island/index.vue:3 · apps/stage-tamagotchi/src/renderer/components/stage-islands/controls-island/index.vue:4 — these 2 files are line-for-line copies of one another — 198 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
Wholesale file copy (190 identical lines × 2 files) apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/settings/models/index.vue:2— apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/settings/models/index.vue:2 · apps/stage-tamagotchi/src/renderer/pages/settings/models/index.vue:2 — these 2 files are line-for-line copies of one another — 190 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
Wholesale file copy (180 identical lines × 2 files) apps/stage-pocket/src/pages/devtools/performance-playground.vue:2— apps/stage-pocket/src/pages/devtools/performance-playground.vue:2 · apps/stage-web/src/pages/devtools/performance-playground.vue:2 — these 2 files are line-for-line copies of one another — 180 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
Wholesale file copy (166 identical lines × 2 files) apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/devtools/widgets-calling.vue:3— apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/devtools/widgets-calling.vue:3 · apps/stage-tamagotchi/src/renderer/pages/devtools/widgets-calling.vue:3 — these 2 files are line-for-line copies of one another — 166 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication· Duplicated block with local edits (158 matched lines × 2 locations) · ×1
Duplicated block with local edits (158 matched lines × 2 locations) packages/pipelines-audio/src/processors/tts-chunker.ts:18— packages/pipelines-audio/src/processors/tts-chunker.ts:18 · packages/stage-ui/src/utils/tts.ts:11 — the two spans are one implementation copied and then locally edited — 761 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 (150 matched lines × 2 locations) · ×1
Duplicated block with local edits (150 matched lines × 2 locations) packages/stage-ui/src/libs/inference/adapters/background-removal.ts:25— packages/stage-ui/src/libs/inference/adapters/background-removal.ts:25 · packages/stage-ui/src/libs/inference/adapters/whisper.ts:49 — the two spans are one implementation copied and then locally edited — 975 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.
Wholesale file copy (149 identical lines × 2 files) apps/stage-tamagotchi-kirie/src-web/src/renderer/stores/tools/builtin/image-journal.ts:1— apps/stage-tamagotchi-kirie/src-web/src/renderer/stores/tools/builtin/image-journal.ts:1 · apps/stage-tamagotchi/src/renderer/stores/tools/builtin/image-journal.ts:1 — these 2 files are line-for-line copies of one another — 149 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
Wholesale file copy (140 identical lines × 2 files) apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/widgets.vue:2— apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/widgets.vue:2 · apps/stage-tamagotchi/src/renderer/pages/widgets.vue:2 — these 2 files are line-for-line copies of one another — 140 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
Wholesale file copy (139 identical lines × 2 files) apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/settings/modules/mcp-config.ts:1— apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/settings/modules/mcp-config.ts:1 · apps/stage-tamagotchi/src/renderer/pages/settings/modules/mcp-config.ts:1 — these 2 files are line-for-line copies of one another — 139 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
Wholesale file copy (138 identical lines × 2 files) apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/devtools/vision.vue:2— apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/devtools/vision.vue:2 · apps/stage-tamagotchi/src/renderer/pages/devtools/vision.vue:2 — these 2 files are line-for-line copies of one another — 138 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication· Duplicated block with local edits (134 matched lines × 2 locations) · ×1
Duplicated block with local edits (134 matched lines × 2 locations) packages/scenarios-stage-tamagotchi-electron/src/scenarios/plugin-chess-worker-smoke.ts:13— packages/scenarios-stage-tamagotchi-electron/src/scenarios/plugin-chess-worker-smoke.ts:13 · packages/scenarios-stage-tamagotchi-electron/src/scenarios/plugin-widget-static-assets-local-address.ts:12 — the two spans are one implementation copied and then locally edited — 878 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.
Wholesale file copy (132 identical lines × 2 files) apps/stage-tamagotchi-kirie/src-web/src/renderer/stores/tools/builtin/weather-api.ts:3— apps/stage-tamagotchi-kirie/src-web/src/renderer/stores/tools/builtin/weather-api.ts:3 · apps/stage-tamagotchi/src/renderer/stores/tools/builtin/weather-api.ts:3 — these 2 files are line-for-line copies of one another — 132 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
Wholesale file copy (127 identical lines × 2 files) apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/about.vue:2— apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/about.vue:2 · apps/stage-tamagotchi/src/renderer/pages/about.vue:2 — these 2 files are line-for-line copies of one another — 127 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
Wholesale file copy (123 identical lines × 2 files) apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/desktop-overlay.vue:2— apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/desktop-overlay.vue:2 · apps/stage-tamagotchi/src/renderer/pages/desktop-overlay.vue:2 — these 2 files are line-for-line copies of one another — 123 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
Wholesale file copy (119 identical lines × 3 files) apps/stage-pocket/src/workers/vad/vad.ts:1— apps/stage-pocket/src/workers/vad/vad.ts:1 · apps/stage-web/src/workers/vad/vad.ts:1 · packages/stage-ui/src/workers/vad/vad.ts:1 — these 3 files are line-for-line copies of one another — 119 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
Wholesale file copy (113 identical lines × 2 files) apps/stage-pocket/src/pages/devtools/background-removal.vue:2— apps/stage-pocket/src/pages/devtools/background-removal.vue:2 · apps/stage-web/src/pages/devtools/background-removal.vue:2 — these 2 files are line-for-line copies of one another — 113 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
Duplicated block (111 lines × 2 locations) apps/stage-tamagotchi-kirie/src-web/src/shared/eventa/index.ts:211— apps/stage-tamagotchi-kirie/src-web/src/shared/eventa/index.ts:211 · apps/stage-tamagotchi/src/shared/eventa/index.ts:423 — 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.
Wholesale file copy (98 identical lines × 2 files) apps/stage-tamagotchi-kirie/src-web/src/renderer/composables/use-vision-screen-capture.ts:1— apps/stage-tamagotchi-kirie/src-web/src/renderer/composables/use-vision-screen-capture.ts:1 · apps/stage-tamagotchi/src/renderer/composables/use-vision-screen-capture.ts:1 — these 2 files are line-for-line copies of one another — 98 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
Wholesale file copy (94 identical lines × 2 files) apps/stage-tamagotchi-kirie/src-web/src/renderer/widgets/extension-ui/components/extension-ui-host.vue:2— apps/stage-tamagotchi-kirie/src-web/src/renderer/widgets/extension-ui/components/extension-ui-host.vue:2 · apps/stage-tamagotchi/src/renderer/widgets/extension-ui/components/extension-ui-host.vue:2 — these 2 files are line-for-line copies of one another — 94 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
Wholesale file copy (93 identical lines × 2 files) apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/devtools/screen-capture.vue:2— apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/devtools/screen-capture.vue:2 · apps/stage-tamagotchi/src/renderer/pages/devtools/screen-capture.vue:2 — these 2 files are line-for-line copies of one another — 93 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
Complex function render (cyclomatic 147, cognitive 110) packages/speech-transformer-math/src/render.ts:183— render has cyclomatic complexity 147 and cognitive complexity 110; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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.
Complex function (anonymous) (cyclomatic 93, cognitive 129) packages/server-runtime/src/index.ts:549— (anonymous) has cyclomatic complexity 93 and cognitive complexity 129; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function normalize (cyclomatic 89, cognitive 128) REDACTED:205— normalize has cyclomatic complexity 89 and cognitive complexity 128; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function executeWorkflow (cyclomatic 83, cognitive 191) services/computer-use-mcp/src/workflows/engine.ts:156— executeWorkflow has cyclomatic complexity 83 and cognitive complexity 191; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function safeEnd (cyclomatic 77, cognitive 134) packages/core-agent/src/voice/output/speech-transformation/segmenter.ts:88— safeEnd has cyclomatic complexity 77 and cognitive complexity 134; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function performSend (cyclomatic 76, cognitive 87) packages/core-agent/src/runtime/chat-orchestrator-runtime.ts:637— performSend has cyclomatic complexity 76 and cognitive complexity 87; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function poseToVrmTargets (cyclomatic 68, cognitive 111) packages/model-driver-mediapipe/src/three/pose-to-vrm.ts:173— poseToVrmTargets has cyclomatic complexity 68 and cognitive complexity 111; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function lowerScripts (cyclomatic 65, cognitive 53) packages/speech-transformer-math/src/lower.ts:898— lowerScripts has cyclomatic complexity 65 and cognitive complexity 53; 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.
Complex function evaluate (cyclomatic 63, cognitive 78) packages/stage-pages/src/vite/settings-search.ts:1195— evaluate has cyclomatic complexity 63 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.
Complex function lowerTerms (cyclomatic 61, cognitive 98) packages/speech-transformer-math/src/lower.ts:601— lowerTerms has cyclomatic complexity 61 and cognitive complexity 98; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 57, cognitive 61) services/computer-use-mcp/src/server/action-executor.ts:237— (anonymous) has cyclomatic complexity 57 and cognitive complexity 61; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 54, cognitive 48) packages/server-sdk/src/client.ts:310— (anonymous) has cyclomatic complexity 54 and cognitive complexity 48; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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.
Complex function runArtistTask (cyclomatic 52, cognitive 64) packages/stage-ui/src/stores/modules/artistry-autonomous.ts:50— runArtistTask has cyclomatic complexity 52 and cognitive complexity 64; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function evaluateStrategy (cyclomatic 49, cognitive 47) services/computer-use-mcp/src/strategy.ts:204— evaluateStrategy has cyclomatic complexity 49 and cognitive complexity 47; 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.
Complex function planExtensionActivation (cyclomatic 47, cognitive 81) packages/plugin-sdk/src/plugin-host/activation-plan.ts:118— planExtensionActivation has cyclomatic complexity 47 and cognitive complexity 81; 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 walk (cyclomatic 46, cognitive 95) · ×1
Complex function walk (cyclomatic 46, cognitive 95) packages/stage-pages/src/vite/settings-search.ts:1350— walk has cyclomatic complexity 46 and cognitive complexity 95; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function handleArtistryTrigger (cyclomatic 46, cognitive 68) apps/stage-tamagotchi/src/main/services/airi/widgets/artistry-bridge.ts:263— handleArtistryTrigger has cyclomatic complexity 46 and cognitive complexity 68; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function evaluateActionPolicy (cyclomatic 46, cognitive 41) services/computer-use-mcp/src/policy.ts:100— evaluateActionPolicy has cyclomatic complexity 46 and cognitive complexity 41; 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.
Complex function chunkTtsInput (cyclomatic 41, cognitive 86) packages/pipelines-audio/src/processors/tts-chunker.ts:56— chunkTtsInput has cyclomatic complexity 41 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.
Complex function (anonymous) (cyclomatic 41, cognitive 66) server/apps/api/src/routes/openai/v1/operations/responses/index.ts:277— (anonymous) has cyclomatic complexity 41 and cognitive complexity 66; 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· integrations/minecraft/src/cognitive/conscious/brain.ts · ×1
integrations/minecraft/src/cognitive/conscious/brain.ts: 2089 lines of code integrations/minecraft/src/cognitive/conscious/brain.ts:1— integrations/minecraft/src/cognitive/conscious/brain.ts has 2089 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· packages/stage-ui/src/stores/chat/session-store.ts · ×1
packages/stage-ui/src/stores/chat/session-store.ts: 1705 lines of code packages/stage-ui/src/stores/chat/session-store.ts:1— packages/stage-ui/src/stores/chat/session-store.ts has 1705 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· packages/stage-pages/src/vite/settings-search.ts · ×1
packages/stage-pages/src/vite/settings-search.ts: 1539 lines of code packages/stage-pages/src/vite/settings-search.ts:1— packages/stage-pages/src/vite/settings-search.ts has 1539 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· integrations/minecraft/src/debug/web/app.js · ×1
integrations/minecraft/src/debug/web/app.js: 1517 lines of code integrations/minecraft/src/debug/web/app.js:1— integrations/minecraft/src/debug/web/app.js has 1517 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· packages/plugin-protocol/src/types/events.ts · ×1
packages/plugin-protocol/src/types/events.ts: 1416 lines of code packages/plugin-protocol/src/types/events.ts:1— packages/plugin-protocol/src/types/events.ts has 1416 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· packages/stage-ui/src/stores/chat.ts · ×1
packages/stage-ui/src/stores/chat.ts: 1416 lines of code packages/stage-ui/src/stores/chat.ts:1— packages/stage-ui/src/stores/chat.ts has 1416 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· services/computer-use-mcp/src/workflows/engine.ts · ×1
services/computer-use-mcp/src/workflows/engine.ts: 1376 lines of code services/computer-use-mcp/src/workflows/engine.ts:1— services/computer-use-mcp/src/workflows/engine.ts has 1376 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· packages/core-agent/src/runtime/chat-orchestrator-runtime.ts · ×1
packages/core-agent/src/runtime/chat-orchestrator-runtime.ts: 1375 lines of code packages/core-agent/src/runtime/chat-orchestrator-runtime.ts:1— packages/core-agent/src/runtime/chat-orchestrator-runtime.ts has 1375 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· packages/stage-ui/src/stores/modules/airi-card.ts · ×1
packages/stage-ui/src/stores/modules/airi-card.ts: 1362 lines of code packages/stage-ui/src/stores/modules/airi-card.ts:1— packages/stage-ui/src/stores/modules/airi-card.ts has 1362 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: 1313 lines of code REDACTED:1— REDACTED has 1313 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· services/computer-use-mcp/src/server/register-tools.ts · ×1
services/computer-use-mcp/src/server/register-tools.ts: 1249 lines of code services/computer-use-mcp/src/server/register-tools.ts:1— services/computer-use-mcp/src/server/register-tools.ts has 1249 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· server/apps/api/src/services/domain/llm-router/router.ts · ×1
server/apps/api/src/services/domain/llm-router/router.ts: 1155 lines of code server/apps/api/src/services/domain/llm-router/router.ts:1— server/apps/api/src/services/domain/llm-router/router.ts has 1155 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· packages/stage-ui/src/stores/providers/provider.ts · ×1
packages/stage-ui/src/stores/providers/provider.ts: 1105 lines of code packages/stage-ui/src/stores/providers/provider.ts:1— packages/stage-ui/src/stores/providers/provider.ts has 1105 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· packages/stage-ui/src/stores/mods/api/context-bridge.ts · ×1
packages/stage-ui/src/stores/mods/api/context-bridge.ts: 1052 lines of code packages/stage-ui/src/stores/mods/api/context-bridge.ts:1— packages/stage-ui/src/stores/mods/api/context-bridge.ts has 1052 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· packages/speech-transformer-math/src/lower.ts · ×1
packages/speech-transformer-math/src/lower.ts: 1017 lines of code packages/speech-transformer-math/src/lower.ts:1— packages/speech-transformer-math/src/lower.ts has 1017 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· packages/stage-pages/src/pages/settings/airi-card/components/CardEditor.vue · ×1
packages/stage-pages/src/pages/settings/airi-card/components/CardEditor.vue: 1010 lines of code packages/stage-pages/src/pages/settings/airi-card/components/CardEditor.vue:1— packages/stage-pages/src/pages/settings/airi-card/components/CardEditor.vue has 1010 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· packages/server-runtime/src/index.ts · ×1
packages/server-runtime/src/index.ts: 996 lines of code packages/server-runtime/src/index.ts:1— packages/server-runtime/src/index.ts has 996 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· packages/stage-ui-three/src/components/Model/VRMModel.vue · ×1
packages/stage-ui-three/src/components/Model/VRMModel.vue: 990 lines of code packages/stage-ui-three/src/components/Model/VRMModel.vue:1— packages/stage-ui-three/src/components/Model/VRMModel.vue has 990 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· packages/stage-ui-three/src/components/ThreeScene.vue · ×1
packages/stage-ui-three/src/components/ThreeScene.vue: 965 lines of code packages/stage-ui-three/src/components/ThreeScene.vue:1— packages/stage-ui-three/src/components/ThreeScene.vue has 965 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· packages/stage-ui/src/composables/use-analytics.ts · ×1
packages/stage-ui/src/composables/use-analytics.ts: 952 lines of code packages/stage-ui/src/composables/use-analytics.ts:1— packages/stage-ui/src/composables/use-analytics.ts has 952 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· packages/stage-pages/src/pages/settings/modules/speech.vue · ×1
packages/stage-pages/src/pages/settings/modules/speech.vue: 922 lines of code packages/stage-pages/src/pages/settings/modules/speech.vue:1— packages/stage-pages/src/pages/settings/modules/speech.vue has 922 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· packages/stage-pages/src/pages/settings/account/account-settings-page.vue · ×1
packages/stage-pages/src/pages/settings/account/account-settings-page.vue: 919 lines of code packages/stage-pages/src/pages/settings/account/account-settings-page.vue:1— packages/stage-pages/src/pages/settings/account/account-settings-page.vue has 919 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· packages/plugin-sdk/src/plugin-host/core.ts · ×1
packages/plugin-sdk/src/plugin-host/core.ts: 907 lines of code packages/plugin-sdk/src/plugin-host/core.ts:1— packages/plugin-sdk/src/plugin-host/core.ts has 907 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· packages/stage-ui-live2d/src/components/scenes/live2d/Model.vue · ×1
packages/stage-ui-live2d/src/components/scenes/live2d/Model.vue: 897 lines of code packages/stage-ui-live2d/src/components/scenes/live2d/Model.vue:1— packages/stage-ui-live2d/src/components/scenes/live2d/Model.vue has 897 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: 846 lines of code REDACTED:1— REDACTED has 846 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· packages/plugin-sdk/src/plugin-host/hosted-kits.ts · ×1
packages/plugin-sdk/src/plugin-host/hosted-kits.ts: 839 lines of code packages/plugin-sdk/src/plugin-host/hosted-kits.ts:1— packages/plugin-sdk/src/plugin-host/hosted-kits.ts has 839 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· packages/stage-ui/src/components/scenarios/settings/model-settings/live2d.vue · ×1
packages/stage-ui/src/components/scenarios/settings/model-settings/live2d.vue: 821 lines of code packages/stage-ui/src/components/scenarios/settings/model-settings/live2d.vue:1— packages/stage-ui/src/components/scenarios/settings/model-settings/live2d.vue has 821 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· apps/stage-tamagotchi/src/main/services/airi/plugins/host/index.ts · ×1
apps/stage-tamagotchi/src/main/services/airi/plugins/host/index.ts: 806 lines of code apps/stage-tamagotchi/src/main/services/airi/plugins/host/index.ts:1— apps/stage-tamagotchi/src/main/services/airi/plugins/host/index.ts has 806 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
server/apps/api/src/app.ts: 800 lines of code server/apps/api/src/app.ts:1— server/apps/api/src/app.ts has 800 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· apps/stage-tamagotchi/src/renderer/pages/index.vue · ×1
apps/stage-tamagotchi/src/renderer/pages/index.vue: 796 lines of code apps/stage-tamagotchi/src/renderer/pages/index.vue:1— apps/stage-tamagotchi/src/renderer/pages/index.vue has 796 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· packages/stage-pages/src/pages/devtools/io-tracer/components/io-tracer-chart.vue · ×1
packages/stage-pages/src/pages/devtools/io-tracer/components/io-tracer-chart.vue: 791 lines of code packages/stage-pages/src/pages/devtools/io-tracer/components/io-tracer-chart.vue:1— packages/stage-pages/src/pages/devtools/io-tracer/components/io-tracer-chart.vue has 791 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· packages/better-ws/src/client/index.ts · ×1
packages/better-ws/src/client/index.ts: 785 lines of code packages/better-ws/src/client/index.ts:1— packages/better-ws/src/client/index.ts has 785 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· server/apps/auth/src/auth.ts · ×1
server/apps/auth/src/auth.ts: 775 lines of code server/apps/auth/src/auth.ts:1— server/apps/auth/src/auth.ts has 775 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· packages/stage-ui/src/components/scenes/Stage.vue · ×1
packages/stage-ui/src/components/scenes/Stage.vue: 752 lines of code packages/stage-ui/src/components/scenes/Stage.vue:1— packages/stage-ui/src/components/scenes/Stage.vue has 752 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· services/computer-use-mcp/src/server/action-executor.ts · ×1
services/computer-use-mcp/src/server/action-executor.ts: 736 lines of code services/computer-use-mcp/src/server/action-executor.ts:1— services/computer-use-mcp/src/server/action-executor.ts has 736 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· apps/stage-tamagotchi/src/shared/eventa/index.ts · ×1
apps/stage-tamagotchi/src/shared/eventa/index.ts: 717 lines of code apps/stage-tamagotchi/src/shared/eventa/index.ts:1— apps/stage-tamagotchi/src/shared/eventa/index.ts has 717 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· packages/stage-pages/src/pages/settings/flux.vue · ×1
packages/stage-pages/src/pages/settings/flux.vue: 710 lines of code packages/stage-pages/src/pages/settings/flux.vue:1— packages/stage-pages/src/pages/settings/flux.vue has 710 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· packages/stage-ui-live2d/src/composables/live2d/motion-manager.ts · ×1
packages/stage-ui-live2d/src/composables/live2d/motion-manager.ts: 703 lines of code packages/stage-ui-live2d/src/composables/live2d/motion-manager.ts:1— packages/stage-ui-live2d/src/composables/live2d/motion-manager.ts has 703 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· packages/stage-shared/src/screen-ambient-light/sampling.ts · ×1
packages/stage-shared/src/screen-ambient-light/sampling.ts: 699 lines of code packages/stage-shared/src/screen-ambient-light/sampling.ts:1— packages/stage-shared/src/screen-ambient-light/sampling.ts has 699 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· apps/stage-tamagotchi/src/main/windows/widgets/index.ts · ×1
apps/stage-tamagotchi/src/main/windows/widgets/index.ts: 694 lines of code apps/stage-tamagotchi/src/main/windows/widgets/index.ts:1— apps/stage-tamagotchi/src/main/windows/widgets/index.ts has 694 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R4 · Test Coverage· This test file cannot be loaded · ×1
This test file cannot be loaded server/apps/api/src/services/domain/billing/tests/flux-usage-migration.test.ts:10— server/apps/api/src/services/domain/billing/tests/flux-usage-migration.test.ts:10 imports '../../../../../drizzle', 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.
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 server/apps/api/src/services/domain/billing/tests/flux-usage-migration.test.ts:10— This repository declares test tooling, and the ✓ above records that declaration — but server/apps/api/src/services/domain/billing/tests/flux-usage-migration.test.ts 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.
Dead file (~691 LoC) services/computer-use-mcp/src/runner/service.ts— no import path from any entry point (1391 application, 153 tooling, 918 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 (~396 LoC) apps/component-calling/src/pages/index.vue— no import path from any entry point (1391 application, 153 tooling, 918 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 (~369 LoC) apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/index.vue— no import path from any entry point (1391 application, 153 tooling, 918 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 (~338 LoC) plugins/airi-plugin-web-extension/src/content/index.ts— no import path from any entry point (1391 application, 153 tooling, 918 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (plugins/airi-plugin-web-extension/entrypoints/content.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~328 LoC) apps/stage-tamagotchi/src/renderer/pages/chat-floating.vue— no import path from any entry point (1391 application, 153 tooling, 918 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 (~302 LoC) apps/ui-server-auth/src/pages/profile.vue— no import path from any entry point (1391 application, 153 tooling, 918 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 (~301 LoC) REDACTED— no import path from any entry point (1391 application, 153 tooling, 918 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 (~283 LoC) apps/stage-web/src/pages/devtools/model-driver-mediapipe.vue— no import path from any entry point (1391 application, 153 tooling, 918 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 (~244 LoC) plugins/airi-plugin-web-extension/src/background/client.ts— no import path from any entry point (1391 application, 153 tooling, 918 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (plugins/airi-plugin-web-extension/entrypoints/background.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~236 LoC) apps/stage-tamagotchi/src/renderer/pages/widgets.vue— no import path from any entry point (1391 application, 153 tooling, 918 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 (~199 LoC) apps/stage-web/src/pages/settings/characters/components/CharacterDialog.vue— no import path from any entry point (1391 application, 153 tooling, 918 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (apps/stage-web/src/pages/settings/characters/index.vue) — 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
Dead file (~191 LoC) apps/stage-tamagotchi/src/renderer/composables/use-vision-screen-capture.ts— no import path from any entry point (1391 application, 153 tooling, 918 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (apps/stage-tamagotchi/src/renderer/pages/devtools/vision.vue) — 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
Dead file (~190 LoC) apps/stage-tamagotchi-kirie/src-web/src/renderer/composables/use-vision-screen-capture.ts— no import path from any entry point (1391 application, 153 tooling, 918 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/devtools/vision.vue) — 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
Dead file (~175 LoC) apps/stage-tamagotchi/src/renderer/pages/devtools/global-shortcut.vue— no import path from any entry point (1391 application, 153 tooling, 918 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
Unused dependency 'oxc-minify' — 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.
Unused dependency 'sponsors-svg' — 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.
Unused dependency 'unplugin-lightningcss' — 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.
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.
Sync-over-async (deadlock risk) apps/stage-tamagotchi-kirie/src-godot/scripts/loopback-auth-server.cs:62— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` wastes a thread and, if the task needs a context this one is holding, deadlocks. `Dispose()` returns void by contract, so it cannot simply `await`: signal the work to stop first (cancel its token, set its stop flag) so the wait is short, give the wait a TIMEOUT so a hung task cannot hang shutdown, and — where callers can use it — add an awaitable teardown (`DisposeAsync`/`StopAsync`) beside the synchronous one and let `Dispose()` remain the bounded fallback.
Swallowed exception (empty catch) engines/stage-tamagotchi-godot/scripts/view/StageViewStateStore.cs:95— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Orphaned file engines/stage-tamagotchi-godot/scripts/visuals/StagePostProcessCompositorEffect.Shaders.cs: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 engines/stage-tamagotchi-godot/scripts/transport/StageViewJson.cs: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 apps/stage-tamagotchi/src/renderer/widgets/artistry/components/Comfy.vue: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 engines/stage-tamagotchi-godot/scripts/dev/StageDevObservationAdapter.cs: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 packages/stage-ui/src/components/scenarios/settings/model-settings/mmd.vue: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 packages/stage-ui/src/libs/inference/adapters/background-removal.ts: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 engines/stage-tamagotchi-godot/scripts/scene/StageSceneController.cs: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 engines/stage-tamagotchi-godot/scripts/view/StageCameraPoseController.cs: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 engines/stage-tamagotchi-godot/scripts/visuals/StagePostProcessCompositorEffect.cs: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 engines/stage-tamagotchi-godot/scripts/visuals/StagePostProcessCompositorEffect.Pipeline.cs: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 engines/stage-tamagotchi-godot/tools/exportXiaoerEdgeReferenceStages.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 packages/stage-ui/src/components/scenarios/settings/model-settings/godot.vue: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 integrations/minecraft/src/libs/mineflayer/plugin-runtime.ts: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 packages/stage-pages/src/pages/devtools/markdown-stress.vue: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 packages/stage-pages/src/pages/settings/providers/transcription/mimo-audio-transcription.vue: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 apps/stage-web/src/pages/settings/characters/components/CharacterItem.vue: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 engines/stage-tamagotchi-godot/scripts/view/StageViewRuntime.cs: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 services/computer-use-mcp/src/server/register-task-memory.ts: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 engines/stage-tamagotchi-godot/scripts/visuals/StageMaterialOverlayOwner.cs: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 services/computer-use-mcp/src/transcript/block-parser.ts: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 packages/stage-ui/src/libs/inference/load-queue.ts: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 apps/stage-web/src/pages/devtools/gesture-circle.vue: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 packages/stage-pages/src/pages/settings/providers/chat/amazon-bedrock.vue: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 packages/model-driver-mediapipe/src/backends/mediapipe.ts: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 packages/stage-ui-three/src/composables/vrm/loader.ts: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.
Classify ADR enforcement: Hosted Kit registration ownership docs/ai/adr/2026-09-22-hosted-kit-registration.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: Sherpaw model asset lifecycle docs/ai/adr/2026-09-22-sherpaw-model-assets.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: Voice input binding follows the microphone stream docs/ai/adr/2026-09-23-voice-input-binding.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: The presence bubble is drawn inside the model canvas docs/ai/adr/2026-09-24-presence-bubble-in-canvas.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: Home Assistant connection docs/ai/adr/2026-10-06-home-assistant-integration.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: A character is a member of a chat docs/ai/adr/2026-10-09-character-as-chat-member.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: Detect wake words in shared audio docs/ai/adr/2026-10-09-detect-wake-words-in-shared-audio.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: Skills, automations, and long-term memory docs/ai/adr/2026-10-10-skills-automations-and-memory.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: Detect wake words in unprocessed audio docs/ai/adr/2026-10-12-detect-wake-words-in-unprocessed-audio.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: Keep the voice inlay shown docs/ai/adr/2026-10-12-keep-the-voice-inlay-shown.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: Voiceprint enrollment and storage docs/ai/adr/2026-10-14-voiceprint-enrollment.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: Speaker evidence in shadow mode docs/ai/adr/2026-10-15-speaker-evidence.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: Split voice input into capture, signals, policy, runtime, and projection docs/ai/adr/2026-10-16-voice-input-layers.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: Voice plugins watch the transcript and finalize it docs/ai/adr/2026-10-16-voice-plugins-watch-and-finalize.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: Speech text preprocessor with a MathJSON layer docs/ai/adr/2026-10-20-speech-text-preprocessor.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: Hosted Responses gateway server/docs/ai/adr/2026-09-15-hosted-responses.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: Redis cache functions and Flux balance expiry server/docs/ai/adr/2026-09-17-flux-cache-ttl.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: TTS Flux history aggregation server/docs/ai/adr/2026-09-17-tts-flux-history-read-model.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: OIDC JWT identity at the Better Auth boundary server/docs/ai/adr/2026-09-20-oidc-jwt-session-boundary.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: Default normalized-cost LLM settlement server/docs/ai/adr/2026-09-23-provider-cost-billing.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: Apple IAP sandbox accounts server/docs/ai/adr/2026-09-27-apple-iap-sandbox-accounts.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: LLM request content server/docs/ai/adr/2026-09-27-llm-request-content.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: Extensible LLM request tracking server/docs/ai/adr/2026-09-27-llm-request-tracking.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: Optional S3 object storage for the API server/docs/ai/adr/2026-09-27-s3-object-storage.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: Stripe Checkout customer creation server/docs/ai/adr/2026-09-29-stripe-checkout-customer.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.
Mock-dominated test: attributes Responses spans and first-token metrics to Responses server/apps/api/src/routes/openai/v1/middlewares/telemetry.test.ts:12— This test sets up 3 test doubles (for example `vi.spyOn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: does not observe and records a read error when the snapshot fails server/apps/api/src/otel/gauges/tts-pool.test.ts:76— This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 1 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: counts each active per-user broadcast channel once server/apps/api/src/otel/gauges/ws-online-users.test.ts:45— This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: serves the cached count for repeated collections within ten seconds server/apps/api/src/otel/gauges/ws-online-users.test.ts:60— This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: skips observation and records a read error when Redis is unavailable server/apps/api/src/otel/gauges/ws-online-users.test.ts:74— This test sets up 4 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: rejects a noise pulse that is shorter than the minimum speech duration packages/stage-ui/src/workers/vad/vad.test.ts:33— This test sets up 3 test doubles (for example `vi.fn`) against 2 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: restarts chat consumers when this renderer becomes the leader packages/stage-ui/src/stores/chat.contract.test.ts:1181— This test sets up 14 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 7 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: emits special tokens with a stable turn id for cross-renderer routing packages/stage-ui/src/stores/chat.contract.test.ts:1660— This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: records core ingest result for input context updates and forwards accepted updates packages/stage-ui/src/stores/mods/api/context-bridge.contract.browser.test.ts:518— This test sets up 4 test doubles (for example `a double assigned in a shared setup`) against 0 real object(s) of its own, and its only verification is 5 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: records rejected lifecycle and continues text ingestion when input context ingest fails packages/stage-ui/src/stores/mods/api/context-bridge.contract.browser.test.ts:637— This test sets up 4 test doubles (for example `a double assigned in a shared setup`) against 1 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: shows a remote stream in a minimal window without the server channel or chat hooks packages/stage-ui/src/stores/mods/api/context-bridge.contract.browser.test.ts:720— This test sets up 6 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 7 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: records a completed VAD span for each detected speech segment packages/stage-ui/src/stores/ai/models/vad.test.ts:71— This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 1 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: forwards canceled speech only to the dedicated cancel handler packages/stage-ui/src/stores/ai/models/vad.test.ts:117— This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: passes the profile page URL as the OAuth link error callback URL packages/stage-ui/src/composables/use-linked-accounts.test.ts:20— This test sets up 4 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: fires analytics hooks on unlink success and link handoff, but not on failure packages/stage-ui/src/composables/use-linked-accounts.test.ts:69— This test sets up 6 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 6 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: sends a trusted touch sequence through Chromium CDP packages/scenarios-stage-tamagotchi-electron/src/runtime/gestures.test.ts:44— This test sets up 5 test doubles (for example `a double assigned in a shared setup`) against 0 real object(s) of its own, and its only verification is 6 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: registers gamelet close cleanup with the module subscription scope packages/plugin-sdk-tamagotchi/src/index.test.ts:313— This test sets up 6 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: registers a toolset prompt before module-scoped tools through the tool helper packages/plugin-sdk-tamagotchi/src/index.test.ts:394— This test sets up 4 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 4 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: normalizes shorthand toolset prompts before registration packages/plugin-sdk-tamagotchi/src/index.test.ts:448— This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: allows gamelet and tool kits to be composed without coupling tool registration to gamelets packages/plugin-sdk-tamagotchi/src/index.test.ts:562— This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 4 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: applies the first pose and only publishes the newest catch-up frame packages/model-driver-magic-live2d/src/driver.test.ts:25— This test sets up 4 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 5 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: filters the newest catch-up pose once per display update packages/model-driver-magic-live2d/src/driver.test.ts:52— This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: skips generated mouth opening by default packages/model-driver-magic-live2d/src/driver.test.ts:74— This test sets up 4 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: publishes generated mouth opening when the output is enabled packages/model-driver-magic-live2d/src/driver.test.ts:88— This test sets up 4 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Mock-dominated test: rebinds repeated CrossWS opens with the same id to the newest raw peer packages/better-ws/src/index.test.ts:450— This test sets up 4 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
Duplicated predicate apps/stage-tamagotchi-kirie/src-godot/scripts/ChatWindowManager.cs:62— `_window is null || !GodotObject.IsInstanceValid(_window) || _window.IsQueuedForDeletion()` appears character-identically in 4 files — apps/stage-tamagotchi-kirie/src-godot/scripts/ChatWindowManager.cs, apps/stage-tamagotchi-kirie/src-godot/scripts/OnboardingWindowManager.cs, apps/stage-tamagotchi-kirie/src-godot/scripts/SettingsWindowManager.cs, apps/stage-tamagotchi-kirie/src-godot/scripts/spotlight-host.cs. 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 packages/stage-ui/src/stores/modules/consciousness.ts:147— `!!activeProvider.value && !!activeModel.value` appears character-identically in 2 files — packages/stage-ui/src/stores/modules/consciousness.ts, packages/stage-ui/src/stores/modules/vision/store.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 packages/stage-layouts/src/composables/theme-color.ts:47— `!('document' in globalThis) || globalThis.document == null` appears character-identically in 2 files — packages/stage-layouts/src/composables/theme-color.ts, packages/stage-ui/src/libs/color-from-element.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 packages/pipelines-audio/src/audio-input.ts:169— `!Number.isFinite(maxBufferedMs) || maxBufferedMs <= 0` appears character-identically in 3 files — packages/pipelines-audio/src/audio-input.ts, packages/pipelines-audio/src/capture.ts, packages/pipelines-audio/src/observe.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 packages/stage-ui-three/src/composables/render-target.ts:70— `!Number.isFinite(scaleX) || !Number.isFinite(scaleY)` appears character-identically in 2 files — packages/stage-ui-three/src/composables/render-target.ts, packages/stage-ui/src/composables/canvas-alpha.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 apps/stage-tamagotchi-kirie/src-web/src/shared/utils/electron/windows/window-size.ts:33— `!Number.isFinite(width) || width <= 0 || !Number.isFinite(height) || height <= 0` appears character-identically in 2 files — apps/stage-tamagotchi-kirie/src-web/src/shared/utils/electron/windows/window-size.ts, apps/stage-tamagotchi/src/shared/utils/electron/windows/window-size.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 packages/stage-ui/src/libs/providers/providers/aliyun-nls/index.ts:49— `!accessKeyId || !accessKeySecret || !appKey` appears character-identically in 2 files — packages/stage-ui/src/libs/providers/providers/aliyun-nls/index.ts, server/apps/api/src/routes/audio-transcription-stream/route.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 packages/pipelines-audio/src/processors/tts-chunker.ts:119— `!afterNext.done && afterNext.value && afterNext.value === '.'` appears character-identically in 2 files — packages/pipelines-audio/src/processors/tts-chunker.ts, packages/stage-ui/src/utils/tts.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 server/apps/api/src/middlewares/rate-limit.ts:99— `!clientAddress || isIP(clientAddress) === 0` appears character-identically in 2 files — server/apps/api/src/middlewares/rate-limit.ts, server/apps/auth/src/rate-limit.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 services/computer-use-mcp/src/remote/ssh.ts:12— `!config.remoteSshHost || !config.remoteSshUser` appears character-identically in 2 files — services/computer-use-mcp/src/remote/ssh.ts, services/computer-use-mcp/src/runner/client.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate apps/stage-tamagotchi/src/main/windows/dashboard/index.ts:90— `!config.windows || !Array.isArray(config.windows)` appears character-identically in 2 files — apps/stage-tamagotchi/src/main/windows/dashboard/index.ts, apps/stage-tamagotchi/src/main/windows/main/index.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/settings/models/godot-view-patch-queue.ts:144— `!disposed && generation === sendGeneration` appears character-identically in 2 files — apps/stage-tamagotchi-kirie/src-web/src/renderer/pages/settings/models/godot-view-patch-queue.ts, apps/stage-tamagotchi/src/renderer/pages/settings/models/godot-view-patch-queue.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 integrations/minecraft/src/skills/actions/world-interactions.ts:160— `!dontMoveFor.includes(blockType) && (pos.distanceTo(targetBlock.position) < 1 || posAbove.distanceTo(targetBlock.position) < 1)` appears character-identically in 2 files — integrations/minecraft/src/skills/actions/world-interactions.ts, integrations/minecraft/src/skills/blocks.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 apps/stage-web/vite.config.ts:330— `!env.S3_ENDPOINT || !env.S3_ACCESS_KEY_ID || !env.S3_SECRET_ACCESS_KEY` appears character-identically in 2 files — apps/stage-web/vite.config.ts, packages/stage-ui/vite.config.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 apps/stage-tamagotchi-kirie/src-web/src/renderer/composables/model-settings-runtime-snapshot.ts:44— `!event.body || runtimeSnapshot.value.ownerInstanceId !== event.body.ownerInstanceId` appears character-identically in 2 files — apps/stage-tamagotchi-kirie/src-web/src/renderer/composables/model-settings-runtime-snapshot.ts, apps/stage-tamagotchi/src/renderer/composables/model-settings-runtime-snapshot.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 apps/stage-tamagotchi-kirie/src-web/src/renderer/widgets/extension-ui/composables/use-iframe-message-port.ts:167— `!event.body || typeof event.body !== 'object' || Array.isArray(event.body)` appears character-identically in 2 files — apps/stage-tamagotchi-kirie/src-web/src/renderer/widgets/extension-ui/composables/use-iframe-message-port.ts, apps/stage-tamagotchi/src/renderer/widgets/extension-ui/composables/use-iframe-message-port.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 packages/provider-inference/src/providers/cloud/google-gemini-audio-speech/index.ts:77— `!init?.body || typeof init.body !== 'string'` appears character-identically in 6 files — packages/provider-inference/src/providers/cloud/google-gemini-audio-speech/index.ts, packages/provider-inference/src/providers/cloud/mimo-audio/index.ts, packages/provider-inference/src/providers/cloud/minimax-speech/index.ts, packages/provider-inference/src/providers/cloud/openrouter-audio-speech/index.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate apps/stage-tamagotchi-kirie/src-web/src/renderer/widgets/extension-ui/components/iframe-request.ts:98— `!input.shouldHandle(request) || handledRequestIds.has(request.requestId)` appears character-identically in 2 files — apps/stage-tamagotchi-kirie/src-web/src/renderer/widgets/extension-ui/components/iframe-request.ts, apps/stage-tamagotchi/src/renderer/widgets/extension-ui/components/iframe-request.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 packages/stage-ui-mmd/src/composables/mmd/blink.ts:32— `!isBlinking.value && timeSinceLastBlink.value >= nextBlinkTime.value` appears character-identically in 2 files — packages/stage-ui-mmd/src/composables/mmd/blink.ts, packages/stage-ui-three/src/composables/vrm/animation.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 packages/stage-ui/src/libs/providers/providers/apple-speech/index.ts:83— `!isStageTamagotchi() || typeof window === 'undefined' || !isElectronWindow(window) || window.platform !== 'darwin'` appears character-identically in 2 files — packages/stage-ui/src/libs/providers/providers/apple-speech/index.ts, packages/stage-ui/src/libs/providers/providers/apple-vision/index.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate apps/stage-tamagotchi-kirie/src-web/src/renderer/composables/use-onboarding-authentication.ts:55— `!needsLogin || options.isAuthenticated.value` appears character-identically in 2 files — apps/stage-tamagotchi-kirie/src-web/src/renderer/composables/use-onboarding-authentication.ts, apps/stage-tamagotchi/src/renderer/composables/use-onboarding-authentication.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 packages/pipelines-audio/src/processors/tts-chunker.ts:117— `!next.done && next.value && next.value === '.'` appears character-identically in 2 files — packages/pipelines-audio/src/processors/tts-chunker.ts, packages/stage-ui/src/utils/tts.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 apps/stage-tamagotchi-kirie/src-web/src/renderer/utils/stage-three-transparency.ts:17— `!params.stagePaused && params.componentState === 'mounted' && params.stageModelRenderer === 'vrm'` appears character-identically in 2 files — apps/stage-tamagotchi-kirie/src-web/src/renderer/utils/stage-three-transparency.ts, apps/stage-tamagotchi/src/renderer/utils/stage-three-transparency.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 services/computer-use-mcp/src/browser-dom/cdp-bridge.ts:220— `!this.socket || this.socket.readyState !== WebSocket.OPEN` appears character-identically in 2 files — services/computer-use-mcp/src/browser-dom/cdp-bridge.ts, services/computer-use-mcp/src/browser-dom/extension-bridge.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 apps/stage-tamagotchi-kirie/src-web/src/renderer/stores/tools/builtin/widgets.ts:239— `!value || typeof value !== 'object' || Array.isArray(value)` appears character-identically in 5 files — apps/stage-tamagotchi-kirie/src-web/src/renderer/stores/tools/builtin/widgets.ts, services/computer-use-mcp/src/browser-dom/extension-bridge.ts, services/computer-use-mcp/src/server/register-tools.ts, services/computer-use-mcp/src/server/register-vscode.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.
Silent fallback default in catch apps/stage-tamagotchi/scripts/linux-window-render-smoke.ts:313— `readStageProcesses` 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 apps/stage-tamagotchi/scripts/regenerate-windows-latest.ts:53— `readExistingUpdateInfo` 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:1148— `readCurrentTurn` 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 integrations/minecraft/src/cognitive/conscious/js-planner-worker.ts:99— `readMemSnapshot` 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 integrations/twitter-services/src/parsers/profile-parser.ts:290— `parseStatNumber` 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 packages/core-agent/src/runtime/response-categoriser.ts:410— `createStreamingCategorizer.filterToSpeech` 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:185— `absoluteUrlError` swallows every exception into `return 'Base URL is not absolute. Try to include a scheme (http:// or https://).'` — 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 packages/stage-pages/src/pages/devtools/context-flow/composables/use-context-flow-formatters.ts:54— `summarizeContextUpdate` swallows every exception into `return '[unserializable]'` — 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 packages/stage-ui/src/stores/tool-cards.ts:75— `readStoredCards` 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 packages/stage-ui/src/libs/inference/transformers-cache.ts:44— `getModelCacheSize` 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 server/apps/api/src/services/domain/llm-router/router.ts:103— `deriveProviderTag` swallows every exception into `return 'unknown'` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch services/computer-use-mcp/src/bin/e2e-airi-chat-observable.ts:260— `readRootEnvValues` 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 services/computer-use-mcp/src/bin/e2e-airi-chat-terminal-self-acquire.ts:169— `readRootEnvValues` 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 services/computer-use-mcp/src/bin/e2e-airi-discord-agentic.ts:330— `readRootEnvValues` 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 services/computer-use-mcp/src/bin/e2e-airi-discord-observable.ts:282— `readRootEnvValues` 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.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 81 significant file(s) lose their only recent owner: packages/stage-ui/src/components/data-pane/color-picker.vue, packages/plugin-sdk/src/plugin-host/runtimes/shared/services/kit-api-bindings.ts, packages/stage-ui/src/components/scenarios/dialogs/model-selector/reports/live2d/content.vue, packages/stage-ui/src/libs/providers/providers/aliyun-nls/provider.ts, packages/plugin-sdk/src/plugin-host/runtimes/shared/services/permissions.ts, packages/scenarios-stage-tamagotchi-electron/src/scenarios/display-model-from-file.ts, apps/stage-tamagotchi/src/renderer/stores/tools/builtin/widgets.ts, packages/testing-audio/src/setup/session.ts (+73 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 39 significant file(s) lose their only recent owner: server/apps/api/src/services/domain/llm-router/router.ts, server/apps/api/src/routes/openai/v1/operations/chat-completions/index.ts, server/apps/api/src/services/domain/billing/billing-service.ts, server/apps/api/src/routes/openai/v1/operations/responses/index.ts, packages/stage-ui/src/libs/chat-sync/ws-client.ts, packages/stage-layouts/src/components/Layouts/mobile-settings-drawer.vue, packages/stage-ui/src/libs/chat-sync/cloud-mapper.ts, server/apps/auth/src/email.ts (+31 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 11 significant file(s) lose their only recent owner: integrations/minecraft/src/cognitive/conscious/brain.ts, integrations/minecraft/src/cognitive/reflex/runtime.ts, integrations/minecraft/src/debug/types.ts, integrations/minecraft/src/cognitive/conscious/prompts/brain-prompt.ts, integrations/minecraft/src/cognitive/reflex/reflex-manager.ts, integrations/minecraft/src/debug/debug-service.ts, integrations/minecraft/src/cognitive/reflex/context.ts, integrations/minecraft/src/cognitive/perception/gaze.ts (+3 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #4 — If anonymized user #4 becomes unavailable, 6 significant file(s) lose their only recent owner: services/computer-use-mcp/src/state.ts, apps/stage-tamagotchi/src/renderer/pages/desktop-overlay.vue, services/computer-use-mcp/src/chrome-semantic-adapter.ts, REDACTED, services/computer-use-mcp/src/desktop-grounding-types.ts, services/computer-use-mcp/src/server.ts. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #5 — If anonymized user #5 becomes unavailable, 3 significant file(s) lose their only recent owner: packages/stage-pages/src/pages/settings/providers/speech/elevenlabs.vue, packages/stage-pages/src/pages/settings/providers/speech/alibaba-cloud-model-studio.vue, packages/stage-pages/src/pages/settings/providers/speech/volcengine.vue. Pair on, review, or document these before any departure.
Fat interface: ChatHookRegistry (21 required operations) packages/core-agent/src/contracts/hook-types.ts:5— `ChatHookRegistry` declares 21 required operations: `onBeforeMessageComposed`, `onAfterMessageComposed`, `onBeforeSend`, `onAfterSend`, `onTokenLiteral`, `onTokenSpecial`, `onStreamEnd`, `onAssistantResponseEnd`, `onAssistantMessage`, `onChatTurnComplete`, `emitBeforeMessageComposedHooks`, `emitAfterMessageComposedHooks`, `emitBeforeSendHooks`, `emitAfterSendHooks`, `emitTokenLiteralHooks`, `emitTokenSpecialHooks`, `emitStreamEndHooks`, `emitAssistantResponseEndHooks`, `emitAssistantMessageHooks`, `emitChatTurnCompleteHooks`, `clearHooks`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: AgentHookRegistry (21 required operations) packages/core-agent/src/contracts/hook-types.ts:32— `AgentHookRegistry` declares 21 required operations: `onBeforeMessageComposed`, `onAfterMessageComposed`, `onBeforeSend`, `onAfterSend`, `onTokenLiteral`, `onTokenSpecial`, `onStreamEnd`, `onAssistantResponseEnd`, `onAssistantMessage`, `onChatTurnComplete`, `emitBeforeMessageComposedHooks`, `emitAfterMessageComposedHooks`, `emitBeforeSendHooks`, `emitAfterSendHooks`, `emitTokenLiteralHooks`, `emitTokenSpecialHooks`, `emitStreamEndHooks`, `emitAssistantResponseEndHooks`, `emitAssistantMessageHooks`, `emitChatTurnCompleteHooks`, `clearHooks`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: MathLocale (51 required operations) packages/speech-transformer-math/src/locale.ts:59— `MathLocale` declares 51 required operations: `join`, `number`, `letter`, `letterCase`, `clauses`, `cases`, `matrix`, `list`, `fraction`, `derivative`, `power`, `squared`, `cubed`, `degrees`, `prime`, `superscript`, `apply`, `upTo`, `numberIndex`, `index`, `subscript`, `root`, `inverse`, `given`, `modulo`, `congruent`, `ordinal`, `limit`, `arrow`, `norm`, `statistic`, `about`, `distributed`, `ceil`, `floor`, `tuple`, `bracket`, `mapping`, `bigOperator`, `absolute`, and 11 more. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
DM9 · Scattered domain decisions· Rule about [x, y] decided in 2 places · ×2
Rule about [x, y] decided in 2 places — apps.stage-tamagotchi-kirie.src-web.src.renderer.pages.desktop-overlay-coordinates.Point's [x, y] are judged in apps.stage-tamagotchi-kirie.src-web.src.renderer.pages.desktop-overlay-coordinates, apps.stage-tamagotchi.src.renderer.pages.desktop-overlay-coordinates — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
Rule about [x, y] decided in 2 places — apps.stage-tamagotchi-kirie.src-web.src.renderer.pages.desktop-overlay-coordinates.Rect's [x, y] are judged in apps.stage-tamagotchi-kirie.src-web.src.renderer.pages.desktop-overlay-coordinates, apps.stage-tamagotchi.src.renderer.pages.desktop-overlay-coordinates — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
README/code drift docs/README.fr.md:272— docs/README.fr.md links to `./.github/CONTRIBUTING.md`, but `docs/.github/CONTRIBUTING.md` does not exist. 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 packages/ui/README.md:58— packages/ui/README.md links to `src/components/Animations/TransitionVertical.vue`, but `packages/ui/src/components/Animations/TransitionVertical.vue` does not exist. 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.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 7 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 (150 single-owned of 1584 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; 1584 of the 3301 production source files in this repository met that bar). They are 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)), anonymized user #11 (1 file(s)) (+1 more) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: engines/stage-tamagotchi-godot/scripts/StageRoot.cs, engines/stage-tamagotchi-godot/scripts/visuals/StageVisualPreset.cs, packages/stage-ui-tachie/src/utils/tachie-archive.ts, packages/stage-ui-tachie/src/components/scenes/tachie/model.vue, packages/cap-vite/src/index.ts, apps/stage-pocket/android/app/build.gradle.kts, apps/stage-tamagotchi/src/renderer/composables/use-screen-ambient-light.ts, apps/stage-tamagotchi/src/renderer/components/stage-islands/controls-island/use-controls-island-layout.ts (+2 more).
D34 · Knowledge Freshness· Further orphaned files (smaller) · ×1
Further orphaned files (smaller) — 45 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: engines/stage-tamagotchi-godot/scripts/visuals/StagePostProcessCompositorEffect.Shaders.cs, engines/stage-tamagotchi-godot/scripts/transport/StageViewJson.cs, apps/stage-tamagotchi/src/renderer/widgets/artistry/components/Comfy.vue, engines/stage-tamagotchi-godot/scripts/dev/StageDevObservationAdapter.cs, packages/stage-ui/src/components/scenarios/settings/model-settings/mmd.vue, engines/stage-tamagotchi-godot/scripts/scene/StageSceneController.cs, engines/stage-tamagotchi-godot/scripts/view/StageCameraPoseController.cs, engines/stage-tamagotchi-godot/scripts/visuals/StagePostProcessCompositorEffect.cs (and 37 more) (46 orphaned of 1585 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; 1585 of the 3301 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.
DM9 · Scattered domain decisions· Rule about [id, type] decided in 2 places · ×1
Rule about [id, type] decided in 2 places — integrations.minecraft.src.cognitive.types.BotEventSource's [id, type] are judged in integrations.minecraft.src.cognitive.conscious.brain, integrations.minecraft.src.cognitive.conscious.brain.Brain — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions· Rule about [height, width] decided in 2 places · ×1
Rule about [height, width] decided in 2 places — services.computer-use-mcp.src.types.Bounds's [height, width] are judged in services.computer-use-mcp.src.preflight, services.computer-use-mcp.src.runtime-probes — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions· Rule about [x, y] decided in 3 places · ×1
Rule about [x, y] decided in 3 places — services.computer-use-mcp.src.types.Bounds's [x, y] are judged in services.computer-use-mcp.src.chrome-semantic-adapter, services.computer-use-mcp.src.policy, services.computer-use-mcp.src.snap-resolver — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
No SAST — No static application security testing detected. For this repository's stack, add CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security as a CI step. What was searched, so you can tell an absence from a miss: the 147927 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.
No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
R8 · Dependency Hygiene· Type-only dependency '@xsai/shared-chat' in production deps · ×1
Type-only dependency '@xsai/shared-chat' in production deps apps/component-calling/src/pages/index.vue:2— Every import is type-only — move it to devDependencies.
X2 · Cancellation propagation· Not all async methods take a CancellationToken · ×1
Not all async methods take a CancellationToken — Only 2/6 async methods accept a CancellationToken, so in-flight work can't be stopped early when the caller gives up — whatever ends it in your host (shutdown signal, timeout, abandoned request, user cancel). Thread a token through the call chain and honour it at each await and loop; where a method genuinely cannot be interrupted, omitting it is a deliberate choice — judge against your hosting model.
Nullable reference types not enabled everywhere — 1/2 NRT-eligible project(s) enable <Nullable>enable</Nullable> (projects targeting a pre-C#-8 framework are excluded — NRTs aren't available there). NRTs catch a whole class of null-deref bugs at compile time.
Null-forgiving operator (`!`) suppressions reduce the NRT score — ~0.3 `!` suppressions per 1k syntax nodes — 6 suppression(s) across the 18231 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.
Skipped (documented): (unnamed test) server/apps/api/src/services/domain/billing/tests/flux-usage-concurrency.test.ts:38— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): ends a finished message by judgement and reuses the speculative rewrite packages/testing-audio/cases/voice-end-latency/case.audio.web.test.ts:23— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): keeps two utterances in transcription packages/testing-audio/cases/two-utterance-streaming/case.audio.test.ts:9— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): keeps two Aliyun NLS utterances in transcription packages/testing-audio/cases/two-utterance-streaming/case.audio.test.ts:54— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): runs an OpenAI-compatible request through the complete pipeline packages/testing-audio/cases/single-utterance-pipeline/case.audio.test.ts:10— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): transcribes the greeting with Aliyun NLS packages/testing-audio/cases/single-utterance-pipeline/case.audio.test.ts:95— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): preserves the complete phrase after long leading silence packages/testing-audio/cases/long-leading-silence/case.audio.test.ts:9— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): still truncates the phrase with Aliyun NLS packages/testing-audio/cases/long-leading-silence/case.audio.test.ts:48— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): sends formulas in an assistant reply to TTS as spoken words, not as TeX packages/testing-audio/cases/formula-speech/case.audio.test.ts:41— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): (unnamed test) apps/stage-tamagotchi/src/main/services/airi/computer-use/runtime.test.ts:61— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Off the main sequence: @proj-airi/auth-shared — @proj-airi/auth-shared: abstractness 0.00, instability 0.00, distance 1.00 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
Off the main sequence: @proj-airi/http-error-shared — @proj-airi/http-error-shared: abstractness 0.00, instability 0.00, distance 1.00 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
Off the main sequence: @proj-airi/server-sdk-shared — @proj-airi/server-sdk-shared: abstractness 0.00, instability 0.00, distance 1.00 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
Off the main sequence: @proj-airi/server-shared — @proj-airi/server-shared: abstractness 0.00, instability 0.17, distance 0.83 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
Off the main sequence: @proj-airi/stage-shared — @proj-airi/stage-shared: abstractness 0.21, instability 0.00, distance 0.79 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
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.
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 124 file(s) — `apps/stage-tamagotchi-kirie/src-godot/scripts/AiriDesktopContracts.cs`, `apps/stage-tamagotchi-kirie/src-godot/scripts/auth-service.cs`, `apps/stage-tamagotchi-kirie/src-godot/scripts/widget-contracts.cs`, `apps/stage-tamagotchi-kirie/src-godot/scripts/widget-window-manager.cs`, `apps/stage-tamagotchi-kirie/src-web/src/renderer/components/chat-tool-renderers/weather-tool-call-widget.ts`, … (+119 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
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.
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.
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.
Run 01a178e3-93cb-72bb-986e-7cfcadfaee74 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 320 · Warnings: 1231 · Recommendations: 190 · Info: 15 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 26-10-2026 @ 15:45 UTC.
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.