Public report of ruvnet/ruflo, 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). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 26 October 2026, 14:22 UTC · Survey ID cd_019aee17495e4a728f222746dc2d51fe
ruvnet/ruflo
Measured 26 October 2026, 14:09 UTC, at code version 9d854dd
Regression: 3 dimensions fell since the last survey
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.
CAI scoreAt riskDown 3 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 very large codebase: 684,557 lines of product code in 59 projects, tests not counted · Estimated rebuild effort: about 8.2 person-years · Weakest lens: Production Readiness, 45
Findings by how serious they are
742 critical3348 serious1177 minor
11 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, 14:09 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.
A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.
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 ▸
108of 108 dimensions measured by tools.
5230of 5267 findings point to an exact file and line, so you can open each one in the code. The other 37 concern the repository as a whole, such as missing documentation.
108dimensions across 8 lenses, read from 684,557 lines of product code in 59 projects.
ruvnet/ruflo is rated At risk because critical security findings are open. Its score is held back because three passwords or keys sit in the current code and it has uses of packages that aren't listed. It scores 49 out of 100, which the At risk rating leaves unchanged. We judged it as a template or a sample, against a lower bar.
Production Readiness, at 45, is the weakest lens and counts most in the score. The best first step is replacing the three exposed passwords or keys and switching the old ones off, worth about 4 points. Making the two tests that check nothing check their results comes next, worth about 2 points. Raising Production Readiness to 52 would lift the score to about 51.
314 pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. 156 known security holes in the packages the code depends on can be used by attackers, and 136 passwords or keys in the code's history and three in the code are open to anyone who can read the repository. Pinning each tool to an exact version, updating the vulnerable packages and replacing each exposed password or key would close these risks. Fixing the weaknesses the scanner points to would fix the 23 security weaknesses in the code, and the 24 places where the code runs text as code or as a command need a direct call instead. The 13 form fields without a label need a label.
The product code is 684,557 lines, about €1,200,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 45 to 52, the lowest score rated Strong, the score would rise from 49 to about 51.
Code composition: what the lines of code are
Product code 72%Tests 28%
New since the last survey: 602 findings
These 602 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.
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: 3732 findings
These 3732 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.
Code Duplication · Duplicated block with local edits (89 matched lines × 2 locations) v3/@claude-flow/neural/src/algorithms/decision-transformer.ts
Rebuild cost: about €1,200,000 · Estimate
Cost to rebuild
€400,000 to €2,000,000, for 6,595 to 20,921 hours of work, about 8.2 person-years for 4 to 16 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 49. 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
Very large: 684,557 lines of product code
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. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Resolve the 3 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (2), REDACTED.
Resolve the 2 No assertions (empty test) finding(s) in Test Quality — start with ruvector-integration.test.ts (2).
Raises the score by about 2 points · Low effort · Test Quality
3
Resolve the 3 Test suite cannot be installed from its own lockfile finding(s) in Test Reliability.
Raises the score by about 2 points · Low effort · Test Reliability
Diagnosis: what the measurements show together
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €1,200,000 to build again, about 8.2 person-years of work. Its weakest lens is Production Readiness, at 45 (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.
One cause behind 13 Domain Modelling findings · Common cause
13 findings in the Domain Modelling lens come from the same cause. The code models the business as objects, such as an order or a customer, and each object should guard its own rules: an order, for example, should refuse to be shipped before it has been paid. Here the objects don't do that. Some objects only hold data, while the rules that should keep that data valid sit elsewhere in the code. Identifiers, such as order numbers and customer numbers, are passed around as plain numbers or text, so nothing stops the code from using one kind where another belongs. Because all of these findings have the same cause, fixing it once, in the business objects themselves, deals with them together.
Based on: Rich vs anemic model (2 findings) · Strongly-typed ids (11 findings)
What to do: Give each business object the methods that enforce its rules, such as a method for shipping an order that first checks it has been paid, and let only those methods change its data. Give each kind of identifier a type of its own, so an order number can't be used where a customer number belongs.
If you do one thing first · First action
Resolve the 3 Leaked secret finding(s) in REDACTED Scanning. Of all the actions in this report, it raises the score most for the work it takes: about 4 points for low effort, because it clears the 3 REDACTED Scanning findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.7 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 3% to 7% on every change. The history of the code shows how much it changes: about 416,619 lines over the last 90 days, which is about 1,689,622 lines a year. At that pace, the extra work comes to an estimated 139.2 to 835.3 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of Watchdog's own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture — 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.
1563 modules, with 2593 dependencies between them. 5 loops run through 10 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 1523 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.
v3.@claude-flow.claims.src.domain.types uses v3.@claude-flow.claims.src.api.mcp-tools, so a change to v3.@claude-flow.claims.src.api.mcp-tools can break v3.@claude-flow.claims.src.domain.types, while a change to v3.@claude-flow.claims.src.domain.types can't break v3.@claude-flow.claims.src.api.mcp-tools.
Position
Below the diagonal: v3.@claude-flow.claims.src.domain.types uses a module listed above it, which is the healthy direction.
v3.@claude-flow.guidance.src uses v3.@claude-flow.cli-core.src.memory.backend, so a change to v3.@claude-flow.cli-core.src.memory.backend can break v3.@claude-flow.guidance.src, while a change to v3.@claude-flow.guidance.src can't break v3.@claude-flow.cli-core.src.memory.backend.
Position
Below the diagonal: v3.@claude-flow.guidance.src uses a module listed above it, which is the healthy direction.
v3.@claude-flow.guidance.src uses v3.@claude-flow.hooks.src.types, so a change to v3.@claude-flow.hooks.src.types can break v3.@claude-flow.guidance.src, while a change to v3.@claude-flow.guidance.src can't break v3.@claude-flow.hooks.src.types.
Position
Below the diagonal: v3.@claude-flow.guidance.src uses a module listed above it, which is the healthy direction.
v3.@claude-flow.mcp.src.types uses v3.@claude-flow.claims.src.api.mcp-tools, so a change to v3.@claude-flow.claims.src.api.mcp-tools can break v3.@claude-flow.mcp.src.types, while a change to v3.@claude-flow.mcp.src.types can't break v3.@claude-flow.claims.src.api.mcp-tools.
Position
Below the diagonal: v3.@claude-flow.mcp.src.types uses a module listed above it, which is the healthy direction.
v3.@claude-flow.memory.src.types uses v3.@claude-flow.cli-core.src.memory.backend, so a change to v3.@claude-flow.cli-core.src.memory.backend can break v3.@claude-flow.memory.src.types, while a change to v3.@claude-flow.memory.src.types can't break v3.@claude-flow.cli-core.src.memory.backend.
Position
Below the diagonal: v3.@claude-flow.memory.src.types uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in v3.@claude-flow.plugin-agent-federation.src.application.federation-coordinator uses a type in v3.@claude-flow.cli.src.transfer.types.
v3.@claude-flow.plugin-agent-federation.src.application.federation-coordinator uses v3.@claude-flow.cli.src.transfer.types, so a change to v3.@claude-flow.cli.src.transfer.types can break v3.@claude-flow.plugin-agent-federation.src.application.federation-coordinator, while a change to v3.@claude-flow.plugin-agent-federation.src.application.federation-coordinator can't break v3.@claude-flow.cli.src.transfer.types.
Position
Below the diagonal: v3.@claude-flow.plugin-agent-federation.src.application.federation-coordinator uses a module listed above it, which is the healthy direction.
v3.@claude-flow.swarm.src.domain.entities.task uses plugins.ruflo-console.hooks.mission-context, so a change to plugins.ruflo-console.hooks.mission-context can break v3.@claude-flow.swarm.src.domain.entities.task, while a change to v3.@claude-flow.swarm.src.domain.entities.task can't break plugins.ruflo-console.hooks.mission-context.
Position
Below the diagonal: v3.@claude-flow.swarm.src.domain.entities.task uses a module listed above it, which is the healthy direction.
v3.plugins.prime-radiant.src.types uses v3.@claude-flow.cli-core.src.memory.backend, so a change to v3.@claude-flow.cli-core.src.memory.backend can break v3.plugins.prime-radiant.src.types, while a change to v3.plugins.prime-radiant.src.types can't break v3.@claude-flow.cli-core.src.memory.backend.
Position
Below the diagonal: v3.plugins.prime-radiant.src.types uses a module listed above it, which is the healthy direction.
v3.plugins.prime-radiant.src.types uses v3.mcp.tools.memory-tools, so a change to v3.mcp.tools.memory-tools can break v3.plugins.prime-radiant.src.types, while a change to v3.plugins.prime-radiant.src.types can't break v3.mcp.tools.memory-tools.
Position
Below the diagonal: v3.plugins.prime-radiant.src.types uses a module listed above it, which is the healthy direction.
v3.@claude-flow.cli.src.commands uses v3.@claude-flow.claims.src.api.cli-types, so a change to v3.@claude-flow.claims.src.api.cli-types can break v3.@claude-flow.cli.src.commands, while a change to v3.@claude-flow.cli.src.commands can't break v3.@claude-flow.claims.src.api.cli-types.
Position
Below the diagonal: v3.@claude-flow.cli.src.commands uses a module listed above it, which is the healthy direction.
v3.@claude-flow.cli.src.commands uses v3.@claude-flow.claims.src.domain.types, so a change to v3.@claude-flow.claims.src.domain.types can break v3.@claude-flow.cli.src.commands, while a change to v3.@claude-flow.cli.src.commands can't break v3.@claude-flow.claims.src.domain.types.
Position
Below the diagonal: v3.@claude-flow.cli.src.commands uses a module listed above it, which is the healthy direction.
v3.@claude-flow.cli.src.mcp-tools uses v3.@claude-flow.claims.src.api.cli-types, so a change to v3.@claude-flow.claims.src.api.cli-types can break v3.@claude-flow.cli.src.mcp-tools, while a change to v3.@claude-flow.cli.src.mcp-tools can't break v3.@claude-flow.claims.src.api.cli-types.
Position
Below the diagonal: v3.@claude-flow.cli.src.mcp-tools uses a module listed above it, which is the healthy direction.
v3.@claude-flow.cli.src.mcp-tools uses v3.@claude-flow.cli-core.src.memory.backend, so a change to v3.@claude-flow.cli-core.src.memory.backend can break v3.@claude-flow.cli.src.mcp-tools, while a change to v3.@claude-flow.cli.src.mcp-tools can't break v3.@claude-flow.cli-core.src.memory.backend.
Position
Below the diagonal: v3.@claude-flow.cli.src.mcp-tools uses a module listed above it, which is the healthy direction.
v3.@claude-flow.cli.src.mcp-tools uses v3.@claude-flow.claims.src.domain.types, so a change to v3.@claude-flow.claims.src.domain.types can break v3.@claude-flow.cli.src.mcp-tools, while a change to v3.@claude-flow.cli.src.mcp-tools can't break v3.@claude-flow.claims.src.domain.types.
Position
Below the diagonal: v3.@claude-flow.cli.src.mcp-tools uses a module listed above it, which is the healthy direction.
v3.@claude-flow.cli.src.services uses v3.@claude-flow.cli.src.services.harness-qualification, so a change to v3.@claude-flow.cli.src.services.harness-qualification can break v3.@claude-flow.cli.src.services, while a change to v3.@claude-flow.cli.src.services can't break v3.@claude-flow.cli.src.services.harness-qualification.
Position
Below the diagonal: v3.@claude-flow.cli.src.services uses a module listed above it, which is the healthy direction.
v3.@claude-flow.cli.src.services uses v3.@claude-flow.cli.src.services.headless-worker-executor, so a change to v3.@claude-flow.cli.src.services.headless-worker-executor can break v3.@claude-flow.cli.src.services, while a change to v3.@claude-flow.cli.src.services can't break v3.@claude-flow.cli.src.services.headless-worker-executor.
Position
Below the diagonal: v3.@claude-flow.cli.src.services uses a module listed above it, which is the healthy direction.
v3.@claude-flow.cli.src.services uses v3.@claude-flow.claims.src.domain.types, so a change to v3.@claude-flow.claims.src.domain.types can break v3.@claude-flow.cli.src.services, while a change to v3.@claude-flow.cli.src.services can't break v3.@claude-flow.claims.src.domain.types.
Position
Below the diagonal: v3.@claude-flow.cli.src.services uses a module listed above it, which is the healthy direction.
v3.@claude-flow.integration.src.agentic-flow-agent uses v3.@claude-flow.cli-core.src.types, so a change to v3.@claude-flow.cli-core.src.types can break v3.@claude-flow.integration.src.agentic-flow-agent, while a change to v3.@claude-flow.integration.src.agentic-flow-agent can't break v3.@claude-flow.cli-core.src.types.
Position
Below the diagonal: v3.@claude-flow.integration.src.agentic-flow-agent uses a module listed above it, which is the healthy direction.
v3.@claude-flow.integration.src.agentic-flow-agent uses v3.@claude-flow.swarm.src.domain.entities.agent, so a change to v3.@claude-flow.swarm.src.domain.entities.agent can break v3.@claude-flow.integration.src.agentic-flow-agent, while a change to v3.@claude-flow.integration.src.agentic-flow-agent can't break v3.@claude-flow.swarm.src.domain.entities.agent.
Position
Below the diagonal: v3.@claude-flow.integration.src.agentic-flow-agent uses a module listed above it, which is the healthy direction.
v3.@claude-flow.integration.src.agentic-flow-agent uses v3.@claude-flow.swarm.src.domain.entities.task, so a change to v3.@claude-flow.swarm.src.domain.entities.task can break v3.@claude-flow.integration.src.agentic-flow-agent, while a change to v3.@claude-flow.integration.src.agentic-flow-agent can't break v3.@claude-flow.swarm.src.domain.entities.task.
Position
Below the diagonal: v3.@claude-flow.integration.src.agentic-flow-agent uses a module listed above it, which is the healthy direction.
v3.@claude-flow.neural.src.types uses v3.@claude-flow.memory.src.types, so a change to v3.@claude-flow.memory.src.types can break v3.@claude-flow.neural.src.types, while a change to v3.@claude-flow.neural.src.types can't break v3.@claude-flow.memory.src.types.
Position
Below the diagonal: v3.@claude-flow.neural.src.types uses a module listed above it, which is the healthy direction.
v3.@claude-flow.plugins.src.integrations.ruvector.types uses v3.@claude-flow.memory.src.types, so a change to v3.@claude-flow.memory.src.types can break v3.@claude-flow.plugins.src.integrations.ruvector.types, while a change to v3.@claude-flow.plugins.src.integrations.ruvector.types can't break v3.@claude-flow.memory.src.types.
Position
Below the diagonal: v3.@claude-flow.plugins.src.integrations.ruvector.types uses a module listed above it, which is the healthy direction.
v3.@claude-flow.plugins.src.types uses v3.@claude-flow.claims.src.api.mcp-tools, so a change to v3.@claude-flow.claims.src.api.mcp-tools can break v3.@claude-flow.plugins.src.types, while a change to v3.@claude-flow.plugins.src.types can't break v3.@claude-flow.claims.src.api.mcp-tools.
Position
Below the diagonal: v3.@claude-flow.plugins.src.types uses a module listed above it, which is the healthy direction.
v3.@claude-flow.plugins.src.types uses v3.@claude-flow.hooks.src.types, so a change to v3.@claude-flow.hooks.src.types can break v3.@claude-flow.plugins.src.types, while a change to v3.@claude-flow.plugins.src.types can't break v3.@claude-flow.hooks.src.types.
Position
Below the diagonal: v3.@claude-flow.plugins.src.types uses a module listed above it, which is the healthy direction.
v3.@claude-flow.plugins.src.types uses v3.@claude-flow.mcp.src.types, so a change to v3.@claude-flow.mcp.src.types can break v3.@claude-flow.plugins.src.types, while a change to v3.@claude-flow.plugins.src.types can't break v3.@claude-flow.mcp.src.types.
Position
Below the diagonal: v3.@claude-flow.plugins.src.types uses a module listed above it, which is the healthy direction.
plugins.ruflo-console.hooks uses plugins.ruflo-console.hooks.mission-context, so a change to plugins.ruflo-console.hooks.mission-context can break plugins.ruflo-console.hooks, while a change to plugins.ruflo-console.hooks can't break plugins.ruflo-console.hooks.mission-context.
Position
Below the diagonal: plugins.ruflo-console.hooks uses a module listed above it, which is the healthy direction.
plugins.ruflo-console.hooks uses v3.@claude-flow.claims.src.domain.types, so a change to v3.@claude-flow.claims.src.domain.types can break plugins.ruflo-console.hooks, while a change to plugins.ruflo-console.hooks can't break v3.@claude-flow.claims.src.domain.types.
Position
Below the diagonal: plugins.ruflo-console.hooks uses a module listed above it, which is the healthy direction.
plugins.ruflo-console.hooks uses v3.@claude-flow.plugins.src.types, so a change to v3.@claude-flow.plugins.src.types can break plugins.ruflo-console.hooks, while a change to plugins.ruflo-console.hooks can't break v3.@claude-flow.plugins.src.types.
Position
Below the diagonal: plugins.ruflo-console.hooks uses a module listed above it, which is the healthy direction.
plugins.ruflo-console.hooks.data uses v3.mcp.tools.memory-tools, so a change to v3.mcp.tools.memory-tools can break plugins.ruflo-console.hooks.data, while a change to plugins.ruflo-console.hooks.data can't break v3.mcp.tools.memory-tools.
Position
Below the diagonal: plugins.ruflo-console.hooks.data uses a module listed above it, which is the healthy direction.
plugins.ruflo-console.hooks.data uses v3.@claude-flow.plugins.src.integrations.ruvector.types, so a change to v3.@claude-flow.plugins.src.integrations.ruvector.types can break plugins.ruflo-console.hooks.data, while a change to plugins.ruflo-console.hooks.data can't break v3.@claude-flow.plugins.src.integrations.ruvector.types.
Position
Below the diagonal: plugins.ruflo-console.hooks.data uses a module listed above it, which is the healthy direction.
plugins.ruflo-console.hooks.views uses v3.@claude-flow.plugins.src.integrations.ruvector.types, so a change to v3.@claude-flow.plugins.src.integrations.ruvector.types can break plugins.ruflo-console.hooks.views, while a change to plugins.ruflo-console.hooks.views can't break v3.@claude-flow.plugins.src.integrations.ruvector.types.
Position
Below the diagonal: plugins.ruflo-console.hooks.views uses a module listed above it, which is the healthy direction.
plugins.ruflo-console.hooks.views uses v3.@claude-flow.plugins.src.types, so a change to v3.@claude-flow.plugins.src.types can break plugins.ruflo-console.hooks.views, while a change to plugins.ruflo-console.hooks.views can't break v3.@claude-flow.plugins.src.types.
Position
Below the diagonal: plugins.ruflo-console.hooks.views uses a module listed above it, which is the healthy direction.
v3.@claude-flow.integration.src.worker-pool uses v3.@claude-flow.cli.src.services.headless-worker-executor, so a change to v3.@claude-flow.cli.src.services.headless-worker-executor can break v3.@claude-flow.integration.src.worker-pool, while a change to v3.@claude-flow.integration.src.worker-pool can't break v3.@claude-flow.cli.src.services.headless-worker-executor.
Position
Below the diagonal: v3.@claude-flow.integration.src.worker-pool uses a module listed above it, which is the healthy direction.
v3.@claude-flow.integration.src.worker-pool uses v3.@claude-flow.swarm.src.domain.entities.task, so a change to v3.@claude-flow.swarm.src.domain.entities.task can break v3.@claude-flow.integration.src.worker-pool, while a change to v3.@claude-flow.integration.src.worker-pool can't break v3.@claude-flow.swarm.src.domain.entities.task.
Position
Below the diagonal: v3.@claude-flow.integration.src.worker-pool uses a module listed above it, which is the healthy direction.
v3.@claude-flow.integration.src.worker-pool uses v3.@claude-flow.integration.src.agentic-flow-agent, so a change to v3.@claude-flow.integration.src.agentic-flow-agent can break v3.@claude-flow.integration.src.worker-pool, while a change to v3.@claude-flow.integration.src.worker-pool can't break v3.@claude-flow.integration.src.agentic-flow-agent.
Position
Below the diagonal: v3.@claude-flow.integration.src.worker-pool uses a module listed above it, which is the healthy direction.
v3.@claude-flow.swarm.src.types uses plugins.ruflo-console.hooks.mission-context, so a change to plugins.ruflo-console.hooks.mission-context can break v3.@claude-flow.swarm.src.types, while a change to v3.@claude-flow.swarm.src.types can't break plugins.ruflo-console.hooks.mission-context.
Position
Below the diagonal: v3.@claude-flow.swarm.src.types uses a module listed above it, which is the healthy direction.
v3.@claude-flow.swarm.src.types uses v3.@claude-flow.swarm.src.domain.entities.agent, so a change to v3.@claude-flow.swarm.src.domain.entities.agent can break v3.@claude-flow.swarm.src.types, while a change to v3.@claude-flow.swarm.src.types can't break v3.@claude-flow.swarm.src.domain.entities.agent.
Position
Below the diagonal: v3.@claude-flow.swarm.src.types uses a module listed above it, which is the healthy direction.
v3.@claude-flow.swarm.src.types uses v3.@claude-flow.claims.src.domain.types, so a change to v3.@claude-flow.claims.src.domain.types can break v3.@claude-flow.swarm.src.types, while a change to v3.@claude-flow.swarm.src.types can't break v3.@claude-flow.claims.src.domain.types.
Position
Below the diagonal: v3.@claude-flow.swarm.src.types uses a module listed above it, which is the healthy direction.
v3.@claude-flow.swarm.src.types uses v3.@claude-flow.swarm.src.domain.entities.task, so a change to v3.@claude-flow.swarm.src.domain.entities.task can break v3.@claude-flow.swarm.src.types, while a change to v3.@claude-flow.swarm.src.types can't break v3.@claude-flow.swarm.src.domain.entities.task.
Position
Below the diagonal: v3.@claude-flow.swarm.src.types uses a module listed above it, which is the healthy direction.
v3.@claude-flow.swarm.src.types uses v3.@claude-flow.integration.src.agentic-flow-agent, so a change to v3.@claude-flow.integration.src.agentic-flow-agent can break v3.@claude-flow.swarm.src.types, while a change to v3.@claude-flow.swarm.src.types can't break v3.@claude-flow.integration.src.agentic-flow-agent.
Position
Below the diagonal: v3.@claude-flow.swarm.src.types uses a module listed above it, which is the healthy direction.
36→39 v3.@claude-flow.swarm.src.types uses v3.@claude-flow.shared.src.typespart of a loop✕
Connections
7 pairs of types, where a type in v3.@claude-flow.swarm.src.types uses a type in v3.@claude-flow.shared.src.types.
v3.@claude-flow.swarm.src.types uses v3.@claude-flow.shared.src.types, so a change to v3.@claude-flow.shared.src.types can break v3.@claude-flow.swarm.src.types, while a change to v3.@claude-flow.swarm.src.types can't break v3.@claude-flow.shared.src.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.
v3.mcp.tools uses v3.@claude-flow.claims.src.api.mcp-tools, so a change to v3.@claude-flow.claims.src.api.mcp-tools can break v3.mcp.tools, while a change to v3.mcp.tools can't break v3.@claude-flow.claims.src.api.mcp-tools.
Position
Below the diagonal: v3.mcp.tools uses a module listed above it, which is the healthy direction.
v3.mcp.tools uses v3.@claude-flow.cli.src.services.harness-qualification, so a change to v3.@claude-flow.cli.src.services.harness-qualification can break v3.mcp.tools, while a change to v3.mcp.tools can't break v3.@claude-flow.cli.src.services.harness-qualification.
Position
Below the diagonal: v3.mcp.tools uses a module listed above it, which is the healthy direction.
v3.mcp.tools uses v3.@claude-flow.hooks.src.types, so a change to v3.@claude-flow.hooks.src.types can break v3.mcp.tools, while a change to v3.mcp.tools can't break v3.@claude-flow.hooks.src.types.
Position
Below the diagonal: v3.mcp.tools uses a module listed above it, which is the healthy direction.
v3.mcp.tools uses v3.@claude-flow.swarm.src.domain.entities.agent, so a change to v3.@claude-flow.swarm.src.domain.entities.agent can break v3.mcp.tools, while a change to v3.mcp.tools can't break v3.@claude-flow.swarm.src.domain.entities.agent.
Position
Below the diagonal: v3.mcp.tools uses a module listed above it, which is the healthy direction.
v3.mcp.tools uses v3.mcp.tools.memory-tools, so a change to v3.mcp.tools.memory-tools can break v3.mcp.tools, while a change to v3.mcp.tools can't break v3.mcp.tools.memory-tools.
Position
Below the diagonal: v3.mcp.tools uses a module listed above it, which is the healthy direction.
v3.mcp.tools uses v3.@claude-flow.memory.src.types, so a change to v3.@claude-flow.memory.src.types can break v3.mcp.tools, while a change to v3.mcp.tools can't break v3.@claude-flow.memory.src.types.
Position
Below the diagonal: v3.mcp.tools uses a module listed above it, which is the healthy direction.
v3.mcp.tools uses v3.@claude-flow.integration.src.agentic-flow-agent, so a change to v3.@claude-flow.integration.src.agentic-flow-agent can break v3.mcp.tools, while a change to v3.mcp.tools can't break v3.@claude-flow.integration.src.agentic-flow-agent.
Position
Below the diagonal: v3.mcp.tools uses a module listed above it, which is the healthy direction.
v3.@claude-flow.integration.src uses v3.@claude-flow.cli-core.src.types, so a change to v3.@claude-flow.cli-core.src.types can break v3.@claude-flow.integration.src, while a change to v3.@claude-flow.integration.src can't break v3.@claude-flow.cli-core.src.types.
Position
Below the diagonal: v3.@claude-flow.integration.src uses a module listed above it, which is the healthy direction.
v3.@claude-flow.integration.src uses v3.@claude-flow.cli.src.services.headless-worker-executor, so a change to v3.@claude-flow.cli.src.services.headless-worker-executor can break v3.@claude-flow.integration.src, while a change to v3.@claude-flow.integration.src can't break v3.@claude-flow.cli.src.services.headless-worker-executor.
Position
Below the diagonal: v3.@claude-flow.integration.src uses a module listed above it, which is the healthy direction.
v3.@claude-flow.integration.src uses v3.@claude-flow.integration.src.agentic-flow-agent, so a change to v3.@claude-flow.integration.src.agentic-flow-agent can break v3.@claude-flow.integration.src, while a change to v3.@claude-flow.integration.src can't break v3.@claude-flow.integration.src.agentic-flow-agent.
Position
Below the diagonal: v3.@claude-flow.integration.src uses a module listed above it, which is the healthy direction.
v3.@claude-flow.integration.src uses v3.@claude-flow.integration.src.worker-pool, so a change to v3.@claude-flow.integration.src.worker-pool can break v3.@claude-flow.integration.src, while a change to v3.@claude-flow.integration.src can't break v3.@claude-flow.integration.src.worker-pool.
Position
Below the diagonal: v3.@claude-flow.integration.src uses a module listed above it, which is the healthy direction.
v3.@claude-flow.shared.src.types uses plugins.ruflo-console.hooks.mission-context, so a change to plugins.ruflo-console.hooks.mission-context can break v3.@claude-flow.shared.src.types, while a change to v3.@claude-flow.shared.src.types can't break plugins.ruflo-console.hooks.mission-context.
Position
Below the diagonal: v3.@claude-flow.shared.src.types uses a module listed above it, which is the healthy direction.
v3.@claude-flow.shared.src.types uses v3.@claude-flow.swarm.src.domain.entities.agent, so a change to v3.@claude-flow.swarm.src.domain.entities.agent can break v3.@claude-flow.shared.src.types, while a change to v3.@claude-flow.shared.src.types can't break v3.@claude-flow.swarm.src.domain.entities.agent.
Position
Below the diagonal: v3.@claude-flow.shared.src.types uses a module listed above it, which is the healthy direction.
v3.@claude-flow.shared.src.types uses v3.@claude-flow.claims.src.domain.types, so a change to v3.@claude-flow.claims.src.domain.types can break v3.@claude-flow.shared.src.types, while a change to v3.@claude-flow.shared.src.types can't break v3.@claude-flow.claims.src.domain.types.
Position
Below the diagonal: v3.@claude-flow.shared.src.types uses a module listed above it, which is the healthy direction.
v3.@claude-flow.shared.src.types uses v3.@claude-flow.swarm.src.domain.entities.task, so a change to v3.@claude-flow.swarm.src.domain.entities.task can break v3.@claude-flow.shared.src.types, while a change to v3.@claude-flow.shared.src.types can't break v3.@claude-flow.swarm.src.domain.entities.task.
Position
Below the diagonal: v3.@claude-flow.shared.src.types uses a module listed above it, which is the healthy direction.
v3.@claude-flow.shared.src.types uses v3.@claude-flow.integration.src.worker-pool, so a change to v3.@claude-flow.integration.src.worker-pool can break v3.@claude-flow.shared.src.types, while a change to v3.@claude-flow.shared.src.types can't break v3.@claude-flow.integration.src.worker-pool.
Position
Below the diagonal: v3.@claude-flow.shared.src.types uses a module listed above it, which is the healthy direction.
v3.@claude-flow.shared.src.types uses v3.@claude-flow.swarm.src.types, so a change to v3.@claude-flow.swarm.src.types can break v3.@claude-flow.shared.src.types, while a change to v3.@claude-flow.shared.src.types can't break v3.@claude-flow.swarm.src.types.
Position
Below the diagonal: v3.@claude-flow.shared.src.types uses a module listed above it, which is the healthy direction.
v3.src.shared.types uses plugins.ruflo-console.hooks.mission-context, so a change to plugins.ruflo-console.hooks.mission-context can break v3.src.shared.types, while a change to v3.src.shared.types can't break plugins.ruflo-console.hooks.mission-context.
Position
Below the diagonal: v3.src.shared.types uses a module listed above it, which is the healthy direction.
v3.src.shared.types uses v3.@claude-flow.claims.src.api.cli-types, so a change to v3.@claude-flow.claims.src.api.cli-types can break v3.src.shared.types, while a change to v3.src.shared.types can't break v3.@claude-flow.claims.src.api.cli-types.
Position
Below the diagonal: v3.src.shared.types uses a module listed above it, which is the healthy direction.
v3.src.shared.types uses v3.@claude-flow.cli-core.src.memory.backend, so a change to v3.@claude-flow.cli-core.src.memory.backend can break v3.src.shared.types, while a change to v3.src.shared.types can't break v3.@claude-flow.cli-core.src.memory.backend.
Position
Below the diagonal: v3.src.shared.types uses a module listed above it, which is the healthy direction.
v3.src.shared.types uses v3.@claude-flow.swarm.src.domain.entities.agent, so a change to v3.@claude-flow.swarm.src.domain.entities.agent can break v3.src.shared.types, while a change to v3.src.shared.types can't break v3.@claude-flow.swarm.src.domain.entities.agent.
Position
Below the diagonal: v3.src.shared.types uses a module listed above it, which is the healthy direction.
v3.src.shared.types uses v3.mcp.tools.memory-tools, so a change to v3.mcp.tools.memory-tools can break v3.src.shared.types, while a change to v3.src.shared.types can't break v3.mcp.tools.memory-tools.
Position
Below the diagonal: v3.src.shared.types uses a module listed above it, which is the healthy direction.
v3.src.shared.types uses v3.@claude-flow.claims.src.domain.types, so a change to v3.@claude-flow.claims.src.domain.types can break v3.src.shared.types, while a change to v3.src.shared.types can't break v3.@claude-flow.claims.src.domain.types.
Position
Below the diagonal: v3.src.shared.types uses a module listed above it, which is the healthy direction.
v3.src.shared.types uses v3.@claude-flow.memory.src.types, so a change to v3.@claude-flow.memory.src.types can break v3.src.shared.types, while a change to v3.src.shared.types can't break v3.@claude-flow.memory.src.types.
Position
Below the diagonal: v3.src.shared.types uses a module listed above it, which is the healthy direction.
v3.src.shared.types uses v3.@claude-flow.swarm.src.domain.entities.task, so a change to v3.@claude-flow.swarm.src.domain.entities.task can break v3.src.shared.types, while a change to v3.src.shared.types can't break v3.@claude-flow.swarm.src.domain.entities.task.
Position
Below the diagonal: v3.src.shared.types uses a module listed above it, which is the healthy direction.
v3.src.shared.types uses v3.@claude-flow.integration.src.agentic-flow-agent, so a change to v3.@claude-flow.integration.src.agentic-flow-agent can break v3.src.shared.types, while a change to v3.src.shared.types can't break v3.@claude-flow.integration.src.agentic-flow-agent.
Position
Below the diagonal: v3.src.shared.types uses a module listed above it, which is the healthy direction.
v3.src.shared.types uses v3.@claude-flow.shared.src.types, so a change to v3.@claude-flow.shared.src.types can break v3.src.shared.types, while a change to v3.src.shared.types can't break v3.@claude-flow.shared.src.types.
Position
Below the diagonal: v3.src.shared.types uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 52% · Adequate · gated by D2, R3 ·
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
513
High / Critical
A03:2025 — Software Supply Chain Failures
268
High / Critical
A07:2025 — Authentication Failures
140
High / Critical
A02:2025 — Security Misconfiguration
65
High / Critical
Roadmap
Immediately resolve the three leaked secrets in REDACTED and REDACTED, then remove unused dependencies and explicitly declare unlisted imports to clean up the package configuration. Strengthen outbound HTTP resilience by adding timeouts, retries, and circuit breakers to all external calls, and fix the two empty tests in ruvector-integration.test.ts. Finally, address the three test suite installation failures to ensure reliable test execution.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 3 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (2), REDACTED.
Bound every outbound call: pass `signal: AbortSignal.timeout(ms)` to `fetch`, set `timeout` on the axios instance (`axios.create({ timeout })`), and add retries with back-off (`axios-retry`, `p-retry`) and a breaker (`opossum`, `cockatiel`) around dependencies that fail.
Fix the listed violations: import through the target package's declared public entry rather than a deep path into its internals or a relative path into its directory (163 rows); respect the layer/slice order — import only through a slice's public index and never upward into a higher layer (21 rows); move the shared test helper into a source directory production code may depend on (4 rows); declare the workspace packages these files import in the importing package's own REDACTED dependencies (1 row) — those imports are already bare package specifiers, so the import statements do not change, only the manifest.
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 — 742
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 — 3348
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 — 1177
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 11
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. 108 of 108 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); none rely on LLM judgement. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.
Every figure here is one of three kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact; ◐ Advisory — an LLM prose judgement. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.
What we checked — 108 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, 5230 of 5267 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.
D7 Architectural Integrity — 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. These records DO declare how the decision is enforced; FileSystemAdrInventoryBuilder.ParseEnforcement maps a fixed vocabulary (`prose`, `test`, `analyzer`, `mechanical`, `judgment`, `judgement`, `process`, `not-applicable`) and these values are outside it. Each was therefore treated as Unclassified: counted into the mechanizable set, but excluded from the scored set because nothing claimed it enforceable. That exclusion rests on our word list, not on the repository. Affected ADR(s): v3/docs/adr/ADR-169-benchmark-reporting-integrity-standard.md, v3/docs/adr/ADR-401-browser-mcp-windows-shell-boundary.md, v3/docs/adr/ADR-403-stable-semver-internal-leaf-packages.md, v3/docs/adr/ADR-476-hive-mind-gating.md. You can widen what we reach: no action is needed from this repository — the gap is in our parser. The values above are reported so the vocabulary can be added; declaring `enforcement: analyzer`, `test`, `prose` or `not-applicable` alongside your own grading would settle these ADRs immediately.
D10 Test Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 19,139 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 3 test source file(s) (.rs) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
D11 Test Reliability — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Test reliability for the vitest suite in v3/ was NOT MEASURED: the dependency install for v3/ 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 — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Test reliability for the vitest suite in v3/@claude-flow/aidefence/ was NOT MEASURED: the dependency install for v3/@claude-flow/aidefence/ 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 — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Test reliability for the vitest suite in v3/@claude-flow/claims/ was NOT MEASURED: the dependency install for v3/@claude-flow/claims/ 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 — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Test reliability for the vitest suite in v3/@claude-flow/cli/ was NOT MEASURED: the dependency install for v3/@claude-flow/cli/ 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. Not scored — 27 direct Cargo declaration(s) were read, but the outdated signal needs crates.io, and no committed REDACTED resolves them to versions, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
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 REDACTED, but the licence verdict published here was taken over its crate dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Single-maintainer repository — bus factor is not applicable (79 contributor(s) across 9906 commit(s) sampled, automation and bot accounts excluded). One of them holds 87% of the history; the other 78 hold 0.2% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
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.
D20 ADR Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The ADR lexicon (adr-lexicon-1) covers de, en, it, nl. A record identified as another language, or whose language could not be identified (fewer than 25 words of prose, or no clear winner), is never read with English rules: its missing-section, status, consequence-cost and same-question rules abstain, and only the structural rules (title, single option, dangling link, enforcement field) run.
D21 Naming Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
D22 Internal API Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
D24 Comment Value — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
D25 ADR Conformance — 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 prohibition grammar (cue words, exception markers, scope prepositions) is English. A decision in another language is never read with it. An `adr-rules` block is read in any language.
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. `plugins/ruflo-arena/src/mcp-tools/index.ts`, `plugins/ruflo-console/hooks/events-ui.ts`, `plugins/ruflo-console/hooks/loops.ts`, `plugins/ruflo-console/hooks/mission-create.ts`, `plugins/ruflo-console/hooks/state.ts`, … (+44 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.
D41 Kernel & Syscall Confinement — 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. Ruflo/src/ruvocal/chart/templates/deployment.yaml:2 did not read as a pod spec (a templated manifest such as Helm's that is not YAML until rendered, or a workload whose pod spec this check does not locate), so the seccomp/AppArmor profile in force there was not judged and no row about them can appear on this card.
AC6 Visual & motion safety — 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. 1 further occurrence(s) are not listed individually; the score already reflects all 41.
AX1 Captive dependencies — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads Microsoft.Extensions.DependencyInjection registrations in C# and Spring beans in Java/Kotlin only, and this repository defines its own container in v3/plugins/ruvector-upstream/src/registry.ts, whose lifetimes are not modelled yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
AXR1 Runtime accessibility — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DockerCompose (v3/@claude-flow/plugins/examples/ruvector/docker-compose.yml). compose up failed (exit 18 — an image could not be pulled) — postgres Pulling adminer Pulling adminer Error Get "https://registry-1.docker.io/v2/": Forbidden postgres Error context canceled Error response from daemon: Get "https://registry-1.docker.io/v2/": Forbidden; the earlier `compose pull` step reported: postgres Pulling adminer Pulling adminer Error Get "https://registry-1.docker.io/v2/": Forbidden postgres Error context canceled Error response from daemon: Get "https://registry-1.docker.io/v2/": Forbidden; the runtime sandbox reaches registries only through the in-fence pull-through mirror, so an image the mirror does not carry cannot be fetched — this is a limit of our sandbox, not of your stack; runtime evidence skipped.
C1 Data Protection — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'pg' is imported (v3/@claude-flow/plugins/src/integrations/ruvector/ruvector-bridge.ts:256), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
C3 Audit Trail — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'pg' is imported (v3/@claude-flow/plugins/src/integrations/ruvector/ruvector-bridge.ts:256), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
C4 Data Retention — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'pg' is imported (v3/@claude-flow/plugins/src/integrations/ruvector/ruvector-bridge.ts:256), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
C5 Data-Subject Rights — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'pg' is imported (v3/@claude-flow/plugins/src/integrations/ruvector/ruvector-bridge.ts:256), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
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.
IC1 Incompleteness & stubs — 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. 148 further occurrence(s) are not listed individually; the score already reflects all 188.
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.
P2 Observability — 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. 367 further occurrence(s) are not listed individually; the score already reflects all 407.
PF3 Async & latency hygiene — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 1086 further occurrence(s) are not listed individually; the score already reflects all 1126.
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. 2004 further occurrence(s) are not listed individually; the score already reflects all 2044.
R11 Import Boundaries — 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. 149 further occurrence(s) are not listed individually; the score already reflects all 189.
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. 402 further occurrence(s) are not listed individually; the score already reflects all 442.
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. 711 further occurrence(s) are not listed individually; the score already reflects all 751.
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. 363 further occurrence(s) are not listed individually; the score already reflects all 403.
X2 Cancellation propagation — 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. 9 further occurrence(s) are not listed individually; the score already reflects all 49.
X3 Exception handling — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 1365 further occurrence(s) are not listed individually; the score already reflects all 1405.
X7 Silent fallback defaults — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 52 further occurrence(s) are not listed individually; the score already reflects all 92.
Repo exclusion declarations: 30 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.
D8 Code Coverage: Coverage is measured by building and running the test suite inside Watchdog's isolated image — the target repo is never modified, and nothing on your systems runs. So coverage exists only when the suite builds and runs within the inline time budget; one that needs external services, can't build, or exceeds the budget yields no coverage (D8 then degrades to not-measured, not a low score). Line coverage also says nothing about assertion quality.
D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D11 Test Reliability: Flakiness is inferred from history/markers — Watchdog runs the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
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.
D23 Boundary Type-Coupling: Boundary leakage is detected from type references across detected contexts — leaks that flow through primitives, serialization or shared infrastructure may not surface as a typed reference.
D25 ADR Conformance: ADR conformance is the LLM-scored fraction of sampled code that follows recorded decisions — it checks the decisions that were written down and the slices it sampled, not unrecorded rules or the whole tree.
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.
D40 Network Egress Confinement: Egress confinement is read from committed Kubernetes manifests — a policy applied out-of-band (cluster-default deny, a service mesh, or a cloud firewall/security group off-repo) is invisible, and a present NetworkPolicy is declared config, not proof the cluster admission-controller actually enforces it at runtime.
D41 Kernel & Syscall Confinement: Syscall/MAC confinement is read from committed manifests — a profile applied by a cluster-wide PodSecurity default or a mutating webhook off-repo isn't seen, and a declared seccomp/AppArmor profile is config presence, not proof the node's kernel actually loaded and enforced it.
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.
AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
DM4 Rich vs anemic model: Behaviour is detected as state mutation inside a method body — a method that enforces an invariant by validating-and-throwing without mutating reads as a query, and mutation delegated through an interface the scan can't resolve isn't credited; entities with zero public properties still drop out of the population. It detects that state changes, not whether the rule is correct.
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.
766 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was createGateway at 130. A further 12 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 ControllerRegistry.isControllerEnabled at 34 — they are counted neither in the figure above nor in this dimension's score. 7 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: v3/@claude-flow/cli/src/mcp-tools/neural-tools.ts (neural-tools.ensureEmbeddings at 28), plugins/ruflo-mods/hooks/guidance/observations.ts (observations.validObservation at 21), v3/@claude-flow/plugin-agent-federation/src/domain/services/pii-pipeline-service.ts (PIIPipelineService.computeConfidence at 18), plugins/ruflo-console/hooks/themes.ts (themes.parseTheme at 17), v3/@claude-flow/cli/src/transfer/deploy-seraphine.ts (deploy-seraphine.parseArgs at 16), and 2 more not listed here. 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.
+ 745 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 1 body over 120 down to 120 or less in Cyclomatic Complexity — start with createGateway (cyclomatic 130). — Refactoring it lifts Cyclomatic Complexity from 4.5 to about 4.7/10.
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.
+ 1116 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 memory-distillation.runDistillation (cognitive 157), createGateway (cognitive 146), swarm.getSwarmStatus (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 2.3 to about 3.0/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 Classes8.4 / 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 131 FileTooLong finding(s) in God Classes — start with REDACTED (11), REDACTED (7), hooks-tools.ts (2). — One of this dimension's main actionable groups (131 warning-level).
Resolve the 99 FunctionTooLong finding(s) in God Classes — start with REDACTED (8), memory-initializer.ts (7), REDACTED (4). — One of this dimension's main actionable groups (99 warning-level).
Resolve the 36 ClassTooLong finding(s) in God Classes — start with REDACTED (3), Index.tsx, unified-coordinator.ts. — One of this dimension's main actionable groups (36 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.
7 duplicated block group(s) detected. Measured on part of this repository only: .ts (96% 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.
+ 2 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 Duplicated block (18 lines × 2) finding(s) in Code Duplication — start with critical.rs. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Duplicated block (7–12 lines × 2) finding(s) in Code Duplication — start with tournament.rs. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Duplicated block (12 lines × 2) finding(s) in Code Duplication — start with parser.rs. — 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 · Coupling8.6 / 10Adequategated by 1 critical finding✓ 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.
58 production modules (Cargo+npm), 1 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 6 module(s) off the main sequence, with abstractness counted on 50 of the 58 (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).
Resolve the 1 Circular dependency finding(s) in Coupling — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
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.
Resolve the 5 Low cohesion finding(s) in Cohesion (LCOM4) — start with memory-application-service.ts, gnn.ts, REDACTED. — One of this dimension's main actionable groups (5 warning-level).
Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
No mechanizable ADR was identified, so enforcement is not measured. Dependency cycles not checked (no project-reference graph; where this repository's language has an import-cycle lens, cycles are reported there).
Resolve the 470 Classify ADR enforcement finding(s) in Architectural Integrity — start with 0001-adr-plugin-pattern.md, 0002-reconcile-deleted-adrs.md, 0001-wasm-contract.md. — One of this dimension's main actionable groups (470 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.
What it measures: How much of the code is actually exercised by tests.
Method: Coverage from coverlet runs or committed reports (Cobertura/OpenCover/lcov), computed per-file with structured exclusions for generated, trivial, and glue code. When the suite can't be built/run in-image AND no report is committed, coverage is reported NOT-MEASURED (excluded from the score) with the precondition to make it measurable — never a LoC-ratio proxy folded in as if measured. Deterministic.
Line coverage 96.3% — 1 file(s) below 50%. Measured from the JavaScript/TypeScript suite (node:test via `npm ci --ignore-scripts` in plugins/ruflo-ai-team/; node:test via `npm ci --ignore-scripts` in plugins/ruflo-chatgpt-federation/; node:test via `npm ci --ignore-scripts` in plugins/ruflo-x-gateway/; vitest in v3/: not run; vitest in v3/@claude-flow/aidefence/: not run; vitest in v3/@claude-flow/browser/: not run; vitest in v3/@claude-flow/claims/: not run; vitest in v3/@claude-flow/cli/: not run).
Resolve the 1 Low coverage finding(s) in Code Coverage — start with ws-proxy.mjs. — One of this dimension's main actionable groups (1 warning-level).
Enforce Code Coverage in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d8_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D9 · Test Distribution9.9 / 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.
19271 test methods: 18971 unit, 193 integration, 34 BDD, 73 e2e. The JavaScript/TypeScript suite contributes 19140 `it`/`test` case(s) across 1456 test file(s) declaring at least one; its tier split is read from package names and paths only. The Rust suite contributes 131 `#[test]` function(s) across 34 file(s) declaring at least one; its unit/integration split is Cargo's own — 2 of those file(s) are integration-test targets under a crate's tests/ directory, and the rest are #[test] functions compiled into the crate they test.
✓ On the Gold path — maintain.
Detailed fixes: d9_recommendation.md.
Do you agree with this assessment?
D10 · Test Quality9.9 / 10Adequategated by 2 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.
144 skipped (92 with a documented reason), 33 zero-assertion, 8 synchronised by a fixed sleep, no mocking-framework packages referenced (hand-written doubles or no mocking) across 19139 tests. Measured on the JavaScript/TypeScript suite only — at least 3 test source file(s) (.rs) went unread, so its test quality is unmeasured and is not in these counts.
No assertions (empty test): should create actual HNSW index · ×2v3/@claude-flow/plugins/__tests__/ruvector-integration.test.ts:1595
Skipped test: should handle lorentz model · ×52v3/plugins/hyperbolic-reasoning/tests/mcp-tools.test.ts:108
No assertions: should log errors via context logger · ×31v3/plugins/test-intelligence/tests/mcp-tools.test.ts:464
Fixed-sleep synchronisation: should propose value as leader · ×8v3/@claude-flow/swarm/__tests__/consensus.test.ts:96
Mock-dominated test: should log duration on success · ×10v3/plugins/test-intelligence/tests/mcp-tools.test.ts:484
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 2 No assertions (empty test) finding(s) in Test Quality — start with ruvector-integration.test.ts (2). — One of this dimension's main actionable groups (2 issue-level).
Resolve the 52 Skipped test finding(s) in Test Quality — start with p1-commands.test.ts (28), commands.test.ts (16), mcp-tools.test.ts (2). — One of this dimension's main actionable groups (52 warning-level).
Resolve the 31 No assertions finding(s) in Test Quality — start with memory-integration.test.ts (4), capabilities.test.ts (3), mcp-tools.test.ts (2). — One of this dimension's main actionable groups (31 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.
Do you agree with this assessment?
D11 · Test Reliability10.0 / 10Adequategated by 3 critical findings✓ Tool-verified
What it measures: Whether the tests pass reliably, with no flakiness.
Method: Suite re-run N times within tiered wall-clock budgets (unit to e2e); tests failing non-deterministically across runs flagged; guarded tests retried when #if guards detected.
0 flaky across 1 measured tier(s). JavaScript/TypeScript (vitest via `pnpm install --frozen-lockfile --ignore-scripts` in the repository root; node:test via `npm ci --ignore-scripts` in plugins/ruflo-ai-team/ (29 tests); vitest via `pnpm install --frozen-lockfile --ignore-scripts` in plugins/ruflo-arena/; node:test via `npm ci --ignore-scripts` in plugins/ruflo-chatgpt-federation/ (40 tests); vitest via `npm ci --ignore-scripts` in plugins/ruflo-graph-intelligence/ (104 tests); node:test via `npm ci --ignore-scripts` in plugins/ruflo-x-gateway/ (138 tests); vitest via `npm ci --ignore-scripts` in ruflo/src/ruvocal/ (0 tests); vitest via `pnpm install --frozen-lockfile --ignore-scripts` in v3/; vitest via `pnpm install --frozen-lockfile --ignore-scripts` in v3/@claude-flow/aidefence/; vitest via `npm ci --ignore-scripts` in v3/@claude-flow/browser/; vitest via `pnpm install --frozen-lockfile --ignore-scripts` in v3/@claude-flow/claims/; vitest via `pnpm install --frozen-lockfile --ignore-scripts` in v3/@claude-flow/cli/): measured (0 flaky).
Test suite cannot be installed from its own lockfile: the repository root · ×3
What to do
Resolve the 3 Test suite cannot be installed from its own lockfile finding(s) in Test Reliability. — One of this dimension's main actionable groups (3 issue-level).
Detailed fixes: d11_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 3 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 issue-level).
Enforce REDACTED 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 243 shipped crate(s) use a banned license. Licences were resolved from crates.io over the crates a consumer compiles — this repository commits no REDACTED, so its graph was resolved here: its manifests' `[dependencies]` and `[build-dependencies]` closed over the crates.io index, each crate at the newest release its requirement admits (what a fresh `cargo generate-lockfile` picks, not a graph the repository has pinned). Crates it asks for ONLY under `[dev-dependencies]` are excluded: they are not compiled by anything that depends on this repository. ★ COVERAGE OF THIS VERDICT: it grades this repository's crate dependencies and nothing else. The repository also declares REDACTED, 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: plugins/ruflo-console/hooks/views/pane.ts (71×77=5467); plugins/ruflo-console/hooks/bindings.ts (49×76=3724); plugins/ruflo-console/hooks/register.ts (45×67=3015) Repeated repair below the complexity floor: REDACTED (24 of 28 changes were fixes); v3/@claude-flow/cli/src/commands/memory.ts (19 of 26 changes were fixes); v3/@claude-flow/cli/src/commands/hooks.ts (13 of 14 changes were fixes)
Resolve the 140 Hotspot finding(s) in Churn × Complexity Hotspots — start with REDACTED (3), register.ts (2), mission-control.ts (2). — One of this dimension's main actionable groups (140 warning-level).
Resolve the 72 Repeated repair finding(s) in Churn × Complexity Hotspots — start with REDACTED (4), skills.ts (3), guard.ts (2). — One of this dimension's main actionable groups (72 warning-level).
Detailed fixes: d15_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 task-comment markers across 592797 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
Resolve the 2 TodoComment finding(s) in Explicit Debt — start with guidance-provider.test.ts, p1-commands.test.ts. — One of this dimension's main actionable groups (2 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.
1 of 1 documentation facets pass in full. 311 document(s) read across 1 unit(s).
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D20 · ADR Quality9.1 / 10Exemplary✓ Tool-verified
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.
299 of 469 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.
ADR lacks an enforcement field · ×283v3/docs/adr/ADR-380-agntcy-outshift-runtime-integration.md:1detected by adr-integrity
ADR declares no status · ×12v3/docs/adr/ADR-350-dream-cycle-swarm-trust-weighted-consensus.md:1detected by adr-integrity
ADR superseded but its status says otherwise · ×8ruflo/docs/adr/ADR-033-RUVECTOR-RUFLO-MCP-INTEGRATION.md:1detected by adr-integrity
ADR has no Context section · ×6v3/docs/adr/ADR-330-adaptive-pheromone-swarm-consensus.md:1detected by adr-integrity
ADR links a record that does not exist · ×5v3/docs/adr/ADR-148-fastgrnn-router-artifact-lifecycle.md:6detected by adr-integrity
+ 3 more group(s) — more in Appendix A; the complete list is findings.md.
✓ On the Gold path — maintain.
Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether domain types (IDs, enums, value objects) leak across bounded-context boundaries.
Method: Cross-context domain-type leakage via Roslyn structural classification (strongly-typed IDs / value objects) over every public surface. Exhaustive, deterministic, type-level aggregate-boundary check.
Coverage: Bounded contexts derived from NAMESPACE prefix (or graph-inferred where available); cross-boundary domain-type leakage then checked exhaustively over every public member of every type.
What it measures: Whether the code actually follows the decisions recorded in the project's ADRs.
Method: Judged by language model at low temperature against ADRs plus a deterministic structural code summary; findings linked to repo-rooted ADR paths for traceability. Advisory.
8 of 17 checkable records are broken by the code (17 of 289 binding records state a rule in checkable form; prose decisions are unverifiable).
ADR not followed: ADR 401: Browser MCP Windows Shell Boundary · ×9v3/docs/adr/ADR-401-browser-mcp-windows-shell-boundary.md:27detected by adr-prohibition
What to do
Resolve the 9 ADR not followed finding(s) in ADR Conformance — start with ADR-403-stable-semver-internal-leaf-packages.md (2), ADR-401-browser-mcp-windows-shell-boundary.md, ADR-444-claude-controls-the-console.md. — One of this dimension's main actionable groups (9 recommendation-level).
Enforce ADR Conformance in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d25_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D26 · Project Cohesion4.5 / 10Weak✓ Tool-verified
What it measures: Whether each project is a focused, coherent unit rather than an oversized grab-bag.
18 of 59 build units (Cargo, npm) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: REDACTED 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.
136 finding(s): 0 critical, 136 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
REDACTED
What to do
Resolve the 135 REDACTED finding(s) in Secrets (history) — start with REDACTED (116), REDACTED (14), REDACTED. — One of this dimension's main actionable groups (135 issue-level).
Resolve the 1 High secret finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.
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).
516 finding(s): 0 critical, 383 high, 128 medium, 5 low. 314 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 116 file(s) — `.claude-plugin/scripts/install.sh` (lines 5–234), `.claude/helpers/intelligence.cjs`, `REDACTED`, `docs/benchmarks/runs/gaia-l1-iter61b-hybrid-only.json`, `docs/benchmarks/runs/router-tinydancer-vs-bandit-2026-06-15T14-01-28Z.json`, … (+111 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 14 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
+ 26 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 23 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (15), REDACTED (2), REDACTED. — One of this dimension's main actionable groups (23 issue-level).
Resolve the 13 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (7), REDACTED (2), REDACTED. — One of this dimension's main actionable groups (13 issue-level).
No action in Static Analysis (SAST) — all 314 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 (314 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.
+ 4 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 143 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (101), REDACTED (41), REDACTED. — One of this dimension's main actionable groups (143 issue-level).
Resolve the 12 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (8), REDACTED (4). — One of this dimension's main actionable groups (12 issue-level).
Resolve the 1 High vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
Resolve the 43 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (25), REDACTED (4), REDACTED (3). — One of this dimension's main actionable groups (43 warning-level).
Resolve the 9 High IaC finding(s) in IaC & Container Security — start with REDACTED (6), REDACTED (2), REDACTED. — One of this dimension's main actionable groups (9 issue-level).
Resolve the 13 Low IaC finding(s) in IaC & Container Security — start with REDACTED (12), REDACTED. — One of this dimension's main actionable groups (13 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.
21 of 1755 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is v3/@claude-flow/plugin-iot-cognitum/src/mcp-tools.ts. Counted over 1755 of the 2478 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 REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 20 Orphaned file finding(s) in Knowledge Freshness — start with plugin.ts, trust-evaluator.ts, device-lifecycle-service.ts. — One of this dimension's main actionable groups (20 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 5 Change coupling finding(s) in Change Coupling — start with bindings.ts, mcp-client.ts, cli.ts. — One of this dimension's main actionable groups (5 warning-level).
Resolve the 1 Change-coupling hub finding(s) in Change Coupling — start with pane.ts. — 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.
+ 6 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 22 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (22 warning-level).
Resolve the 2 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
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 Kubernetes workloads restrict network EGRESS with a NetworkPolicy (or Cilium policy), limiting where a compromised pod can send data or reach a command-and-control server. Presence of committed egress-restricting policy, not runtime enforcement.
Method: Deterministic YAML-manifest inspection (no external tool, no Roslyn — language-agnostic): Kubernetes workloads gate applicability; credits a NetworkPolicy / Cilium policy that restricts egress (policyTypes: [Egress] / egress rules). Reward-leaning (neutral floor climbing to 10, never a deduction — baseline misconfigs stay with D31). Deterministic.
What it measures: Whether Kubernetes workloads confine the kernel boundary — a seccomp profile (RuntimeDefault/Localhost) plus an AppArmor/SELinux mandatory-access-control layer — shrinking the syscall attack surface a container escape would use. Presence of committed confinement config, not runtime enforcement.
Method: Deterministic YAML-manifest inspection (no external tool, no Roslyn): on Kubernetes workloads, credits a seccomp profile (RuntimeDefault/Localhost) and an AppArmor/SELinux MAC layer. Reward-leaning (neutral floor climbing to 10); NotApplicable without workloads. Deterministic.
0/1 workload(s) run every container under a seccomp profile; 0/1 declare an AppArmor/SELinux profile.
No seccomp profileREDACTED:2
What to do
Resolve the 1 No seccomp profile finding(s) in Kernel & Syscall Confinement — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d41_recommendation.md · top locations in Appendix A, every location in findings.md.
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 0 platform declaration(s) and 26 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
✓ On the Gold path — maintain.
Detailed fixes: d44_recommendation.md.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC1 · Text alternatives5.1 / 10Adequate✓ Tool-verified
Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.
A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content. (×2) — ruflo/src/ruvocal/src/lib/components/FoundationBackground.svelte:226, ruflo/src/ruvocal/src/lib/components/RuFloUniverse.svelte:171
Video with no captions <track> offers no captions. This player's source is set at runtime, so there is no caption file to author here: give the player a way to carry captions — accept a track/captions URL alongside the media and render a <track kind="captions"> when one is supplied — and capture that asset wherever the media enters the product (upload, import or generation). — ruflo/src/ruvocal/src/lib/components/chat/UploadedFile.svelte:166
An svg presented as an image needs a name — add a <title> child or an aria-label/aria-labelledby. — ruflo/src/ruvocal/src/lib/components/icons/IconPro.svelte:0
What to do
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Do you agree with this assessment?
AC2 · Forms & labels5.1 / 10Adequate✓ Tool-verified
Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.
Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×9) — ruflo/src/ruvocal/src/lib/components/NavConversationItem.svelte:70, ruflo/src/ruvocal/src/lib/components/ShareConversationModal.svelte:127, ruflo/src/ruvocal/src/lib/components/Switch.svelte:24, …
This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label. (×4) — ruflo/src/ruvocal/src/lib/components/chat/ChatInput.svelte:236, ruflo/src/ruvocal/src/lib/components/mcp/AddServerForm.svelte:147, ruflo/src/ruvocal/src/lib/components/mcp/AddServerForm.svelte:153, …
This <img> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label. — ruflo/src/ruvocal/src/lib/components/chat/ImageLightbox.svelte:59
This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. (×2) — v3/goal_ui/src/components/GoalInput.tsx:118, v3/goal_ui/src/components/ResearchReviewCard.tsx:122
This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id. — v3/goal_ui/src/components/ResearchReviewCard.tsx:121
This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing it renders carries one either (a name prop is the form-submission key, not a label). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. (×10) — v3/goal_ui/src/components/ReviseResearchForm.tsx:489, v3/goal_ui/src/components/ReviseResearchForm.tsx:511, v3/goal_ui/src/components/ReviseResearchForm.tsx:535, …
This UI-library field component has no label / aria-label / aria-labelledby / id — and neither does anything it renders (a name prop is the form-submission key, not a label) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. (×8) — v3/goal_ui/src/components/ReviseResearchForm.tsx:787, v3/goal_ui/src/components/ReviseResearchForm.tsx:806, v3/goal_ui/src/components/ReviseResearchForm.tsx:825, …
What to do
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
Do you agree with this assessment?
AC3 · Page structure6.3 / 10Strong✓ Tool-verified
Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.
Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>. — ruflo/src/ruvocal/src/app.html:2
user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta. — ruflo/src/ruvocal/src/app.html:5
A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope). — ruflo/src/ruvocal/src/lib/components/RufloHelpModal.svelte:327
No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. — v3/goal_ui/public/widget-embed.html:2
Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one. (×4) — v3/goal_ui/src/components/ResearchReportModal.tsx:792, v3/goal_ui/src/pages/Agents.tsx:704, v3/goal_ui/src/pages/Demo.tsx:212, …
What to do
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: elements that pose a keyboard-semantics question, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) — a non-natively-interactive element carrying a click handler, a double-click or hover enter/leave binding, a pointer-only gesture on a tabindex="0" element, or `cursor: pointer` from the repo's own CSS; an href-less or placeholder-href (#, javascript:) anchor; and any element with a positive tabindex. Natively interactive elements used correctly (<button>, <a href>, form controls) are NOT in the population — there is nothing to judge — so a page of nothing but correct controls gives AC4 nothing to measure. Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".
A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabindex="0". (×3) — ruflo/src/ruvocal/src/lib/components/chat/ChatMessage.svelte:302, ruflo/src/ruvocal/src/lib/components/chat/ImageLightbox.svelte:44, ruflo/src/ruvocal/src/lib/components/chat/ImageLightbox.svelte:59
A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler. (×3) — v3/goal_ui/src/components/AgentStep.tsx:184, v3/goal_ui/src/components/DevelopmentStep.tsx:149, v3/goal_ui/src/components/agents/PlanVisualization.tsx:98
What to do
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.
Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.
Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.
Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
<button> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2). (×4) — ruflo/src/ruvocal/src/lib/components/DeleteConversationModal.svelte:38, ruflo/src/ruvocal/src/lib/components/DeleteConversationModal.svelte:57, ruflo/src/ruvocal/src/lib/components/ExpandNavigation.svelte:11, …
<input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2). (×2) — ruflo/src/ruvocal/src/lib/components/NavConversationItem.svelte:70, ruflo/src/ruvocal/src/lib/components/ShareConversationModal.svelte:127
<textarea> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2). (×2) — ruflo/src/ruvocal/src/lib/components/chat/ChatInput.svelte:236, ruflo/src/ruvocal/src/lib/components/chat/ChatMessage.svelte:481
This element's Tailwind text/background colour utilities fall below the 4.5:1 WCAG AA minimum for normal text. Pick a darker or lighter shade. (×4) — ruflo/src/ruvocal/src/lib/components/chat/ChatMessage.svelte:481, ruflo/src/ruvocal/src/lib/components/chat/ChatWindow.svelte:811, ruflo/src/ruvocal/src/lib/components/chat/ToolUpdate.svelte:144, …
<span> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. — ruflo/src/ruvocal/src/lib/components/chat/TaskGroup.svelte:63
<div> moves — its `animate-bounce` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. (×3) — ruflo/src/ruvocal/src/lib/components/icons/IconLoading.svelte:10, ruflo/src/ruvocal/src/lib/components/icons/IconLoading.svelte:14, ruflo/src/ruvocal/src/lib/components/icons/IconLoading.svelte:18
<iconrefresh> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. (×2) — ruflo/src/ruvocal/src/lib/components/mcp/MCPServerManager.svelte:110, ruflo/src/ruvocal/src/lib/components/mcp/ServerCard.svelte:156
<div> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. (×5) — ruflo/src/ruvocal/src/lib/components/wasm/GalleryPanel.svelte:168, v3/goal_ui/src/components/ResearchReportModal.tsx:560, v3/goal_ui/src/components/ResearchReportModal.tsx:767, …
<div> moves — its inline style sets `animation: status` — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. — v3/goal_ui/src/components/AgentStep.tsx:119
<div> moves — its inline style sets `transition: height 0.5s ease-out` — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. (×2) — v3/goal_ui/src/pages/Agents.tsx:716, v3/goal_ui/src/pages/Agents.tsx:1071
<div> moves — its inline style sets `animation: fade-in 2s ease-out forwards` — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. — v3/goal_ui/src/pages/Index.tsx:1070
<div> moves — its inline style sets `animation: fade-in 2.5s ease-out forwards` — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. — v3/goal_ui/src/pages/Index.tsx:1085
`.btn` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — ruflo/src/ruvocal/src/styles/main.css:15
`.base-tool` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — ruflo/src/ruvocal/src/styles/main.css:28
`.qd1` moves (`animation: qdot 2.2s ease-in-out infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. (×2) — ruflo/src/ruvocal/src/lib/components/NavMenu.svelte:299, ruflo/src/ruvocal/src/lib/components/chat/ChatIntroduction.svelte:109
`.qd2` moves (`animation: qdot 2.2s ease-in-out infinite 0.35s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. (×2) — ruflo/src/ruvocal/src/lib/components/NavMenu.svelte:303, ruflo/src/ruvocal/src/lib/components/chat/ChatIntroduction.svelte:113
`.qd3` moves (`animation: qdot 2.2s ease-in-out infinite 0.7s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. (×2) — ruflo/src/ruvocal/src/lib/components/NavMenu.svelte:307, ruflo/src/ruvocal/src/lib/components/chat/ChatIntroduction.svelte:117
`.stop-generating-btn--spinning::after` moves (`animation: stop-generating-rotate 1.2s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — ruflo/src/ruvocal/src/lib/components/StopGeneratingBtn.svelte:53
`.w1` moves (`animation: wave-shift 3s ease-in-out infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — ruflo/src/ruvocal/src/lib/components/icons/Logo.svelte:50
`.w2` moves (`animation: wave-shift 3s ease-in-out infinite 0.5s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — ruflo/src/ruvocal/src/lib/components/icons/Logo.svelte:53
`.w3` moves (`animation: wave-shift 3s ease-in-out infinite 1s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — ruflo/src/ruvocal/src/lib/components/icons/Logo.svelte:57
What to do
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
Other · Accessibility — Whether accessibility is ENFORCED in the toolchain — an accessibility checker configured over the markup (an a11y lint rule set, e.g. eslint-plugin-jsx-a11y or vuejs-accessibility where the project lints JavaScript) and an automated accessibility assertion wired into tests or CI (axe/pa11y/Lighthouse or an equivalent) — on the Documented→Verified→Prevented ladder.
Method: Repo config/CI scan: an accessibility checker configured over the markup (an a11y lint rule set such as eslint-plugin-jsx-a11y / vuejs-accessibility where JavaScript is linted) and an automated accessibility assertion in tests or CI (axe/pa11y/Lighthouse or equivalent), graded on the Documented→Verified→Prevented rungs. Deterministic, presence/rung detection.
Coverage: Population: the repository's own tooling configuration — lint config, test and CI files — NOT the markup. It is read for a configured accessibility checker and an automated accessibility assertion (axe/pa11y/Lighthouse, or a native-toolkit equivalent), and it credits an INVOCATION, never a mention: a licence filename, an import comment or a doc reference earns no rung. Enforcement configured entirely outside the repository leaves no evidence here and cannot be credited.
An a11y linter is configured (Documented) but there's no automated a11y test or CI gate. Add vitest-axe to verify at runtime, then gate it in CI. What was searched, so you can tell an absence from a miss: the 162 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
What to do
Accessibility linting is already configured — assert with vitest-axe in tests, then gate axe/pa11y/Lighthouse in CI.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
What to do
The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
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.
The projects @claude-flow/cli → @claude-flow/codex → @claude-flow/cli form a reference cycle. Cyclic dependencies prevent independent build/test/deploy, blur ownership, and tend to grow into a big ball of mud. Break the cycle by extracting the shared types into a separate project both can reference. — v3/@claude-flow/cli/REDACTED:104
What to do
Break project reference cycles by extracting shared abstractions into a separate project; keep the graph a DAG.
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.
`IAgentRepository` declares 20 required operations: `save`, `findById`, `findByName`, `delete`, `exists`, `saveMany`, `findByIds`, `deleteMany`, `findAll`, `findByStatus`, `findByRole`, `findByDomain`, `findByParent`, `findByCapability`, `findAvailable`, `getStatistics`, `count`, `initialize`, `shutdown`, `clear`. 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. — v3/@claude-flow/swarm/src/domain/repositories/agent-repository.interface.ts:39
`ITaskRepository` declares 22 required operations: `save`, `findById`, `delete`, `exists`, `saveMany`, `findByIds`, `deleteMany`, `findAll`, `findByStatus`, `findByPriority`, `findByAgent`, `findPending`, `findQueued`, `findRunning`, `findTimedOut`, `getNextTask`, `getTaskQueue`, `getStatistics`, `count`, `initialize`, `shutdown`, `clear`. 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. — v3/@claude-flow/swarm/src/domain/repositories/task-repository.interface.ts:41
`IMemoryBackend` declares 16 required operations: `initialize`, `shutdown`, `store`, `get`, `getByKey`, `update`, `delete`, `query`, `search`, `bulkInsert`, `bulkDelete`, `count`, `listNamespaces`, `clearNamespace`, `getStats`, `healthCheck`. 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. — v3/@claude-flow/memory/src/types.ts:308
`IMemoryRepository` declares 27 required operations: `save`, `findById`, `findByKey`, `findByCompositeKey`, `delete`, `exists`, `saveMany`, `findByIds`, `deleteMany`, `findAll`, `findByNamespace`, `findByType`, `findByStatus`, `searchByVector`, `findSimilar`, `findExpired`, `deleteExpired`, `findCold`, `archiveCold`, `getStatistics`, `count`, `listNamespaces`, `deleteNamespace`, `getNamespaceSize`, `initialize`, `shutdown`, `clear`. 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. — v3/@claude-flow/memory/src/domain/repositories/memory-repository.interface.ts:77
`IRuVectorClient` declares 27 required operations: `connect`, `disconnect`, `isConnected`, `getConnectionInfo`, `search`, `batchSearch`, `insert`, `update`, `delete`, `bulkDelete`, `createIndex`, `dropIndex`, `rebuildIndex`, `getIndexStats`, `listIndices`, `computeAttention`, `runGNNLayer`, `buildGraph`, `hyperbolicEmbed`, `hyperbolicDistance`, `embed`, `embedBatch`, `transaction`, `vacuum`, `analyze`, `healthCheck`, `getStats`. 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. — v3/@claude-flow/plugins/src/integrations/ruvector/types.ts:1737
`IUnifiedSwarmCoordinator` declares 17 required operations: `initialize`, `shutdown`, `pause`, `resume`, `registerAgent`, `unregisterAgent`, `getAgent`, `getAllAgents`, `submitTask`, `cancelTask`, `getTask`, `getAllTasks`, `proposeConsensus`, `broadcastMessage`, `getState`, `getMetrics`, `getPerformanceReport`. 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. — v3/@claude-flow/swarm/src/types.ts:544
`IAgentRegistry` declares 17 required operations: `register`, `unregister`, `isRegistered`, `spawn`, `terminate`, `getState`, `updateStatus`, `assignTask`, `completeTask`, `getDefinition`, `getAllAgents`, `getActiveAgents`, `getAgentsByDomain`, `getAgentsByCapability`, `heartbeat`, `getHealthStatus`, `onAgentEvent`. 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. — v3/@claude-flow/swarm/src/coordination/agent-registry.ts:33
`ITaskOrchestrator` declares 23 required operations: `createTask`, `createBatchTasks`, `queueTask`, `assignTask`, `startTask`, `completeTask`, `failTask`, `cancelTask`, `addDependency`, `removeDependency`, `getDependencies`, `getDependents`, `isBlocked`, `getBlockingTasks`, `getTask`, `getAllTasks`, `getTasksByStatus`, `getTasksByAgent`, `getTasksByDomain`, `getTasksByPhase`, `getNextTask`, `getPriorityQueue`, `getTaskMetrics`. 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. — v3/@claude-flow/swarm/src/coordination/task-orchestrator.ts:38
`ISwarmHub` declares 24 required operations: `initialize`, `shutdown`, `isInitialized`, `spawnAgent`, `spawnAllAgents`, `spawnAgentsByDomain`, `terminateAgent`, `submitTask`, `submitBatchTasks`, `assignNextTask`, `completeTask`, `getCurrentPhase`, `advancePhase`, `getPhaseDefinition`, `getMilestones`, `completeMilestone`, `sendMessage`, `broadcast`, `onMessage`, `getState`, `getMetrics`, `getAgentRegistry`, `getTaskOrchestrator`, `onSwarmEvent`. 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. — v3/@claude-flow/swarm/src/coordination/swarm-hub.ts:61
`IGasTownBridge` declares 16 required operations: `createBead`, `getReady`, `showBead`, `manageDependency`, `createConvoy`, `getConvoyStatus`, `trackConvoy`, `listFormulas`, `cookFormula`, `executeFormula`, `createFormula`, `sling`, `listAgents`, `sendMail`, `readMail`, `listMail`. 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. — v3/plugins/gastown-bridge/src/types.ts:831
`WasmModule` declares 21 required operations: `cohomology_compute_energy`, `cohomology_detect_contradictions`, `spectral_compute_eigenvalues`, `spectral_compute_gap`, `spectral_stability_index`, `causal_estimate_effect`, `causal_find_confounders`, `causal_backdoor_paths`, `quantum_betti_numbers`, `quantum_persistence_diagram`, `quantum_homology_classes`, `category_apply_morphism`, `category_compose`, `category_is_natural`, `hott_verify_proof`, `hott_infer_type`, `hott_normalize`, `hott_path_equivalent`, `hott_transport`, `alloc`, `dealloc`. 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. — v3/plugins/prime-radiant/src/types.ts:318
What to do
Split fat interfaces into focused role-interfaces so clients depend only on what they use.
Do you agree with this assessment?
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified
Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.
Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.
Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.
Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.
Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.
Do you agree with this assessment?
C2 · Access Controls7.0 / 10Strong✓ Tool-verified
Other · Security — Whether access is authorized by default — a framework authorization attribute/decorator or policy, or imperative guard methods (throw-on-violation) called from handlers.
Method: Roslyn scan: [Authorize] usage and authorization policies, plus imperative throw-on-violation guard methods detected via syntax. Deterministic.
Authorization IS enforced here (by route guards, auth middleware or checks that refuse a caller) — this is NOT a claim that endpoints are unprotected. What's missing is a NAMED rule set: who may do what is encoded inline where it is checked, so the rules can't be listed, reviewed or tested apart from the code that applies them. Recommendation, not a defect.
What to do
Name the access rules — roles/permissions declared once (a @Roles/@Permissions decorator with its guard, a CASL ability, a casbin model, or Supabase CREATE POLICY) and consulted where access is checked, so the rule set is reviewable and testable on its own.
Other · Domain Modelling — Whether aggregates reference each other by identity (id) rather than by direct object reference — the core DDD consistency-boundary rule.
Method: Roslyn (DDD-gated): aggregate roots identified by convention; each aggregate field checked for direct references to other aggregates versus id-only. Deterministic, DDD-native.
Coverage: Population: aggregate roots identified by AggregateRoot/IAggregateRoot base/interface NAME convention; reference-by-identity then checked exhaustively within that set — a root not using those names is invisible.
Do you agree with this assessment?
DM10 · One transaction, one aggregate9.6 / 10Exemplary✓ Tool-verified
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.
`CoordinationService.assignTask` saves `ITaskRepository`, `IAgentRepository` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — v3/@claude-flow/swarm/src/domain/services/coordination-service.ts:59
`CoordinationService.processTaskCompletion` saves `ITaskRepository`, `IAgentRepository` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — v3/@claude-flow/swarm/src/domain/services/coordination-service.ts:181
`CoordinationService.processTaskFailure` saves `ITaskRepository`, `IAgentRepository` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — v3/@claude-flow/swarm/src/domain/services/coordination-service.ts:221
What to do
Mutate one aggregate per operation and let the others follow from a domain event — the second aggregate reaching consistency a moment later is the design, not a compromise.
Other · Domain Modelling — Whether an aggregate can be constructed in a state its own rules forbid — a public constructor that takes a raw primitive, stores it, and validates nothing, with no factory beside it. A constructor taking only value objects is not counted: each parameter has already validated itself.
Method: Neutral surface (DDD-gated): each non-abstract entity/aggregate checked for a PUBLIC constructor taking at least one RAW PRIMITIVE parameter whose body contains no guard token (throw / Guard. / Ensure. / ArgumentException / CheckRule), on a type that also offers no static Create/Of/From/New factory. A constructor taking only value objects is never charged -- measured: 64 of 87 unguarded public constructors on the C# corpus take value objects only, so ignoring parameter types would be 73% false positives. One finding per entity. Deterministic.
Other · Domain Modelling — How much of the domain uses strongly-typed ids vs raw Guid/string/int — adoption curve, not all-or-nothing.
Method: Roslyn (DDD-gated): strongly-typed id adoption on domain entities/events; raw Guid/int/string ids counted versus wrapped types. An id wrapper is recognised by VALUE SEMANTICS, not by being a struct — a record struct, a record class (`record ApartmentId(Guid Value)`) or a class declared by a typed-id base (`class MemberId : TypedIdValueBase`) all count, while a plain mutable class (reference equality) and a verb-phrase query record (`GetCustomerById`) do not. Deterministic, adoption percentage.
Coverage: Population: id-like members by *Id/*Key NAME suffix; strongly-typed-ID shape then checked semantically — non-suffixed identifiers are not seen.
`MemoryEntry.compositeKey` is a raw `string` — give it a strongly-typed id: a dedicated single-field type wrapping the `string`, in whatever form your language spells that. — v3/@claude-flow/memory/src/domain/entities/memory-entry.ts:146
`FederationNode.nodeId` is a raw `string` — give it a strongly-typed id: a dedicated single-field type wrapping the `string`, in whatever form your language spells that. — v3/@claude-flow/plugin-agent-federation/src/domain/entities/federation-node.ts:51
`FederationNode.publicKey` is a raw `string` — give it a strongly-typed id: a dedicated single-field type wrapping the `string`, in whatever form your language spells that. — v3/@claude-flow/plugin-agent-federation/src/domain/entities/federation-node.ts:52
`FederationEnvelope.envelopeId` is a raw `string` — give it a strongly-typed id: a dedicated single-field type wrapping the `string`, in whatever form your language spells that. — v3/@claude-flow/plugin-agent-federation/src/domain/entities/federation-envelope.ts:51
`FederationEnvelope.sourceNodeId` is a raw `string` — give it a strongly-typed id: a dedicated single-field type wrapping the `string`, in whatever form your language spells that. — v3/@claude-flow/plugin-agent-federation/src/domain/entities/federation-envelope.ts:52
`FederationEnvelope.targetNodeId` is a raw `string` — give it a strongly-typed id: a dedicated single-field type wrapping the `string`, in whatever form your language spells that. — v3/@claude-flow/plugin-agent-federation/src/domain/entities/federation-envelope.ts:53
`FederationEnvelope.sessionId` is a raw `string` — give it a strongly-typed id: a dedicated single-field type wrapping the `string`, in whatever form your language spells that. — v3/@claude-flow/plugin-agent-federation/src/domain/entities/federation-envelope.ts:54
`FederationSession.sessionId` is a raw `string` — give it a strongly-typed id: a dedicated single-field type wrapping the `string`, in whatever form your language spells that. — v3/@claude-flow/plugin-agent-federation/src/domain/entities/federation-session.ts:26
`FederationSession.localNodeId` is a raw `string` — give it a strongly-typed id: a dedicated single-field type wrapping the `string`, in whatever form your language spells that. — v3/@claude-flow/plugin-agent-federation/src/domain/entities/federation-session.ts:27
`FederationSession.remoteNodeId` is a raw `string` — give it a strongly-typed id: a dedicated single-field type wrapping the `string`, in whatever form your language spells that. — v3/@claude-flow/plugin-agent-federation/src/domain/entities/federation-session.ts:28
`SecurityContext.principalId` is a raw `string` — give it a strongly-typed id: a dedicated single-field type wrapping the `string`, in whatever form your language spells that. — REDACTED:72
What to do
Adopt strongly-typed ids across the domain — finish the migration or document the boundary; primitive ids invite transposed-argument bugs.
Do you agree with this assessment?
DM4 · Rich vs anemic model8.2 / 10Exemplary✓ Tool-verified
Other · Domain Modelling — Whether aggregates/entities carry the behaviour that protects their invariants, rather than being data bags driven by external services.
Method: Roslyn (DDD-gated): entity method BODIES classified mutator-vs-query — only methods that mutate the entity's own declared state count as invariant-protecting behaviour, so a getter/passthrough doesn't rescue an anemic class. Deterministic, exhaustive over domain-layer entities.
Coverage: Population: entities by name/base convention; rich-vs-anemic judged by classifying each method body mutator-vs-query — logic-bearing domain types outside the convention are invisible.
`FederationEnvelope` is an aggregate/entity with 10 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — v3/@claude-flow/plugin-agent-federation/src/domain/entities/federation-envelope.ts:50
`SecurityContext` is an aggregate/entity with 11 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — REDACTED:36
What to do
Move business rules onto the aggregates/entities they govern so invariants are enforced at the source, not in anemic services.
Other · Domain Modelling — Whether entities protect their state — private/init-only setters, and collections handed out as read-only views rather than the mutable backing collection — instead of exposing writable state that bypasses invariants. Softened when a rehydration framework (Marten/EF) is present.
Method: Roslyn (DDD-gated): entities scanned for publicly writable state — public setters, and (C#/VB) own mutable collections handed out through an auto-property, a public field or a bare-field expression getter, where a computed/copying getter is never charged. One finding per entity; score softened when Marten/EF rehydration frameworks present. Deterministic, framework-aware.
Coverage: Population: entities by convention; encapsulation (setter shape) checked exhaustively within the set.
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.
Other · Domain Modelling — Whether repositories are per aggregate root (not per child entity) and keep the persistence query handle behind the contract, so the root's invariants can't be bypassed.
Method: Roslyn (DDD-gated): repository abstraction detection; repositories over non-aggregate-root entities flagged, and (C#/VB) repository INTERFACES whose members return a live persistence query handle (IQueryable/DbSet/IMongoQueryable) — implementations and specification evaluators are out of population by design, since composing a query internally is what an implementation is for. Deterministic, DDD-native.
Coverage: Population: repositories + aggregate roots by NAME convention; per-root repository rule checked within the set.
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.
plugins.ruflo-console.hooks.gfx.raster.Grid's [columns, rows] are judged in plugins.ruflo-console.hooks.controller, plugins.ruflo-console.hooks.gfx.orbital — 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.
v3.@claude-flow.browser.src.infrastructure.security-integration.ThreatScanResult's [pii, threats] are judged in v3.@claude-flow.browser.src.application.cookie-vault-service, v3.@claude-flow.browser.src.application.session-capsule-service — 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.
v3.@claude-flow.cli-core.src.memory.backend.MemoryEntry's [key, namespace] are judged in v3.@claude-flow.guidance.src.memory-gate.MemoryWriteGate, v3.@claude-flow.memory.src.database-provider.JsonBackend, v3.@claude-flow.memory.src.infrastructure.repositories.hybrid-memory-repository.HybridMemoryRepository — 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.
v3.@claude-flow.embeddings.src.rvf-embedding-service.LRUCache's [cache, maxSize] are judged in v3.@claude-flow.embeddings.src.embedding-service.LRUCache, v3.@claude-flow.memory.benchmarks.cache-hit-rate_bench.LRUCache — 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.
v3.@claude-flow.shared.src.core.event-bus.EventBus's [history, maxHistorySize] are judged in v3.@claude-flow.shared.src.events.EventBus, v3.@claude-flow.swarm.src.shared.events.EventBus — 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.
v3.@claude-flow.swarm.src.types.TopologyEdge's [from, to] are judged in v3.@claude-flow.swarm.src.topology-manager.TopologyManager, v3.plugins.teammate-plugin.src.topology-optimizer.TopologyOptimizer — 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.
v3.plugins.perf-optimizer.src.types.ConfigParameter's [current, suggested] are judged in v3.plugins.perf-optimizer.src.bridges.fpga-bridge.PerfFpgaBridge, v3.plugins.perf-optimizer.src.mcp-tools — 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 in this repository's JavaScript/TypeScript: functions whose whole body still throws a "not implemented" error, and placeholder text (lorem ipsum, changeme/replace_me…) left in strings and JSX of non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.
Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.
A shipped function's whole body still throws a "not implemented" error — generated scaffolding that was never completed. Implement it or remove the dead surface. (×4) — v3/plugins/code-intelligence/src/bridges/gnn-bridge.ts:467, v3/plugins/code-intelligence/src/bridges/mincut-bridge.ts:403, v3/plugins/legal-contracts/src/bridges/attention-bridge.ts:311, …
A placeholder string ("lorem ipsum dolor sit amet") is still in shipped code — typical of generated boilerplate that was never filled in. (×3) — plugins/ruflo-protector/scripts/bench.mjs:53, scripts/bench-mod-hooks.mjs:91, REDACTED:49
What to do
Finish or delete the functions that still throw "not implemented", and replace placeholder text before shipping.
Other · Code Health — Unfinished work detected by code SHAPE, not keywords, in this repository's JavaScript/TypeScript: functions that only throw a "not implemented" error, functions that take inputs and return a constant or do nothing, async functions that never await, dead `if (false)` branches, and skeleton classes most of whose methods are holes.
Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, guards that return what the code already falls through to, tests an earlier guard already decided, comparisons against NaN, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.
Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition. (×9) — plugins/ruflo-console/hooks/mission-palette.ts:59, plugins/ruflo-console/hooks/views/events.ts:127, plugins/ruflo-console/scripts/bench-events.mjs:124, …
`storeSet` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — plugins/ruflo-console/scripts/theme-demo.mts:17
`init` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — ruflo/src/ruvocal/src/lib/server/database.ts:44
`delete` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — ruflo/src/ruvocal/src/lib/server/database/rvf.ts:1062
The guard above `return "";` also returns `""`, so no input can make it matter. Implement the distinction that was intended, or delete the guard. — REDACTED:315
`GET` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — ruflo/src/ruvocal/src/routes/conversation/+server.ts:113
`cleanup` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. (×6) — scripts/benchmark-graph.mjs:56, scripts/smoke-graph-pathfinder.mjs:35, scripts/smoke-graph-plugin-adapter.mjs:33, …
`main` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — scripts/check-fingerprint-schema.mjs:81
`testPluginJsonStub` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — scripts/smoke-graph-plugin-adapter.mjs:73
`testAdapterExports` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — scripts/smoke-graph-plugin-adapter.mjs:90
`testAdapterBackwardCompat` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — scripts/smoke-graph-plugin-adapter.mjs:108
`analyzeFailure` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — v3/@claude-flow/browser/src/infrastructure/reasoningbank-adapter.ts:182
`recordVerdict` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — v3/@claude-flow/browser/src/infrastructure/reasoningbank-adapter.ts:235
`requireFile` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — v3/@claude-flow/cli/src/commands/appliance.ts:56
`installClaudeCode` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — REDACTED:2430
`maybeInstallSkillsSh` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — v3/@claude-flow/cli/src/commands/init.ts:338
`createDirectories` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — v3/@claude-flow/cli/src/init/executor.ts:894
`writeSettings` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — v3/@claude-flow/cli/src/init/executor.ts:916
`writeMCPConfig` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — v3/@claude-flow/cli/src/init/executor.ts:1082
`copySkills` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — v3/@claude-flow/cli/src/init/executor.ts:1141
`copyCommands` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — v3/@claude-flow/cli/src/init/executor.ts:1192
`copyAgents` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — v3/@claude-flow/cli/src/init/executor.ts:1260
`writeHelpers` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — v3/@claude-flow/cli/src/init/executor.ts:1375
`writeStatusline` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — v3/@claude-flow/cli/src/init/executor.ts:1511
`writeInitialMetrics` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — v3/@claude-flow/cli/src/init/executor.ts:1679
`writeCapabilitiesDoc` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — v3/@claude-flow/cli/src/init/executor.ts:1796
`writeClaudeMd` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — v3/@claude-flow/cli/src/init/executor.ts:2220
What to do
Finish or delete the unfinished stubs (functions that throw "not implemented", or whose body is empty or a bare constant) — they are dead surface that looks live.
Clear the softer debt: re-enable or delete skipped tests, decide whether each empty function is a deliberate no-op (and say so in a comment), and replace blanket `eslint-disable` / `@ts-nocheck` with targeted, justified suppressions.
Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Add a README to the 14 of 61 project(s) that lack one — worth up to 0.5 pts.
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.
CONTRIBUTING.md links to `docs/adr/`, but `docs/adr` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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. — CONTRIBUTING.md:17
README.md links to `verification.md`, but `verification.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — README.md:470
README.zh-CN.md links to `verification.md`, but `verification.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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.zh-CN.md:340
.claude-plugin/README.md links to `docs/USER_GUIDE.md`, but `.claude-plugin/docs/USER_GUIDE.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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. — .claude-plugin/README.md:639
.claude-plugin/README.md links to `docs/API_REFERENCE.md`, but `.claude-plugin/docs/API_REFERENCE.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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. — .claude-plugin/README.md:640
.claude-plugin/README.md links to `docs/TROUBLESHOOTING.md`, but `.claude-plugin/docs/TROUBLESHOOTING.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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. — .claude-plugin/README.md:642
v3/README.md links to `./docs/README.md`, but `v3/docs/README.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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. — v3/README.md:449
v3/README.md links to `./docs/implementation/`, but `v3/docs/implementation` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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. — v3/README.md:450
v3/README.md links to `./docs/guides/`, but `v3/docs/guides` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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. — v3/README.md:451
docs/dream-cycle/dream-gist-2026-09-05.md names Vitest 4, but the manifest declares `vitest` ^3.2.6. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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/dream-cycle/dream-gist-2026-09-05.md:46
docs/dream-cycle/dream-gist-2026-09-07.md names Vitest 4, but the manifest declares `vitest` ^3.2.6. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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/dream-cycle/dream-gist-2026-09-07.md:45
docs/dream-cycle/dream-gist-2026-09-10.md names Vitest 4, but the manifest declares `vitest` ^3.2.6. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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/dream-cycle/dream-gist-2026-09-10.md:44
docs/dream-cycle/dream-gist-2026-09-21.md names Vitest 4, but the manifest declares `vitest` ^3.2.6. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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/dream-cycle/dream-gist-2026-09-21.md:41
docs/dream-cycle/dream-gist-2026-10-16.md names Vitest 4, but the manifest declares `vitest` ^3.2.6. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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/dream-cycle/dream-gist-2026-10-16.md:37
plugins/ruflo-neural-trader/README.md links to `../../v3/docs/adr/ADR-125-memory-consolidation.md`, but `v3/docs/adr/ADR-125-memory-consolidation.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — plugins/ruflo-neural-trader/README.md:215
plugins/ruflo-protector/README.md links to `../../v3/docs/adr/ADR-404-ruflo-as-a-mod.md`, but `v3/docs/adr/ADR-404-ruflo-as-a-mod.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — plugins/ruflo-protector/README.md:3
plugins/ruflo-ruvector/README.md links to `./docs/adrs/0001-pin-ruvector-0.3.3.md`, but `plugins/ruflo-ruvector/docs/adrs/0001-pin-ruvector-0.3.3.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — plugins/ruflo-ruvector/README.md:241
v3/goal_ui/README.md names Vite 5, but the manifest declares `vite` ^6.3.5. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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. — v3/goal_ui/README.md:68
v3/helpers/README.md links to `./docs/platform-setup.md`, but `v3/helpers/docs/platform-setup.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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. — v3/helpers/README.md:239
v3/helpers/README.md links to `./docs/api-reference.md`, but `v3/helpers/docs/api-reference.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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. — v3/helpers/README.md:241
v3/helpers/README.md links to `./docs/troubleshooting.md`, but `v3/helpers/docs/troubleshooting.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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. — v3/helpers/README.md:242
v3/implementation/README.md links to `../docs/adrs/`, but `v3/docs/adrs` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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. — v3/implementation/README.md:87
v3/@claude-flow/browser/README.md links to `../../CONTRIBUTING.md`, but `v3/CONTRIBUTING.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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. — v3/@claude-flow/browser/README.md:710
v3/@claude-flow/cli/README.md links to `ruflo/assets/ruflo-small.jpeg`, but `v3/@claude-flow/cli/ruflo/assets/ruflo-small.jpeg` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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. — v3/@claude-flow/cli/README.md:3
v3/@claude-flow/cli/README.md links to `docs/assets/ruflo-explained/ch14.jpg`, but `v3/@claude-flow/cli/docs/assets/ruflo-explained/ch14.jpg` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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. — v3/@claude-flow/cli/README.md:21
v3/@claude-flow/cli/README.md links to `docs/ruflo-explained.md`, but `v3/@claude-flow/cli/docs/ruflo-explained.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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. — v3/@claude-flow/cli/README.md:21
v3/@claude-flow/cli/README.md links to `./ruflo-plugins.gif`, but `v3/@claude-flow/cli/ruflo-plugins.gif` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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. — v3/@claude-flow/cli/README.md:51
v3/@claude-flow/cli/README.md links to `docs/metaharness-user-guide.md`, but `v3/@claude-flow/cli/docs/metaharness-user-guide.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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. — v3/@claude-flow/cli/README.md:137
v3/@claude-flow/cli/README.md links to `docs/reviews/intelligence-system-audit-2026-05-29.md`, but `v3/@claude-flow/cli/docs/reviews/intelligence-system-audit-2026-05-29.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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. — v3/@claude-flow/cli/README.md:228
v3/@claude-flow/cli/README.md links to `scripts/benchmark-intelligence.mjs`, but `v3/@claude-flow/cli/scripts/benchmark-intelligence.mjs` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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. — v3/@claude-flow/cli/README.md:228
v3/@claude-flow/cli/README.md links to `./docs/federation/`, but `v3/@claude-flow/cli/docs/federation` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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. — v3/@claude-flow/cli/README.md:258
v3/@claude-flow/cli/README.md links to `./docs/federation/phase7-mesh-bringup.md`, but `v3/@claude-flow/cli/docs/federation/phase7-mesh-bringup.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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. — v3/@claude-flow/cli/README.md:258
v3/@claude-flow/cli/README.md links to `docs/STATUS.md`, but `v3/@claude-flow/cli/docs/STATUS.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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. — v3/@claude-flow/cli/README.md:356
v3/@claude-flow/cli/README.md links to `docs/USERGUIDE.md`, but `v3/@claude-flow/cli/docs/USERGUIDE.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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. — v3/@claude-flow/cli/README.md:357
v3/@claude-flow/cli/README.md links to `verification.md`, but `v3/@claude-flow/cli/verification.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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. — v3/@claude-flow/cli/README.md:360
v3/@claude-flow/cli/README.md links to `docs/TEAM-GATEWAY-CHECKLIST.md`, but `v3/@claude-flow/cli/docs/TEAM-GATEWAY-CHECKLIST.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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. — v3/@claude-flow/cli/README.md:361
v3/@claude-flow/memory/README.md links to `../../../v3/docs/adr/ADR-125-memory-consolidation.md`, but `v3/docs/adr/ADR-125-memory-consolidation.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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. — v3/@claude-flow/memory/README.md:14
What to do
Reconcile the README with reality: CONTRIBUTING.md links to `docs/adr/`, but `docs/adr` does not exist; README.md links to `verification.md`, but `verification.md` does not exist; README.zh-CN.md links to `verification.md`, but `verification.md` does not exist; .claude-plugin/README.md links to `docs/USER_GUIDE.md`, but `.claude-plugin/docs/USER_GUIDE.md` does not exist; .claude-plugin/README.md links to `docs/API_REFERENCE.md`, but `.claude-plugin/docs/API_REFERENCE.md` 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 & versioning6.0 / 10Strong✓ Tool-verified
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.
67/71 types (94%) declared in the published library are public. For a library, every public type is a stability contract — keep implementation types off the surface and expose only the intended API.
What to do
Keep implementation types off the public surface (Rust: `pub(crate)`, or keep the module private) so internals can change without breaking consumers.
Only 18/30 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `plugins/ruflo-ai-team`, `plugins/ruflo-arena`, `plugins/ruflo-chatgpt-federation`, `plugins/ruflo-x-gateway` and 7 more.
`ruflo/src/ruvocal/static/wasm/rvagent_wasm.js` reports through `console.*` at line 672 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ruflo/src/ruvocal/static/wasm/rvagent_wasm.js:672
`ruflo/src/ruvocal/static/wasm/rvagent_wasm.js` reports through `console.*` at line 1467 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ruflo/src/ruvocal/static/wasm/rvagent_wasm.js:1467
`ruflo/src/ruvocal/static/wasm/rvagent_wasm.js` reports through `console.*` at line 1501 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ruflo/src/ruvocal/static/wasm/rvagent_wasm.js:1501
`ruflo/src/ruvocal/static/wasm/rvagent_wasm.js` reports through `console.*` at line 1521 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ruflo/src/ruvocal/static/wasm/rvagent_wasm.js:1521
`ruflo/src/ruvocal/src/routes/conversation/[id]/message/[messageId]/prompt/+server.ts` reports through `console.*` at line 46 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ruflo/src/ruvocal/src/routes/conversation/[id]/message/[messageId]/prompt/+server.ts:46
`ruflo/src/ruvocal/src/routes/api/mcp/servers/+server.ts` reports through `console.*` at line 16 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ruflo/src/ruvocal/src/routes/api/mcp/servers/+server.ts:16
`ruflo/src/ruvocal/src/lib/wasm/idb.ts` reports through `console.*` at line 69 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ruflo/src/ruvocal/src/lib/wasm/idb.ts:69
`ruflo/src/ruvocal/src/lib/wasm/idb.ts` reports through `console.*` at line 76 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ruflo/src/ruvocal/src/lib/wasm/idb.ts:76
`ruflo/src/ruvocal/src/lib/wasm/idb.ts` reports through `console.*` at line 114 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ruflo/src/ruvocal/src/lib/wasm/idb.ts:114
`ruflo/src/ruvocal/src/lib/wasm/idb.ts` reports through `console.*` at line 129 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ruflo/src/ruvocal/src/lib/wasm/idb.ts:129
`ruflo/src/ruvocal/src/lib/wasm/workerClient.ts` reports through `console.*` at line 74 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ruflo/src/ruvocal/src/lib/wasm/workerClient.ts:74
`ruflo/src/ruvocal/src/lib/utils/loadAttachmentsFromUrls.ts` reports through `console.*` at line 109 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ruflo/src/ruvocal/src/lib/utils/loadAttachmentsFromUrls.ts:109
`ruflo/src/ruvocal/src/lib/utils/mcpValidation.ts` reports through `console.*` at line 28 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ruflo/src/ruvocal/src/lib/utils/mcpValidation.ts:28
`ruflo/src/ruvocal/src/lib/utils/mcpValidation.ts` reports through `console.*` at line 35 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ruflo/src/ruvocal/src/lib/utils/mcpValidation.ts:35
`ruflo/src/ruvocal/src/lib/stores/mcpServers.ts` reports through `console.*` at line 63 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ruflo/src/ruvocal/src/lib/stores/mcpServers.ts:63
`ruflo/src/ruvocal/src/lib/stores/mcpServers.ts` reports through `console.*` at line 77 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ruflo/src/ruvocal/src/lib/stores/mcpServers.ts:77
`ruflo/src/ruvocal/src/lib/stores/mcpServers.ts` reports through `console.*` at line 89 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ruflo/src/ruvocal/src/lib/stores/mcpServers.ts:89
`ruflo/src/ruvocal/src/lib/stores/mcpServers.ts` reports through `console.*` at line 100 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ruflo/src/ruvocal/src/lib/stores/mcpServers.ts:100
`ruflo/src/ruvocal/src/lib/stores/mcpServers.ts` reports through `console.*` at line 112 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ruflo/src/ruvocal/src/lib/stores/mcpServers.ts:112
`ruflo/src/ruvocal/src/lib/stores/mcpServers.ts` reports through `console.*` at line 124 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ruflo/src/ruvocal/src/lib/stores/mcpServers.ts:124
`ruflo/src/ruvocal/src/lib/stores/mcpServers.ts` reports through `console.*` at line 218 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ruflo/src/ruvocal/src/lib/stores/mcpServers.ts:218
`ruflo/src/ruvocal/src/lib/stores/mcpServers.ts` reports through `console.*` at line 270 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ruflo/src/ruvocal/src/lib/stores/mcpServers.ts:270
`ruflo/src/ruvocal/src/lib/stores/mcpServers.ts` reports through `console.*` at line 277 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ruflo/src/ruvocal/src/lib/stores/mcpServers.ts:277
`ruflo/src/ruvocal/src/lib/stores/mcpServers.ts` reports through `console.*` at line 503 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ruflo/src/ruvocal/src/lib/stores/mcpServers.ts:503
`ruflo/src/ruvocal/src/lib/stores/wasmMcp.ts` reports through `console.*` at line 128 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ruflo/src/ruvocal/src/lib/stores/wasmMcp.ts:128
`ruflo/src/ruvocal/src/lib/stores/wasmMcp.ts` reports through `console.*` at line 137 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ruflo/src/ruvocal/src/lib/stores/wasmMcp.ts:137
`ruflo/src/ruvocal/src/lib/stores/wasmMcp.ts` reports through `console.*` at line 312 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ruflo/src/ruvocal/src/lib/stores/wasmMcp.ts:312
`ruflo/src/ruvocal/src/lib/stores/wasmMcp.ts` reports through `console.*` at line 328 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ruflo/src/ruvocal/src/lib/stores/wasmMcp.ts:328
`ruflo/src/ruvocal/src/lib/stores/wasmMcp.ts` reports through `console.*` at line 331 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ruflo/src/ruvocal/src/lib/stores/wasmMcp.ts:331
`ruflo/src/ruvocal/src/lib/stores/wasmMcp.ts` reports through `console.*` at line 364 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ruflo/src/ruvocal/src/lib/stores/wasmMcp.ts:364
`ruflo/src/ruvocal/src/lib/stores/wasmMcp.ts` reports through `console.*` at line 367 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ruflo/src/ruvocal/src/lib/stores/wasmMcp.ts:367
`ruflo/src/ruvocal/src/lib/stores/wasmMcp.ts` reports through `console.*` at line 390 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ruflo/src/ruvocal/src/lib/stores/wasmMcp.ts:390
`ruflo/src/ruvocal/src/lib/stores/wasmMcp.ts` reports through `console.*` at line 392 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ruflo/src/ruvocal/src/lib/stores/wasmMcp.ts:392
`ruflo/src/ruvocal/src/lib/stores/wasmMcp.ts` reports through `console.*` at line 441 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ruflo/src/ruvocal/src/lib/stores/wasmMcp.ts:441
`ruflo/src/ruvocal/src/lib/stores/wasmMcp.ts` reports through `console.*` at line 443 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ruflo/src/ruvocal/src/lib/stores/wasmMcp.ts:443
`ruflo/src/ruvocal/src/lib/stores/wasmMcp.ts` reports through `console.*` at line 463 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ruflo/src/ruvocal/src/lib/stores/wasmMcp.ts:463
`ruflo/src/ruvocal/src/lib/server/database.ts` reports through `console.*` at line 55 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ruflo/src/ruvocal/src/lib/server/database.ts:55
`ruflo/src/ruvocal/src/lib/server/database.ts` reports through `console.*` at line 61 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ruflo/src/ruvocal/src/lib/server/database.ts:61
`ruflo/src/ruvocal/src/lib/server/mcp/registry.ts` reports through `console.*` at line 47 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ruflo/src/ruvocal/src/lib/server/mcp/registry.ts:47
What to do
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
Route service-code `console.*` output through the module's structured logger (with named fields), so delivery outcomes and failures reach the log pipeline with a level.
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.
What to do
Dependabot is configured but does not watch `cargo` — add that `package-ecosystem` entry to REDACTED so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
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 outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.
Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.
`fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×5) — REDACTED:1670, REDACTED:1842, v3/@claude-flow/mcp/src/oauth.ts:188, …
What to do
Bound every outbound call: pass `signal: AbortSignal.timeout(ms)` to `fetch`, set `timeout` on the axios instance (`axios.create({ timeout })`), and add retries with back-off (`axios-retry`, `p-retry`) and a breaker (`opossum`, `cockatiel`) around dependencies that fail.
Readiness · Readiness — Whether database schema changes go through versioned migrations rather than being auto-created from the model at startup.
Method: Roslyn scan: EF Core DbContext for a versioned migrations directory versus bare EnsureCreated usage; off .NET, a file scan of dependency manifests, migration histories (Flyway, Liquibase, Alembic, Django, Rails, Prisma, TypeORM, Knex/Sequelize, golang-migrate, goose, Laravel, Doctrine, Diesel/sqlx) and schema auto-create in production source or config. Exhaustive, deterministic.
Readiness · Performance — Whether the code protects its performance with benchmarks — a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.
Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI; off .NET, the same ladder over Go testing.B, Rust criterion/#[bench]/divan, JMH/kotlinx-benchmark, pytest-benchmark/asv/pyperf, tinybench/mitata/vitest bench/benchmark.js and Swift package-benchmark — scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.
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.
`existsSync` in `loadOrCreateCasaSigningKeypair` 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) — plugins/ruflo-agntcy/src/receipts/casa-receipt.ts:154, plugins/ruflo-agntcy/src/receipts/casa-receipt.ts:164
`readFileSync` in `loadOrCreateCasaSigningKeypair` 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. — plugins/ruflo-agntcy/src/receipts/casa-receipt.ts:155
`mkdirSync` in `loadOrCreateCasaSigningKeypair` 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. — plugins/ruflo-agntcy/src/receipts/casa-receipt.ts:164
`writeFileSync` in `loadOrCreateCasaSigningKeypair` 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. — plugins/ruflo-agntcy/src/receipts/casa-receipt.ts:170
`existsSync` in `appendCasaReceipt` 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. — plugins/ruflo-agntcy/src/receipts/casa-receipt.ts:269
`mkdirSync` in `appendCasaReceipt` 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. — plugins/ruflo-agntcy/src/receipts/casa-receipt.ts:270
`appendFileSync` in `appendCasaReceipt` 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. — plugins/ruflo-agntcy/src/receipts/casa-receipt.ts:272
`existsSync` in `runTick` 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. — plugins/ruflo-business-pods/scripts/pod-tick.mjs:331
`readFileSync` in `runTick` 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. — plugins/ruflo-business-pods/scripts/pod-tick.mjs:338
`readFileSync` in `read` 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. — plugins/ruflo-console/tests/adr-helpers.ts:25
`lstatSync` in `stat` 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. — plugins/ruflo-console/tests/adr-helpers.ts:28
`readdirSync` in `list` 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. — plugins/ruflo-console/tests/adr-helpers.ts:35
`mkdtempSync` in `run` 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. — plugins/ruflo-console/tests/adr-helpers.ts:46
`writeFileSync` in `run` 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. — plugins/ruflo-console/tests/adr-helpers.ts:49
`spawnSync` in `run` 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. — plugins/ruflo-console/tests/adr-helpers.ts:51
`rmSync` in `run` 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. — plugins/ruflo-console/tests/adr-helpers.ts:53
`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. — plugins/ruflo-ruos/scripts/cli.mjs:194
`readFileSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — plugins/ruflo-ruos/scripts/cli.mjs:195
`readFileSync` in `record` 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. — plugins/ruflo-ruos/scripts/cli.mjs:240
`existsSync` in `resolveCallTool` 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. — plugins/ruflo-ruos/scripts/lib/ledger.mjs:79
`existsSync` in `readInput` 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. — plugins/ruflo-workflows/scripts/gaia-audit.mjs:838
`readFileSync` in `readInput` 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. — plugins/ruflo-workflows/scripts/gaia-audit.mjs:842
`writeFileSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — plugins/ruflo-workflows/scripts/gaia-audit.mjs:909
`existsSync` in `init` 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. — ruflo/src/ruvocal/src/lib/server/database.ts:49
`mkdirSync` in `init` 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. — ruflo/src/ruvocal/src/lib/server/database.ts:50
`existsSync` in `claudeLeg` 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) — scripts/e2e/leg-claude.mjs:21, scripts/e2e/leg-claude.mjs:36
`readdirSync` in `claudeLeg` 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. — scripts/e2e/leg-claude.mjs:36
`mkdirSync` in `liveClaude` 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. — scripts/e2e/leg-claude.mjs:92
`readFileSync` in `liveClaude` 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. — scripts/e2e/leg-claude.mjs:95
`writeFileSync` in `liveClaude` 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) — scripts/e2e/leg-claude.mjs:97, scripts/e2e/leg-claude.mjs:102, scripts/e2e/leg-claude.mjs:132
`chmodSync` in `liveClaude` 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. — scripts/e2e/leg-claude.mjs:98
`existsSync` in `codexLeg` 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) — scripts/e2e/leg-codex.mjs:21, scripts/e2e/leg-codex.mjs:32, scripts/e2e/leg-codex.mjs:33
`mkdirSync` in `codexLeg` 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. — scripts/e2e/leg-codex.mjs:26
`readFileSync` in `codexLeg` 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. — scripts/e2e/leg-codex.mjs:33
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.
Do you agree with this assessment?
R1 · Type Safety9.0 / 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.
230 duplicated blocks under v3/@claude-flow/ have copies in at least two of the sibling directories aidefence, browser, claims, cli, cli-core, codex (+15 more sibling(s) not listed) — 118 of them are reported below, and 112 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 230 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 230 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 230 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. — v3/@claude-flow/shared/src/types.ts:12
164 duplicated blocks under plugins/ have copies in at least two of the sibling directories ruflo-adr, ruflo-agent, ruflo-agentdb, ruflo-agntcy, ruflo-ai-team, ruflo-aidefence (+40 more sibling(s) not listed) — 153 of them are reported below, and 11 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 164 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 164 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 164 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. — plugins/ruflo-console/hooks/toast-policy.ts:12
120 duplicated blocks under v3/ have copies in at least two of the sibling directories @claude-flow, goal_ui, mcp, plugins, src — 83 of them are reported below, and 37 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 120 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 120 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 120 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. — v3/@claude-flow/shared/src/mcp/server.ts:18
85 duplicated blocks under the repository root have copies in at least two of the sibling directories plugin, plugins, ruflo, scripts, v3 — 47 of them are reported below, and 38 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 85 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 85 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 85 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. — plugins/ruflo-graph-intelligence/src/infrastructure/witness-signer.ts:29
85 duplicated blocks under v3/plugins/ have copies in at least two of the sibling directories code-intelligence, cognitive-kernel, financial-risk, gastown-bridge, healthcare-clinical, hyperbolic-reasoning (+7 more sibling(s) not listed) — 52 of them are reported below, and 33 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 85 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 85 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 85 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. — v3/plugins/cognitive-kernel/src/bridges/cognitive-bridge.ts:49
55 duplicated blocks under v3/@claude-flow/cli/src/ have copies in at least two of the sibling directories appliance, commands, config, funnel, init, mcp-tools (+9 more sibling(s) not listed) — 37 of them are reported below, and 18 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 55 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 55 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 55 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. — v3/@claude-flow/cli/src/commands/autopilot.ts:180
7 duplicated blocks under v3/@claude-flow/cli/ have copies in at least two of the sibling directories bin, cloud-functions, scripts, src — 5 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 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. — v3/@claude-flow/cli/bin/mcp-server.js:44
6 of the duplicated blocks reported below have copies in at least two of the sibling directories api, conversation, models, r, settings under ruflo/src/ruvocal/src/routes/. 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. — ruflo/src/ruvocal/src/routes/api/v2/user/settings/+server.ts:84
6 duplicated blocks under v3/goal_ui/src/ have copies in at least two of the sibling directories components, pages — 2 of them are reported below, and 4 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 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. — v3/goal_ui/src/components/agents/ExecutionDashboard.tsx:233
6 duplicated blocks under v3/goal_ui/supabase/functions/ have copies in at least two of the sibling directories generate-action-items, generate-research-goal, optimize-research-config, research-step — 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. — v3/goal_ui/supabase/functions/generate-research-goal/index.ts:141
5 duplicated blocks under ruflo/src/ruvocal/src/ have copies in at least two of the sibling directories lib, routes — 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. — ruflo/src/ruvocal/src/lib/server/conversation.ts:54
5 duplicated blocks under ruflo/src/ruvocal/src/lib/ have copies in at least two of the sibling directories components, server, stores, types, utils, wasm — 3 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 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. — ruflo/src/ruvocal/src/lib/server/mcp/hf.ts:6
REDACTED:1 · REDACTED:1 — these 2 files are line-for-line copies of one another — 802 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — REDACTED:1
v3/@claude-flow/shared/src/mcp/server.ts:18 · v3/mcp/server.ts:18 — these 2 files are line-for-line copies of one another — 404 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. — v3/@claude-flow/shared/src/mcp/server.ts:18
v3/plugins/gastown-bridge/src/bridges/bd-bridge.ts:56 · v3/plugins/gastown-bridge/src/bridges/gt-bridge.ts:49 — the two spans are one implementation copied and then locally edited — 2009 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. — v3/plugins/gastown-bridge/src/bridges/bd-bridge.ts:56
ruflo/src/mcp-bridge/test-harness.js:22 · ruflo/src/ruvocal/mcp-bridge/test-harness.js:22 — these 2 files are line-for-line copies of one another — 333 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. — ruflo/src/mcp-bridge/test-harness.js:22
REDACTED:37 · REDACTED:38 — the two spans are one implementation copied and then locally edited — 1883 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — REDACTED:37
v3/@claude-flow/shared/src/mcp/tool-registry.ts:17 · v3/mcp/tool-registry.ts:17 — these 2 files are line-for-line copies of one another — 275 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. — v3/@claude-flow/shared/src/mcp/tool-registry.ts:17
v3/@claude-flow/shared/src/mcp/types.ts:23 · v3/mcp/types.ts:23 — these 2 files are line-for-line copies of one another — 257 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. — v3/@claude-flow/shared/src/mcp/types.ts:23
REDACTED:7 · REDACTED:15 · REDACTED:15 — these 3 files are line-for-line copies of one another — 248 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — REDACTED:7
v3/goal_ui/src/components/AgentStep.tsx:5 · v3/goal_ui/src/components/DevelopmentStep.tsx:5 — the two spans are one implementation copied and then locally edited — 1430 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. — v3/goal_ui/src/components/AgentStep.tsx:5
plugins/ruflo-console/hooks/toast-policy.ts:12 · plugins/ruflo-mods/hooks/toast/policy.ts:12 · plugins/ruflo-protector/hooks/toast-policy.ts:12 · plugins/ruflo-swarm/hooks/toast-policy.ts:12 — these 4 files are line-for-line copies of one another — 241 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. — plugins/ruflo-console/hooks/toast-policy.ts:12
v3/@claude-flow/mcp/src/session-manager.ts:7 · v3/@claude-flow/shared/src/mcp/session-manager.ts:17 · v3/mcp/session-manager.ts:17 — these 3 files are line-for-line copies of one another — 205 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. — v3/@claude-flow/mcp/src/session-manager.ts:7
v3/@claude-flow/mcp/src/connection-pool.ts:7 · v3/@claude-flow/shared/src/mcp/connection-pool.ts:16 · v3/mcp/connection-pool.ts:16 — these 3 files are line-for-line copies of one another — 204 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. — v3/@claude-flow/mcp/src/connection-pool.ts:7
v3/plugins/cognitive-kernel/src/bridges/cognitive-bridge.ts:49 · v3/plugins/ruvector-upstream/src/bridges/cognitive.ts:41 — the two spans are one implementation copied and then locally edited — 1362 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. — v3/plugins/cognitive-kernel/src/bridges/cognitive-bridge.ts:49
v3/@claude-flow/shared/src/types.ts:12 · v3/@claude-flow/swarm/src/shared/types.ts:13 — these 2 files are line-for-line copies of one another — 183 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. — v3/@claude-flow/shared/src/types.ts:12
v3/@claude-flow/providers/src/anthropic-provider.ts:139 · v3/@claude-flow/providers/src/cohere-provider.ts:136 — the two spans are one implementation copied and then locally edited — 1137 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. — v3/@claude-flow/providers/src/anthropic-provider.ts:139
v3/@claude-flow/memory/src/sqlite-backend.ts:84 · v3/@claude-flow/memory/src/sqljs-backend.ts:87 — the two spans are one implementation copied and then locally edited — 973 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. — v3/@claude-flow/memory/src/sqlite-backend.ts:84
v3/@claude-flow/cli/src/commands/agent.ts:124 · v3/@claude-flow/cli/src/commands/task.ts:125 — the two spans are one implementation copied and then locally edited — 903 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. — v3/@claude-flow/cli/src/commands/agent.ts:124
plugins/ruflo-neural-trader/src/signed-attribution.mjs:44 · plugins/ruflo-neural-trader/src/signed-attribution.ts:138 — the two spans are one implementation copied and then locally edited — 1218 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. — plugins/ruflo-neural-trader/src/signed-attribution.mjs:44
scripts/smoke-neural-trader-backtest-signing.mjs:47 · scripts/smoke-neural-trader-feature-attribution.mjs:49 — the two spans are one implementation copied and then locally edited — 822 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — scripts/smoke-neural-trader-backtest-signing.mjs:47
v3/@claude-flow/cli/bin/mcp-server.js:44 · REDACTED:811 — the two spans are one implementation copied and then locally edited — 824 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. — v3/@claude-flow/cli/bin/mcp-server.js:44
v3/@claude-flow/mcp/src/transport/stdio.ts:7 · v3/@claude-flow/shared/src/mcp/transport/stdio.ts:14 · v3/mcp/transport/stdio.ts:14 — these 3 files are line-for-line copies of one another — 147 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. — v3/@claude-flow/mcp/src/transport/stdio.ts:7
v3/@claude-flow/neural/src/modes/balanced.ts:32 · v3/@claude-flow/neural/src/modes/research.ts:35 — the two spans are one implementation copied and then locally edited — 981 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. — v3/@claude-flow/neural/src/modes/balanced.ts:32
v3/@claude-flow/mcp/src/types.ts:504 · v3/@claude-flow/shared/src/mcp/types.ts:323 · v3/mcp/types.ts:325 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — v3/@claude-flow/mcp/src/types.ts:504
v3/@claude-flow/shared/src/events.ts:19 · v3/@claude-flow/swarm/src/shared/events.ts:15 — the two spans are one implementation copied and then locally edited — 1022 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. — v3/@claude-flow/shared/src/events.ts:19
ruflo/src/nginx/static/welcome.js:1 · ruflo/src/ruvocal/static/chatui/welcome.js:1 — these 2 files are line-for-line copies of one another — 135 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. — ruflo/src/nginx/static/welcome.js:1
v3/plugins/cognitive-kernel/src/bridges/sona-bridge.ts:282 · v3/plugins/ruvector-upstream/src/bridges/sona.ts:220 — the two spans are one implementation copied and then locally edited — 1089 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. — v3/plugins/cognitive-kernel/src/bridges/sona-bridge.ts:282
v3/@claude-flow/mcp/src/transport/index.ts:12 · v3/@claude-flow/shared/src/mcp/transport/index.ts:22 · v3/mcp/transport/index.ts:21 — these 3 files are line-for-line copies of one another — 130 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. — v3/@claude-flow/mcp/src/transport/index.ts:12
v3/@claude-flow/providers/src/google-provider.ts:147 · v3/@claude-flow/providers/src/ollama-provider.ts:148 — the two spans are one implementation copied and then locally edited — 813 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. — v3/@claude-flow/providers/src/google-provider.ts:147
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.
plugins/ruflo-console/scripts/bench-memmap.mjs:10 reaches into another package with a relative path (../../../v3/@claude-flow/cli/src/memory/embedding-q8.ts) — import the package by name instead. — plugins/ruflo-console/scripts/bench-memmap.mjs:10
plugins/ruflo-console/scripts/bench-snapshot.mjs:8 imports plugins/ruflo-console/tests/fixtures/ruflo-run.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — plugins/ruflo-console/scripts/bench-snapshot.mjs:8
plugins/ruflo-console/scripts/bench-views.mjs:13 imports plugins/ruflo-console/tests/fixtures/ruflo-run.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — plugins/ruflo-console/scripts/bench-views.mjs:13
plugins/ruflo-console/scripts/bench.ts:13 imports plugins/ruflo-console/tests/fixtures/ruflo-run.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — plugins/ruflo-console/scripts/bench.ts:13
plugins/ruflo-console/tests/memmap-vectors.spec.ts:8 reaches past another workspace package's public entry into its internals with a relative path (../../../v3/@claude-flow/cli/src/memory/embedding-q8) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — plugins/ruflo-console/tests/memmap-vectors.spec.ts:8
plugins/ruflo-graph-intelligence/src/application/federation-client.ts:9 imports plugins/ruflo-graph-intelligence/src/infrastructure/witness-signer.ts against the layered-src rules. — plugins/ruflo-graph-intelligence/src/application/federation-client.ts:9
plugins/ruflo-graph-intelligence/src/application/federation-client.ts:10 imports plugins/ruflo-graph-intelligence/src/infrastructure/solver-bridge.ts against the layered-src rules. — plugins/ruflo-graph-intelligence/src/application/federation-client.ts:10
plugins/ruflo-graph-intelligence/src/application/federation-server.ts:13 imports plugins/ruflo-graph-intelligence/src/infrastructure/witness-signer.ts against the layered-src rules. — plugins/ruflo-graph-intelligence/src/application/federation-server.ts:13
plugins/ruflo-graph-intelligence/src/application/federation-server.ts:14 imports plugins/ruflo-graph-intelligence/src/infrastructure/solver-bridge.ts against the layered-src rules. — plugins/ruflo-graph-intelligence/src/application/federation-server.ts:14
plugins/ruflo-graph-intelligence/src/application/streaming-bridge.ts:17 imports plugins/ruflo-graph-intelligence/src/infrastructure/solver-bridge.ts against the layered-src rules. — plugins/ruflo-graph-intelligence/src/application/streaming-bridge.ts:17
REDACTED:2 imports katex/dist/contrib/mhchem.mjs, 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. — REDACTED:2
REDACTED:11 imports highlight.js/lib/core, 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. — REDACTED:11
REDACTED:13 imports highlight.js/lib/languages/javascript, 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. — REDACTED:13
REDACTED:14 imports highlight.js/lib/languages/typescript, 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. — REDACTED:14
REDACTED:15 imports highlight.js/lib/languages/json, 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. — REDACTED:15
REDACTED:16 imports highlight.js/lib/languages/bash, 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. — REDACTED:16
REDACTED:17 imports highlight.js/lib/languages/shell, 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. — REDACTED:17
REDACTED:18 imports highlight.js/lib/languages/python, 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. — REDACTED:18
REDACTED:19 imports highlight.js/lib/languages/go, 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. — REDACTED:19
REDACTED:20 imports highlight.js/lib/languages/rust, 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. — REDACTED:20
REDACTED:21 imports highlight.js/lib/languages/java, 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. — REDACTED:21
REDACTED:22 imports highlight.js/lib/languages/csharp, 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. — REDACTED:22
REDACTED:23 imports highlight.js/lib/languages/cpp, 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. — REDACTED:23
REDACTED:24 imports highlight.js/lib/languages/c, 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. — REDACTED:24
REDACTED:25 imports highlight.js/lib/languages/xml, 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. — REDACTED:25
REDACTED:26 imports highlight.js/lib/languages/css, 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. — REDACTED:26
REDACTED:27 imports highlight.js/lib/languages/scss, 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. — REDACTED:27
REDACTED:28 imports highlight.js/lib/languages/markdown, 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. — REDACTED:28
REDACTED:29 imports highlight.js/lib/languages/yaml, 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. — REDACTED:29
REDACTED:30 imports highlight.js/lib/languages/sql, 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. — REDACTED:30
REDACTED:31 imports highlight.js/lib/languages/plaintext, 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. — REDACTED:31
scripts/auto-retrain-router.mjs:38 reaches into another package with a relative path (../v3/@claude-flow/cli/dist/src/ruvector/router-trajectory.js) — import the package by name instead. — scripts/auto-retrain-router.mjs:38
scripts/auto-retrain-router.mjs:39 reaches into another package with a relative path (../v3/@claude-flow/cli/dist/src/ruvector/router-calibrator.js) — import the package by name instead. — scripts/auto-retrain-router.mjs:39
scripts/auto-retrain-router.mjs:41 reaches into another package with a relative path (../v3/@claude-flow/cli/dist/src/ruvector/model-prices.js) — import the package by name instead. — scripts/auto-retrain-router.mjs:41
scripts/bench-managed-cycle.mts:7 reaches into another package with a relative path (../v3/@claude-flow/cli/src/services/managed-learning.js) — import the package by name instead. — scripts/bench-managed-cycle.mts:7
scripts/bench-managed-cycle.mts:8 reaches into another package with a relative path (../v3/@claude-flow/cli/src/services/managed-learning-store.js) — import the package by name instead. — scripts/bench-managed-cycle.mts:8
REDACTED:8 reaches into another package with a relative path (../v3/@claude-flow/cli/src/services/managed-workflows.ts) — import the package by name instead. — REDACTED:8
scripts/bench-mods-latency.ts:26 reaches into another package with a relative path (../v3/@claude-flow/cli/__tests__/mods/harness) — import the package by name instead. — scripts/bench-mods-latency.ts:26
scripts/bench-mods-latency.ts:26 imports v3/@claude-flow/cli/__tests__/mods/harness.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — scripts/bench-mods-latency.ts:26
scripts/calibration-check.mjs:40 reaches into another package with a relative path (../v3/@claude-flow/cli/dist/src/ruvector/router-calibrator.js) — import the package by name instead. — scripts/calibration-check.mjs:40
What to do
Fix the listed violations: import through the target package's declared public entry rather than a deep path into its internals or a relative path into its directory (163 rows); respect the layer/slice order — import only through a slice's public index and never upward into a higher layer (21 rows); move the shared test helper into a source directory production code may depend on (4 rows); declare the workspace packages these files import in the importing package's own REDACTED dependencies (1 row) — those imports are already bare package specifiers, so the import statements do not change, only the manifest.
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.
runMcpFlow has cyclomatic complexity 131 and cognitive complexity 222; 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. — ruflo/src/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts:41
(anonymous) has cyclomatic complexity 98 and cognitive complexity 119; 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. — v3/@claude-flow/cli/src/commands/hooks.ts:2327
createController has cyclomatic complexity 88 and cognitive complexity 104; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — v3/@claude-flow/memory/src/controller-registry.ts:751
(anonymous) has cyclomatic complexity 87 and cognitive complexity 140; 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. — v3/@claude-flow/cli/src/commands/neural.ts:2806
(anonymous) has cyclomatic complexity 83 and cognitive complexity 112; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — v3/@claude-flow/cli/src/commands/neural.ts:2333
(anonymous) has cyclomatic complexity 80 and cognitive complexity 117; 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. — v3/@claude-flow/cli/src/commands/neural.ts:38
(anonymous) has cyclomatic complexity 78 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. — ruflo/src/ruvocal/src/lib/server/textGeneration/mcp/wasmTools.test.ts:55
diffEvents has cyclomatic complexity 78 and cognitive complexity 94; 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. — plugins/ruflo-console/hooks/data/events.ts:44
main has cyclomatic complexity 78 and cognitive complexity 70; 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. — v3/@claude-flow/hooks/src/cli/guidance-cli.ts:24
run has cyclomatic complexity 77 and cognitive complexity 103; 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. — v3/@claude-flow/cli/src/index.ts:93
paneView has cyclomatic complexity 77 and cognitive complexity 74; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — plugins/ruflo-console/hooks/views/pane.ts:324
picturesOf has cyclomatic complexity 75 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. — plugins/ruflo-console/hooks/views/frames.ts:181
execute has cyclomatic complexity 72 and cognitive complexity 91; 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. — v3/@claude-flow/guidance/tests/analyzer.test.ts:1919
validateEnvelope has cyclomatic complexity 70 and cognitive complexity 60; 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. — plugins/ruflo-console/hooks/data/ap-envelope.ts:114
handler has cyclomatic complexity 69 and cognitive complexity 119; 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. — v3/@claude-flow/cli/src/mcp-tools/hooks-tools.ts:3882
(anonymous) has cyclomatic complexity 69 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. — v3/@claude-flow/cli/src/commands/init.ts:676
(anonymous) has cyclomatic complexity 67 and cognitive complexity 121; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — v3/@claude-flow/cli/src/commands/security.ts:108
writeMessage has cyclomatic complexity 67 and cognitive complexity 110; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — ruflo/src/ruvocal/src/routes/conversation/[id]/+page.svelte:103
(anonymous) has cyclomatic complexity 66 and cognitive complexity 132; 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. — v3/@claude-flow/cli/src/commands/daemon.ts:59
(anonymous) has cyclomatic complexity 66 and cognitive complexity 101; 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. — v3/@claude-flow/cli/src/commands/hooks.ts:4193
What to do
Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
Do you agree with this assessment?
R3 · Large Files3.2 / 10Weak✓ 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.
v3/@claude-flow/cli/src/mcp-tools/hooks-tools.ts has 5357 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — v3/@claude-flow/cli/src/mcp-tools/hooks-tools.ts:1
v3/@claude-flow/cli/src/commands/hooks.ts has 5143 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — v3/@claude-flow/cli/src/commands/hooks.ts:1
v3/@claude-flow/cli/src/commands/neural.ts has 4313 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — v3/@claude-flow/cli/src/commands/neural.ts:1
v3/@claude-flow/cli/src/memory/memory-initializer.ts has 3823 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — v3/@claude-flow/cli/src/memory/memory-initializer.ts:1
v3/@claude-flow/cli/src/memory/memory-bridge.ts has 3692 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — v3/@claude-flow/cli/src/memory/memory-bridge.ts:1
REDACTED has 2892 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
REDACTED has 2831 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
v3/@claude-flow/plugins/src/integrations/ruvector/gnn.ts has 2681 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — v3/@claude-flow/plugins/src/integrations/ruvector/gnn.ts:1
v3/@claude-flow/cli/src/commands/memory.ts has 2205 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — v3/@claude-flow/cli/src/commands/memory.ts:1
v3/@claude-flow/cli/src/init/executor.ts has 2131 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — v3/@claude-flow/cli/src/init/executor.ts:1
v3/@claude-flow/plugins/src/integrations/ruvector/self-learning.ts has 2092 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — v3/@claude-flow/plugins/src/integrations/ruvector/self-learning.ts:1
REDACTED has 2083 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
v3/@claude-flow/cli/src/commands/analyze.ts has 2072 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — v3/@claude-flow/cli/src/commands/analyze.ts:1
v3/plugins/teammate-plugin/src/teammate-bridge.ts has 1989 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — v3/plugins/teammate-plugin/src/teammate-bridge.ts:1
v3/@claude-flow/cli/src/init/helpers-generator.ts has 1831 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — v3/@claude-flow/cli/src/init/helpers-generator.ts:1
v3/@claude-flow/swarm/src/unified-coordinator.ts has 1818 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — v3/@claude-flow/swarm/src/unified-coordinator.ts:1
v3/@claude-flow/claims/src/api/mcp-tools.ts has 1807 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — v3/@claude-flow/claims/src/api/mcp-tools.ts:1
v3/@claude-flow/plugins/src/integrations/ruvector/quantization.ts has 1803 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — v3/@claude-flow/plugins/src/integrations/ruvector/quantization.ts:1
v3/@claude-flow/hooks/src/workers/index.ts has 1801 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — v3/@claude-flow/hooks/src/workers/index.ts:1
v3/@claude-flow/plugins/src/integrations/ruvector/ruvector-bridge.ts has 1786 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — v3/@claude-flow/plugins/src/integrations/ruvector/ruvector-bridge.ts:1
v3/@claude-flow/plugins/src/integrations/ruvector/types.ts has 1776 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — v3/@claude-flow/plugins/src/integrations/ruvector/types.ts:1
v3/@claude-flow/swarm/src/queen-coordinator.ts has 1775 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — v3/@claude-flow/swarm/src/queen-coordinator.ts:1
v3/@claude-flow/cli/src/commands/init.ts has 1767 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — v3/@claude-flow/cli/src/commands/init.ts:1
REDACTED has 1753 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
v3/plugins/gastown-bridge/src/index.ts has 1740 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — v3/plugins/gastown-bridge/src/index.ts:1
v3/@claude-flow/cli/src/commands/daemon.ts has 1719 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — v3/@claude-flow/cli/src/commands/daemon.ts:1
v3/@claude-flow/plugins/src/integrations/ruvector/hyperbolic.ts has 1718 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — v3/@claude-flow/plugins/src/integrations/ruvector/hyperbolic.ts:1
REDACTED has 1713 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
v3/plugins/gastown-bridge/src/mcp-tools.ts has 1676 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — v3/plugins/gastown-bridge/src/mcp-tools.ts:1
v3/@claude-flow/cli/src/commands/embeddings.ts has 1642 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — v3/@claude-flow/cli/src/commands/embeddings.ts:1
v3/@claude-flow/cli/src/memory/intelligence.ts has 1578 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — v3/@claude-flow/cli/src/memory/intelligence.ts:1
v3/goal_ui/src/pages/Index.tsx has 1573 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — v3/goal_ui/src/pages/Index.tsx:1
REDACTED has 1559 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
v3/@claude-flow/plugins/src/integrations/ruvector/streaming.ts has 1497 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — v3/@claude-flow/plugins/src/integrations/ruvector/streaming.ts:1
v3/@claude-flow/cli/src/services/headless-worker-executor.ts has 1482 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — v3/@claude-flow/cli/src/services/headless-worker-executor.ts:1
v3/@claude-flow/cli/src/mcp-tools/agentdb-tools.ts has 1463 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — v3/@claude-flow/cli/src/mcp-tools/agentdb-tools.ts:1
v3/@claude-flow/cli/src/ruvector/model-router.ts has 1430 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — v3/@claude-flow/cli/src/ruvector/model-router.ts:1
v3/@claude-flow/cli/src/commands/security.ts has 1377 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — v3/@claude-flow/cli/src/commands/security.ts:1
REDACTED 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. — REDACTED:1
v3/@claude-flow/cli/src/commands/hive-mind.ts has 1339 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — v3/@claude-flow/cli/src/commands/hive-mind.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 Coverage6.8 / 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.
No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×40) — v3/goal_ui/src/pages/Index.tsx:1, v3/mcp/tools/hooks-tools.ts:1, v3/goal_ui/src/pages/Agents.tsx:1, …
What to do
Add tests that import the unreached modules (directly or through their public entry).
React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).
Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.
32 outdated package(s); JS/npm CVEs scored in D30
What to do
Bump outdated dependencies to current versions to limit upgrade debt.
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 REDACTED 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: REDACTED scanned for test/lint/typecheck script wiring. Deterministic presence check.
Do you agree with this assessment?
R7 · Dead Code7.2 / 10Strong✓ Tool-verified
React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).
Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.
1441 file(s) (~204019 LoC) were excluded from dead-code analysis. This package's entry point(s) resolved, but the walk stopped one hop in: tests/rvf-capability-verify.test.ts imports '../v3/@claude-flow/memory/src/hnsw-lite.js', which is not in the scanned tree. That is usually a generated or build-output module, so reachability cannot see past it and no dead-code claim is made about this package. Nothing is necessarily wrong here.
360 file(s) (~35907 LoC) were excluded from dead-code analysis. This package's entry point(s) resolved, but the walk stopped one hop in: ruflo/src/ruvocal/src/routes/api/mcp/health/+server.ts imports './$types', which is not in the scanned tree. That is usually a generated or build-output module, so reachability cannot see past it and no dead-code claim is made about this package. Nothing is necessarily wrong here. — ruflo/src/ruvocal
99 file(s) (~37495 LoC) were excluded from dead-code analysis. This package's entry point(s) resolved, but the walk stopped one hop in: v3/index.ts imports './core/interfaces/event.interface.js', which is not in the scanned tree. That is usually a generated or build-output module, so reachability cannot see past it and no dead-code claim is made about this package. Nothing is necessarily wrong here. — v3
Unreachable from the 884 application, 408 tooling and 1695 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 (884 application, 408 tooling, 1695 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (v3/plugins/gastown-bridge/src/gupp/adapter.ts, v3/plugins/gastown-bridge/src/gupp/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 — v3/plugins/gastown-bridge/src/gupp/state.ts
no import path from any entry point (884 application, 408 tooling, 1695 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (v3/plugins/gastown-bridge/src/gupp/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 — v3/plugins/gastown-bridge/src/gupp/adapter.ts
no import path from any entry point (884 application, 408 tooling, 1695 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 (×24) — v3/@claude-flow/neural/src/reasoningbank-adapter.ts, v3/goal_ui/src/components/ui/sidebar.tsx, v3/@claude-flow/security/src/CVE-REMEDIATION.ts, …
no import path from any entry point (884 application, 408 tooling, 1695 test roots considered), but 2 in-repo import(s) from 1 other file(s) do name it (v3/@claude-flow/hooks/src/llm/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 — v3/@claude-flow/hooks/src/llm/llm-hooks.ts
no import path from any entry point (884 application, 408 tooling, 1695 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (v3/@claude-flow/memory/src/infrastructure/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 — v3/@claude-flow/memory/src/infrastructure/repositories/hybrid-memory-repository.ts
no import path from any entry point (884 application, 408 tooling, 1695 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (v3/@claude-flow/shared/src/plugins/official/index.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it (×2) — v3/@claude-flow/shared/src/plugins/official/maestro-plugin.ts, v3/@claude-flow/shared/src/plugins/official/hive-mind-plugin.ts
no import path from any entry point (884 application, 408 tooling, 1695 test roots considered), but 3 in-repo import(s) from 3 other file(s) do name it (v3/@claude-flow/memory/src/application/commands/store-memory.command.ts, v3/@claude-flow/memory/src/application/services/memory-application-service.ts, v3/@claude-flow/memory/src/domain/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 — v3/@claude-flow/memory/src/domain/services/memory-domain-service.ts
no import path from any entry point (884 application, 408 tooling, 1695 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (v3/@claude-flow/swarm/src/application/services/swarm-application-service.ts, v3/@claude-flow/swarm/src/domain/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 — v3/@claude-flow/swarm/src/domain/services/coordination-service.ts
no import path from any entry point (884 application, 408 tooling, 1695 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (v3/@claude-flow/security/src/application/services/security-application-service.ts, v3/@claude-flow/security/src/domain/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 — v3/@claude-flow/security/src/domain/services/security-domain-service.ts
no import path from any entry point (884 application, 408 tooling, 1695 test roots considered), but 7 in-repo import(s) from 7 other file(s) do name it (v3/@claude-flow/memory/src/application/commands/store-memory.command.ts, v3/@claude-flow/memory/src/application/queries/search-memory.query.ts, v3/@claude-flow/memory/src/application/services/memory-application-service.ts and 4 more) — 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 — v3/@claude-flow/memory/src/domain/entities/memory-entry.ts
no import path from any entry point (884 application, 408 tooling, 1695 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (v3/@claude-flow/neural/src/application/services/neural-application-service.ts, v3/@claude-flow/neural/src/domain/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 — v3/@claude-flow/neural/src/domain/services/learning-service.ts
no import path from any entry point (884 application, 408 tooling, 1695 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (v3/@claude-flow/memory/src/application/index.ts, v3/@claude-flow/memory/src/application/services/memory-application-service.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 — v3/@claude-flow/memory/src/application/queries/search-memory.query.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.
Imported but not declared in any reachable REDACTED — installs work only by hoisting accident. (×7) — scripts/auto-retrain-router.mjs:37, scripts/track-clones.mjs:95, scripts/smoke-workflows-yaml.mjs:27, …
Imported only as a TYPE and declared in no reachable REDACTED. The import is erased at compile time, so nothing is installed and no runtime resolution depends on it — but type-checking a clean clone will fail. Declare the typings it resolves through (or the package itself) in the owning REDACTED. — ruflo/src/ruvocal/src/lib/types/ConvSidebar.ts:1
Declared in ruflo/src/ruvocal/REDACTED 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)
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.
plugins/ruflo-console/hooks/adr-mission.ts → plugins/ruflo-console/hooks/adr.ts → plugins/ruflo-console/hooks/mission-control.ts → plugins/ruflo-console/hooks/mission-advisor-live.ts → plugins/ruflo-console/hooks/adr-mission.ts (one verified cycle inside a mutually-dependent group of 8 files) — plugins/ruflo-console/hooks/adr-mission.ts:7
plugins/ruflo-console/hooks/ask-claude.ts → plugins/ruflo-console/hooks/views/pane.ts → plugins/ruflo-console/hooks/ask-claude.ts (one verified cycle inside a mutually-dependent group of 15 files) — plugins/ruflo-console/hooks/ask-claude.ts:18
plugins/ruflo-console/hooks/data/cli.ts → plugins/ruflo-console/hooks/data/failure.ts → plugins/ruflo-console/hooks/data/cli.ts (one verified cycle inside a mutually-dependent group of 12 files) — plugins/ruflo-console/hooks/data/cli.ts:8
Other · Security — Read from this repository's JavaScript/TypeScript source: cryptographic hygiene (weak hash or cipher, key material fixed in the source) and outbound TLS (certificate validation, protocol version) — facts about code that hold whether or not it serves anything itself. This repository commits the configuration that serves its own HTTP surface, so that configuration was read in full for the security response headers it sets. The server controls — HTTPS enforcement, HSTS, cookie flags, input validation — are NOT assessed for JavaScript/TypeScript: each is scored as an absence, an absence is only reportable over the production HTTP server, and in this ecosystem the file that opens the port is build output or a framework launcher rather than a file in the source tree. Their absence here is not a finding about this repository. Its Node HTTP listeners were read for HTTPS enforcement alone — TLS served, a redirect to https:// or HSTS, or a TLS-terminating proxy configuration committed beside the server — each judged per server package.
Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.
`rejectUnauthorized: false` is set on a TLS client, so every peer certificate is accepted — including one an attacker presents. Chain, expiry, revocation and hostname are all skipped, so an attacker on the network path can present any certificate and read or rewrite the traffic — the connection is encrypted to the attacker, not to the intended host. Remove the option so Node validates the peer. If the server presents a self-signed or privately-issued certificate, trust THAT issuer rather than every certificate: pass its CA as `ca` (or set `NODE_EXTRA_CA_CERTS`), which keeps the chain and hostname checks on. A managed database or broker that documents `rejectUnauthorized: false` publishes a CA bundle for exactly this purpose. (×9) — v3/@claude-flow/cli/src/commands/ruvector/backup.ts:184, v3/@claude-flow/cli/src/commands/ruvector/backup.ts:584, v3/@claude-flow/cli/src/commands/ruvector/benchmark.ts:238, …
This code fixes PBKDF2-SHA-256 at 100,000 iterations. A key-derivation function's only defence is the cost of ONE guess, and that cost is this number — the algorithm choice does not set it. Current OWASP guidance is 1,300,000 PBKDF2 iterations with HMAC-SHA1, 600,000 with SHA-256 and 210,000 with SHA-512; scrypt at N=2^17, r=8, p=1 (or an equivalent N·r·p product); Argon2id at 19 MiB of memory and 2 iterations (or an equivalent row); bcrypt at a work factor of at least 10. This figure divides the attacker's work by a factor of tens or hundreds against the same stolen hash, on hardware they already own. Where what is derived is short or low-entropy — a PIN, a numeric parental code, a four-character token — the whole keyspace falls in the time this parameter buys, and no salt or constant-time comparison changes that. Raise the count to the current published figure for the PRF you use, measure it on the slowest hardware that must run it (a target of roughly 100 ms per derivation is the usual budget), and read the value from configuration so a deployment can raise it again without a rebuild. Where the derived value must interoperate with a format someone else fixed, the count cannot move — derive a SEPARATE value for anything you own rather than inheriting the external format's price. — v3/@claude-flow/cli/src/appliance/rvfa-runner.ts:272
`server.listen(…)` serves plain HTTP on a network address, and nothing in its package enforces HTTPS: no TLS served (`https.createServer`, Fastify `https`, Nest `httpsOptions`), no redirect of plain requests to `https://`, no `Strict-Transport-Security` (helmet sends it by default), and no TLS-terminating proxy configuration committed beside it — so a browser may talk to it in clear text. (−2.0 on this card.) (×3) — REDACTED:153, REDACTED:229, REDACTED:559
`app.listen(…)` serves plain HTTP on a network address, and nothing in its package enforces HTTPS: no TLS served (`https.createServer`, Fastify `https`, Nest `httpsOptions`), no redirect of plain requests to `https://`, no `Strict-Transport-Security` (helmet sends it by default), and no TLS-terminating proxy configuration committed beside it — so a browser may talk to it in clear text. (−2.0 on this card.) — REDACTED:1784
What to do
Stop accepting every TLS certificate: delete `rejectUnauthorized: false` / `NODE_TLS_REJECT_UNAUTHORIZED=0` so the chain, hostname and expiry are verified, and trust a self-signed or private server by passing its CA (`ca`, or `NODE_EXTRA_CA_CERTS`) — never by switching verification off. This repository constructs a TLS client that accepts any certificate at 9 sites, not one: `v3/@claude-flow/cli/src/commands/ruvector/backup.ts:184` (`rejectUnauthorized: false`), `v3/@claude-flow/cli/src/commands/ruvector/backup.ts:584` (`rejectUnauthorized: false`), `v3/@claude-flow/cli/src/commands/ruvector/benchmark.ts:238` (`rejectUnauthorized: false`), `v3/@claude-flow/cli/src/commands/ruvector/init.ts:226` (`rejectUnauthorized: false`), `v3/@claude-flow/cli/src/commands/ruvector/migrate.ts:306` (`rejectUnauthorized: false`), `v3/@claude-flow/cli/src/commands/ruvector/optimize.ts:166` (`rejectUnauthorized: false`), `v3/@claude-flow/cli/src/commands/ruvector/optimize.ts:517` (`rejectUnauthorized: false`), `v3/@claude-flow/cli/src/commands/ruvector/status.ts:161` (`rejectUnauthorized: false`), and 1 further site(s). Each is a separate decision — fixing only the line this row cites leaves the others in place.
Raise the cost parameter to current guidance — PBKDF2 at 1,300,000 (HMAC-SHA1), 600,000 (SHA-256) or 210,000 (SHA-512) iterations; scrypt at N=2^17, r=8, p=1; bcrypt at a work factor of 10 or more — or move to a memory-hard KDF (Argon2id, scrypt) where the platform offers one. Read the parameter from configuration and tune it to roughly 100 ms per derivation on the slowest hardware that must run it, so the price can be raised again without shipping new code.
Enforce HTTPS on each listed server: serve TLS itself, or redirect plain requests to `https://` and send `Strict-Transport-Security` (`helmet()` does by default) behind the TLS-terminating proxy — and commit that proxy's configuration beside the service. A server only this machine reaches should bind `127.0.0.1`.
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.
The function passed to `new Promise(…)` is `async`. The constructor ignores what its executor returns, so anything this executor throws — every throw inside an `async` function, including after an `await` — rejects a Promise nobody holds instead of the one being constructed: the outer Promise never settles, whoever awaits it hangs, and the error is reported nowhere. If the body needs `await`, it does not need `new Promise` at all: make the enclosing function `async` and `return` the value (or `throw`) directly. If it wraps a callback API, keep the executor synchronous — call the API and `resolve`/`reject` from its callback — and do the awaiting outside it. (×2) — v3/@claude-flow/plugins/src/integrations/agentic-flow.ts:391, v3/@claude-flow/plugins/src/integrations/ruvector/ruvector-bridge.ts:382
`forEach` ignores what its callback returns, so the Promise each `async` call returns is dropped: nothing can await it, the code after this loop runs before any of the awaited work has finished (a function that `await`s around this loop still returns early), and a rejection is never handled — in Node.js an unhandled rejection terminates the process by default, and in a browser it is lost. Iterate with `for (const item of items) { await … }` when the work must run in order, or `await Promise.all(items.map(async (item) => { … }))` when it may run concurrently, so the enclosing function finishes only when the work does and its failures reach the caller. Where firing and forgetting is genuinely intended, make the callback's whole body a `try { … } catch (e) { … }` that handles the failure, so it cannot escape. (×2) — ruflo/src/ruvocal/src/routes/api/v2/export/+server.ts:61, ruflo/src/ruvocal/scripts/populate.ts:155
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.
This function unwraps IPv4-MAPPED IPv6 (`::ffff:`, line 90) and then rejects `10.0.0.0/8` on its IPv4 path — but the IPv6 decision at line 85 classifies the address as written, and IPv4 reaches IPv6 through three MORE embeddings this function never mentions: IPv4-compatible (`::a.b.c.d`), 6to4 (`2002::/16`) and NAT64 (`64:ff9b::/96`). So `::10.0.0.1`, `2002:0a00:0001::` and `64:ff9b::10.0.0.0` all name a host inside `10.0.0.0/8` — the range this same function declares non-public — and all reach the IPv6 decision un-unwrapped, taking the opposite verdict. Unwrap every embedding to its IPv4 form before classifying, or reject any IPv6 address carrying an embedded IPv4 outright. — v3/@claude-flow/cli/src/mcp-tools/http-fetch-tools.ts:85
What to do
Each finding names the IPv4 branch that rejects the host and the IPv6 branch that accepts the same host in another notation. Confirm from the two, then unwrap every IPv4-in-IPv6 embedding before classifying, or reject non-native IPv6 outright.
Do you agree with this assessment?
X15 · Unvalidated length from an untrusted reader3.5 / 10Weak✓ Tool-verified
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.
`dims` is read from the bytes being parsed at line 526 (`getUint32`), then used to size a `new Float32Array` at line 538 — and nowhere in its scope is `dims` bounded from above — compared to a limit, clamped, or checked against the input that remains (a zero or sign test, or the loop that counts up to it, bounds nothing). Whoever wrote those bytes therefore chooses the allocation directly: a 32-bit length asks for up to 4 GiB before a single byte of the payload is known to exist, which either exhausts the process's memory or throws a `RangeError` out of a parser whose failure path was written for malformed input, not for hostile input. Bound `dims` against the bytes actually remaining and a maximum the format allows before allocating. — v3/@claude-flow/embeddings/src/rvf-embedding-cache.ts:538
What to do
Each finding names the read that takes the length from the input and the site that spends it, and states that the value is never compared in between. Confirm from the two, then bound the length against the remaining stream before using it.
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 document1.4 / 10Critical✓ Tool-verified
Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.
Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.
`redactSensitiveFields` is exported and takes `obj: Record<string, unknown>` from its caller, and it calls itself at line 479 (`redactSensitiveFields`) with a piece of `obj` (and at line 483) — and nowhere in `redactSensitiveFields` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `redactSensitiveFields` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — v3/plugins/gastown-bridge/src/sanitizers.ts:479
`sanitizeMetadata` is exported and takes `metadata: Record<string, unknown>` from its caller, and it calls itself at line 573 (`sanitizeMetadata`) with a piece of `metadata` — and nowhere in `sanitizeMetadata` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `sanitizeMetadata` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — v3/plugins/gastown-bridge/src/sanitizers.ts:573
`assertMatchesSnapshot` is exported, takes a document from its caller (line 222) and hands it to `removeFields`, which calls itself at line 261 (`removeFields`) with a piece of `obj` — and nowhere in `removeFields` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `removeFields` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — v3/@claude-flow/testing/src/helpers/assertion-helpers.ts:261
`canonicalizePolicy` is exported, takes a document from its caller (line 19) and hands it to `normalize`, which calls itself at line 4 (`normalize`) with a piece of `value` (and at line 10) — and nowhere in `normalize` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `normalize` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — v3/@claude-flow/security/src/policy/canonical.ts:4
`canonicalizeProductPlane` is exported and takes `value: unknown` from its caller, and it calls itself at line 1107 (`canonicalizeProductPlane`) with a piece of `value` (and at line 1120) — and nowhere in `canonicalizeProductPlane` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `canonicalizeProductPlane` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — v3/@claude-flow/security/src/policy/product-plane.ts:1107
`canonicalize` is exported and takes `value: unknown` from its caller, and it calls itself at line 116 (`canonicalize`) with a piece of `value` (and at line 119) — and nowhere in `canonicalize` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `canonicalize` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — v3/@claude-flow/security/src/plugins/integrity-verifier.ts:116
`deepEncode` is exported and takes `value: unknown` from its caller, and it calls itself at line 68 (`deepEncode`) with a piece of `value` (and at line 70, line 73) — and nowhere in `deepEncode` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `deepEncode` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — v3/@claude-flow/neural/src/utils/serialize.ts:68
`deepDecode` is exported and takes `value: unknown` from its caller, and it calls itself at line 82 (`deepDecode`) with a piece of `value` (and at line 84, line 87) — and nowhere in `deepDecode` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `deepDecode` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — v3/@claude-flow/neural/src/utils/serialize.ts:82
`validateSchema` is exported and takes `data: unknown` from its caller, and it calls itself at line 128 (`validateSchema`) with a piece of `data` (and at line 157) — and nowhere in `validateSchema` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `validateSchema` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — REDACTED:128
`canonicalJson` is exported, takes a document from its caller (line 109) and hands it to `encode`, which calls itself at line 134 (`encode`) with a piece of `item` (and at line 143) — and nowhere in `encode` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `encode` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — v3/@claude-flow/codex/src/harness/repository-state.ts:134
`canonicalizeJcs` is exported, takes a document from its caller (line 250) and hands it to `assertJsonValue`, which calls itself at line 232 (`assertJsonValue`) with a piece of `value` (and at line 239) — and nowhere in `assertJsonValue` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `assertJsonValue` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — v3/@claude-flow/cli/src/services/flywheel-receipt.ts:232
`canonicalizeJcs` is exported, takes a document from its caller (line 250) and hands it to `encode`, which calls itself at line 254 (`encode`) with a piece of `v` (and at line 256) — and nowhere in `encode` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `encode` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — v3/@claude-flow/cli/src/services/flywheel-receipt.ts:254
`assertReceiptNumberDomain` is exported and takes `value: unknown` from its caller, and it calls itself at line 291 (`assertReceiptNumberDomain`) with a piece of `value` (and at line 296) — and nowhere in `assertReceiptNumberDomain` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `assertReceiptNumberDomain` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — v3/@claude-flow/cli/src/services/flywheel-receipt.ts:291
`encodePolicyFractions` is exported and takes `value: unknown` from its caller, and it calls itself at line 352 (`encodePolicyFractions`) with a piece of `value` (and at line 355) — and nowhere in `encodePolicyFractions` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `encodePolicyFractions` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — v3/@claude-flow/cli/src/services/flywheel-receipt.ts:352
`canonical` is exported and takes `v: unknown` from its caller, and it calls itself at line 31 (`canonical`) with a piece of `v` (and at line 32) — and nowhere in `canonical` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `canonical` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — v3/@claude-flow/cli/src/services/managed-learning.ts:31
`sanitize` is exported and takes `input: Record<string, unknown>` from its caller, and it calls itself at line 203 (`this.sanitize`) with a piece of `input` — and nowhere in `sanitize` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `sanitize` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — v3/@claude-flow/cli/src/production/error-handler.ts:203
`canonicalJSON` is exported and takes `value: unknown` from its caller, and it calls itself at line 46 (`canonicalJSON`) with a piece of `value` (and at line 50) — and nowhere in `canonicalJSON` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `canonicalJSON` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — v3/@claude-flow/browser/src/infrastructure/witness-signer.ts:46
`deepestChild` is exported and takes `el: HTMLElement` from its caller, and it calls itself at line 3 (`deepestChild`) with a piece of `el` — and nowhere in `deepestChild` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `deepestChild` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — ruflo/src/ruvocal/src/lib/utils/deepestChild.ts:3
`attachFileRefsToArgs` is exported, takes a document from its caller (line 104) and hands it to `visit`, which calls itself at line 114 (`visit`) with a piece of `node` (and at line 121) — and nowhere in `visit` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `visit` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — REDACTED:114
`remoteHostOf` is exported, takes a document from its caller (line 31) and hands it to `recordOf`, which calls itself at line 57 (`recordOf`) with a piece of `value` — and nowhere in `recordOf` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `recordOf` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — plugins/ruflo-swarm/hooks/reader/ruos.ts:57
`flag` is exported and takes `value: unknown` from its caller, and it calls itself at line 21 (`flag`) with a piece of `value` — and nowhere in `flag` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `flag` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — plugins/ruflo-protector/hooks/options.ts:21
`flag` is exported and takes `value: unknown` from its caller, and it calls itself at line 19 (`flag`) with a piece of `value` — and nowhere in `flag` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `flag` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — plugins/ruflo-loop-workers/hooks/options.ts:19
`canonicalJSON` is exported and takes `value: unknown` from its caller, and it calls itself at line 39 (`canonicalJSON`) with a piece of `value` (and at line 42) — and nowhere in `canonicalJSON` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `canonicalJSON` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — plugins/ruflo-graph-intelligence/src/infrastructure/witness-signer.ts:39
`render` is exported, takes a document from its caller (line 273) and hands it to `flat`, which calls itself at line 143 (`flat`) with a piece of `children` — and nowhere in `flat` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `flat` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — plugins/ruflo-console/tui/ansi.ts:143
`render` is exported, takes a document from its caller (line 273) and hands it to `textOf`, which calls itself at line 148 (`textOf`) with a piece of `children` — and nowhere in `textOf` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `textOf` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — plugins/ruflo-console/tui/ansi.ts:148
`parseTheme` is exported, takes a document from its caller (line 35) and hands it to `exact`, which calls itself at line 37 (`exact`) with a piece of `value` — and nowhere in `exact` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `exact` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — plugins/ruflo-console/hooks/themes.ts:37
`parseRecord` is exported, takes a document from its caller (line 95) and hands it to `keys`, which calls itself at line 103 (`keys`) with a piece of `value` — and nowhere in `keys` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `keys` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — plugins/ruflo-console/hooks/whatsnew.ts:103
`linesOf` is exported and takes `node: unknown` from its caller, and it calls itself at line 433 (`linesOf`) with a piece of `node` (and at line 447) — and nowhere in `linesOf` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `linesOf` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — plugins/ruflo-console/hooks/views/pane.ts:433
`validateEnvelope` is exported, takes a document from its caller (line 114) and hands it to `money`, which calls itself at line 165 (`money`) with a piece of `value` — and nowhere in `money` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `money` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — plugins/ruflo-console/hooks/data/ap-envelope.ts:165
`canonical` is exported and takes `value: unknown` from its caller, and it calls itself at line 212 (`canonical`) with a piece of `value` (and at line 213) — and nowhere in `canonical` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `canonical` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — plugins/ruflo-console/hooks/data/ap-envelope.ts:212
`tool` is exported, takes a document from its caller (line 91) and hands it to `list`, which calls itself at line 132 (`list`) with a piece of `value` (and at line 141) — and nowhere in `list` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `list` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — plugins/ruflo-console/hooks/data/devtools.ts:132
`refOf` is exported and takes `value: unknown` from its caller, and it calls itself at line 104 (`refOf`) with a piece of `value` (and at line 109, line 113, line 114, line 121, line 122, line 124, line 133, line 138, line 139, line 186, line 284) — and nowhere in `refOf` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `refOf` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — plugins/ruflo-console/hooks/data/evolve.ts:104
`refOf` is exported, takes a document from its caller (line 83) and hands it to `count`, which calls itself at line 286 (`count`) with a piece of `value` (and at line 301, line 302, line 303, line 304, line 316) — and nowhere in `count` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `count` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — plugins/ruflo-console/hooks/data/evolve.ts:286
`callsOf` is exported, takes a document from its caller (line 39) and hands it to `whole`, which calls itself at line 40 (`whole`) with a piece of `v` (and at line 49, line 54, line 91) — and nowhere in `whole` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `whole` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — plugins/ruflo-console/hooks/data/mods.ts:40
`modVersionOf` is exported and takes `v: unknown` from its caller, and it calls itself at line 94 (`modVersionOf`) with a piece of `v` — and nowhere in `modVersionOf` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `modVersionOf` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — plugins/ruflo-console/hooks/data/mods.ts:94
`rureLines` is exported, takes a document from its caller (line 230) and hands it to `text`, which calls itself at line 27 (`text`) with a piece of `value` (and at line 77, line 80, line 86, line 87, line 88, line 89, line 102, line 104, line 107, line 112, line 118, line 126, line 128, line 129, line 130, line 141, line 162) — and nowhere in `text` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `text` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — plugins/ruflo-console/hooks/data/rure.ts:27
`skillIdOf` is exported and takes `value: unknown` from its caller, and it calls itself at line 213 (`skillIdOf`) with a piece of `value` — and nowhere in `skillIdOf` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `skillIdOf` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — plugins/ruflo-console/hooks/data/skills.ts:213
`summaryOf` is exported, takes a document from its caller (line 77) and hands it to `asRecord`, which calls itself at line 101 (`asRecord`) with a piece of `value` (and at line 149) — and nowhere in `asRecord` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `asRecord` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — plugins/ruflo-console/hooks/data/wf-activity.ts:101
`flag` is exported and takes `value: unknown` from its caller, and it calls itself at line 22 (`flag`) with a piece of `value` — and nowhere in `flag` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `flag` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — plugins/ruflo-autopilot/hooks/options.ts:22
`flag` is exported and takes `value: unknown` from its caller, and it calls itself at line 29 (`flag`) with a piece of `value` (and at line 32) — and nowhere in `flag` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `flag` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — plugins/ruflo-agentdb/hooks/options.ts:29
What to do
Each finding names the externally-callable member that accepts the document and the self-call that descends, and states that no depth parameter or counter exists anywhere in the walk. Confirm from the two, then thread a depth argument through the walk and reject documents past a fixed maximum, or rewrite it with an explicit stack.
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.
`runIntegratedNeural` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — the `CLAUDE_FLOW_ROUTER_NEURAL` environment variable (set at line 137, cleared at line 168) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception thrown in between — or by a promise that rejects at an `await`, and while this function is suspended at one every other callback the event loop runs sees the moved value too: the process then keeps the overwritten value for the rest of its life, and every later relative path, child-process launch or config read in ANY module resolves against it. That failure is silent and remote from its cause — the function that breaks is not the function that moved the directory. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — the `cwd` and `env` options of `child_process.spawn`/`exec`/`execSync` (or `Deno.Command`) scope both to the CHILD — or build absolute paths with `path.resolve`. Where the global genuinely must move, wrap it `try`/`finally` so the restore runs on every path. — scripts/benchmark-router.mjs:136
What to do
Each finding names the statement that changes the process-global value and the statement that puts it back. Confirm from the two that nothing between them is protected — then prefer removing the mutation over widening the restore: a working directory or an environment variable passed to the operation that needs it (the `cwd` and `env` options of `child_process`, or of `Deno.Command`) is scoped to that operation, which is what the save-and-restore was trying to approximate. Where the global genuinely must move, a `try`/`finally` is the least that makes the restore unconditional. In Python the same holds for `os.chdir`, `os.environ` and `sys.stdout`: pass `cwd=`/`env=` to `subprocess`, or use `contextlib.chdir`/`redirect_stdout`, rather than moving the global by hand.
Other · Code Health — Whether async functions that make a cancellable request accept or pass on an AbortSignal (adoption curve).
Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.
Only 70/118 async functions that make a cancellable request (fetch, axios, ky, ofetch) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
`loadWasmBrowser` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — v3/plugins/prime-radiant/src/wasm-bridge.ts:238
`executeResearchStep` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — v3/goal_ui/supabase/functions/research-api/index.ts:185
`checkWidget` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — v3/goal_ui/src/pages/Demo.tsx:48
`__wbg_init` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. (×2) — v3/@claude-flow/watermark/web/ruflo_watermark.js:372, ruflo/src/ruvocal/static/wasm/rvagent_wasm.js:1513
`postForm` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — v3/@claude-flow/security/src/oauth/client.ts:92
`exchangeManualCode` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — v3/@claude-flow/security/src/oauth/client.ts:137
`doHealthCheck` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. (×6) — v3/@claude-flow/providers/src/anthropic-provider.ts:281, v3/@claude-flow/providers/src/cohere-provider.ts:274, v3/@claude-flow/providers/src/google-provider.ts:279, …
`listModels` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. (×2) — v3/@claude-flow/providers/src/ollama-provider.ts:243, v3/@claude-flow/providers/src/ruvector-provider.ts:450
`getSonaMetrics` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — v3/@claude-flow/providers/src/ruvector-provider.ts:653
`triggerSonaLearning` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — v3/@claude-flow/providers/src/ruvector-provider.ts:684
`searchMemory` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — v3/@claude-flow/providers/src/ruvector-provider.ts:700
`exchangeCode` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — v3/@claude-flow/mcp/src/oauth.ts:165
`refreshTokens` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — v3/@claude-flow/mcp/src/oauth.ts:215
`fetchFromIPFS` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — v3/@claude-flow/cli/src/transfer/store/download.ts:156
`uploadToWeb3Storage` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — v3/@claude-flow/cli/src/transfer/ipfs/upload.ts:76
`uploadToPinata` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — v3/@claude-flow/cli/src/transfer/ipfs/upload.ts:137
`pinContent` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — v3/@claude-flow/cli/src/transfer/ipfs/upload.ts:291
`unpinContent` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — v3/@claude-flow/cli/src/transfer/ipfs/upload.ts:337
`uploadToLocalIPFS` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — v3/@claude-flow/cli/src/transfer/ipfs/upload.ts:418
`pinToIPFS` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. (×2) — v3/@claude-flow/cli/scripts/publish-registry.ts:156, REDACTED:65
`callOpenRouter` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. (×2) — scripts/benchmark-models-midtier.mjs:325, scripts/benchmark-models.mjs:210
`callOR` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — scripts/benchmark-seed-corpus.mjs:261
`fetchNpmDownloads` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — scripts/track-clones.mjs:79
`RequestHandler` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. (×2) — ruflo/src/ruvocal/src/routes/api/v2/user/billing-orgs/+server.ts:8, ruflo/src/ruvocal/src/routes/api/v2/debug/refresh/+server.ts:6
`createShareLink` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — ruflo/src/ruvocal/src/lib/createShareLink.ts:6
`loadAttachmentsFromUrls` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — ruflo/src/ruvocal/src/lib/utils/loadAttachmentsFromUrls.ts:69
`refreshMcpServers` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — ruflo/src/ruvocal/src/lib/stores/mcpServers.ts:167
`healthCheckServer` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — ruflo/src/ruvocal/src/lib/stores/mcpServers.ts:404
`setSettings` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — ruflo/src/ruvocal/src/lib/stores/settings.ts:53
What to do
Thread an AbortSignal through async functions that make requests, so the work stops when its caller gives up.
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.
`debug` at line 988 is called with an argument built by `Object.keys(vars)` (line 988), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch. — v3/plugins/gastown-bridge/src/formula/executor.ts:988
`debug` at line 81 is called with an argument built by `servers.map((s) => ({ name : s.name, url : s.url }))` (line 82), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch. — ruflo/src/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts:81
`debug` at line 104 is called with an argument built by `servers.map((s) => ({ name : s.name, url : s.url, hasAuth : !!s.headers?.Authorization, }))` (line 107), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch. — ruflo/src/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts:104
`debug` at line 126 is called with an argument built by `servers.map((s) => s.name)` (line 127), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch. — ruflo/src/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts:126
`debug` at line 227 is called with an argument built by `servers.map((s) => s.name)` (line 228), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch. — ruflo/src/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts:227
`debug` at line 86 is called with an argument built by `tools.map((t) => t?.name)` (line 91), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch. — ruflo/src/ruvocal/src/lib/server/mcp/tools.ts:86
What to do
Each finding names the diagnostic call and the expression inside its argument whose cost scales with a collection. Confirm from the two that the argument is built before the call — that is JavaScript's evaluation order, not a guess — then put the construction behind the level check the logger offers (`if (logger.isLevelEnabled('debug'))` for pino and winston, `isDebugEnabled()` for log4js, the repository's own debug flag where it has one), or hand the logger the object and a format string (`logger.debug({ payload }, 'raw request')`) so the serialising happens only when the line is written. Moving the call is not the fix: it is the join/projection/stringify in the argument that is paid, wherever the call sits.
Do you agree with this assessment?
X24 · Document value interpolated into markup unescaped7.0 / 10Strong✓ 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.
`escapeHTML(source.link)` 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. — REDACTED:238
`escapeHTML(safeHref)` 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. — REDACTED:355
`safeTitle` 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. (×2) — REDACTED:367, REDACTED:370
`safeSrc` 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. — REDACTED:372
`Object.entries(THEMES).map(([theme,prefix])=>`
${prefix} [data-chart=${id}] {
${colorConfig.map(([key,itemConfig])=>{…` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` 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. — REDACTED:71
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 `for` loop leaves the `RefCell` it is walking alone — safe Rust rejects a body that changes the collection its loop borrows at compile time, except through interior mutability: a `RefCell` borrowed in the loop's header stays borrowed until the loop ends, so a `borrow_mut()` of it inside the body panics with `already borrowed: BorrowMutError` and the remaining elements are never seen. Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items are never seen.
Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.
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.
`catch (error)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — v3/src/infrastructure/mcp/MCPServer.ts:83
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. (×31) — v3/plugins/teammate-plugin/src/semantic-router.ts:369, v3/plugins/teammate-plugin/src/teammate-bridge.ts:1962, v3/plugins/teammate-plugin/src/teammate-bridge.ts:2014, …
`catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×5) — v3/plugins/gastown-bridge/src/wasm/loader.ts:166, v3/plugins/code-intelligence/src/mcp-tools.ts:672, v3/plugins/code-intelligence/src/mcp-tools.ts:681, …
`.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. (×3) — v3/@claude-flow/swarm/src/consensus/federation-transport.ts:129, v3/@claude-flow/swarm/src/consensus/federation-transport.ts:174, v3/@claude-flow/swarm/src/consensus/transport.ts:274
What to do
Swallowed exception (caught, then discarded)
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.
Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.
Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `REDACTED` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.
`debug` at line 103 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.debug({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.debug('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — REDACTED:103
`error` at line 27 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — ruflo/src/ruvocal/src/routes/api/v2/user/billing-orgs/+server.ts:27
`info` at line 51 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — ruflo/src/ruvocal/src/routes/api/v2/user/billing-orgs/+server.ts:51
`info` at line 108 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — ruflo/src/ruvocal/src/routes/api/mcp/health/+server.ts:108
`info` at line 115 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — ruflo/src/ruvocal/src/routes/api/mcp/health/+server.ts:115
`info` at line 171 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — ruflo/src/ruvocal/src/routes/api/mcp/health/+server.ts:171
`info` at line 58 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — ruflo/src/ruvocal/src/lib/server/adminToken.ts:58
`info` at line 237 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — ruflo/src/ruvocal/src/lib/server/metrics.ts:237
`error` at line 21 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — ruflo/src/ruvocal/src/lib/server/sendSlack.ts:21
`info` at line 248 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — ruflo/src/ruvocal/src/lib/server/textGeneration/generate.ts:248
`warn` at line 164 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — ruflo/src/ruvocal/src/lib/server/database/postgres.ts:164
`debug` at line 52 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.debug({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.debug('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — ruflo/src/ruvocal/src/lib/migrations/migrations.ts:52
`debug` at line 59 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.debug({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.debug('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — ruflo/src/ruvocal/src/lib/migrations/migrations.ts:59
`debug` at line 66 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.debug({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.debug('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — ruflo/src/ruvocal/src/lib/migrations/migrations.ts:66
`error` at line 89 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — ruflo/src/ruvocal/src/lib/migrations/migrations.ts:89
`info` at line 73 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — ruflo/src/ruvocal/src/lib/migrations/routines/09-delete-empty-conversations.ts:73
Other · Code Health — Whether strict null checking is enabled and not undermined by heavy `!` assertion — TypeScript's `strictNullChecks` (which `strict` turns on) is what makes `string` exclude `null` and `undefined`, and the postfix `!` is the operator that silences it.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
83/84 of this repository's type-checking configuration(s) turn on strict null checking (`"strict": true`, or `"strictNullChecks": true`). A configuration that states neither is counted as OFF, because off is tsc's own default; a solution-style one whose `"files"` is empty and whose `"references"` point at other projects is in neither number, because it checks no source itself. Where it is off, `string` admits `null` and `undefined`: passing a value that is null compiles silently and throws on the first property access.
~1.6 `!` null assertions per 1k TypeScript source lines — 1007 assertion(s) across the 630604 source line(s) of the 2198 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: v3/plugins/hyperbolic-reasoning/src/bridges/gnn-bridge.ts (32), v3/plugins/neural-coordination/src/mcp-tools.ts (30), v3/@claude-flow/memory/src/sqlite-backend.ts (27). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce.
What to do
The findings name the configuration each number was taken from and, for the assertions, the files that hold them. Turn null checking on where it is off — `"strict": true` in the base tsconfig that the others extend switches `strictNullChecks` on with the rest of the family — and then resolve the assertions rather than adding to them. A `!` on a value the checker could show to be null is a promise the author cannot check from where they are standing, and each one is a `TypeError: Cannot read properties of null` waiting for the path that makes it true; where the value genuinely cannot be null, say something the checker can see instead (narrow it with a test, make the property required, drop the `?`).
Do you agree with this assessment?
WCAG coverage — what static analysis assessed
Statically assessed 15 of 55 WCAG 2.2 Level A/AA success criteria (27%; ≈30% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 40 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).
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 — 9 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.
X10 Duplicated predicate — 25 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X6 Hand-rolled structured-format parsing — 13 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 3 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
C3 Audit Trail — Not assessed: this repository stores data through 'pg' (v3/@claude-flow/plugins/src/integrations/ruvector/ruvector-bridge.ts:256) but declares no persisted model this check reads (TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entities, Mongoose schemas, Sequelize or Drizzle tables, Knex migrations, Prisma models). Personal data may be written through raw SQL or a hosted backend, so whether its changes need an audit trail could not be established, and the trail's absence is not scored.
C4 Data Retention — Not assessed: this repository stores data through 'pg' (v3/@claude-flow/plugins/src/integrations/ruvector/ruvector-bridge.ts:256) but declares no persisted model this check reads (TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entities, Mongoose schemas, Sequelize or Drizzle tables, Knex migrations, Prisma models). Personal data may be written through raw SQL or a hosted backend, so whether a retention limit applies here could not be established, and its absence is not scored.
C5 Data-Subject Rights — Not assessed: this repository stores data through 'pg' (v3/@claude-flow/plugins/src/integrations/ruvector/ruvector-bridge.ts:256) but declares no persisted model this check reads (TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entities, Mongoose schemas, Sequelize or Drizzle tables, Knex migrations, Prisma models). Personal data may be written through raw SQL or a hosted backend, so whether data-subject rights apply here could not be established, and their absence is not scored.
Not included — 26 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.
AX1 Captive dependencies — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. Rust's compiler refuses unsynchronised shared mutation — a value shared across threads must be Sync — so the race this check looks for cannot be written. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — compose up failed (exit 18 — an image could not be pulled) — postgres Pulling adminer Pulling adminer Error Get "https://registry-1.docker.io/v2/": Forbidden postgres Error context canceled Error response from daemon: Get "https://registry-1.docker.io/v2/": Forbidden; the earlier `compose pull` step reported: postgres Pulling adminer Pulling adminer Error Get "https://registry-1.docker.io/v2/": Forbidden postgres Error context canceled Error response from daemon: Get "https://registry-1.docker.io/v2/": Forbidden; the runtime sandbox reaches registries only through the in-fence pull-through mirror, so an image the mirror does not carry cannot be fetched — this is a limit of our sandbox, not of your stack; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
C1 Data Protection — Not assessed: this repository stores data through 'pg' (v3/@claude-flow/plugins/src/integrations/ruvector/ruvector-bridge.ts:256) but declares no persisted model this check reads (TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entities, Mongoose schemas, Sequelize or Drizzle tables, Knex migrations, Prisma models). Personal data may be written through raw SQL or a hosted backend, so the absence of a personal-data field here is not evidence that none is stored, and encryption at rest is not scored over a subject that could not be established.
D12 Dependency Hygiene — Not scored — 27 direct Cargo declaration(s) were read, but the outdated signal needs crates.io, and no committed REDACTED resolves them to versions, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
D16 Bus Factor — single-maintainer repository — bus factor is not applicable
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D21 Naming Consistency — Naming consistency is measured on C# only; JavaScript, Python, Rust, TypeScript, html not measured.
D22 Internal API Consistency — API consistency is measured on C# only; the exposed JavaScript, Rust, TypeScript surface was not measured.
D24 Comment Value — D24 reads C# and Visual Basic comments only — this repository's production source is .mts, .py, .rs, .ts, .tsx, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.cjs,.html,.mjs,.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) — 49 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
D42 Runtime Threat Enforcement — The repository ships application workloads but no cluster-governance resources (CRDs, admission webhooks, or a committed policy engine). Runtime threat-detection (Falco/Tetragon) and admission control (Kyverno/OPA-Gatekeeper/PodSecurity) are cluster-OPERATOR controls owned by the platform, not shipped by an application repo/chart — nothing for this repo to assess.
DM3 Integration-event coupling — no integration events detected — coupling check not applicable
ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows only 1 of the 3 signals this lens looks for (an append-only event-store seam (IEventStore/Append-of-events))
P9 Domain vs controller coverage — coverage data present for 41 file(s), but no domain-layer files were identified: no covered file's path contains any of the markers this check keys on (/domain/, /aggregates/, /valueobjects/, /domainmodel/, .domain/, /entities/), which are matched case-insensitively anywhere in the path. With no domain partition there is nothing to compare the web/controller layer against — if this repository keeps its business rules under a folder named none of those, that naming is what the check cannot see, not the domain logic.
PF2 Allocation hygiene — Not applicable: TypeScript/JavaScript runs on a garbage-collected runtime that gives a program no allocation-control idiom to choose on a hot path — no pools, stack allocation or value types — so allocation awareness is not something this code can be rated on.
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
TLS certificate validation disabled v3/@claude-flow/cli/src/commands/ruvector/backup.ts:184— `rejectUnauthorized: false` is set on a TLS client, so every peer certificate is accepted — including one an attacker presents. Chain, expiry, revocation and hostname are all skipped, so an attacker on the network path can present any certificate and read or rewrite the traffic — the connection is encrypted to the attacker, not to the intended host. Remove the option so Node validates the peer. If the server presents a self-signed or privately-issued certificate, trust THAT issuer rather than every certificate: pass its CA as `ca` (or set `NODE_EXTRA_CA_CERTS`), which keeps the chain and hostname checks on. A managed database or broker that documents `rejectUnauthorized: false` publishes a CA bundle for exactly this purpose.
TLS certificate validation disabled v3/@claude-flow/cli/src/commands/ruvector/backup.ts:584— `rejectUnauthorized: false` is set on a TLS client, so every peer certificate is accepted — including one an attacker presents. Chain, expiry, revocation and hostname are all skipped, so an attacker on the network path can present any certificate and read or rewrite the traffic — the connection is encrypted to the attacker, not to the intended host. Remove the option so Node validates the peer. If the server presents a self-signed or privately-issued certificate, trust THAT issuer rather than every certificate: pass its CA as `ca` (or set `NODE_EXTRA_CA_CERTS`), which keeps the chain and hostname checks on. A managed database or broker that documents `rejectUnauthorized: false` publishes a CA bundle for exactly this purpose.
TLS certificate validation disabled v3/@claude-flow/cli/src/commands/ruvector/benchmark.ts:238— `rejectUnauthorized: false` is set on a TLS client, so every peer certificate is accepted — including one an attacker presents. Chain, expiry, revocation and hostname are all skipped, so an attacker on the network path can present any certificate and read or rewrite the traffic — the connection is encrypted to the attacker, not to the intended host. Remove the option so Node validates the peer. If the server presents a self-signed or privately-issued certificate, trust THAT issuer rather than every certificate: pass its CA as `ca` (or set `NODE_EXTRA_CA_CERTS`), which keeps the chain and hostname checks on. A managed database or broker that documents `rejectUnauthorized: false` publishes a CA bundle for exactly this purpose.
TLS certificate validation disabled v3/@claude-flow/cli/src/commands/ruvector/init.ts:226— `rejectUnauthorized: false` is set on a TLS client, so every peer certificate is accepted — including one an attacker presents. Chain, expiry, revocation and hostname are all skipped, so an attacker on the network path can present any certificate and read or rewrite the traffic — the connection is encrypted to the attacker, not to the intended host. Remove the option so Node validates the peer. If the server presents a self-signed or privately-issued certificate, trust THAT issuer rather than every certificate: pass its CA as `ca` (or set `NODE_EXTRA_CA_CERTS`), which keeps the chain and hostname checks on. A managed database or broker that documents `rejectUnauthorized: false` publishes a CA bundle for exactly this purpose.
TLS certificate validation disabled v3/@claude-flow/cli/src/commands/ruvector/migrate.ts:306— `rejectUnauthorized: false` is set on a TLS client, so every peer certificate is accepted — including one an attacker presents. Chain, expiry, revocation and hostname are all skipped, so an attacker on the network path can present any certificate and read or rewrite the traffic — the connection is encrypted to the attacker, not to the intended host. Remove the option so Node validates the peer. If the server presents a self-signed or privately-issued certificate, trust THAT issuer rather than every certificate: pass its CA as `ca` (or set `NODE_EXTRA_CA_CERTS`), which keeps the chain and hostname checks on. A managed database or broker that documents `rejectUnauthorized: false` publishes a CA bundle for exactly this purpose.
TLS certificate validation disabled v3/@claude-flow/cli/src/commands/ruvector/optimize.ts:166— `rejectUnauthorized: false` is set on a TLS client, so every peer certificate is accepted — including one an attacker presents. Chain, expiry, revocation and hostname are all skipped, so an attacker on the network path can present any certificate and read or rewrite the traffic — the connection is encrypted to the attacker, not to the intended host. Remove the option so Node validates the peer. If the server presents a self-signed or privately-issued certificate, trust THAT issuer rather than every certificate: pass its CA as `ca` (or set `NODE_EXTRA_CA_CERTS`), which keeps the chain and hostname checks on. A managed database or broker that documents `rejectUnauthorized: false` publishes a CA bundle for exactly this purpose.
TLS certificate validation disabled v3/@claude-flow/cli/src/commands/ruvector/optimize.ts:517— `rejectUnauthorized: false` is set on a TLS client, so every peer certificate is accepted — including one an attacker presents. Chain, expiry, revocation and hostname are all skipped, so an attacker on the network path can present any certificate and read or rewrite the traffic — the connection is encrypted to the attacker, not to the intended host. Remove the option so Node validates the peer. If the server presents a self-signed or privately-issued certificate, trust THAT issuer rather than every certificate: pass its CA as `ca` (or set `NODE_EXTRA_CA_CERTS`), which keeps the chain and hostname checks on. A managed database or broker that documents `rejectUnauthorized: false` publishes a CA bundle for exactly this purpose.
TLS certificate validation disabled v3/@claude-flow/cli/src/commands/ruvector/status.ts:161— `rejectUnauthorized: false` is set on a TLS client, so every peer certificate is accepted — including one an attacker presents. Chain, expiry, revocation and hostname are all skipped, so an attacker on the network path can present any certificate and read or rewrite the traffic — the connection is encrypted to the attacker, not to the intended host. Remove the option so Node validates the peer. If the server presents a self-signed or privately-issued certificate, trust THAT issuer rather than every certificate: pass its CA as `ca` (or set `NODE_EXTRA_CA_CERTS`), which keeps the chain and hostname checks on. A managed database or broker that documents `rejectUnauthorized: false` publishes a CA bundle for exactly this purpose.
TLS certificate validation disabled v3/@claude-flow/plugins/src/integrations/ruvector/ruvector-bridge.ts:279— `rejectUnauthorized: false` is set on a TLS client, so every peer certificate is accepted — including one an attacker presents. Chain, expiry, revocation and hostname are all skipped, so an attacker on the network path can present any certificate and read or rewrite the traffic — the connection is encrypted to the attacker, not to the intended host. Remove the option so Node validates the peer. If the server presents a self-signed or privately-issued certificate, trust THAT issuer rather than every certificate: pass its CA as `ca` (or set `NODE_EXTRA_CA_CERTS`), which keeps the chain and hostname checks on. A managed database or broker that documents `rejectUnauthorized: false` publishes a CA bundle for exactly this purpose.
AC2 · Forms & labels· <input> without a programmatic label · ×6
<input> without a programmatic label ruflo/src/ruvocal/src/lib/components/NavConversationItem.svelte:70— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label ruflo/src/ruvocal/src/lib/components/ShareConversationModal.svelte:127— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label ruflo/src/ruvocal/src/lib/components/Switch.svelte:24— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label ruflo/src/ruvocal/src/lib/components/mcp/AddServerForm.svelte:147— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
<input> without a programmatic label ruflo/src/ruvocal/src/lib/components/mcp/AddServerForm.svelte:153— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
<input> without a programmatic label ruflo/src/ruvocal/src/lib/components/wasm/GalleryPanel.svelte:183— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
Import cycle (2 files) v3/@claude-flow/neural/src/modes/balanced.js:11— v3/@claude-flow/neural/src/modes/balanced.js → v3/@claude-flow/neural/src/modes/index.js → v3/@claude-flow/neural/src/modes/balanced.js (one verified cycle inside a mutually-dependent group of 6 files)
AC4 · Keyboard semantics· Click handler on a non-interactive <div> · ×5
Click handler on a non-interactive <div> ruflo/src/ruvocal/src/lib/components/chat/ChatMessage.svelte:302— A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabindex="0".
Click handler on a non-interactive <div> ruflo/src/ruvocal/src/lib/components/chat/ImageLightbox.svelte:44— A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabindex="0".
Click handler on a non-interactive <div> v3/goal_ui/src/components/AgentStep.tsx:184— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> v3/goal_ui/src/components/DevelopmentStep.tsx:149— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> v3/goal_ui/src/components/agents/PlanVisualization.tsx:98— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
AC2 · Forms & labels· <select> without a programmatic label · ×4
<select> without a programmatic label ruflo/src/ruvocal/src/lib/components/chat/ModelSwitch.svelte:48— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<select> without a programmatic label ruflo/src/ruvocal/src/routes/settings/(nav)/application/+page.svelte:202— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<select> without a programmatic label ruflo/src/ruvocal/src/routes/settings/(nav)/application/+page.svelte:246— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<select> without a programmatic label ruflo/src/ruvocal/src/routes/settings/(nav)/application/+page.svelte:283— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
AC2 · Forms & labels· <textarea> without a programmatic label · ×3
<textarea> without a programmatic label ruflo/src/ruvocal/src/lib/components/SystemPromptModal.svelte:37— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<textarea> without a programmatic label ruflo/src/ruvocal/src/lib/components/chat/ChatInput.svelte:236— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
<textarea> without a programmatic label ruflo/src/ruvocal/src/lib/components/chat/ChatMessage.svelte:481— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
D11 · Test Reliability· Test suite cannot be installed from its own lockfile · ×3
Test suite cannot be installed from its own lockfile: the repository root — The vitest suite in the repository root was never exercised because its dependency install refused the committed lockfile — the dependency install for the repository root refused the committed lockfile (ERR_PNPM_OUTDATED_LOCKFILE Cannot install with "frozen-lockfile" because REDACTED is not up to date with <ROOT>/REDACTED), so the suite never ran. The suite is declared and committed but cannot be installed from what the repository ships, so neither this scan nor a new contributor can run it. The ask is the one the owner performs: run the install locally and commit the lockfile it writes.
Test suite cannot be installed from its own lockfile: plugins/ruflo-arena/ — The vitest suite in plugins/ruflo-arena/ was never exercised because its dependency install refused the committed lockfile — the dependency install for plugins/ruflo-arena/ refused the committed lockfile (ERR_PNPM_OUTDATED_LOCKFILE Cannot install with "frozen-lockfile" because REDACTED is not up to date with <ROOT>/REDACTED), so the suite never ran. The suite is declared and committed but cannot be installed from what the repository ships, so neither this scan nor a new contributor can run it. The ask is the one the owner performs: run the install locally and commit the lockfile it writes.
Test suite cannot be installed from its own lockfile: v3/@claude-flow/browser/ — The vitest suite in v3/@claude-flow/browser/ was never exercised because its dependency install refused the committed lockfile — the dependency install for v3/@claude-flow/browser/ refused the committed lockfile (npm error code EUSAGE), so the suite never ran. The suite is declared and committed but cannot be installed from what the repository ships, so neither this scan nor a new contributor can run it. The ask is the one the owner performs: run the install locally and commit the lockfile it writes.
D10 · Test Quality· No assertions (empty test) · ×2
No assertions (empty test): should create actual HNSW index v3/@claude-flow/plugins/__tests__/ruvector-integration.test.ts:1595— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): should perform actual vector search v3/@claude-flow/plugins/__tests__/ruvector-integration.test.ts:1599— Test method has an empty body — it asserts nothing and exercises no code.
AC1 · Text alternatives· <svg role="img"> without an accessible name · ×1
<svg role="img"> without an accessible name ruflo/src/ruvocal/src/lib/components/icons/IconPro.svelte— An svg presented as an image needs a name — add a <title> child or an aria-label/aria-labelledby.
AC2 · Forms & labels· Custom control with no accessible name on <img> · ×1
Custom control with no accessible name on <img> ruflo/src/ruvocal/src/lib/components/chat/ImageLightbox.svelte:59— This <img> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
AC2 · Forms & labels· <label> that labels no control · ×1
<label> that labels no control v3/goal_ui/src/components/ResearchReviewCard.tsx:121— This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
AC3 · Page structure· Document without a <title> · ×1
Document without a <title> ruflo/src/ruvocal/src/app.html:2— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Viewport restricts zoom ruflo/src/ruvocal/src/app.html:5— user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta.
AC4 · Keyboard semantics· Click handler on a non-interactive <img> · ×1
Click handler on a non-interactive <img> ruflo/src/ruvocal/src/lib/components/chat/ImageLightbox.svelte:59— A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabindex="0".
Project dependency cycle v3/@claude-flow/cli/REDACTED:104— The projects @claude-flow/cli → @claude-flow/codex → @claude-flow/cli form a reference cycle. Cyclic dependencies prevent independent build/test/deploy, blur ownership, and tend to grow into a big ball of mud. Break the cycle by extracting the shared types into a separate project both can reference.
Orphaned knowledge v3/@claude-flow/plugin-iot-cognitum/src/mcp-tools.ts: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.
Unlisted import '@metaharness/router' scripts/auto-retrain-router.mjs:37— Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
Unlisted import '@ruvector/rvf' scripts/track-clones.mjs:95— Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
Unlisted import 'js-yaml' scripts/smoke-workflows-yaml.mjs:27— Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
Unlisted import '@huggingface/jinja' ruflo/src/ruvocal/src/lib/utils/template.ts:3— Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
Unlisted import 'agenticow' v3/@claude-flow/cli/__tests__/agenticow-speculate-tools.test.ts:35— Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
Unlisted import 'glob' v3/@claude-flow/cli/__tests__/services/headless-worker-executor.test.ts:44— Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
Unlisted import '@ruvector/attention-wasm' v3/plugins/neural-coordination/src/bridges/attention-bridge.ts:113— Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
Hotspot: plugins/ruflo-console/hooks/views/pane.ts plugins/ruflo-console/hooks/views/pane.ts:324— plugins/ruflo-console/hooks/views/pane.ts changed 71 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 77 in pane.paneView at line 324. 15 of those changes were fix/bug commits, and the other 56 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- plugins/ruflo-console/hooks/views/pane.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: plugins/ruflo-console/hooks/bindings.ts plugins/ruflo-console/hooks/bindings.ts:63— plugins/ruflo-console/hooks/bindings.ts changed 49 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 76 in bindings.actionsOf at line 63. 7 of those changes were fix/bug commits, and the other 42 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- plugins/ruflo-console/hooks/bindings.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: plugins/ruflo-console/hooks/register.ts plugins/ruflo-console/hooks/register.ts:169— plugins/ruflo-console/hooks/register.ts changed 45 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 67 in register.register at line 169. 14 of those changes were fix/bug commits, and the other 31 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- plugins/ruflo-console/hooks/register.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: v3/@claude-flow/cli/src/memory/memory-bridge.ts v3/@claude-flow/cli/src/memory/memory-bridge.ts:245— v3/@claude-flow/cli/src/memory/memory-bridge.ts changed 40 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 69 in memory-bridge.getRegistry at line 245. 32 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- v3/@claude-flow/cli/src/memory/memory-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: plugins/ruflo-console/hooks/views/frames.ts plugins/ruflo-console/hooks/views/frames.ts:181— plugins/ruflo-console/hooks/views/frames.ts changed 37 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 66 in frames.picturesOf at line 181. 9 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- plugins/ruflo-console/hooks/views/frames.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: plugins/ruflo-console/hooks/runner.ts plugins/ruflo-console/hooks/runner.ts:87— plugins/ruflo-console/hooks/runner.ts changed 37 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 61 in runner.createRunner.execute at line 87. 16 of those changes were fix/bug commits, and the other 21 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- plugins/ruflo-console/hooks/runner.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: v3/@claude-flow/cli/src/memory/memory-initializer.ts v3/@claude-flow/cli/src/memory/memory-initializer.ts:3197— v3/@claude-flow/cli/src/memory/memory-initializer.ts changed 35 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in memory-initializer.searchEntries at line 3197. 28 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- v3/@claude-flow/cli/src/memory/memory-initializer.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: plugins/ruflo-console/hooks/views/menu.ts plugins/ruflo-console/hooks/views/menu.ts:73— plugins/ruflo-console/hooks/views/menu.ts changed 28 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 54 in menu.menuView at line 73. 4 of those changes were fix/bug commits, and the other 24 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- plugins/ruflo-console/hooks/views/menu.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: plugins/ruflo-console/hooks/palette.ts plugins/ruflo-console/hooks/palette.ts:86— plugins/ruflo-console/hooks/palette.ts changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in palette.paletteEntries at line 86. 4 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- plugins/ruflo-console/hooks/palette.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: plugins/ruflo-mods/hooks/guard/dangerous-command.ts plugins/ruflo-mods/hooks/guard/dangerous-command.ts:12— plugins/ruflo-mods/hooks/guard/dangerous-command.ts changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 142 in dangerous-command.hasRootDelete at line 12. 8 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- plugins/ruflo-mods/hooks/guard/dangerous-command.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:426— REDACTED changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 59 in server.createGateway.server at line 426. 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: plugins/ruflo-console/tui/run.ts plugins/ruflo-console/tui/run.ts:264— plugins/ruflo-console/tui/run.ts changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 101 in run.runTui at line 264. 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- plugins/ruflo-console/tui/run.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: plugins/ruflo-console/hooks/controller.ts plugins/ruflo-console/hooks/controller.ts:105— plugins/ruflo-console/hooks/controller.ts changed 44 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in controller.createController.readAll at line 105. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- plugins/ruflo-console/hooks/controller.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: plugins/ruflo-console/hooks/gfx/orbital.ts plugins/ruflo-console/hooks/gfx/orbital.ts:143— plugins/ruflo-console/hooks/gfx/orbital.ts changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 56 in orbital.orbitalHeader at line 143. 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- plugins/ruflo-console/hooks/gfx/orbital.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: v3/@claude-flow/cli/src/mcp-tools/hooks-tools.ts v3/@claude-flow/cli/src/mcp-tools/hooks-tools.ts:1420— v3/@claude-flow/cli/src/mcp-tools/hooks-tools.ts changed 25 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in hooks-tools.routeTaskLocal at line 1420. 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- v3/@claude-flow/cli/src/mcp-tools/hooks-tools.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: plugins/ruflo-console/hooks/dispatch.ts plugins/ruflo-console/hooks/dispatch.ts:91— plugins/ruflo-console/hooks/dispatch.ts changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in dispatch.dispatch at line 91. 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- plugins/ruflo-console/hooks/dispatch.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: plugins/ruflo-console/hooks/mission-control.ts plugins/ruflo-console/hooks/mission-control.ts:193— plugins/ruflo-console/hooks/mission-control.ts changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 51 in mission-control.missionActions at line 193. 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- plugins/ruflo-console/hooks/mission-control.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: plugins/ruflo-console/hooks/gfx/pictures.ts plugins/ruflo-console/hooks/gfx/pictures.ts:99— plugins/ruflo-console/hooks/gfx/pictures.ts changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 37 in pictures.topologyPicture at line 99. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- plugins/ruflo-console/hooks/gfx/pictures.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:423— REDACTED changed 56 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in common.confirmRow at line 423. 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: plugins/ruflo-console/hooks/model-tools.ts plugins/ruflo-console/hooks/model-tools.ts:350— plugins/ruflo-console/hooks/model-tools.ts changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in model-tools.answer at line 350. 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- plugins/ruflo-console/hooks/model-tools.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: plugins/ruflo-console/hooks/commands.ts plugins/ruflo-console/hooks/commands.ts:34— plugins/ruflo-console/hooks/commands.ts changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 47 in commands.parseRuflo 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- plugins/ruflo-console/hooks/commands.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: v3/@claude-flow/cli/src/commands/init.ts v3/@claude-flow/cli/src/commands/init.ts:676— v3/@claude-flow/cli/src/commands/init.ts changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 69 in init.initClaudeAction at line 676. 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- v3/@claude-flow/cli/src/commands/init.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:751— REDACTED changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in doctor.checkMemoryPersistenceDriver at line 751. 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: plugins/ruflo-swarm/hooks/register.ts plugins/ruflo-swarm/hooks/register.ts:72— plugins/ruflo-swarm/hooks/register.ts changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 97 in register.register at line 72. 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- plugins/ruflo-swarm/hooks/register.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: v3/@claude-flow/cli/src/mcp-tools/agent-execute-core.ts v3/@claude-flow/cli/src/mcp-tools/agent-execute-core.ts:615— v3/@claude-flow/cli/src/mcp-tools/agent-execute-core.ts changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 61 in agent-execute-core.executeAgentTask at line 615. 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- v3/@claude-flow/cli/src/mcp-tools/agent-execute-core.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.
FileTooLong: mcp-tools/hooks-tools.ts v3/@claude-flow/cli/src/mcp-tools/hooks-tools.ts— FileTooLong — 3955 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3455 over it, 7.91× 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: commands/hooks.ts v3/@claude-flow/cli/src/commands/hooks.ts— FileTooLong — 3903 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3403 over it, 7.81× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: commands/neural.ts v3/@claude-flow/cli/src/commands/neural.ts— FileTooLong — 3365 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2865 over it, 6.73× 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: memory/memory-initializer.ts v3/@claude-flow/cli/src/memory/memory-initializer.ts— FileTooLong — 2477 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1977 over it, 4.95× 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: memory/memory-bridge.ts v3/@claude-flow/cli/src/memory/memory-bridge.ts— FileTooLong — 2280 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1780 over it, 4.56× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: REDACTED REDACTED— FileTooLong — 1972 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1472 over it, 3.94× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: REDACTED REDACTED— FileTooLong — 1862 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1362 over it, 3.72× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: ruvector/gnn.ts v3/@claude-flow/plugins/src/integrations/ruvector/gnn.ts— FileTooLong — 1702 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1202 over it, 3.40× 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: commands/analyze.ts v3/@claude-flow/cli/src/commands/analyze.ts— FileTooLong — 1575 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1075 over it, 3.15× 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: commands/memory.ts v3/@claude-flow/cli/src/commands/memory.ts— FileTooLong — 1570 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1070 over it, 3.14× 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: init/executor.ts v3/@claude-flow/cli/src/init/executor.ts— FileTooLong — 1509 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1009 over it, 3.02× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: api/mcp-tools.ts v3/@claude-flow/claims/src/api/mcp-tools.ts— FileTooLong — 1346 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 846 over it, 2.69× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: pages/Index.tsx v3/goal_ui/src/pages/Index.tsx— FileTooLong — 1326 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: Index (128-1653). The bar is 500 significant lines; this is 826 over it, 2.65× 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 v3/@claude-flow/plugins/src/integrations/ruvector/self-learning.ts— FileTooLong — 1311 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 811 over it, 2.62× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: commands/embeddings.ts v3/@claude-flow/cli/src/commands/embeddings.ts— FileTooLong — 1275 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 775 over it, 2.55× 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/unified-coordinator.ts v3/@claude-flow/swarm/src/unified-coordinator.ts— FileTooLong — 1273 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: UnifiedSwarmCoordinator (136-2088). The bar is 500 significant lines; this is 773 over it, 2.55× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/teammate-bridge.ts v3/plugins/teammate-plugin/src/teammate-bridge.ts— FileTooLong — 1267 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: TeammateBridge (247-2384). The bar is 500 significant lines; this is 767 over it, 2.53× 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: workers/index.ts v3/@claude-flow/hooks/src/workers/index.ts— FileTooLong — 1256 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 756 over it, 2.51× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: commands/init.ts v3/@claude-flow/cli/src/commands/init.ts— FileTooLong — 1238 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 738 over it, 2.48× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: REDACTED REDACTED— FileTooLong — 1199 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 699 over it, 2.40× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: REDACTED REDACTED— FileTooLong — 1189 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 689 over it, 2.38× 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: ruvector/ruvector-bridge.ts v3/@claude-flow/plugins/src/integrations/ruvector/ruvector-bridge.ts— FileTooLong — 1168 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 668 over it, 2.34× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: REDACTED REDACTED— FileTooLong — 1164 significant lines (blank, comment-only and punctuation-only lines excluded), about 88% of them inside a single declaration: WorkerDaemon (238-2243). The bar is 500 significant lines; this is 664 over it, 2.33× 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/queen-coordinator.ts v3/@claude-flow/swarm/src/queen-coordinator.ts— FileTooLong — 1157 significant lines (blank, comment-only and punctuation-only lines excluded), about 77% of them inside a single declaration: QueenCoordinator (500-2017). The bar is 500 significant lines; this is 657 over it, 2.31× 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/index.ts v3/plugins/gastown-bridge/src/index.ts— FileTooLong — 1155 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 655 over it, 2.31× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FunctionTooLong: Index.Index v3/goal_ui/src/pages/Index.tsx:128— FunctionTooLong — Index runs 1210 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1110 over it, 12.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: Agents.Agents v3/goal_ui/src/pages/Agents.tsx:59— FunctionTooLong — Agents runs 1043 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 943 over it, 10.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: ReviseResearchForm.ReviseResearchForm v3/goal_ui/src/components/ReviseResearchForm.tsx:98— FunctionTooLong — ReviseResearchForm runs 857 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 757 over it, 8.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: ResearchReportModal.ResearchReportModal v3/goal_ui/src/components/ResearchReportModal.tsx:78— FunctionTooLong — ResearchReportModal runs 734 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 634 over it, 7.34× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: mcp-tools.createMcpTools v3/@claude-flow/plugin-iot-cognitum/src/mcp-tools.ts:12— FunctionTooLong — createMcpTools runs 512 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 412 over it, 5.12× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: AdvancedSettingsModal.AdvancedSettingsModal v3/goal_ui/src/components/agents/AdvancedSettingsModal.tsx:118— FunctionTooLong — AdvancedSettingsModal runs 458 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 358 over it, 4.58× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: WidgetCustomizer.WidgetCustomizer v3/goal_ui/src/components/WidgetCustomizer.tsx:42— FunctionTooLong — WidgetCustomizer runs 377 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 277 over it, 3.77× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: cli-commands.createCliCommands v3/@claude-flow/plugin-iot-cognitum/src/cli-commands.ts:22— FunctionTooLong — createCliCommands runs 376 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 276 over it, 3.76× 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: mcp-tools.createMcpTools v3/@claude-flow/plugin-agent-federation/src/mcp-tools.ts:19— FunctionTooLong — createMcpTools runs 341 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 241 over it, 3.41× 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: ExecutionDashboard.ExecutionDashboard v3/goal_ui/src/components/agents/ExecutionDashboard.tsx:34— FunctionTooLong — ExecutionDashboard runs 341 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 241 over it, 3.41× 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: executor.writeCapabilitiesDoc v3/@claude-flow/cli/src/init/executor.ts:1796— FunctionTooLong — writeCapabilitiesDoc runs 331 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 231 over it, 3.31× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: guidance-cli.main v3/@claude-flow/hooks/src/cli/guidance-cli.ts:24— FunctionTooLong — main runs 305 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 205 over it, 3.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: server.createGateway REDACTED:71— FunctionTooLong — createGateway runs 303 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 203 over it, 3.03× 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: controller.createController plugins/ruflo-console/hooks/controller.ts:72— FunctionTooLong — createController runs 260 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 160 over it, 2.60× 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: StateAssessmentCard.StateAssessmentCard v3/goal_ui/src/components/StateAssessmentCard.tsx:15— FunctionTooLong — StateAssessmentCard runs 251 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 151 over it, 2.51× 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: bindings.actionsOf plugins/ruflo-console/hooks/bindings.ts:63— FunctionTooLong — actionsOf runs 247 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 147 over it, 2.47× 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: runner.createRunner plugins/ruflo-console/hooks/runner.ts:70— FunctionTooLong — createRunner runs 244 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 144 over it, 2.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: AgentStep.AgentStep v3/goal_ui/src/components/AgentStep.tsx:43— FunctionTooLong — AgentStep runs 243 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 143 over it, 2.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: mcp-tools.handleMCPTool v3/plugins/teammate-plugin/src/mcp-tools.ts:536— FunctionTooLong — handleMCPTool runs 239 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 139 over it, 2.39× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: register.register plugins/ruflo-swarm/hooks/register.ts:72— FunctionTooLong — register runs 237 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 137 over it, 2.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: cli-commands.createCliCommands v3/@claude-flow/plugin-agent-federation/src/cli-commands.ts:32— FunctionTooLong — createCliCommands runs 219 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 119 over it, 2.19× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: index.buildSystemPrompt REDACTED:1109— FunctionTooLong — buildSystemPrompt runs 218 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 118 over it, 2.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: DevelopmentStep.DevelopmentStep v3/goal_ui/src/components/DevelopmentStep.tsx:30— FunctionTooLong — DevelopmentStep runs 217 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 117 over it, 2.17× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: Demo.Demo v3/goal_ui/src/pages/Demo.tsx:8— FunctionTooLong — Demo runs 200 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 100 over it, 2.00× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: memory-distillation.runDistillation v3/@claude-flow/cli/src/services/memory-distillation.ts:140— FunctionTooLong — runDistillation runs 194 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 94 over it, 1.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.
Repeated repair: REDACTED REDACTED:455— REDACTED changed 28 times in last 90 days and 24 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 memory-tools.ensureInitialized at line 455), 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(memory): keep same-key entries from other namespaces in memory_search_unified (#4470)”; “fix(mcp): let memory tools target an explicit store (#4350)”; “fix(memory): let export target an explicit store (#4341)”; “fix(memory): refresh Claude memories across project and worktree roots (#4210)”. 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: v3/@claude-flow/cli/src/commands/memory.ts v3/@claude-flow/cli/src/commands/memory.ts:33— v3/@claude-flow/cli/src/commands/memory.ts changed 26 times in last 90 days and 19 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 memory.warnIfSiblingHasRows at line 33), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(memory): let export target an explicit store (#4341)”; “fix(memory): memory import reports the tool error and partial failures instead of crashing”; “fix(memory): memory export reports the tool error instead of crashing (#4204)”; “fix(memory): stop SmartRetrieval collapsing search results to one”. 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- v3/@claude-flow/cli/src/commands/memory.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: v3/@claude-flow/cli/src/commands/hooks.ts v3/@claude-flow/cli/src/commands/hooks.ts:46— v3/@claude-flow/cli/src/commands/hooks.ts changed 14 times in last 90 days and 13 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 hooks.suggestAgentsForFile at line 46), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(hooks): honor --no-color in hooks statusline (#4387)”; “fix(hooks): worker dispatch prints the status the tool returned (#4196)”; “fix: correct coverage reporting and plugin workflow contracts”; “fix(memory,hooks): keep the on-disk format on sql.js write-back (#4057); command-recording off switch, redaction and a cleanup that sees expired rows (#4056)”. 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- v3/@claude-flow/cli/src/commands/hooks.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: v3/@claude-flow/cli/src/mcp-tools/agentdb-tools.ts v3/@claude-flow/cli/src/mcp-tools/agentdb-tools.ts:1301— v3/@claude-flow/cli/src/mcp-tools/agentdb-tools.ts changed 12 times in last 90 days and 12 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 agentdb-tools.simplePersonalizedPageRank at line 1301), 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(cli,ruflo-knowledge-graph): causal-edge says when an edge cannot be read back under encryption at rest; kg-traverse uses the read tools (#4135, #4161)”; “fix(memory): distinguish an RFE1-encrypted store from a broken one (#2889)”; “fix(memory): honest agentdb_pattern-store failures; share AgentDB's better-sqlite3 for graph writer (#3691, #3693)”; “fix(graph): retain graph query selection guidance”. 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- v3/@claude-flow/cli/src/mcp-tools/agentdb-tools.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: v3/@claude-flow/swarm/src/unified-coordinator.ts v3/@claude-flow/swarm/src/unified-coordinator.ts:1798— v3/@claude-flow/swarm/src/unified-coordinator.ts changed 13 times in last 90 days and 10 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is UnifiedSwarmCoordinator.spawnAgent at line 1798), 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(swarm): release the old domain slot when a retry moves agents (#4499)”; “fix(swarm): stop treating silent idle agents as heartbeat failures (#4320)”; “fix(swarm): release stale task owners on terminal states”; “fix(swarm): remove domain-pool membership when an agent is unregistered”. 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- v3/@claude-flow/swarm/src/unified-coordinator.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: v3/@claude-flow/cli/src/mcp-tools/task-tools.ts v3/@claude-flow/cli/src/mcp-tools/task-tools.ts:90— v3/@claude-flow/cli/src/mcp-tools/task-tools.ts changed 9 times in last 90 days and 9 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is task-tools.updateAgents at line 90), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(cli): make task cancel report unknown and finished tasks instead of claiming success (#4331)”; “fix(cli): report all matching tasks in task_list total, not just the limited page (#4324)”; “fix(cli): make `status tasks` list tasks instead of always printing "No tasks" (#4321)”; “fix(tasks): validate reassignment and preserve retained worker ownership”. 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- v3/@claude-flow/cli/src/mcp-tools/task-tools.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: plugins/ruflo-console/hooks/data/parse.ts plugins/ruflo-console/hooks/data/parse.ts:249— plugins/ruflo-console/hooks/data/parse.ts changed 12 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 12 (its worst body is parse.parseTasks at line 249), 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(console): show times as times, a swarm's own agents, and labels that match the gate”; “fix(console): card-bound confirm, one model-facing sanitiser, linear escape stripping, own-key lookups, wrapped Approvals (0.40.2)”; “fix(console): session control cap, gate on read-only entries that act, hostile text/data, mission auto-run guards (#3814 #3815 #3816 #3817 #3818)”; “fix(console): pin the recorded stop, bound the hand-over read, mask zero-width-split keys at parse, ADR-467”. 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- plugins/ruflo-console/hooks/data/parse.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: v3/@claude-flow/cli/src/commands/mcp.ts v3/@claude-flow/cli/src/commands/mcp.ts:61— v3/@claude-flow/cli/src/commands/mcp.ts changed 9 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 4 (its worst body is mcp.isOutOfRange 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(security): migration-safe hive-mind gating by caller transport (ADR-476, #3338)”; “fix(mcp): refuse unauthenticated HTTP on non-loopback hosts; optional bearer-token auth”; “fix(mcp): prevent late HTTP timeout responses”; “fix(mcp): stdio start no longer SIGKILLs sibling servers (#3364)”. 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- v3/@claude-flow/cli/src/commands/mcp.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: v3/@claude-flow/cli/src/mcp-tools/agent-tools.ts v3/@claude-flow/cli/src/mcp-tools/agent-tools.ts:171— v3/@claude-flow/cli/src/mcp-tools/agent-tools.ts changed 9 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 12 (its worst body is agent-tools.determineAgentModel at line 171), 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(agent): make agent list --all and --type filter as documented (#4302)”; “fix(agent): persist the name given to agent spawn (#4300) (#4301)”; “fix(agent): keep the ADR-112 'Use when' guidance in the agent_health description”; “fix(agent): report measured execution health instead of registry defaults”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- v3/@claude-flow/cli/src/mcp-tools/agent-tools.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: v3/@claude-flow/cli/src/mcp-tools/workflow-tools.ts v3/@claude-flow/cli/src/mcp-tools/workflow-tools.ts:51— v3/@claude-flow/cli/src/mcp-tools/workflow-tools.ts changed 8 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 workflow-tools.parseCondition at line 51), 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(cli): report every stored workflow in workflow_list total, not just the limited page (#4372)”; “fix(workflow): list, status, stop and run read the shape and errors the workflow tools return”; “fix(workflow): reject unsupported steps and invalid condition gates”; “fix(workflows): validate the agent bindings used by the runtime”. 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- v3/@claude-flow/cli/src/mcp-tools/workflow-tools.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: v3/@claude-flow/cli/src/services/config-file-manager.ts v3/@claude-flow/cli/src/services/config-file-manager.ts:278— v3/@claude-flow/cli/src/services/config-file-manager.ts changed 8 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 9 (its worst body is config-file-manager.parseConfigValue at line 278), 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(config): commit cached updates after successful writes”; “fix(config): parse signed and scientific numeric values”; “fix(config): preserve unrelated sections during targeted reset”; “fix(config): isolate nested default values (#3595)”. 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- v3/@claude-flow/cli/src/services/config-file-manager.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: plugins/ruflo-console/hooks/mission-types.ts plugins/ruflo-console/hooks/mission-types.ts:62— plugins/ruflo-console/hooks/mission-types.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 1 (its worst body is goal at line 62), 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(ruflo-console): adopt pre-#4237 missions one at a time, keep offers and prune only after a save (#4254)”; “fix(ruflo-console): stop pre-#4237 missions leaking into every project (#4254)”; “fix(ruflo-console): key the mission ledger by project (#4237) (#4242)”; “fix(console): bound CLI numbers at the reader, keep unreadable counts visible, and a resume by Claude keeps hand-out counts”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- plugins/ruflo-console/hooks/mission-types.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: plugins/ruflo-mods/hooks/guidance/screen.ts plugins/ruflo-mods/hooks/guidance/screen.ts:63— plugins/ruflo-mods/hooks/guidance/screen.ts changed 8 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 8 (its worst body is screen.cut 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(screens): catch `.env` exfiltration, stop flagging model token talk and secret references”; “fix(ruflo-mods): keep main's Google-key and JWT matches when glued to a dash; no ^ at mid-line window starts (#3798)”; “fix(ruflo-mods): screen three readings so stripping or folding never glues a phrase to the word before it (#3798)”; “fix(ruflo-mods): screens stay linear on blank lines and repeated token starts; whitespace padding cannot straddle a window (#3798)”. 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- plugins/ruflo-mods/hooks/guidance/screen.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: v3/@claude-flow/cli/src/commands/security.ts v3/@claude-flow/cli/src/commands/security.ts:457— v3/@claude-flow/cli/src/commands/security.ts changed 7 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 13 (its worst body is security.interpretNpmAudit at line 457), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(security): mark absent manifests and malformed audit reports incomplete”; “fix(security): report "could not scan" instead of a clean tree when npm audit fails (#4124)”; “fix(security): scan code patterns without the false positives seen on a real tree”; “fix(security): honor JSON and SARIF scan output formats”. 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- v3/@claude-flow/cli/src/commands/security.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: v3/@claude-flow/cli-core/src/output.ts v3/@claude-flow/cli-core/src/output.ts:223— v3/@claude-flow/cli-core/src/output.ts changed 7 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 8 (its worst body is OutputFormatter.table at line 223), 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(cli-core): clear progress rows without counting ANSI bytes”; “fix(cli-core): suppress transient progress in quiet and redirected output”; “fix(cli-core): measure visible widths for colored headers”; “fix(cli-core): include table padding in width constraints”. 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- v3/@claude-flow/cli-core/src/output.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: v3/@claude-flow/cli/src/mcp-tools/metaharness-tools.ts v3/@claude-flow/cli/src/mcp-tools/metaharness-tools.ts:122— v3/@claude-flow/cli/src/mcp-tools/metaharness-tools.ts 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 8 (its worst body is metaharness-tools.runScript at line 122), 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: bump @metaharness/darwin pin from ~0.10.2 to ~0.12.0 (#3219) (#4252)”; “fix(cli,plugins): stop plugin-dir walk-ups at the node_modules boundary; drop embeddings hunk”; “fix(cli,plugins): resolve executed optional modules from the tool's own install”; “fix(metaharness): use the @metaharness/* and ruflo CLI already installed instead of npm-installing at tool-call time (#3366)”. 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- v3/@claude-flow/cli/src/mcp-tools/metaharness-tools.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: plugins/ruflo-console/hooks/data/ap-guard.ts plugins/ruflo-console/hooks/data/ap-guard.ts:74— plugins/ruflo-console/hooks/data/ap-guard.ts changed 7 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is ap-guard.anatoleFact at line 74), 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(ruflo-console): close Windows autopilot guard gaps and binary-planting paths (#4491) (#4494)”; “fix(ruflo-console): Windows fixes from running every view on a real Windows machine (console 0.49.1, cost-tracker 0.28.3) (#4490)”; “fix(ruflo-console): Windows writes go through the host filesystem (#4433) (#4434)”; “fix(console): autopilot MCP preflight names the plugin-namespaced tool (fleet MCP prefix audit)”. 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- plugins/ruflo-console/hooks/data/ap-guard.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: v3/@claude-flow/cli/src/memory/graph-edge-writer.ts v3/@claude-flow/cli/src/memory/graph-edge-writer.ts:240— v3/@claude-flow/cli/src/memory/graph-edge-writer.ts changed 6 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is graph-edge-writer.getBridgeDb at line 240), 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(memory): resolve graph reads through explicit CLAUDE_FLOW_DB_PATH binding (#4291)”; “fix(memory): read the RFE1 header in a bounded child so the sniff cannot drop live SQLite locks (#4040)”; “fix(memory): dedup the RFE1 warning per dbPath, not per process (#2889 follow-up)”; “fix(memory): distinguish an RFE1-encrypted store from a broken one (#2889)”. 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- v3/@claude-flow/cli/src/memory/graph-edge-writer.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: v3/@claude-flow/cli-core/src/memory/json-backend.ts v3/@claude-flow/cli-core/src/memory/json-backend.ts:57— v3/@claude-flow/cli-core/src/memory/json-backend.ts changed 6 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 8 (its worst body is JsonMemoryBackend.load 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(cli-core): honor ttl=0 as immediate expiry in JsonMemoryBackend”; “fix(memory): allow expired JSON keys to be reused”; “fix(memory): omit nonmatching JSON substring results”; “fix(cli-core): measure JSON memory size in UTF-8 bytes”. 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- v3/@claude-flow/cli-core/src/memory/json-backend.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: v3/@claude-flow/cli/src/init/settings-generator.ts v3/@claude-flow/cli/src/init/settings-generator.ts:216— v3/@claude-flow/cli/src/init/settings-generator.ts changed 6 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 8 (its worst body is settings-generator.generateHooksConfig at line 216), 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(init): stop granting blanket execution of project helpers (#4221)”; “fix(init): omit unimplemented generated hooks (#4200) (#4213)”; “fix(auto-memory): hooks deliver their subcommand, sync sees learnings, worktrees share the main memory dir, writes are atomic (#4058)”; “fix(init): pin user-level hook and statusline commands to $HOME helpers”. 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- v3/@claude-flow/cli/src/init/settings-generator.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: v3/@claude-flow/swarm/src/message-bus.ts v3/@claude-flow/swarm/src/message-bus.ts:492— v3/@claude-flow/swarm/src/message-bus.ts changed 8 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 12 (its worst body is MessageBus.processQueues at line 492), 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(swarm): preserve urgent messages on queue overflow (#4235)”; “fix(swarm): track acknowledgements per recipient (#4234)”; “fix(swarm): cancel queued subscriber delivery at shutdown (#4233)”; “fix(swarm): skip broadcast retry re-queue for a subscriber that unsubscribed during backoff (#3928)”. 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- v3/@claude-flow/swarm/src/message-bus.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: v3/@claude-flow/cli/bin/cli.js v3/@claude-flow/cli/bin/cli.js:41— v3/@claude-flow/cli/bin/cli.js changed 7 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is cli._filterAdvertisedMcpTools at line 41), 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(cli): drain memory teardown instead of forcing process exit (#4334)”; “fix(security): migration-safe hive-mind gating by caller transport (ADR-476, #3338)”; “fix(mcp): flag handler errors in tool result envelopes”; “fix(mcp): enforce opt-in policy in shipped stdio launchers”. 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- v3/@claude-flow/cli/bin/cli.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: v3/@claude-flow/cli/src/commands/agent.ts v3/@claude-flow/cli/src/commands/agent.ts:1152— v3/@claude-flow/cli/src/commands/agent.ts 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 6 (its worst body is agent.formatStatus at line 1152), 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(agent): make agent list --all and --type filter as documented (#4302)”; “fix(agent): persist the name given to agent spawn (#4300) (#4301)”; “fix(agent): report measured execution health instead of registry defaults”; “fix(cli): report unknown agent/task ids and value-less options as errors”. 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- v3/@claude-flow/cli/src/commands/agent.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: v3/@claude-flow/cli/vitest.config.ts v3/@claude-flow/cli/vitest.config.ts:39— v3/@claude-flow/cli/vitest.config.ts 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 7 (its worst body is resolveId 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(mods): compose guidance inside native event handlers”; “fix(cli): alias @claude-flow/security/safe-git ahead of the bare-package vitest alias”; “fix(memory,tests): restore `memory search` recall and green the CLI suite (69 → 0) (#3252)”; “fix(agentbbs-tools): detect the real CLI-only agentbbs package instead of a nonexistent JS import (#3250)”. 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- v3/@claude-flow/cli/vitest.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: REDACTED REDACTED:149— REDACTED changed 5 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is trust.registerTrust 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(ruflo-mods): classify risky host calls and intercepting hooks (#3802)”; “fix(ruflo-mods): trust gate judges a glob or a negation by what it selects (#3801)”; “fix(ruflo-mods): trust gate treats process.spawn, mcp.call/connect, session.send, config.set, prompt.submit and agent.spawn as risky; names a reload that gains risk (#3787, #3801)”; “fix(ruflo-mods): trust gate counts prompt.submit and agent.spawn as risky; ranked context drops control and bidi characters (0.3.13)”. 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 09:58:56 -04:00' --until='2026-10-26 09:58:56 -04:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
+ 47 more in this group — see findings.md.
D30 · Dependency Vulnerabilities· Medium CVE · ×62
Skipped test: should handle lorentz model v3/plugins/hyperbolic-reasoning/tests/mcp-tools.test.ts:108— Skipped — switched off by it.skip
Skipped test: should handle half_plane model v3/plugins/hyperbolic-reasoning/tests/mcp-tools.test.ts:149— Skipped — switched off by it.skip
Skipped test: should persist memory across backend reinitialization v3/__tests__/integration/memory-integration.test.ts:113— Skipped — switched off by it.skip
Skipped test: should support workflow resume after interruption v3/__tests__/integration/workflow-integration.test.ts:389— Skipped — switched off by it.skip It synchronises against work it did not wait for (`execution`, still running when the sleep starts) with `new Promise(resolve => setTimeout(resolve, 100))` — a fixed wait rather than a signal, which is the usual cause of exactly this kind of randomness.
Skipped test: should support workflow composition and nesting v3/__tests__/integration/workflow-integration.test.ts:595— Skipped — switched off by it.skip
Skipped test: should complete request with local model v3/@claude-flow/providers/src/__tests__/provider-integration.test.ts:170— Skipped — switched off by it.skip
Skipped test: should parse multiple flags v3/@claude-flow/cli/__tests__/cli.test.ts:259— Skipped — switched off by it.skip
Skipped test: should spawn agent with type flag v3/@claude-flow/cli/__tests__/commands.test.ts:205— Skipped — switched off by it.skip
Skipped test: should spawn agent with custom name v3/@claude-flow/cli/__tests__/commands.test.ts:217— Skipped — switched off by it.skip
Skipped test: should list all agents v3/@claude-flow/cli/__tests__/commands.test.ts:266— Skipped — switched off by it.skip
Skipped test: should filter by agent type v3/@claude-flow/cli/__tests__/commands.test.ts:277— Skipped — switched off by it.skip
Skipped test: should filter by status v3/@claude-flow/cli/__tests__/commands.test.ts:286— Skipped — switched off by it.skip
Skipped test: should include inactive agents with --all flag v3/@claude-flow/cli/__tests__/commands.test.ts:295— Skipped — switched off by it.skip
Skipped test: should show agent status v3/@claude-flow/cli/__tests__/commands.test.ts:306— Skipped — switched off by it.skip
Skipped test: should stop agent v3/@claude-flow/cli/__tests__/commands.test.ts:332— Skipped — switched off by it.skip
Skipped test: should initialize swarm with default topology v3/@claude-flow/cli/__tests__/commands.test.ts:391— Skipped — switched off by it.skip
Skipped test: should initialize swarm with custom topology v3/@claude-flow/cli/__tests__/commands.test.ts:402— Skipped — switched off by it.skip
Skipped test: should enable V3 mode v3/@claude-flow/cli/__tests__/commands.test.ts:412— Skipped — switched off by it.skip
Skipped test: should set max agents v3/@claude-flow/cli/__tests__/commands.test.ts:421— Skipped — switched off by it.skip
Skipped test: should store data v3/@claude-flow/cli/__tests__/commands.test.ts:561— Skipped — switched off by it.skip
Skipped test: should retrieve data v3/@claude-flow/cli/__tests__/commands.test.ts:583— Skipped — switched off by it.skip
Skipped test: should delete entry v3/@claude-flow/cli/__tests__/commands.test.ts:633— Skipped — switched off by it.skip
Skipped test: should show memory statistics v3/@claude-flow/cli/__tests__/commands.test.ts:647— Skipped — switched off by it.skip
Skipped test: should initialize with default configuration v3/@claude-flow/cli/__tests__/p1-commands.test.ts:408— Skipped — switched off by it.skip
Skipped test: should initialize with minimal configuration v3/@claude-flow/cli/__tests__/p1-commands.test.ts:419— Skipped — switched off by it.skip
Sync-over-async blocking plugins/ruflo-agntcy/src/receipts/casa-receipt.ts:154— `existsSync` in `loadOrCreateCasaSigningKeypair` 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 plugins/ruflo-agntcy/src/receipts/casa-receipt.ts:155— `readFileSync` in `loadOrCreateCasaSigningKeypair` 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 plugins/ruflo-agntcy/src/receipts/casa-receipt.ts:164— `existsSync` in `loadOrCreateCasaSigningKeypair` 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 plugins/ruflo-agntcy/src/receipts/casa-receipt.ts:164— `mkdirSync` in `loadOrCreateCasaSigningKeypair` 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 plugins/ruflo-agntcy/src/receipts/casa-receipt.ts:170— `writeFileSync` in `loadOrCreateCasaSigningKeypair` 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 plugins/ruflo-agntcy/src/receipts/casa-receipt.ts:269— `existsSync` in `appendCasaReceipt` 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 plugins/ruflo-agntcy/src/receipts/casa-receipt.ts:270— `mkdirSync` in `appendCasaReceipt` 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 plugins/ruflo-agntcy/src/receipts/casa-receipt.ts:272— `appendFileSync` in `appendCasaReceipt` 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 plugins/ruflo-business-pods/scripts/pod-tick.mjs:331— `existsSync` in `runTick` 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 plugins/ruflo-business-pods/scripts/pod-tick.mjs:338— `readFileSync` in `runTick` 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 plugins/ruflo-console/tests/adr-helpers.ts:25— `readFileSync` in `read` 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 plugins/ruflo-console/tests/adr-helpers.ts:28— `lstatSync` in `stat` 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 plugins/ruflo-console/tests/adr-helpers.ts:35— `readdirSync` in `list` 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 plugins/ruflo-console/tests/adr-helpers.ts:46— `mkdtempSync` in `run` 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 plugins/ruflo-console/tests/adr-helpers.ts:49— `writeFileSync` in `run` 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 plugins/ruflo-console/tests/adr-helpers.ts:51— `spawnSync` in `run` 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 plugins/ruflo-console/tests/adr-helpers.ts:53— `rmSync` in `run` 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 plugins/ruflo-ruos/scripts/cli.mjs:194— `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 plugins/ruflo-ruos/scripts/cli.mjs:195— `readFileSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking plugins/ruflo-ruos/scripts/cli.mjs:240— `readFileSync` in `record` 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 plugins/ruflo-ruos/scripts/lib/ledger.mjs:79— `existsSync` in `resolveCallTool` 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 plugins/ruflo-workflows/scripts/gaia-audit.mjs:838— `existsSync` in `readInput` 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 plugins/ruflo-workflows/scripts/gaia-audit.mjs:842— `readFileSync` in `readInput` 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 plugins/ruflo-workflows/scripts/gaia-audit.mjs:909— `writeFileSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Sync-over-async blocking ruflo/src/ruvocal/src/lib/server/database.ts:49— `existsSync` in `init` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
+ 15 more in this group — see findings.md.
R4 · Test Coverage· No test reaches this file · ×40
No test reaches this file v3/goal_ui/src/pages/Index.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file v3/mcp/tools/hooks-tools.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file v3/goal_ui/src/pages/Agents.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file v3/mcp/tools/task-tools.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file 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 v3/goal_ui/src/components/ReviseResearchForm.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file v3/mcp/tools/sona-tools.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file v3/goal_ui/src/components/ResearchReportModal.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file v3/mcp/tools/system-tools.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file ruflo/src/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.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 v3/plugins/gastown-bridge/src/gupp/state.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 ruflo/src/ruvocal/src/routes/conversation/[id]/+server.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 v3/plugins/gastown-bridge/src/gupp/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 ruflo/src/ruvocal/src/lib/server/database/postgres.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 v3/@claude-flow/neural/src/reasoningbank-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 v3/goal_ui/src/components/agents/AdvancedSettingsModal.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file v3/goal_ui/src/components/ui/sidebar.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file v3/mcp/tools/v2-compat-tools.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file v3/mcp/tools/federation-tools.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file v3/mcp/tools/config-tools.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file ruflo/src/ruvocal/src/lib/components/chat/ChatWindow.svelte: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 v3/@claude-flow/security/src/CVE-REMEDIATION.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 plugins/ruflo-metaharness/scripts/test-pipeline-roundtrip.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 v3/mcp/tools/memory-tools.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file ruflo/src/ruvocal/src/routes/conversation/[id]/+page.svelte:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
+ 15 more in this group — see findings.md.
X17 · Uncapped recursion over a caller-supplied document· Recursive walk over a caller-supplied document has no depth cap · ×40
Recursive walk over a caller-supplied document has no depth cap v3/plugins/gastown-bridge/src/sanitizers.ts:479— `redactSensitiveFields` is exported and takes `obj: Record<string, unknown>` from its caller, and it calls itself at line 479 (`redactSensitiveFields`) with a piece of `obj` (and at line 483) — and nowhere in `redactSensitiveFields` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `redactSensitiveFields` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap v3/plugins/gastown-bridge/src/sanitizers.ts:573— `sanitizeMetadata` is exported and takes `metadata: Record<string, unknown>` from its caller, and it calls itself at line 573 (`sanitizeMetadata`) with a piece of `metadata` — and nowhere in `sanitizeMetadata` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `sanitizeMetadata` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap v3/@claude-flow/testing/src/helpers/assertion-helpers.ts:261— `assertMatchesSnapshot` is exported, takes a document from its caller (line 222) and hands it to `removeFields`, which calls itself at line 261 (`removeFields`) with a piece of `obj` — and nowhere in `removeFields` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `removeFields` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap v3/@claude-flow/security/src/policy/canonical.ts:4— `canonicalizePolicy` is exported, takes a document from its caller (line 19) and hands it to `normalize`, which calls itself at line 4 (`normalize`) with a piece of `value` (and at line 10) — and nowhere in `normalize` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `normalize` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap v3/@claude-flow/security/src/policy/product-plane.ts:1107— `canonicalizeProductPlane` is exported and takes `value: unknown` from its caller, and it calls itself at line 1107 (`canonicalizeProductPlane`) with a piece of `value` (and at line 1120) — and nowhere in `canonicalizeProductPlane` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `canonicalizeProductPlane` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap v3/@claude-flow/security/src/plugins/integrity-verifier.ts:116— `canonicalize` is exported and takes `value: unknown` from its caller, and it calls itself at line 116 (`canonicalize`) with a piece of `value` (and at line 119) — and nowhere in `canonicalize` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `canonicalize` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap v3/@claude-flow/neural/src/utils/serialize.ts:68— `deepEncode` is exported and takes `value: unknown` from its caller, and it calls itself at line 68 (`deepEncode`) with a piece of `value` (and at line 70, line 73) — and nowhere in `deepEncode` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `deepEncode` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap v3/@claude-flow/neural/src/utils/serialize.ts:82— `deepDecode` is exported and takes `value: unknown` from its caller, and it calls itself at line 82 (`deepDecode`) with a piece of `value` (and at line 84, line 87) — and nowhere in `deepDecode` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `deepDecode` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap REDACTED:128— `validateSchema` is exported and takes `data: unknown` from its caller, and it calls itself at line 128 (`validateSchema`) with a piece of `data` (and at line 157) — and nowhere in `validateSchema` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `validateSchema` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap v3/@claude-flow/codex/src/harness/repository-state.ts:134— `canonicalJson` is exported, takes a document from its caller (line 109) and hands it to `encode`, which calls itself at line 134 (`encode`) with a piece of `item` (and at line 143) — and nowhere in `encode` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `encode` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap v3/@claude-flow/cli/src/services/flywheel-receipt.ts:232— `canonicalizeJcs` is exported, takes a document from its caller (line 250) and hands it to `assertJsonValue`, which calls itself at line 232 (`assertJsonValue`) with a piece of `value` (and at line 239) — and nowhere in `assertJsonValue` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `assertJsonValue` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap v3/@claude-flow/cli/src/services/flywheel-receipt.ts:254— `canonicalizeJcs` is exported, takes a document from its caller (line 250) and hands it to `encode`, which calls itself at line 254 (`encode`) with a piece of `v` (and at line 256) — and nowhere in `encode` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `encode` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap v3/@claude-flow/cli/src/services/flywheel-receipt.ts:291— `assertReceiptNumberDomain` is exported and takes `value: unknown` from its caller, and it calls itself at line 291 (`assertReceiptNumberDomain`) with a piece of `value` (and at line 296) — and nowhere in `assertReceiptNumberDomain` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `assertReceiptNumberDomain` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap v3/@claude-flow/cli/src/services/flywheel-receipt.ts:352— `encodePolicyFractions` is exported and takes `value: unknown` from its caller, and it calls itself at line 352 (`encodePolicyFractions`) with a piece of `value` (and at line 355) — and nowhere in `encodePolicyFractions` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `encodePolicyFractions` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap v3/@claude-flow/cli/src/services/managed-learning.ts:31— `canonical` is exported and takes `v: unknown` from its caller, and it calls itself at line 31 (`canonical`) with a piece of `v` (and at line 32) — and nowhere in `canonical` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `canonical` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap v3/@claude-flow/cli/src/production/error-handler.ts:203— `sanitize` is exported and takes `input: Record<string, unknown>` from its caller, and it calls itself at line 203 (`this.sanitize`) with a piece of `input` — and nowhere in `sanitize` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `sanitize` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap v3/@claude-flow/browser/src/infrastructure/witness-signer.ts:46— `canonicalJSON` is exported and takes `value: unknown` from its caller, and it calls itself at line 46 (`canonicalJSON`) with a piece of `value` (and at line 50) — and nowhere in `canonicalJSON` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `canonicalJSON` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap ruflo/src/ruvocal/src/lib/utils/deepestChild.ts:3— `deepestChild` is exported and takes `el: HTMLElement` from its caller, and it calls itself at line 3 (`deepestChild`) with a piece of `el` — and nowhere in `deepestChild` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `deepestChild` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap REDACTED:114— `attachFileRefsToArgs` is exported, takes a document from its caller (line 104) and hands it to `visit`, which calls itself at line 114 (`visit`) with a piece of `node` (and at line 121) — and nowhere in `visit` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `visit` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap plugins/ruflo-swarm/hooks/reader/ruos.ts:57— `remoteHostOf` is exported, takes a document from its caller (line 31) and hands it to `recordOf`, which calls itself at line 57 (`recordOf`) with a piece of `value` — and nowhere in `recordOf` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `recordOf` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap plugins/ruflo-protector/hooks/options.ts:21— `flag` is exported and takes `value: unknown` from its caller, and it calls itself at line 21 (`flag`) with a piece of `value` — and nowhere in `flag` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `flag` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap plugins/ruflo-loop-workers/hooks/options.ts:19— `flag` is exported and takes `value: unknown` from its caller, and it calls itself at line 19 (`flag`) with a piece of `value` — and nowhere in `flag` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `flag` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap plugins/ruflo-graph-intelligence/src/infrastructure/witness-signer.ts:39— `canonicalJSON` is exported and takes `value: unknown` from its caller, and it calls itself at line 39 (`canonicalJSON`) with a piece of `value` (and at line 42) — and nowhere in `canonicalJSON` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `canonicalJSON` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap plugins/ruflo-console/tui/ansi.ts:143— `render` is exported, takes a document from its caller (line 273) and hands it to `flat`, which calls itself at line 143 (`flat`) with a piece of `children` — and nowhere in `flat` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `flat` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap plugins/ruflo-console/tui/ansi.ts:148— `render` is exported, takes a document from its caller (line 273) and hands it to `textOf`, which calls itself at line 148 (`textOf`) with a piece of `children` — and nowhere in `textOf` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `textOf` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
+ 15 more in this group — see findings.md.
X2 · Cancellation propagation· Async function without AbortSignal · ×39
Async function without AbortSignal: loadWasmBrowser v3/plugins/prime-radiant/src/wasm-bridge.ts:238— `loadWasmBrowser` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: executeResearchStep v3/goal_ui/supabase/functions/research-api/index.ts:185— `executeResearchStep` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: checkWidget v3/goal_ui/src/pages/Demo.tsx:48— `checkWidget` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: __wbg_init v3/@claude-flow/watermark/web/ruflo_watermark.js:372— `__wbg_init` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: postForm v3/@claude-flow/security/src/oauth/client.ts:92— `postForm` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: exchangeManualCode v3/@claude-flow/security/src/oauth/client.ts:137— `exchangeManualCode` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: doHealthCheck v3/@claude-flow/providers/src/anthropic-provider.ts:281— `doHealthCheck` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: doHealthCheck v3/@claude-flow/providers/src/cohere-provider.ts:274— `doHealthCheck` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: doHealthCheck v3/@claude-flow/providers/src/google-provider.ts:279— `doHealthCheck` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: listModels v3/@claude-flow/providers/src/ollama-provider.ts:243— `listModels` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: doHealthCheck v3/@claude-flow/providers/src/ollama-provider.ts:279— `doHealthCheck` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: doHealthCheck v3/@claude-flow/providers/src/openai-provider.ts:354— `doHealthCheck` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: listModels v3/@claude-flow/providers/src/ruvector-provider.ts:450— `listModels` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: doHealthCheck v3/@claude-flow/providers/src/ruvector-provider.ts:496— `doHealthCheck` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: getSonaMetrics v3/@claude-flow/providers/src/ruvector-provider.ts:653— `getSonaMetrics` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: triggerSonaLearning v3/@claude-flow/providers/src/ruvector-provider.ts:684— `triggerSonaLearning` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: searchMemory v3/@claude-flow/providers/src/ruvector-provider.ts:700— `searchMemory` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: exchangeCode v3/@claude-flow/mcp/src/oauth.ts:165— `exchangeCode` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: refreshTokens v3/@claude-flow/mcp/src/oauth.ts:215— `refreshTokens` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: fetchFromIPFS v3/@claude-flow/cli/src/transfer/store/download.ts:156— `fetchFromIPFS` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: uploadToWeb3Storage v3/@claude-flow/cli/src/transfer/ipfs/upload.ts:76— `uploadToWeb3Storage` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: uploadToPinata v3/@claude-flow/cli/src/transfer/ipfs/upload.ts:137— `uploadToPinata` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: pinContent v3/@claude-flow/cli/src/transfer/ipfs/upload.ts:291— `pinContent` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: unpinContent v3/@claude-flow/cli/src/transfer/ipfs/upload.ts:337— `unpinContent` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: uploadToLocalIPFS v3/@claude-flow/cli/src/transfer/ipfs/upload.ts:418— `uploadToLocalIPFS` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
ClassTooLong: Index v3/goal_ui/src/pages/Index.tsx:1— ClassTooLong — 1210 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 810 over it, 3.03× 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: UnifiedSwarmCoordinator v3/@claude-flow/swarm/src/unified-coordinator.ts:136— ClassTooLong — 1182 significant lines (blank, comment-only and punctuation-only lines excluded), 77 methods. The bar is 400 significant lines; this is 782 over it, 2.96× 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: TeammateBridge v3/plugins/teammate-plugin/src/teammate-bridge.ts:247— ClassTooLong — 1126 significant lines (blank, comment-only and punctuation-only lines excluded), 77 methods. The bar is 400 significant lines; this is 726 over it, 2.82× 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: Agents v3/goal_ui/src/pages/Agents.tsx:1— ClassTooLong — 1043 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 643 over it, 2.61× 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: WorkerDaemon REDACTED:238— ClassTooLong — 1028 significant lines (blank, comment-only and punctuation-only lines excluded), 54 methods. The bar is 400 significant lines; this is 628 over it, 2.57× 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: PluginDiscoveryService v3/@claude-flow/cli/src/plugins/store/discovery.ts:167— ClassTooLong — 938 significant lines (blank, comment-only and punctuation-only lines excluded), 13 methods. The bar is 400 significant lines; this is 538 over it, 2.35× 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: QueenCoordinator v3/@claude-flow/swarm/src/queen-coordinator.ts:500— ClassTooLong — 886 significant lines (blank, comment-only and punctuation-only lines excluded), 57 methods. The bar is 400 significant lines; this is 486 over it, 2.22× 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: ReviseResearchForm v3/goal_ui/src/components/ReviseResearchForm.tsx:1— ClassTooLong — 857 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 457 over it, 2.14× 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: ResearchReportModal v3/goal_ui/src/components/ResearchReportModal.tsx:1— ClassTooLong — 734 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 334 over it, 1.84× 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: MCPServer v3/@claude-flow/mcp/src/server.ts:72— ClassTooLong — 674 significant lines (blank, comment-only and punctuation-only lines excluded), 41 methods. The bar is 400 significant lines; this is 274 over it, 1.69× 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: AgentDBAdapter v3/@claude-flow/memory/src/agentdb-adapter.ts:98— ClassTooLong — 637 significant lines (blank, comment-only and punctuation-only lines excluded), 40 methods. The bar is 400 significant lines; this is 237 over it, 1.59× 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: ReasoningBank v3/@claude-flow/neural/src/reasoning-bank.ts:168— ClassTooLong — 626 significant lines (blank, comment-only and punctuation-only lines excluded), 49 methods. The bar is 400 significant lines; this is 226 over it, 1.57× 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: GasTownBridgePlugin v3/plugins/gastown-bridge/src/index.ts:684— ClassTooLong — 610 significant lines (blank, comment-only and punctuation-only lines excluded), 37 methods. The bar is 400 significant lines; this is 210 over it, 1.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: MCPServerManager REDACTED:389— ClassTooLong — 568 significant lines (blank, comment-only and punctuation-only lines excluded), 19 methods. The bar is 400 significant lines; this is 168 over it, 1.42× 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: ControllerRegistry v3/@claude-flow/memory/src/controller-registry.ts:248— ClassTooLong — 563 significant lines (blank, comment-only and punctuation-only lines excluded), 22 methods. The bar is 400 significant lines; this is 163 over it, 1.41× 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: HeadlessWorkerExecutor v3/@claude-flow/cli/src/services/headless-worker-executor.ts:661— ClassTooLong — 555 significant lines (blank, comment-only and punctuation-only lines excluded), 26 methods. The bar is 400 significant lines; this is 155 over it, 1.39× 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: AgentDBBackend v3/@claude-flow/memory/src/agentdb-backend.ts:146— ClassTooLong — 528 significant lines (blank, comment-only and punctuation-only lines excluded), 37 methods. The bar is 400 significant lines; this is 128 over it, 1.32× 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: CodexInitializer v3/@claude-flow/codex/src/initializer.ts:43— ClassTooLong — 528 significant lines (blank, comment-only and punctuation-only lines excluded), 19 methods. The bar is 400 significant lines; this is 128 over it, 1.32× 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: HNSWIndex v3/@claude-flow/memory/src/hnsw-index.ts:217— ClassTooLong — 520 significant lines (blank, comment-only and punctuation-only lines excluded), 31 methods. The bar is 400 significant lines; this is 120 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: FormulaExecutor v3/plugins/gastown-bridge/src/formula/executor.ts:635— ClassTooLong — 496 significant lines (blank, comment-only and punctuation-only lines excluded), 18 methods. The bar is 400 significant lines; this is 96 over it, 1.24× 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: ConvoyObserver v3/plugins/gastown-bridge/src/convoy/observer.ts:229— ClassTooLong — 491 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 91 over it, 1.23× 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: EnhancedPluginRegistry v3/@claude-flow/plugins/src/registry/enhanced-plugin-registry.ts:256— ClassTooLong — 481 significant lines (blank, comment-only and punctuation-only lines excluded), 36 methods. The bar is 400 significant lines; this is 81 over it, 1.20× 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: AttentionCoordinator v3/@claude-flow/swarm/src/attention-coordinator.ts:180— ClassTooLong — 461 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 61 over it, 1.15× 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: AdvancedSettingsModal v3/goal_ui/src/components/agents/AdvancedSettingsModal.tsx:1— ClassTooLong — 458 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 58 over it, 1.15× 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: PrimeRadiantPlugin v3/plugins/prime-radiant/src/plugin.ts:607— ClassTooLong — 449 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 49 over it, 1.12× 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] plugins/ruflo-console/scripts/bench-memmap.mjs:10— plugins/ruflo-console/scripts/bench-memmap.mjs:10 reaches into another package with a relative path (../../../v3/@claude-flow/cli/src/memory/embedding-q8.ts) — import the package by name instead.
Boundary violation [package:test-suite-dependency] plugins/ruflo-console/scripts/bench-snapshot.mjs:8— plugins/ruflo-console/scripts/bench-snapshot.mjs:8 imports plugins/ruflo-console/tests/fixtures/ruflo-run.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
Boundary violation [package:test-suite-dependency] plugins/ruflo-console/scripts/bench-views.mjs:13— plugins/ruflo-console/scripts/bench-views.mjs:13 imports plugins/ruflo-console/tests/fixtures/ruflo-run.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
Boundary violation [package:test-suite-dependency] plugins/ruflo-console/scripts/bench.ts:13— plugins/ruflo-console/scripts/bench.ts:13 imports plugins/ruflo-console/tests/fixtures/ruflo-run.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
Boundary violation [package:test-cross-package-internals] plugins/ruflo-console/tests/memmap-vectors.spec.ts:8— plugins/ruflo-console/tests/memmap-vectors.spec.ts:8 reaches past another workspace package's public entry into its internals with a relative path (../../../v3/@claude-flow/cli/src/memory/embedding-q8) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
Boundary violation [package:third-party-deep-import] REDACTED:2— REDACTED:2 imports katex/dist/contrib/mhchem.mjs, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] REDACTED:11— REDACTED:11 imports highlight.js/lib/core, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] REDACTED:13— REDACTED:13 imports highlight.js/lib/languages/javascript, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] REDACTED:14— REDACTED:14 imports highlight.js/lib/languages/typescript, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] REDACTED:15— REDACTED:15 imports highlight.js/lib/languages/json, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] REDACTED:16— REDACTED:16 imports highlight.js/lib/languages/bash, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] REDACTED:17— REDACTED:17 imports highlight.js/lib/languages/shell, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] REDACTED:18— REDACTED:18 imports highlight.js/lib/languages/python, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] REDACTED:19— REDACTED:19 imports highlight.js/lib/languages/go, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] REDACTED:20— REDACTED:20 imports highlight.js/lib/languages/rust, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] REDACTED:21— REDACTED:21 imports highlight.js/lib/languages/java, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] REDACTED:22— REDACTED:22 imports highlight.js/lib/languages/csharp, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] REDACTED:23— REDACTED:23 imports highlight.js/lib/languages/cpp, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] REDACTED:24— REDACTED:24 imports highlight.js/lib/languages/c, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] REDACTED:25— REDACTED:25 imports highlight.js/lib/languages/xml, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] REDACTED:26— REDACTED:26 imports highlight.js/lib/languages/css, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] REDACTED:27— REDACTED:27 imports highlight.js/lib/languages/scss, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] REDACTED:28— REDACTED:28 imports highlight.js/lib/languages/markdown, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] REDACTED:29— REDACTED:29 imports highlight.js/lib/languages/yaml, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] REDACTED:30— REDACTED:30 imports highlight.js/lib/languages/sql, 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.
Swallowed exception (empty catch) v3/plugins/teammate-plugin/src/semantic-router.ts:369— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) v3/plugins/teammate-plugin/src/teammate-bridge.ts:1962— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) v3/plugins/teammate-plugin/src/teammate-bridge.ts:2014— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) v3/plugins/teammate-plugin/src/teammate-bridge.ts:2215— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) v3/plugins/teammate-plugin/src/teammate-bridge.ts:2242— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) v3/plugins/teammate-plugin/src/teammate-bridge.ts:2304— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) v3/plugins/teammate-plugin/src/topology-optimizer.ts:401— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) v3/plugins/gastown-bridge/src/cache.ts:879— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) v3/plugins/gastown-bridge/src/cache.ts:906— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) v3/plugins/gastown-bridge/src/index.ts:1244— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) v3/plugins/gastown-bridge/src/index.ts:1675— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) v3/plugins/gastown-bridge/src/convoy/tracker.ts:745— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) REDACTED:448— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) v3/plugins/code-intelligence/src/mcp-tools.ts:831— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) REDACTED:135— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) REDACTED:155— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) REDACTED:434— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) REDACTED:487— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) v3/mcp/tools/hooks-tools.ts:47— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) v3/mcp/tools/session-tools.ts:614— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) v3/mcp/tools/system-tools.ts:416— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) v3/mcp/tools/session-tools.js:470— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) v3/mcp/tools/system-tools.js:263— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) v3/@claude-flow/testing/src/regression/security-regression.ts:258— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) v3/@claude-flow/testing/src/regression/security-regression.ts:325— 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.
No assertions: should log errors via context logger v3/plugins/test-intelligence/tests/mcp-tools.test.ts:464— 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 be non-commutative v3/plugins/hyperbolic-reasoning/tests/bridges.test.ts:390— 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 log failed operations v3/plugins/healthcare-clinical/tests/mcp-tools.test.ts:640— 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 initialize successfully when WASM is available v3/plugins/gastown-bridge/tests/wasm-loader.test.ts:498— 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: initialize succeeds even without node-llama-cpp v3/__tests__/appliance/gguf-engine.test.ts:274— 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 attempt learning when neural system unavailable v3/@claude-flow/swarm/__tests__/queen-coordinator.test.ts:1103— 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 track available dependencies v3/@claude-flow/shared/__tests__/hooks/bash-safety.test.ts:264— 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 allow setting project root v3/@claude-flow/shared/__tests__/hooks/file-organization.test.ts:276— 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 create multiple timers when called multiple times v3/@claude-flow/plugin-agent-federation/__tests__/unit/discovery-service.test.ts:359— 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 clean up periodic sync timer v3/@claude-flow/memory/src/auto-memory-bridge.test.ts:1304— 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 emit controller:failed for failed controllers v3/@claude-flow/memory/src/controller-registry.test.ts:278— 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 emit agentdb:unavailable when module missing v3/@claude-flow/memory/src/controller-registry.test.ts:718— 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 handle non-existent pattern gracefully v3/@claude-flow/hooks/src/__tests__/reasoningbank.test.ts:276— 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 be a no-op for unknown capability IDs v3/@claude-flow/guidance/tests/capabilities.test.ts:305— 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 be a no-op for unknown capability IDs v3/@claude-flow/guidance/tests/capabilities.test.ts:350— 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 be a no-op for unknown capability IDs v3/@claude-flow/guidance/tests/capabilities.test.ts:412— 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 only release lock owned by the same holder v3/@claude-flow/guidance/tests/persistence.test.ts:259— 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 succeed when releasing without holding a lock v3/@claude-flow/guidance/tests/persistence.test.ts:273— 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: batch processes 10,000 SHA-256 hashes v3/@claude-flow/guidance/tests/wasm-kernel.test.ts:301— 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: secret scanning throughput on 10,000 inputs v3/@claude-flow/guidance/tests/wasm-kernel.test.ts:331— 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 exit with code 0 on success v3/@claude-flow/cli/__tests__/cli.test.ts:555— 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 store a completed trajectory v3/@claude-flow/browser/tests/memory-integration.test.ts:175— 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 store a learned pattern v3/@claude-flow/browser/tests/memory-integration.test.ts:199— 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 store a snapshot v3/@claude-flow/browser/tests/memory-integration.test.ts:215— 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 store an error v3/@claude-flow/browser/tests/memory-integration.test.ts:230— 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.
Fake-async — async method never awaits plugins/ruflo-console/scripts/theme-demo.mts:17— `storeSet` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits ruflo/src/ruvocal/src/lib/server/database.ts:44— `init` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits ruflo/src/ruvocal/src/lib/server/database/rvf.ts:1062— `delete` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits ruflo/src/ruvocal/src/routes/conversation/+server.ts:113— `GET` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits scripts/benchmark-graph.mjs:56— `cleanup` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits scripts/check-fingerprint-schema.mjs:81— `main` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits scripts/smoke-graph-pathfinder.mjs:35— `cleanup` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits scripts/smoke-graph-plugin-adapter.mjs:33— `cleanup` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits scripts/smoke-graph-plugin-adapter.mjs:73— `testPluginJsonStub` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits scripts/smoke-graph-plugin-adapter.mjs:90— `testAdapterExports` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits scripts/smoke-graph-plugin-adapter.mjs:108— `testAdapterBackwardCompat` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits scripts/smoke-graph-query-dispatch.mjs:34— `cleanup` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits scripts/smoke-graph-schema-migration.mjs:56— `cleanup` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits scripts/smoke-trajectory-graph-edges.mjs:46— `cleanup` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits v3/@claude-flow/browser/src/infrastructure/reasoningbank-adapter.ts:182— `analyzeFailure` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits v3/@claude-flow/browser/src/infrastructure/reasoningbank-adapter.ts:235— `recordVerdict` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits v3/@claude-flow/cli/src/commands/appliance.ts:56— `requireFile` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits REDACTED:2430— `installClaudeCode` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits v3/@claude-flow/cli/src/commands/init.ts:338— `maybeInstallSkillsSh` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits v3/@claude-flow/cli/src/init/executor.ts:894— `createDirectories` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits v3/@claude-flow/cli/src/init/executor.ts:916— `writeSettings` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits v3/@claude-flow/cli/src/init/executor.ts:1082— `writeMCPConfig` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits v3/@claude-flow/cli/src/init/executor.ts:1141— `copySkills` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits v3/@claude-flow/cli/src/init/executor.ts:1192— `copyCommands` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits v3/@claude-flow/cli/src/init/executor.ts:1260— `copyAgents` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
TooManyMethods: AgentBrowserAdapter v3/@claude-flow/browser/src/infrastructure/agent-browser-adapter.ts:33— TooManyMethods — 98 methods. The bar is 30 methods; this is 68 over it, 3.27× 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: UnifiedSwarmCoordinator v3/@claude-flow/swarm/src/unified-coordinator.ts:136— TooManyMethods — 77 methods. The bar is 30 methods; this is 47 over it, 2.57× 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: TeammateBridge v3/plugins/teammate-plugin/src/teammate-bridge.ts:247— TooManyMethods — 77 methods. The bar is 30 methods; this is 47 over it, 2.57× 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: QueenCoordinator v3/@claude-flow/swarm/src/queen-coordinator.ts:500— TooManyMethods — 57 methods. The bar is 30 methods; this is 27 over it, 1.90× 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: WorkerDaemon REDACTED:238— TooManyMethods — 54 methods. The bar is 30 methods; this is 24 over it, 1.80× 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: ReasoningBank v3/@claude-flow/neural/src/reasoning-bank.ts:168— TooManyMethods — 49 methods. The bar is 30 methods; this is 19 over it, 1.63× 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: OutputFormatter v3/@claude-flow/cli-core/src/output.ts:55— TooManyMethods — 46 methods. The bar is 30 methods; this is 16 over it, 1.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: HyperbolicSpace v3/@claude-flow/plugins/src/integrations/ruvector/hyperbolic.ts:222— TooManyMethods — 43 methods. 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: MCPServer v3/@claude-flow/mcp/src/server.ts:72— TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× 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: AgentDBAdapter v3/@claude-flow/memory/src/agentdb-adapter.ts:98— TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.33× 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: PluginRegistry v3/@claude-flow/shared/src/plugin-registry.ts:24— TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× 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: AgentDBBackend v3/@claude-flow/memory/src/agentdb-backend.ts:146— TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.23× 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: GasTownBridgePlugin v3/plugins/gastown-bridge/src/index.ts:684— TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.23× 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: EnhancedPluginRegistry v3/@claude-flow/plugins/src/registry/enhanced-plugin-registry.ts:256— TooManyMethods — 36 methods. The bar is 30 methods; this is 6 over it, 1.20× 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: UnifiedMemoryService v3/@claude-flow/memory/src/index.ts:326— TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: QueryBuilder v3/@claude-flow/memory/src/query-builder.ts:77— TooManyMethods — 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.
TooManyMethods: SONAManager v3/@claude-flow/neural/src/sona-manager.ts:160— TooManyMethods — 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.
TooManyMethods: IoTCoordinator v3/@claude-flow/plugin-iot-cognitum/src/application/iot-coordinator.ts:79— TooManyMethods — 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.
TooManyMethods: FederationHub v3/@claude-flow/swarm/src/federation-hub.ts:194— TooManyMethods — 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.
TooManyMethods: GuppAdapter v3/plugins/gastown-bridge/src/gupp/adapter.ts:134— TooManyMethods — 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.
TooManyMethods: SONAAdapter v3/@claude-flow/integration/src/sona-adapter.ts:123— TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.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: TaskOrchestrator v3/@claude-flow/swarm/src/coordination/task-orchestrator.ts:101— TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.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: TopologyManager v3/@claude-flow/swarm/src/topology-manager.ts:17— TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.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: HybridBackend v3/@claude-flow/memory/src/hybrid-backend.ts:154— TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: SwarmCommunication v3/@claude-flow/hooks/src/swarm/index.ts:138— TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× 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.
+ 3 more in this group — see findings.md.
AC6 · Visual & motion safety· Animation without a prefers-reduced-motion guard · ×26
Animation without a prefers-reduced-motion guard ruflo/src/ruvocal/src/lib/components/chat/TaskGroup.svelte:63— <span> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
Animation without a prefers-reduced-motion guard ruflo/src/ruvocal/src/lib/components/icons/IconLoading.svelte:10— <div> moves — its `animate-bounce` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
Animation without a prefers-reduced-motion guard ruflo/src/ruvocal/src/lib/components/icons/IconLoading.svelte:14— <div> moves — its `animate-bounce` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
Animation without a prefers-reduced-motion guard ruflo/src/ruvocal/src/lib/components/icons/IconLoading.svelte:18— <div> moves — its `animate-bounce` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
Animation without a prefers-reduced-motion guard ruflo/src/ruvocal/src/lib/components/mcp/MCPServerManager.svelte:110— <iconrefresh> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
Animation without a prefers-reduced-motion guard ruflo/src/ruvocal/src/lib/components/mcp/ServerCard.svelte:156— <iconrefresh> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
Animation without a prefers-reduced-motion guard ruflo/src/ruvocal/src/lib/components/wasm/GalleryPanel.svelte:168— <div> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
Animation without a prefers-reduced-motion guard v3/goal_ui/src/components/AgentStep.tsx:119— <div> moves — its inline style sets `animation: status` — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
Animation without a prefers-reduced-motion guard v3/goal_ui/src/components/ResearchReportModal.tsx:560— <div> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
Animation without a prefers-reduced-motion guard v3/goal_ui/src/components/ResearchReportModal.tsx:767— <div> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
Animation without a prefers-reduced-motion guard v3/goal_ui/src/components/agents/ExecutionDashboard.tsx:147— <div> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
Animation without a prefers-reduced-motion guard v3/goal_ui/src/pages/Agents.tsx:716— <div> moves — its inline style sets `transition: height 0.5s ease-out` — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
Animation without a prefers-reduced-motion guard v3/goal_ui/src/pages/Agents.tsx:1071— <div> moves — its inline style sets `transition: height 0.5s ease-out` — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
Animation without a prefers-reduced-motion guard v3/goal_ui/src/pages/Demo.tsx:245— <div> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
Animation without a prefers-reduced-motion guard v3/goal_ui/src/pages/Index.tsx:1070— <div> moves — its inline style sets `animation: fade-in 2s ease-out forwards` — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
Animation without a prefers-reduced-motion guard v3/goal_ui/src/pages/Index.tsx:1085— <div> moves — its inline style sets `animation: fade-in 2.5s ease-out forwards` — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
Animation without a prefers-reduced-motion guard ruflo/src/ruvocal/src/lib/components/NavMenu.svelte:299— `.qd1` moves (`animation: qdot 2.2s ease-in-out infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard ruflo/src/ruvocal/src/lib/components/NavMenu.svelte:303— `.qd2` moves (`animation: qdot 2.2s ease-in-out infinite 0.35s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard ruflo/src/ruvocal/src/lib/components/NavMenu.svelte:307— `.qd3` moves (`animation: qdot 2.2s ease-in-out infinite 0.7s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard ruflo/src/ruvocal/src/lib/components/StopGeneratingBtn.svelte:53— `.stop-generating-btn--spinning::after` moves (`animation: stop-generating-rotate 1.2s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard ruflo/src/ruvocal/src/lib/components/icons/Logo.svelte:50— `.w1` moves (`animation: wave-shift 3s ease-in-out infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard ruflo/src/ruvocal/src/lib/components/icons/Logo.svelte:53— `.w2` moves (`animation: wave-shift 3s ease-in-out infinite 0.5s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard ruflo/src/ruvocal/src/lib/components/icons/Logo.svelte:57— `.w3` moves (`animation: wave-shift 3s ease-in-out infinite 1s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard ruflo/src/ruvocal/src/lib/components/chat/ChatIntroduction.svelte:109— `.qd1` moves (`animation: qdot 2.2s ease-in-out infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard ruflo/src/ruvocal/src/lib/components/chat/ChatIntroduction.svelte:113— `.qd2` moves (`animation: qdot 2.2s ease-in-out infinite 0.35s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
MethodTooLong: PluginDiscoveryService.getDemoPlugins v3/@claude-flow/cli/src/plugins/store/discovery.ts:403— MethodTooLong — getDemoPlugins runs 710 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 610 over it, 7.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: AgentFederationPlugin.initialize v3/@claude-flow/plugin-agent-federation/src/plugin.ts:90— MethodTooLong — initialize runs 297 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 197 over it, 2.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: ControllerRegistry.createController v3/@claude-flow/memory/src/controller-registry.ts:751— MethodTooLong — createController runs 227 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 127 over it, 2.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: IntegrationRegressionSuite.registerDefaultTests v3/@claude-flow/testing/src/regression/integration-regression.ts:122— MethodTooLong — registerDefaultTests runs 178 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 78 over it, 1.78× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CodexInitializer.initialize v3/@claude-flow/codex/src/initializer.ts:56— MethodTooLong — initialize runs 129 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 29 over it, 1.29× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: GasTownBridgePlugin.createBridgeFacade v3/plugins/gastown-bridge/src/index.ts:1281— MethodTooLong — createBridgeFacade runs 129 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 29 over it, 1.29× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CLI.run v3/@claude-flow/cli/src/index.ts:93— MethodTooLong — run runs 128 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 28 over it, 1.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.
MethodTooLong: AgentRegistry.registerDefaultAgents v3/@claude-flow/swarm/src/coordination/agent-registry.ts:352— MethodTooLong — registerDefaultAgents runs 125 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 25 over it, 1.25× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ModelRouter.route v3/@claude-flow/cli/src/ruvector/model-router.ts:619— MethodTooLong — route runs 119 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 19 over it, 1.19× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ConformanceRunner.runConformanceTest v3/@claude-flow/guidance/src/conformance-kit.ts:719— MethodTooLong — runConformanceTest runs 118 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 18 over it, 1.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.
MethodTooLong: CognitiveBridge.createMockModule v3/plugins/cognitive-kernel/src/bridges/cognitive-bridge.ts:253— MethodTooLong — createMockModule 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.
MethodTooLong: SonaBridge.createMockModule v3/plugins/cognitive-kernel/src/bridges/sona-bridge.ts:272— MethodTooLong — createMockModule 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.
MethodTooLong: HeadlessWorkerExecutor.executeInternal v3/@claude-flow/cli/src/services/headless-worker-executor.ts:960— MethodTooLong — executeInternal runs 112 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 12 over it, 1.12× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ConformanceSuite.createDefaultTraces v3/@claude-flow/guidance/src/manifest-validator.ts:942— MethodTooLong — createDefaultTraces runs 109 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 9 over it, 1.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.
MethodTooLong: MctsExplorer.explore v3/@claude-flow/browser/src/application/mcts-explorer.ts:80— MethodTooLong — explore runs 104 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 4 over it, 1.04× 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: MCPServerManager.startStdioServer REDACTED:707— MethodTooLong — startStdioServer runs 104 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 4 over it, 1.04× 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: TaskHooksManager.analyzeTask v3/@claude-flow/shared/src/hooks/task-hooks.ts:260— MethodTooLong — analyzeTask runs 103 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 3 over it, 1.03× 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: PatternPublisher.publishPattern v3/@claude-flow/cli/src/transfer/store/publish.ts:36— MethodTooLong — publishPattern runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2 over it, 1.02× 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: EnhancedModelRouter.route REDACTED:382— MethodTooLong — route runs 101 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1 over it, 1.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.
MethodTooLong: SonaBridge.createMockModule v3/plugins/ruvector-upstream/src/bridges/sona.ts:212— MethodTooLong — createMockModule runs 101 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1 over it, 1.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.
AC2 · Forms & labels· <Select> field component without a label · ×10
<Select> field component without a label v3/goal_ui/src/components/ReviseResearchForm.tsx:489— This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing it renders carries one either (a name prop is the form-submission key, not a label). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<Select> field component without a label v3/goal_ui/src/components/ReviseResearchForm.tsx:511— This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing it renders carries one either (a name prop is the form-submission key, not a label). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<Select> field component without a label v3/goal_ui/src/components/ReviseResearchForm.tsx:535— This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing it renders carries one either (a name prop is the form-submission key, not a label). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<Select> field component without a label v3/goal_ui/src/components/ReviseResearchForm.tsx:574— This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing it renders carries one either (a name prop is the form-submission key, not a label). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<Select> field component without a label v3/goal_ui/src/components/ReviseResearchForm.tsx:988— This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing it renders carries one either (a name prop is the form-submission key, not a label). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<Select> field component without a label v3/goal_ui/src/components/WidgetCustomizer.tsx:254— This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing it renders carries one either (a name prop is the form-submission key, not a label). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<Select> field component without a label v3/goal_ui/src/components/WidgetCustomizer.tsx:273— This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing it renders carries one either (a name prop is the form-submission key, not a label). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<Select> field component without a label v3/goal_ui/src/components/WidgetCustomizer.tsx:291— This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing it renders carries one either (a name prop is the form-submission key, not a label). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<Select> field component without a label v3/goal_ui/src/components/WidgetCustomizer.tsx:308— This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing it renders carries one either (a name prop is the form-submission key, not a label). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<Select> field component without a label v3/goal_ui/src/components/WidgetCustomizer.tsx:390— This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing it renders carries one either (a name prop is the form-submission key, not a label). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
IC1 · Incompleteness & stubs· Both branches are identical · ×9
Both branches are identical — the condition decides nothing plugins/ruflo-console/hooks/mission-palette.ts:59— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing plugins/ruflo-console/hooks/views/events.ts:127— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing plugins/ruflo-console/scripts/bench-events.mjs:124— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing plugins/ruflo-cost-tracker/scripts/counterfactual.mjs:175— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing scripts/audit-cli-mcp-tools.mjs:58— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing scripts/smoke-router-regex.mjs:85— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing v3/@claude-flow/browser/src/application/action-router.ts:108— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing v3/@claude-flow/cli/src/commands/security.ts:579— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing v3/@claude-flow/cli/src/commands/security.ts:1039— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
AC2 · Forms & labels· <Slider> field component without a label · ×8
<Slider> field component without a label v3/goal_ui/src/components/ReviseResearchForm.tsx:787— This UI-library field component has no label / aria-label / aria-labelledby / id — and neither does anything it renders (a name prop is the form-submission key, not a label) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<Slider> field component without a label v3/goal_ui/src/components/ReviseResearchForm.tsx:806— This UI-library field component has no label / aria-label / aria-labelledby / id — and neither does anything it renders (a name prop is the form-submission key, not a label) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<Slider> field component without a label v3/goal_ui/src/components/ReviseResearchForm.tsx:825— This UI-library field component has no label / aria-label / aria-labelledby / id — and neither does anything it renders (a name prop is the form-submission key, not a label) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<Slider> field component without a label v3/goal_ui/src/components/ReviseResearchForm.tsx:844— This UI-library field component has no label / aria-label / aria-labelledby / id — and neither does anything it renders (a name prop is the form-submission key, not a label) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<Slider> field component without a label v3/goal_ui/src/components/ReviseResearchForm.tsx:863— This UI-library field component has no label / aria-label / aria-labelledby / id — and neither does anything it renders (a name prop is the form-submission key, not a label) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<Slider> field component without a label v3/goal_ui/src/components/ReviseResearchForm.tsx:897— This UI-library field component has no label / aria-label / aria-labelledby / id — and neither does anything it renders (a name prop is the form-submission key, not a label) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<Slider> field component without a label v3/goal_ui/src/components/agents/AdvancedSettingsModal.tsx:347— This UI-library field component has no label / aria-label / aria-labelledby / id — and neither does anything it renders (a name prop is the form-submission key, not a label) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<Slider> field component without a label v3/goal_ui/src/components/agents/AdvancedSettingsModal.tsx:366— This UI-library field component has no label / aria-label / aria-labelledby / id — and neither does anything it renders (a name prop is the form-submission key, not a label) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
Focus outline removed inline ruflo/src/ruvocal/src/lib/components/DeleteConversationModal.svelte:38— <button> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline ruflo/src/ruvocal/src/lib/components/DeleteConversationModal.svelte:57— <button> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline ruflo/src/ruvocal/src/lib/components/ExpandNavigation.svelte:11— <button> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline ruflo/src/ruvocal/src/lib/components/NavConversationItem.svelte:70— <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline ruflo/src/ruvocal/src/lib/components/ShareConversationModal.svelte:127— <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline ruflo/src/ruvocal/src/lib/components/chat/ChatInput.svelte:236— <textarea> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline ruflo/src/ruvocal/src/lib/components/chat/ChatInput.svelte:430— <button> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Focus outline removed inline ruflo/src/ruvocal/src/lib/components/chat/ChatMessage.svelte:481— <textarea> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
D10 · Test Quality· Fixed-sleep synchronisation · ×8
Fixed-sleep synchronisation: should propose value as leader v3/@claude-flow/swarm/__tests__/consensus.test.ts:96— This test starts work it did not wait for (`raftLeader`, still running when the sleep starts) and then orders itself against it with `new Promise(resolve => setTimeout(resolve, 150))` — 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: should vote on proposal v3/@claude-flow/swarm/__tests__/consensus.test.ts:139— This test starts work it did not wait for (`raftLeader`, still running when the sleep starts) and then orders itself against it with `new Promise(resolve => setTimeout(resolve, 150))` — 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: reproduces today's flat quorum exactly when no weights are supplied (regression guard) v3/@claude-flow/swarm/__tests__/consensus.test.ts:745— This test starts work it did not wait for (`raftLeader`, still running when the sleep starts) and then orders itself against it with `new Promise(resolve => setTimeout(resolve, 150))` — 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: does not recreate an orphaned queue for the departed subscriber v3/@claude-flow/swarm/__tests__/message-bus.broadcast-retry.test.ts:103— This test starts work it did not wait for (`bus`, still running when the sleep starts) and then orders itself against it with `new Promise((resolve) => setTimeout(resolve, 500))` — 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: resolves a pending proposal via the consensus.achieved event, never via setInterval polling v3/@claude-flow/swarm/__tests__/raft-await-consensus-event-driven.test.ts:40— This test starts work it did not wait for (`awaitPromise`, still running when the sleep starts) and then orders itself against it with `new Promise(resolve => setTimeout(resolve, 5))` — 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: drains native SQLite writes and nested fallback work before one close, then reopens durably v3/@claude-flow/cli/__tests__/memory-bridge-native-lifecycle.test.ts:11— This test starts work it did not wait for (`pending`, still running when the sleep starts) and then orders itself against it with `new Promise(r=>setTimeout(r,0))` — 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: waits for an asynchronous cache clear before acknowledging purge v3/@claude-flow/cli/__tests__/memory-purge-cache-invalidation.test.ts:24— This test starts work it did not wait for (`purge`, still running when the sleep starts) and then orders itself against it with `new Promise(r=>setTimeout(r,0))` — 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: a write that starts while detection is still running waits for it, and is built with the detected flavor plugins/ruflo-console/tests/write-argv.spec.ts:93— This test starts work it did not wait for (`flushing`, 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.
command.answer (cognitive 19) plugins/ruflo-agent/hooks/command.ts:10— command.answer has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 5 (6 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
command.answer (cognitive 19) plugins/ruflo-bbs-federation/hooks/command.ts:11— command.answer has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 6 (8 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
command.answer (cognitive 19) plugins/ruflo-browser/hooks/command.ts:10— command.answer has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 6 (8 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
command.answer (cognitive 19) plugins/ruflo-goals/hooks/command.ts:15— command.answer has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 6 (8 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
command.answer (cognitive 19) plugins/ruflo-intelligence/hooks/command.ts:15— command.answer has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 6 (8 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
command.answer (cognitive 19) plugins/ruflo-iot-cognitum/hooks/command.ts:15— command.answer has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 6 (8 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
command.answer (cognitive 19) plugins/ruflo-plugin-creator/hooks/command.ts:42— command.answer has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 7 (9 pts), if/else 6, boolean chains 4 (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.
command.answer (cognitive 19) plugins/ruflo-workflows/hooks/command.ts:10— command.answer has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 6 (7 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 6). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
X24 · Document value interpolated into markup unescaped· Untrusted text written into markup unescaped · ×6
Untrusted text written into markup unescaped REDACTED:238— `escapeHTML(source.link)` 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.
Untrusted text written into markup unescaped REDACTED:355— `escapeHTML(safeHref)` 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.
Untrusted text written into markup unescaped REDACTED:367— `safeTitle` 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 REDACTED:370— `safeTitle` 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 REDACTED:372— `safeSrc` 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.
Untrusted text written into markup unescaped REDACTED:71— `Object.entries(THEMES).map(([theme,prefix])=>`
${prefix} [data-chart=${id}] {
${colorConfig.map(([key,itemConfig])=>{…` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` 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.
Swallowed exception (caught, then discarded) v3/src/infrastructure/mcp/MCPServer.ts:83— `catch (error)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) v3/plugins/gastown-bridge/src/wasm/loader.ts:166— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) v3/plugins/code-intelligence/src/mcp-tools.ts:672— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) v3/plugins/code-intelligence/src/mcp-tools.ts:681— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) v3/plugins/code-intelligence/src/mcp-tools.ts:702— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) v3/plugins/code-intelligence/src/mcp-tools.ts:773— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
ruvector_gnn_wasm::dag::find_cycle_nodes_internal (cognitive 31) v3/plugins/gastown-bridge/wasm/ruvector-gnn-wasm/src/dag.rs:159— ruvector_gnn_wasm::dag::find_cycle_nodes_internal has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 8 (13 pts) (nesting depth added 14). Of this number, 21 points are the body's own statements and 10 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.
ruvector_gnn_wasm::dag::compute_levels_internal (cognitive 26) v3/plugins/gastown-bridge/wasm/ruvector-gnn-wasm/src/dag.rs:256— ruvector_gnn_wasm::dag::compute_levels_internal has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 6 (9 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ruvector_gnn_wasm::critical::critical_path_internal (cognitive 23) v3/plugins/gastown-bridge/wasm/ruvector-gnn-wasm/src/critical.rs:34— ruvector_gnn_wasm::critical::critical_path_internal has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 6 (8 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.
ruvector_gnn_wasm::topo::topo_sort_kahn (cognitive 18) v3/plugins/gastown-bridge/wasm/ruvector-gnn-wasm/src/topo.rs:88— ruvector_gnn_wasm::topo::topo_sort_kahn has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 6 (8 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ruvector_gnn_wasm::critical::topo_sort_kahn_indices (cognitive 16) v3/plugins/gastown-bridge/wasm/ruvector-gnn-wasm/src/critical.rs:137— ruvector_gnn_wasm::critical::topo_sort_kahn_indices has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 5 (7 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
register.answer (cognitive 20) plugins/ruflo-jujutsu/hooks/register.ts:48— register.answer has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 6 (7 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
register.answer (cognitive 20) plugins/ruflo-knowledge-graph/hooks/register.ts:48— register.answer has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 6 (7 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
register.answer (cognitive 20) plugins/ruflo-loop-workers/hooks/register.ts:48— register.answer has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 6 (7 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
register.answer (cognitive 20) plugins/ruflo-market-data/hooks/register.ts:48— register.answer has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 6 (7 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
register.answer (cognitive 20) plugins/ruflo-metaharness/hooks/register.ts:48— register.answer has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 6 (7 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
command.answer (cognitive 16) plugins/ruflo-migrations/hooks/command.ts:16— command.answer has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 4 (5 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.
command.answer (cognitive 16) plugins/ruflo-rag-memory/hooks/command.ts:13— command.answer has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 5 (6 pts), boolean chains 2 (nesting depth added 5). 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.
command.answer (cognitive 16) plugins/ruflo-ruvector/hooks/command.ts:13— command.answer has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 5 (6 pts), boolean chains 2 (nesting depth added 5). 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.
command.answer (cognitive 16) plugins/ruflo-ruvllm/hooks/command.ts:13— command.answer has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 5 (6 pts), boolean chains 2 (nesting depth added 5). 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.
command.answer (cognitive 16) plugins/ruflo-rvf/hooks/command.ts:13— command.answer has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 5 (6 pts), boolean chains 2 (nesting depth added 5). 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.
D30 · Dependency Vulnerabilities· Medium vulnerability · ×5
Change coupling: bindings.ts ↔ commands.ts plugins/ruflo-console/hooks/bindings.ts:1— `plugins/ruflo-console/hooks/bindings.ts` and `plugins/ruflo-console/hooks/commands.ts` change together 64% of the time (9 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 between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `ec1541fb` fix(console): bind every confirm route to the card the person saw (#3…; `dab6c087` feat(console): wire the Workflows page (ADR-464): view, nav, menu, li…; `5c7379ad` feat(ruflo-console): ruHelp and 32 guides: a help bot, walkthroughs a… — run `git show` on any of them.
Change coupling: mcp-client.ts ↔ REDACTED v3/@claude-flow/cli/src/mcp-client.ts:1— `v3/@claude-flow/cli/src/mcp-client.ts` and `v3/@claude-flow/cli/src/mcp-tools/index.ts` change together 60% of the time (9 of the 15 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 `953d8d00` feat: Grok Build host surface + host-agnostic team bus (ADR-402) (#3512); `0483ac55` feat(missions): ADR-406 M1 mission observation via CLI and MCP, e2e gate; `90bff10f` feat(x-gateway): public and private swarm channels (ADR-386) (#3261) — run `git show` on any of them.
Change coupling: cli.ts ↔ runner.ts plugins/ruflo-console/hooks/data/cli.ts:1— `plugins/ruflo-console/hooks/data/cli.ts` and `plugins/ruflo-console/hooks/runner.ts` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `df7af622` fix(console): a verdict command's "found something" exit is an answer…; `8612da1e` fix(ruflo-console): a Dev Tools entry's own cost is the floor of its …; `484cf7b3` feat(ruflo-console): Cost can set a budget, shows where spend goes, a… — run `git show` on any of them.
Change coupling: commands.ts ↔ REDACTED plugins/ruflo-console/hooks/commands.ts:1— `plugins/ruflo-console/hooks/commands.ts` and `REDACTED` change together 57% of the time (8 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `ec1541fb` fix(console): bind every confirm route to the card the person saw (#3…; `dab6c087` feat(console): wire the Workflows page (ADR-464): view, nav, menu, li…; `5c7379ad` feat(ruflo-console): ruHelp and 32 guides: a help bot, walkthroughs a… — run `git show` on any of them.
Change coupling: palette.ts ↔ REDACTED plugins/ruflo-console/hooks/palette.ts:1— `plugins/ruflo-console/hooks/palette.ts` and `REDACTED` change together 50% of the time (11 of the 22 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 11 shared commits counted here, the most recent 3 are `bc578a5f` feat(ruflo-console): 0.13.0 — Ask Claude on every section, per-view r…; `bf1b5550` feat(ruflo-console): 0.10.0 — Settings with search, AI terminal (clau…; `ed47d375` feat(ruflo-console): 0.9.0 — Plugin Catalog (every ruflo plugin, mod … — run `git show` on any of them.
Off the main sequence: @claude-flow/security — @claude-flow/security: abstractness 0.13, instability 0.00, distance 0.87 — zone of pain — concrete and depended on by 4 project(s), so it's rigid to change.
Off the main sequence: @claude-flow/mcp — @claude-flow/mcp: abstractness 0.19, instability 0.00, distance 0.81 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: @claude-flow/memory — @claude-flow/memory: abstractness 0.09, instability 0.14, distance 0.77 — zone of pain — concrete and depended on by 6 project(s), so it's rigid to change.
Off the main sequence: @claude-flow/cli-core — @claude-flow/cli-core: abstractness 0.29, instability 0.00, distance 0.71 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: @claude-flow/plugin-agent-federation — @claude-flow/plugin-agent-federation: abstractness 0.30, instability 0.00, distance 0.70 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Low cohesion: MemoryApplicationService (LCOM4 5) v3/@claude-flow/memory/src/application/services/memory-application-service.ts:23— MemoryApplicationService's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: GraphOperations (LCOM4 5) v3/@claude-flow/plugins/src/integrations/ruvector/gnn.ts:2250— GraphOperations's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: WasmLoaderAdapter (LCOM4 5) v3/plugins/gastown-bridge/src/index.ts:461— WasmLoaderAdapter's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: ASTAnalyzer (LCOM4 4) REDACTED:61— ASTAnalyzer's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: AgentAuthorizationPropagator (LCOM4 4) v3/@claude-flow/security/src/authorization/propagator.ts:119— AgentAuthorizationPropagator's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Outbound HTTP without resilience REDACTED:1670— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience REDACTED:1842— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience v3/@claude-flow/mcp/src/oauth.ts:188— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience v3/@claude-flow/mcp/src/oauth.ts:231— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience v3/@claude-flow/mcp/src/sampling.ts:329— `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
gastown_formula_wasm::parser::extract_metadata_fast (cognitive 28) v3/plugins/gastown-bridge/wasm/gastown-formula-wasm/src/parser.rs:202— gastown_formula_wasm::parser::extract_metadata_fast has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (22 pts), match/switch 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
gastown_formula_wasm::molecule::topological_sort (cognitive 22) v3/plugins/gastown-bridge/wasm/gastown-formula-wasm/src/molecule.rs:117— gastown_formula_wasm::molecule::topological_sort has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 6 (8 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.
gastown_formula_wasm::cooker::substitute_all (cognitive 19) v3/plugins/gastown-bridge/wasm/gastown-formula-wasm/src/cooker.rs:162— gastown_formula_wasm::cooker::substitute_all has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
gastown_formula_wasm::parser::extract_type_fast (cognitive 19) v3/plugins/gastown-bridge/wasm/gastown-formula-wasm/src/parser.rs:82— gastown_formula_wasm::parser::extract_type_fast has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (11 pts), match/switch 1 (5 pts), boolean chains 2, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Unfinished stub — throws a "not implemented" error v3/plugins/code-intelligence/src/bridges/gnn-bridge.ts:467— A shipped function's whole body still throws a "not implemented" error — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws a "not implemented" error v3/plugins/code-intelligence/src/bridges/mincut-bridge.ts:403— A shipped function's whole body still throws a "not implemented" error — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws a "not implemented" error v3/plugins/legal-contracts/src/bridges/attention-bridge.ts:311— A shipped function's whole body still throws a "not implemented" error — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws a "not implemented" error v3/plugins/legal-contracts/src/bridges/dag-bridge.ts:377— A shipped function's whole body still throws a "not implemented" error — generated scaffolding that was never completed. Implement it or remove the dead surface.
Low contrast Tailwind colour pair (4.4:1) ruflo/src/ruvocal/src/lib/components/chat/ChatMessage.svelte:481— This element's Tailwind text/background colour utilities fall below the 4.5:1 WCAG AA minimum for normal text. Pick a darker or lighter shade.
Low contrast Tailwind colour pair (4.4:1) ruflo/src/ruvocal/src/lib/components/chat/ChatWindow.svelte:811— This element's Tailwind text/background colour utilities fall below the 4.5:1 WCAG AA minimum for normal text. Pick a darker or lighter shade.
Low contrast Tailwind colour pair (4.4:1) ruflo/src/ruvocal/src/lib/components/chat/ToolUpdate.svelte:144— This element's Tailwind text/background colour utilities fall below the 4.5:1 WCAG AA minimum for normal text. Pick a darker or lighter shade.
toast-policy.createToaster.run (cyclomatic 21) plugins/ruflo-console/hooks/toast-policy.ts:309— toast-policy.createToaster.run 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.
toast-policy.createToaster.run (cyclomatic 21) plugins/ruflo-protector/hooks/toast-policy.ts:309— toast-policy.createToaster.run 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.
toast-policy.createToaster.run (cyclomatic 21) plugins/ruflo-swarm/hooks/toast-policy.ts:309— toast-policy.createToaster.run 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.
toast-policy.decodeRing (cyclomatic 20) plugins/ruflo-console/hooks/toast-policy.ts:132— toast-policy.decodeRing 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.
toast-policy.decodeRing (cyclomatic 20) plugins/ruflo-protector/hooks/toast-policy.ts:132— toast-policy.decodeRing 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.
toast-policy.decodeRing (cyclomatic 20) plugins/ruflo-swarm/hooks/toast-policy.ts:132— toast-policy.decodeRing 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.
toast-policy.createToaster.run (cognitive 25) plugins/ruflo-console/hooks/toast-policy.ts:309— toast-policy.createToaster.run has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 5, 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.
toast-policy.createToaster.run (cognitive 25) plugins/ruflo-protector/hooks/toast-policy.ts:309— toast-policy.createToaster.run has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 5, 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.
toast-policy.createToaster.run (cognitive 25) plugins/ruflo-swarm/hooks/toast-policy.ts:309— toast-policy.createToaster.run has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 5, 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.
ToolRegistry.search (cognitive 24) v3/@claude-flow/mcp/src/tool-registry.ts:217— ToolRegistry.search has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 3, 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.
ToolRegistry.search (cognitive 24) v3/@claude-flow/shared/src/mcp/tool-registry.ts:253— ToolRegistry.search has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 3, 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.
ToolRegistry.search (cognitive 24) v3/mcp/tool-registry.ts:257— ToolRegistry.search has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 3, 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.
DM10 · One transaction, one aggregate· One operation mutates 2 aggregates · ×3
One operation mutates 2 aggregates: CoordinationService.assignTask v3/@claude-flow/swarm/src/domain/services/coordination-service.ts:59— `CoordinationService.assignTask` saves `ITaskRepository`, `IAgentRepository` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
One operation mutates 2 aggregates: CoordinationService.processTaskCompletion v3/@claude-flow/swarm/src/domain/services/coordination-service.ts:181— `CoordinationService.processTaskCompletion` saves `ITaskRepository`, `IAgentRepository` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
One operation mutates 2 aggregates: CoordinationService.processTaskFailure v3/@claude-flow/swarm/src/domain/services/coordination-service.ts:221— `CoordinationService.processTaskFailure` saves `ITaskRepository`, `IAgentRepository` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
P12 · CI test-gate honesty· Runner config excludes tests no gate runs · ×3
Runner config excludes tests no gate runs ruflo/src/ruvocal/vite.config.ts:57— `src/lib/server/**` removes 164 test(s) in 12 file(s) (e.g. `ruflo/src/ruvocal/src/lib/server/isURLLocal.spec.ts`, `ruflo/src/ruvocal/src/lib/server/__tests__/conversation-stop-generating.spec.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 ruflo/src/ruvocal/vite.config.ts:79— `src/**/*.svelte.{test,spec}.{js,ts}` removes 11 test(s) in 1 file(s) (e.g. `ruflo/src/ruvocal/src/lib/components/chat/MarkdownRenderer.svelte.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 v3/vitest.config.ts:90— `__tests__/appliance/**` removes 132 test(s) in 5 file(s) (e.g. `v3/__tests__/appliance/gguf-engine.test.ts`, `v3/__tests__/appliance/rvfa-builder.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.
P12 · CI test-gate honesty· Workspace package's tests never run by CI · ×3
Workspace package's tests never run by CI v3/@claude-flow/mcp/REDACTED:18— `v3/@claude-flow/mcp` is a workspace package with 124 test(s) in 13 file(s) (e.g. `v3/@claude-flow/mcp/__tests__/connection-pool-reservation.test.ts`, `v3/@claude-flow/mcp/__tests__/http-transport-auth.test.ts`), but no CI command runs them — no step names the package and no workspace-wide command reaches it, so its tests gate nothing. Run its tests in CI, or delete them.
Workspace package's tests never run by CI v3/@claude-flow/plugin-agent-federation/REDACTED:21— `v3/@claude-flow/plugin-agent-federation` is a workspace package with 532 test(s) in 27 file(s) (e.g. `v3/@claude-flow/plugin-agent-federation/__tests__/unit/a2a-agent-card.test.ts`, `v3/@claude-flow/plugin-agent-federation/__tests__/unit/a2a-well-known.test.ts`), but no CI command runs them — no step names the package and no workspace-wide command reaches it, so its tests gate nothing. Run its tests in CI, or delete them.
Workspace package's tests never run by CI v3/@claude-flow/security/REDACTED:17— `v3/@claude-flow/security` is a workspace package with 618 test(s) in 33 file(s) (e.g. `v3/@claude-flow/security/__tests__/agentic-policy-engine.test.ts`, `v3/@claude-flow/security/__tests__/authorization-propagator.test.ts`), but no CI command runs them — no step names the package and no workspace-wide command reaches it, so its tests gate nothing. Run its tests in CI, or delete them.
AC1 · Text alternatives· <canvas> without a text alternative · ×2
<canvas> without a text alternative ruflo/src/ruvocal/src/lib/components/FoundationBackground.svelte:226— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative ruflo/src/ruvocal/src/lib/components/RuFloUniverse.svelte:171— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
AC2 · Forms & labels· <Textarea> field component without a label · ×2
<Textarea> field component without a label v3/goal_ui/src/components/GoalInput.tsx:118— This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<Textarea> field component without a label v3/goal_ui/src/components/ResearchReviewCard.tsx:122— This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
AC3 · Page structure· Heading level jumps from h1 to h3 · ×2
Heading level jumps from h1 to h3 v3/goal_ui/src/pages/Agents.tsx:704— Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
Heading level jumps from h1 to h3 v3/goal_ui/src/pages/Index.tsx:1055— Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
AC6 · Visual & motion safety· Focus outline removed in CSS without a · ×2
Focus outline removed in CSS without a :focus replacement ruflo/src/ruvocal/src/styles/main.css:15— `.btn` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement ruflo/src/ruvocal/src/styles/main.css:28— `.base-tool` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
mission-create.createSpec::createChain::undo (cyclomatic 22) plugins/ruflo-console/hooks/mission-create.ts:319— mission-create.createSpec::createChain::undo has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (mission-create.createSpec::createChain) 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.
mission-create.createSpec::createChain (cyclomatic 16) plugins/ruflo-console/hooks/mission-create.ts:173— mission-create.createSpec::createChain 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 shape REPEATS in the file: one other method here (mission-create.createSpec::createChain::undo) 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.
ruflo-hook.resolveCommandPath (cyclomatic 20) REDACTED:100— ruflo-hook.resolveCommandPath 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.
ruflo-hook.resolveCommandPath (cyclomatic 20) REDACTED:177— ruflo-hook.resolveCommandPath 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.
dangerous-command.hasRootDelete::firstGroup (cyclomatic 19) plugins/ruflo-mods/hooks/guard/dangerous-command.ts:56— dangerous-command.hasRootDelete::firstGroup has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 2 other methods here (dangerous-command.hasRootDelete, dangerous-command.hasRootDelete::takeWord) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
dangerous-command.hasRootDelete::takeWord (cyclomatic 19) plugins/ruflo-mods/hooks/guard/dangerous-command.ts:99— dangerous-command.hasRootDelete::takeWord 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. This shape REPEATS in the file: 2 other methods here (dangerous-command.hasRootDelete, dangerous-command.hasRootDelete::firstGroup) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
signed-attribution.localSingleEntryPageRank (cyclomatic 19) plugins/ruflo-neural-trader/src/signed-attribution.mjs:67— signed-attribution.localSingleEntryPageRank has cyclomatic complexity 19 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
signed-attribution.localSingleEntryPageRank (cyclomatic 19) plugins/ruflo-neural-trader/src/signed-attribution.ts:208— signed-attribution.localSingleEntryPageRank has cyclomatic complexity 19 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
TodoComment v3/@claude-flow/hooks/src/__tests__/guidance-provider.test.ts:233— // TODO: implement proper validation — 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.
TodoComment v3/@claude-flow/cli/__tests__/p1-commands.test.ts:406— // TODO: Init command tests require complex mocking of executeInit internals — 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.
ruflo-hook.resolveCommandPath (cognitive 34) REDACTED:100— ruflo-hook.resolveCommandPath has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 5 (11 pts), boolean chains 7, if/else 2 (6 pts), loops 3 (6 pts), error handling 1 (4 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ruflo-hook.resolveCommandPath (cognitive 34) REDACTED:177— ruflo-hook.resolveCommandPath has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 5 (11 pts), boolean chains 7, if/else 2 (6 pts), loops 3 (6 pts), error handling 1 (4 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
signed-attribution.localSingleEntryPageRank (cognitive 31) plugins/ruflo-neural-trader/src/signed-attribution.mjs:67— signed-attribution.localSingleEntryPageRank has cognitive complexity 31 (threshold 15). Drivers by points: loops 10 (18 pts), if/else 6 (11 pts), boolean chains 2 (nesting depth added 13). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
signed-attribution.localSingleEntryPageRank (cognitive 31) plugins/ruflo-neural-trader/src/signed-attribution.ts:208— signed-attribution.localSingleEntryPageRank has cognitive complexity 31 (threshold 15). Drivers by points: loops 10 (18 pts), if/else 6 (11 pts), boolean chains 2 (nesting depth added 13). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
mission-create.createSpec::createChain::undo (cognitive 29) plugins/ruflo-console/hooks/mission-create.ts:319— mission-create.createSpec::createChain::undo has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 11 (18 pts), if/else 4 (6 pts), boolean chains 4, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (mission-create.createSpec::createChain) 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.
mission-create.createSpec::createChain (cognitive 18) plugins/ruflo-console/hooks/mission-create.ts:173— mission-create.createSpec::createChain has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 6, if/else 4 (6 pts), ternaries 4 (5 pts), loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (mission-create.createSpec::createChain::undo) 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.
bin.loadDotenv (cognitive 28) v3/@claude-flow/plugin-agent-federation/src/bin.ts:19— bin.loadDotenv has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (20 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
bin.loadDotenv (cognitive 28) v3/@claude-flow/plugin-iot-cognitum/src/bin.ts:28— bin.loadDotenv has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (20 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ruflo-cli.findRufloOnPath (cognitive 22) plugins/ruflo-adr/scripts/lib/ruflo-cli.mjs:87— ruflo-cli.findRufloOnPath has cognitive complexity 22 (threshold 15). Drivers by points: if/else 3 (10 pts), ternaries 2 (5 pts), error handling 1 (3 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ruflo-cli.findRufloOnPath (cognitive 22) plugins/ruflo-goals/scripts/lib/ruflo-cli.mjs:76— ruflo-cli.findRufloOnPath has cognitive complexity 22 (threshold 15). Drivers by points: if/else 3 (10 pts), ternaries 2 (5 pts), error handling 1 (3 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
bin.parseArgs (cognitive 21) v3/@claude-flow/plugin-agent-federation/src/bin.ts:57— bin.parseArgs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 3, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
bin.parseArgs (cognitive 21) v3/@claude-flow/plugin-iot-cognitum/src/bin.ts:104— bin.parseArgs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 3, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
command.answer (cognitive 17) plugins/ruflo-business-pods/hooks/command.ts:11— command.answer has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 4 (8 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
command.answer (cognitive 17) plugins/ruflo-chatgpt-federation/hooks/command.ts:11— command.answer has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 4 (8 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebSocketTransport.handleMessage (cognitive 16) REDACTED:276— WebSocketTransport.handleMessage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, error handling 2 (3 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebSocketTransport.handleMessage (cognitive 16) REDACTED:342— WebSocketTransport.handleMessage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, error handling 2 (3 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Anemic entity: FederationEnvelope v3/@claude-flow/plugin-agent-federation/src/domain/entities/federation-envelope.ts:50— `FederationEnvelope` is an aggregate/entity with 10 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: SecurityContext REDACTED:36— `SecurityContext` is an aggregate/entity with 11 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Dead file (~257 LoC) v3/@claude-flow/neural/src/modes/real-time.ts— no import path from any entry point (884 application, 408 tooling, 1695 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 (~257 LoC) v3/@claude-flow/shared/src/utils/secure-logger.ts— no import path from any entry point (884 application, 408 tooling, 1695 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
`async` Promise executor v3/@claude-flow/plugins/src/integrations/agentic-flow.ts:391— The function passed to `new Promise(…)` is `async`. The constructor ignores what its executor returns, so anything this executor throws — every throw inside an `async` function, including after an `await` — rejects a Promise nobody holds instead of the one being constructed: the outer Promise never settles, whoever awaits it hangs, and the error is reported nowhere. If the body needs `await`, it does not need `new Promise` at all: make the enclosing function `async` and `return` the value (or `throw`) directly. If it wraps a callback API, keep the executor synchronous — call the API and `resolve`/`reject` from its callback — and do the awaiting outside it.
`async` Promise executor v3/@claude-flow/plugins/src/integrations/ruvector/ruvector-bridge.ts:382— The function passed to `new Promise(…)` is `async`. The constructor ignores what its executor returns, so anything this executor throws — every throw inside an `async` function, including after an `await` — rejects a Promise nobody holds instead of the one being constructed: the outer Promise never settles, whoever awaits it hangs, and the error is reported nowhere. If the body needs `await`, it does not need `new Promise` at all: make the enclosing function `async` and `return` the value (or `throw`) directly. If it wraps a callback API, keep the executor synchronous — call the API and `resolve`/`reject` from its callback — and do the awaiting outside it.
`async` callback passed to `forEach` ruflo/src/ruvocal/src/routes/api/v2/export/+server.ts:61— `forEach` ignores what its callback returns, so the Promise each `async` call returns is dropped: nothing can await it, the code after this loop runs before any of the awaited work has finished (a function that `await`s around this loop still returns early), and a rejection is never handled — in Node.js an unhandled rejection terminates the process by default, and in a browser it is lost. Iterate with `for (const item of items) { await … }` when the work must run in order, or `await Promise.all(items.map(async (item) => { … }))` when it may run concurrently, so the enclosing function finishes only when the work does and its failures reach the caller. Where firing and forgetting is genuinely intended, make the callback's whole body a `try { … } catch (e) { … }` that handles the failure, so it cannot escape.
`async` callback passed to `forEach` ruflo/src/ruvocal/scripts/populate.ts:155— `forEach` ignores what its callback returns, so the Promise each `async` call returns is dropped: nothing can await it, the code after this loop runs before any of the awaited work has finished (a function that `await`s around this loop still returns early), and a rejection is never handled — in Node.js an unhandled rejection terminates the process by default, and in a browser it is lost. Iterate with `for (const item of items) { await … }` when the work must run in order, or `await Promise.all(items.map(async (item) => { … }))` when it may run concurrently, so the enclosing function finishes only when the work does and its failures reach the caller. Where firing and forgetting is genuinely intended, make the callback's whole body a `try { … } catch (e) { … }` that handles the failure, so it cannot escape.
AC1 · Text alternatives· <video> without a captions track · ×1
<video> without a captions track ruflo/src/ruvocal/src/lib/components/chat/UploadedFile.svelte:166— Video with no captions <track> offers no captions. This player's source is set at runtime, so there is no caption file to author here: give the player a way to carry captions — accept a track/captions URL alongside the media and render a <track kind="captions"> when one is supplied — and capture that asset wherever the media enters the product (upload, import or generation).
AC3 · Page structure· Data table has no header cells · ×1
Data table has no header cells ruflo/src/ruvocal/src/lib/components/RufloHelpModal.svelte:327— A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
AC3 · Page structure· Page without a main landmark · ×1
Page without a main landmark v3/goal_ui/public/widget-embed.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
AC3 · Page structure· Heading level jumps from h3 to h5 · ×1
Heading level jumps from h3 to h5 v3/goal_ui/src/components/ResearchReportModal.tsx:792— Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
AC3 · Page structure· Heading level jumps from h1 to h4 · ×1
Heading level jumps from h1 to h4 v3/goal_ui/src/pages/Demo.tsx:212— Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
Low contrast Tailwind colour pair (1.0:1) ruflo/src/ruvocal/src/lib/components/chat/VoiceRecorder.svelte:193— This element's Tailwind text/background colour utilities fall below the 4.5:1 WCAG AA minimum for normal text. Pick a darker or lighter shade.
createGateway (cyclomatic 130) REDACTED:71— createGateway has cyclomatic complexity 130 (threshold 15). Of this number, 16 points are the body's own statements and 114 belong to 62 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.register (cyclomatic 97) plugins/ruflo-swarm/hooks/register.ts:72— register.register has cyclomatic complexity 97 (threshold 15). Most of this is not in the body itself: 4 of the 97 points are its own statements and the rest belongs to 19 function items inside it that branch (a function literal at line 440, refresh, answer, …). 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.
ControllerRegistry.createController (cyclomatic 93) v3/@claude-flow/memory/src/controller-registry.ts:751— ControllerRegistry.createController has cyclomatic complexity 93 (threshold 15). Of this number, 84 points are the body's own statements and 9 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
swarm.getSwarmStatus (cyclomatic 82) v3/@claude-flow/cli/src/commands/swarm.ts:65— swarm.getSwarmStatus has cyclomatic complexity 82 (threshold 15). Of this number, 51 points are the body's own statements and 31 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.
guidance-cli.main (cyclomatic 78) v3/@claude-flow/hooks/src/cli/guidance-cli.ts:24— guidance-cli.main has cyclomatic complexity 78 (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.
pane.paneView (cyclomatic 77) plugins/ruflo-console/hooks/views/pane.ts:324— pane.paneView has cyclomatic complexity 77 (threshold 15). Of this number, 75 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.
bindings.actionsOf (cyclomatic 76) plugins/ruflo-console/hooks/bindings.ts:63— bindings.actionsOf has cyclomatic complexity 76 (threshold 15). Most of this is not in the body itself: 1 of the 76 points is its own statement and the rest belongs to 25 function items inside it that branch (a function literal at line 290, a function literal at line 265, select, …). 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.
CLI.run (cyclomatic 74) v3/@claude-flow/cli/src/index.ts:93— CLI.run has cyclomatic complexity 74 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AgentStep.AgentStep (cyclomatic 73) v3/goal_ui/src/components/AgentStep.tsx:43— AgentStep.AgentStep has cyclomatic complexity 73 (threshold 15). Of this number, 52 points are the body's own statements and 21 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.
createAiTeamService (cyclomatic 72) REDACTED:48— createAiTeamService has cyclomatic complexity 72 (threshold 15). Most of this is not in the body itself: 8 of the 72 points are its own statements and the rest belongs to 30 function items inside it that branch (a function literal at line 125, a function literal at line 79, a function literal at line 65, …). 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.
ap-envelope.validateEnvelope (cyclomatic 70) plugins/ruflo-console/hooks/data/ap-envelope.ts:114— ap-envelope.validateEnvelope has cyclomatic complexity 70 (threshold 15). Of this number, 67 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
memory-bridge.getRegistry (cyclomatic 69) v3/@claude-flow/cli/src/memory/memory-bridge.ts:245— memory-bridge.getRegistry has cyclomatic complexity 69 (threshold 15). Of this number, 19 points are the body's own statements and 50 belong to 5 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
init.initClaudeAction (cyclomatic 69) v3/@claude-flow/cli/src/commands/init.ts:676— init.initClaudeAction has cyclomatic complexity 69 (threshold 15). To reduce it, separate the cases: extract each independent 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.register (cyclomatic 67) plugins/ruflo-console/hooks/register.ts:169— register.register has cyclomatic complexity 67 (threshold 15). Most of this is not in the body itself: 2 of the 67 points are its own statements and the rest belongs to 20 function literals inside it that branch (lines 296, 403, 185, …). 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.
frames.picturesOf (cyclomatic 66) plugins/ruflo-console/hooks/views/frames.ts:181— frames.picturesOf has cyclomatic complexity 66 (threshold 15). Of this number, 62 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.
diff.main (cyclomatic 65) plugins/ruflo-cost-tracker/scripts/diff.mjs:121— diff.main has cyclomatic complexity 65 (threshold 15). Of this number, 62 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
nav.groupedTabs (cyclomatic 63) plugins/ruflo-console/hooks/views/nav.ts:22— nav.groupedTabs has cyclomatic complexity 63 (threshold 15). Of this number, 26 points are the body's own statements and 37 belong to 13 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
harness-claude.summarizeClaude (cyclomatic 62) plugins/ruflo-console/hooks/data/harness-claude.ts:52— harness-claude.summarizeClaude has cyclomatic complexity 62 (threshold 15). Most of this is not in the body itself: 8 of the 62 points are its own statements and the rest belongs to one function literal inside it that branches (line 60). 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.
product-plane.validateProductActionEnvelope (cyclomatic 62) v3/@claude-flow/security/src/policy/product-plane.ts:630— product-plane.validateProductActionEnvelope has cyclomatic complexity 62 (threshold 15). Of this number, 57 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
runner.createRunner.execute (cyclomatic 61) plugins/ruflo-console/hooks/runner.ts:87— runner.createRunner.execute has cyclomatic complexity 61 (threshold 15). Of this number, 52 points are the body's own statements and 9 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
agent-execute-core.executeAgentTask (cyclomatic 61) v3/@claude-flow/cli/src/mcp-tools/agent-execute-core.ts:615— agent-execute-core.executeAgentTask has cyclomatic complexity 61 (threshold 15). Of this number, 50 points are the body's own statements and 11 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.
memory-distillation.runDistillation (cyclomatic 60) v3/@claude-flow/cli/src/services/memory-distillation.ts:140— memory-distillation.runDistillation has cyclomatic complexity 60 (threshold 15). Of this number, 43 points are the body's own statements and 17 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.
ap-live.apTick (cyclomatic 59) plugins/ruflo-console/hooks/ap-live.ts:321— ap-live.apTick has cyclomatic complexity 59 (threshold 15). Of this number, 57 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.
server.createGateway.server (cyclomatic 59) REDACTED:426— server.createGateway.server has cyclomatic complexity 59 (threshold 15). Of this number, 55 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.
ResearchReportModal.ResearchReportModal (cyclomatic 59) v3/goal_ui/src/components/ResearchReportModal.tsx:78— ResearchReportModal.ResearchReportModal has cyclomatic complexity 59 (threshold 15). Most of this is not in the body itself: 7 of the 59 points are its own statements and the rest belongs to 15 function items inside it that branch (generateActionItems, a function literal at line 774, generateAIContent, …). 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.
memory-initializer.searchEntries (cyclomatic 58) v3/@claude-flow/cli/src/memory/memory-initializer.ts:3197— memory-initializer.searchEntries has cyclomatic complexity 58 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
dangerous-command.hasRootDelete (cyclomatic 57) plugins/ruflo-mods/hooks/guard/dangerous-command.ts:12— dangerous-command.hasRootDelete has cyclomatic complexity 57 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 2 other methods here (dangerous-command.hasRootDelete::firstGroup, dangerous-command.hasRootDelete::takeWord) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
memory-bridge.bridgeStoreEntry (cyclomatic 57) v3/@claude-flow/cli/src/memory/memory-bridge.ts:1035— memory-bridge.bridgeStoreEntry has cyclomatic complexity 57 (threshold 15). Of this number, 52 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
orbital.orbitalHeader (cyclomatic 56) plugins/ruflo-console/hooks/gfx/orbital.ts:143— orbital.orbitalHeader has cyclomatic complexity 56 (threshold 15). Of this number, 36 points are the body's own statements and 20 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.
overview.overviewView (cyclomatic 56) plugins/ruflo-console/hooks/views/overview.ts:17— overview.overviewView has cyclomatic complexity 56 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
createPublisherService (cyclomatic 56) REDACTED:58— createPublisherService has cyclomatic complexity 56 (threshold 15). Most of this is not in the body itself: 13 of the 56 points are its own statements and the rest belongs to 15 function items inside it that branch (a function literal at line 157, a function literal at line 138, authContext, …). 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.
ai.openAi (cyclomatic 55) plugins/ruflo-console/tui/ai.ts:77— ai.openAi has cyclomatic complexity 55 (threshold 15). Most of this is not in the body itself: 4 of the 55 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 225, run, cardFor, …). 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.
DevelopmentStep.DevelopmentStep (cyclomatic 55) v3/goal_ui/src/components/DevelopmentStep.tsx:30— DevelopmentStep.DevelopmentStep has cyclomatic complexity 55 (threshold 15). Of this number, 40 points are the body's own statements and 15 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
menu.menuView (cyclomatic 54) plugins/ruflo-console/hooks/views/menu.ts:73— menu.menuView has cyclomatic complexity 54 (threshold 15). Of this number, 18 points are the body's own statements and 36 belong to 8 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AgentFederationPlugin.initialize (cyclomatic 52) v3/@claude-flow/plugin-agent-federation/src/plugin.ts:90— AgentFederationPlugin.initialize has cyclomatic complexity 52 (threshold 15). Of this number, 25 points are the body's own statements and 27 belong to 9 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.
events.diffEvents (cyclomatic 51) plugins/ruflo-console/hooks/data/events.ts:44— events.diffEvents has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
mission-control.missionActions (cyclomatic 51) plugins/ruflo-console/hooks/mission-control.ts:193— mission-control.missionActions has cyclomatic complexity 51 (threshold 15). Most of this is not in the body itself: 1 of the 51 points is its own statement and the rest belongs to 23 function items inside it that branch (launch, research, a function literal at line 257, …). 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.
ap-loop.tick (cyclomatic 51) plugins/ruflo-console/hooks/data/ap-loop.ts:238— ap-loop.tick has cyclomatic complexity 51 (threshold 15). Of this number, 48 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
run.runTui::onKey (cyclomatic 51) plugins/ruflo-console/tui/run.ts:347— run.runTui::onKey has cyclomatic complexity 51 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (run.runTui) 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.
ap-journal.parseLine (cyclomatic 49) plugins/ruflo-console/hooks/data/ap-journal.ts:64— ap-journal.parseLine has cyclomatic complexity 49 (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.
palette.paletteEntries (cyclomatic 48) plugins/ruflo-console/hooks/palette.ts:86— palette.paletteEntries 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
dispatch.dispatch (cyclomatic 48) plugins/ruflo-console/hooks/dispatch.ts:91— dispatch.dispatch has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent 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-ledger-anchor.archiveHasTailReceipt (cyclomatic 48) v3/@claude-flow/cli/src/services/policy-ledger-anchor.ts:147— policy-ledger-anchor.archiveHasTailReceipt has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
schema-validator.validateSchema (cyclomatic 48) REDACTED:25— schema-validator.validateSchema has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
harness.runAgent (cyclomatic 47) plugins/ruflo-console/hooks/harness.ts:178— harness.runAgent has cyclomatic complexity 47 (threshold 15). Of this number, 30 points are the body's own statements and 17 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.
commands.parseRuflo (cyclomatic 47) plugins/ruflo-console/hooks/commands.ts:34— commands.parseRuflo has cyclomatic complexity 47 (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.
orbital.orbitalBoot (cyclomatic 47) plugins/ruflo-console/hooks/gfx/orbital.ts:314— orbital.orbitalBoot has cyclomatic complexity 47 (threshold 15). Of this number, 30 points are the body's own statements and 17 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.
agent-execute-core.callAnthropicMessages (cyclomatic 47) v3/@claude-flow/cli/src/mcp-tools/agent-execute-core.ts:171— agent-execute-core.callAnthropicMessages has cyclomatic complexity 47 (threshold 15). Of this number, 46 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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.
Agents.Agents (cyclomatic 47) v3/goal_ui/src/pages/Agents.tsx:59— Agents.Agents has cyclomatic complexity 47 (threshold 15). Of this number, 26 points are the body's own statements and 21 belong to 9 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
mission-launch.launchSteps (cyclomatic 46) plugins/ruflo-console/hooks/views/mission-launch.ts:15— mission-launch.launchSteps has cyclomatic complexity 46 (threshold 15). Of this number, 45 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.
index.publishRegistry (cyclomatic 46) REDACTED:193— index.publishRegistry has cyclomatic complexity 46 (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.
wf-send.sendTo (cyclomatic 45) plugins/ruflo-console/hooks/data/wf-send.ts:142— wf-send.sendTo has cyclomatic complexity 45 (threshold 15). Of this number, 42 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
check-metaharness-pins.main (cyclomatic 45) scripts/check-metaharness-pins.mjs:139— check-metaharness-pins.main has cyclomatic complexity 45 (threshold 15). Of this number, 43 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.
REDACTED.render (cyclomatic 44) REDACTED:48— REDACTED.render has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
room.roomView (cyclomatic 44) plugins/ruflo-console/hooks/views/room.ts:50— room.roomView has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
model-tools.answer (cyclomatic 44) plugins/ruflo-console/hooks/model-tools.ts:350— model-tools.answer has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
flywheel-transaction.promoteFlywheelCandidate (cyclomatic 44) v3/@claude-flow/cli/src/services/flywheel-transaction.ts:424— flywheel-transaction.promoteFlywheelCandidate has cyclomatic complexity 44 (threshold 15). Most of this is not in the body itself: 9 of the 44 points are its own statements and the rest belongs to one function literal inside it that branches (line 440). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
JsonReader.value (cyclomatic 44) v3/@claude-flow/cli/src/services/policy-anchor-log.ts:42— JsonReader.value has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
binary-parse.parseElf (cyclomatic 43) v3/@claude-flow/cli/src/rure/binary-parse.ts:89— binary-parse.parseElf has cyclomatic complexity 43 (threshold 15). Most of this is not in the body itself: 7 of the 43 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 107, a function literal at line 150, a function literal at line 136, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
managed.parseManaged (cyclomatic 42) plugins/ruflo-console/hooks/data/managed.ts:37— managed.parseManaged has cyclomatic complexity 42 (threshold 15). Of this number, 31 points are the body's own statements and 11 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
redblue.main (cyclomatic 42) plugins/ruflo-metaharness/scripts/redblue.mjs:177— redblue.main has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
evm-parse.analyzeEvm (cyclomatic 42) v3/@claude-flow/cli/src/rure/evm-parse.ts:149— evm-parse.analyzeEvm has cyclomatic complexity 42 (threshold 15). 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
probe.probeMods (cyclomatic 42) v3/@claude-flow/cli/src/mods/probe.ts:135— probe.probeMods has cyclomatic complexity 42 (threshold 15). Of this number, 34 points are the body's own statements and 8 belong to 7 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
product-plane.validateRuViewSemanticObservation (cyclomatic 42) v3/@claude-flow/security/src/policy/product-plane.ts:957— product-plane.validateRuViewSemanticObservation has cyclomatic complexity 42 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
github-query.createGithubQuery.get (cyclomatic 41) plugins/ruflo-x-gateway/src/github-query.mjs:185— github-query.createGithubQuery.get has cyclomatic complexity 41 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
neural-router.tryCostOptimalRoute (cyclomatic 41) v3/@claude-flow/cli/src/ruvector/neural-router.ts:554— neural-router.tryCostOptimalRoute has cyclomatic complexity 41 (threshold 15). Of this number, 32 points are the body's own statements and 9 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
autopilot-state.discoverTasks (cyclomatic 41) v3/@claude-flow/cli/src/autopilot-state.ts:245— autopilot-state.discoverTasks has cyclomatic complexity 41 (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.
createGithubQuery.get (cyclomatic 41) plugins/ruflo-x-gateway/src/github-query.mjs:185— createGithubQuery.get has cyclomatic complexity 41 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
hooks-tools.routeTaskLocal (cyclomatic 40) v3/@claude-flow/cli/src/mcp-tools/hooks-tools.ts:1420— hooks-tools.routeTaskLocal has cyclomatic complexity 40 (threshold 15). Of this number, 34 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
mcp-tools.handleMCPTool (cyclomatic 40) v3/plugins/teammate-plugin/src/mcp-tools.ts:536— mcp-tools.handleMCPTool 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.
adr-lint.lint (cyclomatic 39) REDACTED:28— adr-lint.lint has cyclomatic complexity 39 (threshold 15). Of this number, 38 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
memory-initializer.listEntries (cyclomatic 39) v3/@claude-flow/cli/src/memory/memory-initializer.ts:3511— memory-initializer.listEntries has cyclomatic complexity 39 (threshold 15). Of this number, 38 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WorkerDaemon.initializeWorkerStates (cyclomatic 39) REDACTED:826— WorkerDaemon.initializeWorkerStates 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.
generators.generateClaudeMd (cyclomatic 39) v3/@claude-flow/guidance/src/generators.ts:142— generators.generateClaudeMd has cyclomatic complexity 39 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AgenticPolicyEngine.verifyReceipt (cyclomatic 39) v3/@claude-flow/security/src/policy/engine.ts:169— AgenticPolicyEngine.verifyReceipt has cyclomatic complexity 39 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
themes.themesView (cyclomatic 38) plugins/ruflo-console/hooks/views/themes.ts:6— themes.themesView has cyclomatic complexity 38 (threshold 15). Of this number, 35 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.
events.eventsView (cyclomatic 38) plugins/ruflo-console/hooks/views/events.ts:36— events.eventsView has cyclomatic complexity 38 (threshold 15). Of this number, 36 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.
ansi.render (cyclomatic 38) plugins/ruflo-console/tui/ansi.ts:273— ansi.render has cyclomatic complexity 38 (threshold 15). Of this number, 35 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
audit-trend.main (cyclomatic 38) plugins/ruflo-metaharness/scripts/audit-trend.mjs:115— audit-trend.main has cyclomatic complexity 38 (threshold 15). Of this number, 33 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
command.answer (cyclomatic 38) plugins/ruflo-protector/hooks/command.ts:18— command.answer has cyclomatic complexity 38 (threshold 15). Of this number, 34 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.
index.executeGoapSearch (cyclomatic 38) REDACTED:685— index.executeGoapSearch 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, 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.
run-beir-hybrid.main (cyclomatic 38) v3/@claude-flow/cli/scripts/run-beir-hybrid.mjs:84— run-beir-hybrid.main has cyclomatic complexity 38 (threshold 15). Of this number, 36 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
executor.copyCommands (cyclomatic 38) v3/@claude-flow/cli/src/init/executor.ts:1192— executor.copyCommands 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.
product-plane.verifySignedProductActionEnvelope (cyclomatic 38) v3/@claude-flow/security/src/policy/product-plane.ts:1267— product-plane.verifySignedProductActionEnvelope has cyclomatic complexity 38 (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.
xruv.xruvLines (cyclomatic 37) plugins/ruflo-console/hooks/xruv.ts:152— xruv.xruvLines has cyclomatic complexity 37 (threshold 15). Of this number, 33 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
pictures.topologyPicture (cyclomatic 37) plugins/ruflo-console/hooks/gfx/pictures.ts:99— pictures.topologyPicture has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 9 of the 37 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 160, 142, 129). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
router-parallel-analyze.main (cyclomatic 37) plugins/ruflo-metaharness/scripts/router-parallel-analyze.mjs:74— router-parallel-analyze.main has cyclomatic complexity 37 (threshold 15). Of this number, 32 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.
rootdelete.hasRootDelete (cyclomatic 37) plugins/ruflo-protector/hooks/rootdelete.ts:4— rootdelete.hasRootDelete has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (rootdelete.hasRootDelete::finishWord) 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.
register.register (cyclomatic 37) plugins/ruflo-protector/hooks/register.ts:63— register.register has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 1 of the 37 points is its own statement and the rest belongs to 10 function literals inside it that branch (lines 134, 190, 170, …). 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.
managed-outcome-verifier.verifyHostManifest (cyclomatic 37) scripts/managed-outcome-verifier.mts:106— managed-outcome-verifier.verifyHostManifest has cyclomatic complexity 37 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
render-tui-svg.parseLine (cyclomatic 37) scripts/render-tui-svg.mjs:37— render-tui-svg.parseLine 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.
evolve-proof.verifyReceiptBundle (cyclomatic 37) v3/@claude-flow/cli/src/services/evolve-proof.ts:366— evolve-proof.verifyReceiptBundle has cyclomatic complexity 37 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
doctor.checkMcpServers (cyclomatic 37) REDACTED:1464— doctor.checkMcpServers has cyclomatic complexity 37 (threshold 15). Of this number, 19 points are the body's own statements and 18 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CommandParser.parse (cyclomatic 37) v3/@claude-flow/cli/src/parser.ts:152— CommandParser.parse has cyclomatic complexity 37 (threshold 15). Of this number, 33 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.
server.createAiTeamService.server (cyclomatic 36) REDACTED:125— server.createAiTeamService.server has cyclomatic complexity 36 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
wf-activity.parseActivity (cyclomatic 36) plugins/ruflo-console/hooks/data/wf-activity.ts:116— wf-activity.parseActivity has cyclomatic complexity 36 (threshold 15). Of this number, 35 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
wf-saved.decodeSaved (cyclomatic 36) plugins/ruflo-console/hooks/data/wf-saved.ts:39— wf-saved.decodeSaved has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
anomaly.main (cyclomatic 36) plugins/ruflo-cost-tracker/scripts/anomaly.mjs:64— anomaly.main has cyclomatic complexity 36 (threshold 15). Of this number, 35 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ManagedProgress.accept (cyclomatic 36) v3/@claude-flow/cli/src/services/managed-workflows.ts:80— ManagedProgress.accept has cyclomatic complexity 36 (threshold 15). Of this number, 35 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent 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-ledger-audit.verifyFullPolicyLedger (cyclomatic 36) v3/@claude-flow/cli/src/services/policy-ledger-audit.ts:115— policy-ledger-audit.verifyFullPolicyLedger has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ts-walk.analyzeModuleSource::visit (cyclomatic 36) v3/@claude-flow/cli/src/rure/ts-walk.ts:99— ts-walk.analyzeModuleSource::visit has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
bar.barParts (cyclomatic 35) plugins/ruflo-console/hooks/views/bar.ts:105— bar.barParts has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
managed-workflows.eventPage (cyclomatic 35) v3/@claude-flow/cli/src/services/managed-workflows.ts:19— managed-workflows.eventPage has cyclomatic complexity 35 (threshold 15). Of this number, 32 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
search.searchPlugins (cyclomatic 35) v3/@claude-flow/cli/src/plugins/store/search.ts:16— search.searchPlugins has cyclomatic complexity 35 (threshold 15). Of this number, 25 points are the body's own statements and 10 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
cli-commands.createCliCommands (cyclomatic 35) v3/@claude-flow/plugin-iot-cognitum/src/cli-commands.ts:22— cli-commands.createCliCommands 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 14 function literals inside it that branch (lines 181, 521, 216, …). 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.
bench.main (cyclomatic 34) plugins/ruflo-cost-tracker/scripts/bench.mjs:48— bench.main has cyclomatic complexity 34 (threshold 15). Of this number, 33 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: 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.
ManagedRunCollector.refresh (cyclomatic 34) v3/@claude-flow/cli/src/services/managed-run-collector.ts:55— ManagedRunCollector.refresh has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 14 of the 34 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 72, 60). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
memory-bridge.bridgeListEntries (cyclomatic 34) v3/@claude-flow/cli/src/memory/memory-bridge.ts:1551— memory-bridge.bridgeListEntries has cyclomatic complexity 34 (threshold 15). Of this number, 33 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.
memory-initializer.recoverMemoryDatabase (cyclomatic 34) v3/@claude-flow/cli/src/memory/memory-initializer.ts:1628— memory-initializer.recoverMemoryDatabase has cyclomatic complexity 34 (threshold 15). Of this number, 32 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, 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.
dotnet-parse.readTables (cyclomatic 34) v3/@claude-flow/cli/src/rure/dotnet-parse.ts:232— dotnet-parse.readTables has cyclomatic complexity 34 (threshold 15). Of this number, 25 points are the body's own statements and 9 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
graph-analyzer.fallbackLouvain (cyclomatic 34) v3/@claude-flow/cli/src/ruvector/graph-analyzer.ts:644— graph-analyzer.fallbackLouvain has cyclomatic complexity 34 (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.
CodexInitializer.initialize (cyclomatic 34) v3/@claude-flow/codex/src/initializer.ts:56— CodexInitializer.initialize has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
mcp-tools.taxonomicReasonHandler (cyclomatic 34) v3/plugins/hyperbolic-reasoning/src/mcp-tools.ts:198— mcp-tools.taxonomicReasonHandler has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
pane.footer (cyclomatic 33) plugins/ruflo-console/hooks/views/pane.ts:201— pane.footer has cyclomatic complexity 33 (threshold 15). Of this number, 32 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.
runner.createRunner.ask (cyclomatic 33) plugins/ruflo-console/hooks/runner.ts:275— runner.createRunner.ask has cyclomatic complexity 33 (threshold 15). Of this number, 32 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.
oia-audit.main (cyclomatic 33) plugins/ruflo-metaharness/scripts/oia-audit.mjs:124— oia-audit.main has cyclomatic complexity 33 (threshold 15). Of this number, 31 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
members.membersOf (cyclomatic 33) plugins/ruflo-swarm/hooks/model/members.ts:214— members.membersOf has cyclomatic complexity 33 (threshold 15). Of this number, 26 points are the body's own statements and 7 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.
gaia-audit.main (cyclomatic 33) plugins/ruflo-workflows/scripts/gaia-audit.mjs:828— gaia-audit.main has cyclomatic complexity 33 (threshold 15). Of this number, 32 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ManagedMemoryClient.run (cyclomatic 33) v3/@claude-flow/cli/src/services/managed-memory-client.ts:86— ManagedMemoryClient.run has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 11 of the 33 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 124, 115, 113, …). 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.
ManagedRunCollector.observe (cyclomatic 33) v3/@claude-flow/cli/src/services/managed-run-collector.ts:134— ManagedRunCollector.observe has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
smoke-all-plugins.main (cyclomatic 33) scripts/smoke-all-plugins.mjs:249— smoke-all-plugins.main has cyclomatic complexity 33 (threshold 15). Of this number, 26 points are the body's own statements and 7 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.
ModelRouter.route (cyclomatic 33) v3/@claude-flow/cli/src/ruvector/model-router.ts:619— ModelRouter.route has cyclomatic complexity 33 (threshold 15). Of this number, 31 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
benchmark-pretrained-retrieval.main (cyclomatic 33) v3/@claude-flow/cli/scripts/benchmark-pretrained-retrieval.mjs:105— benchmark-pretrained-retrieval.main has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PromptManager.multiSelect (cyclomatic 33) v3/@claude-flow/cli/src/prompt.ts:294— PromptManager.multiSelect has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 5 of the 33 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 358, displayChoices, a function literal at line 350, …). 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.
memory-bridge.bridgeRecordFeedback (cyclomatic 33) v3/@claude-flow/cli/src/memory/memory-bridge.ts:2743— memory-bridge.bridgeRecordFeedback has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
memory-initializer.storeEntry (cyclomatic 33) v3/@claude-flow/cli/src/memory/memory-initializer.ts:2962— memory-initializer.storeEntry has cyclomatic complexity 33 (threshold 15). Of this number, 23 points are the body's own statements and 10 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.
daemon.renderAllDaemonsStatus (cyclomatic 33) v3/@claude-flow/cli/src/commands/daemon.ts:1119— daemon.renderAllDaemonsStatus has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 15 of the 33 points are its own statements and the rest belongs to one function literal inside it that branches (line 1135). 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.
ShardRetriever.scoreShards (cyclomatic 33) REDACTED:406— ShardRetriever.scoreShards has cyclomatic complexity 33 (threshold 15). Of this number, 32 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.
wf-alerts.evaluateGuards (cyclomatic 32) plugins/ruflo-console/hooks/data/wf-alerts.ts:129— wf-alerts.evaluateGuards has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
boot-cyber.constellation (cyclomatic 32) plugins/ruflo-console/hooks/gfx/boot-cyber.ts:91— boot-cyber.constellation has cyclomatic complexity 32 (threshold 15). Of this number, 18 points are the body's own statements and 14 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.
ap-loop.foldJournal (cyclomatic 32) plugins/ruflo-console/hooks/data/ap-loop.ts:50— ap-loop.foldJournal has cyclomatic complexity 32 (threshold 15). Of this number, 28 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
wf-slots.registerSlot (cyclomatic 32) plugins/ruflo-console/hooks/views/wf-slots.ts:56— wf-slots.registerSlot has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
wf-search.search (cyclomatic 32) plugins/ruflo-console/hooks/data/wf-search.ts:63— wf-search.search has cyclomatic complexity 32 (threshold 15). Of this number, 30 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
update-flow.checkForUpdate (cyclomatic 32) plugins/ruflo-console/hooks/update-flow.ts:140— update-flow.checkForUpdate has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
svg.gridToSvg (cyclomatic 32) plugins/ruflo-console/hooks/gfx/svg.ts:97— svg.gridToSvg has cyclomatic complexity 32 (threshold 15). Of this number, 30 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ai-guard.validateCodexArgv (cyclomatic 32) plugins/ruflo-console/tui/ai-guard.ts:22— ai-guard.validateCodexArgv has cyclomatic complexity 32 (threshold 15). Of this number, 29 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
managed-memory-client.resultOf (cyclomatic 32) v3/@claude-flow/cli/src/services/managed-memory-client.ts:28— managed-memory-client.resultOf has cyclomatic complexity 32 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
policy-ledger-anchor.recordAnchor (cyclomatic 32) v3/@claude-flow/cli/src/services/policy-ledger-anchor.ts:418— policy-ledger-anchor.recordAnchor has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WorkerDaemon.readDaemonConfigFromFile (cyclomatic 32) REDACTED:523— WorkerDaemon.readDaemonConfigFromFile has cyclomatic complexity 32 (threshold 15). Of this number, 28 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body: 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.
doctor.checkVersionFreshness (cyclomatic 32) REDACTED:1675— doctor.checkVersionFreshness has cyclomatic complexity 32 (threshold 15). Of this number, 27 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
index.validateConfigToml (cyclomatic 32) v3/@claude-flow/codex/src/validators/index.ts:380— index.validateConfigToml has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FlashAttention.cpuOptimizedAttention (cyclomatic 32) v3/@claude-flow/neural/src/flash-attention.ts:140— FlashAttention.cpuOptimizedAttention has cyclomatic complexity 32 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
config-tools.handleValidateConfig (cyclomatic 32) v3/mcp/tools/config-tools.ts:352— config-tools.handleValidateConfig has cyclomatic complexity 32 (threshold 15). Of this number, 23 points are the body's own statements and 9 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.
FormulaExecutor.execute (cyclomatic 32) v3/plugins/gastown-bridge/src/formula/executor.ts:677— FormulaExecutor.execute has cyclomatic complexity 32 (threshold 15). Of this number, 23 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.
mcp-tools.neuralConsensusHandler (cyclomatic 32) v3/plugins/neural-coordination/src/mcp-tools.ts:59— mcp-tools.neuralConsensusHandler has cyclomatic complexity 32 (threshold 15). Of this number, 31 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.
learning.learningView (cyclomatic 31) plugins/ruflo-console/hooks/views/learning.ts:72— learning.learningView has cyclomatic complexity 31 (threshold 15). Of this number, 30 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
terminal.terminalView (cyclomatic 31) plugins/ruflo-console/hooks/views/terminal.ts:100— terminal.terminalView has cyclomatic complexity 31 (threshold 15). Of this number, 22 points are the body's own statements and 9 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.
theme-demo.render (cyclomatic 31) plugins/ruflo-console/scripts/theme-demo.mts:28— theme-demo.render has cyclomatic complexity 31 (threshold 15). Of this number, 24 points are the body's own statements and 7 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.
_ledger.codexRows (cyclomatic 31) plugins/ruflo-cost-tracker/scripts/_ledger.mjs:95— _ledger.codexRows 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.
check-metaharness-compat.main (cyclomatic 31) scripts/check-metaharness-compat.mjs:32— check-metaharness-compat.main 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.
rvfa-format.validateHeader (cyclomatic 31) v3/@claude-flow/cli/src/appliance/rvfa-format.ts:143— rvfa-format.validateHeader has cyclomatic complexity 31 (threshold 15). Of this number, 30 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.
EnhancedModelRouter.route (cyclomatic 31) REDACTED:382— EnhancedModelRouter.route has cyclomatic complexity 31 (threshold 15). Of this number, 26 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
memory-initializer.loadLocalEmbeddingChain (cyclomatic 31) v3/@claude-flow/cli/src/memory/memory-initializer.ts:2338— memory-initializer.loadLocalEmbeddingChain has cyclomatic complexity 31 (threshold 15). Of this number, 30 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.validateSkillMd (cyclomatic 31) v3/@claude-flow/codex/src/validators/index.ts:215— index.validateSkillMd 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.
cli.program.command("validate").alias("check").description("Validate AGENTS.md, SKILL.md, or config.toml files").option("-f, (cyclomatic 31) v3/@claude-flow/codex/src/cli.ts:268— cli.program.command("validate").alias("check").description("Validate AGENTS.md, SKILL.md, or config.toml files").option("-f, 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.
mcp-tools.createMcpTools (cyclomatic 31) v3/@claude-flow/plugin-iot-cognitum/src/mcp-tools.ts:12— mcp-tools.createMcpTools 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 28 function items inside it that branch (a function literal at line 674, requireCoordinator, a function literal at line 37, …). 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.
chart.ChartTooltipContent (cyclomatic 31) REDACTED:103— chart.ChartTooltipContent has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 5 of the 31 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 163, 123). 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.
stream.codexEvent (cyclomatic 30) plugins/ruflo-console/hooks/stream.ts:49— stream.codexEvent 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.
federation.federationView (cyclomatic 30) plugins/ruflo-console/hooks/views/federation.ts:11— federation.federationView 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.
sessions.sessionRows (cyclomatic 30) plugins/ruflo-console/hooks/views/sessions.ts:94— sessions.sessionRows has cyclomatic complexity 30 (threshold 15). Of this number, 29 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
cli.main (cyclomatic 30) plugins/ruflo-ruos/scripts/cli.mjs:121— cli.main 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.
doctor.checkMemoryPersistenceDriver (cyclomatic 30) REDACTED:751— doctor.checkMemoryPersistenceDriver 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.
executor.mergeSettingsForUpgrade (cyclomatic 30) v3/@claude-flow/cli/src/init/executor.ts:340— executor.mergeSettingsForUpgrade has cyclomatic complexity 30 (threshold 15). Of this number, 26 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.
apply.applyMods (cyclomatic 30) v3/@claude-flow/cli/src/mods/apply.ts:114— apply.applyMods has cyclomatic complexity 30 (threshold 15). Of this number, 27 points are the body's own statements and 3 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
security-code-patterns.interpolatedExec (cyclomatic 30) v3/@claude-flow/cli/src/commands/security-code-patterns.ts:28— security-code-patterns.interpolatedExec 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.
SonaBridge.createMockModule (cyclomatic 30) v3/plugins/cognitive-kernel/src/bridges/sona-bridge.ts:272— SonaBridge.createMockModule 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.
executeTool (cyclomatic 30) REDACTED:780— executeTool 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.
server.createAiTeamService.buildMcp (cyclomatic 29) REDACTED:59— server.createAiTeamService.buildMcp 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 14 function literals inside it that branch (lines 79, 65, 95, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
mission-guidance.startGuidance (cyclomatic 29) plugins/ruflo-console/hooks/mission-guidance.ts:104— mission-guidance.startGuidance has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 5 of the 29 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 179, a function literal at line 127, a function literal at line 137, …). 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.
orbital.orbitalMasthead (cyclomatic 29) plugins/ruflo-console/hooks/gfx/orbital.ts:261— orbital.orbitalMasthead 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.
swarm.swarmView (cyclomatic 29) plugins/ruflo-console/hooks/views/swarm.ts:29— swarm.swarmView 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.
wf-triage.costRows (cyclomatic 29) plugins/ruflo-console/hooks/views/wf-triage.ts:115— wf-triage.costRows 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.
index.handleAutopilot (cyclomatic 29) REDACTED:1424— index.handleAutopilot has cyclomatic complexity 29 (threshold 15). Of this number, 20 points are the body's own statements and 9 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
neural-router.resolveBackend (cyclomatic 29) v3/@claude-flow/cli/src/ruvector/neural-router.ts:320— neural-router.resolveBackend has cyclomatic complexity 29 (threshold 15). Of this number, 24 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
memory-bridge.bridgeSearchEntries (cyclomatic 29) v3/@claude-flow/cli/src/memory/memory-bridge.ts:1378— memory-bridge.bridgeSearchEntries 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.
cuda-cubin.parseCubin (cyclomatic 29) v3/@claude-flow/cli/src/rure/cuda-cubin.ts:107— cuda-cubin.parseCubin 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.
start.startAction (cyclomatic 29) v3/@claude-flow/cli/src/commands/start.ts:90— start.startAction 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.
PathValidator.validate (cyclomatic 29) v3/@claude-flow/security/src/path-validator.ts:295— PathValidator.validate 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.
GasTownBridgePlugin.createBridgeFacade (cyclomatic 29) v3/plugins/gastown-bridge/src/index.ts:1281— GasTownBridgePlugin.createBridgeFacade has cyclomatic complexity 29 (threshold 15). Of this number, 27 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: 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.
write-via.viaHostFs (cyclomatic 28) plugins/ruflo-console/hooks/data/write-via.ts:105— write-via.viaHostFs has cyclomatic complexity 28 (threshold 15). Of this number, 27 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
boot.bootPicture (cyclomatic 28) plugins/ruflo-console/hooks/gfx/boot.ts:109— boot.bootPicture has cyclomatic complexity 28 (threshold 15). Of this number, 26 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
harness-track.settle (cyclomatic 28) plugins/ruflo-console/hooks/data/harness-track.ts:48— harness-track.settle has cyclomatic complexity 28 (threshold 15). Of this number, 15 points are the body's own statements and 13 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.
wf-worktrees.whyKept (cyclomatic 28) REDACTED:258— wf-worktrees.whyKept has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
plugins.pluginsView (cyclomatic 28) plugins/ruflo-console/hooks/views/plugins.ts:15— plugins.pluginsView has cyclomatic complexity 28 (threshold 15). Of this number, 24 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.
events-args.applyEventsArgs (cyclomatic 28) plugins/ruflo-console/hooks/events-args.ts:15— events-args.applyEventsArgs 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.
trend.main (cyclomatic 28) plugins/ruflo-cost-tracker/scripts/trend.mjs:57— trend.main has cyclomatic complexity 28 (threshold 15). 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
drift-from-history.main (cyclomatic 28) plugins/ruflo-metaharness/scripts/drift-from-history.mjs:160— drift-from-history.main has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
projection.parseProjection (cyclomatic 28) plugins/ruflo-mods/hooks/guidance/projection.ts:40— projection.parseProjection 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, 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.
server.createGateway.buildMcp (cyclomatic 28) REDACTED:211— server.createGateway.buildMcp has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 6 of the 28 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 336, a function literal at line 215, a function literal at line 290, …). 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-github-safe-injection.runOne (cyclomatic 28) scripts/smoke-github-safe-injection.mjs:104— smoke-github-safe-injection.runOne 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.
memory.runMemoryCommand (cyclomatic 28) v3/@claude-flow/cli-core/src/commands/memory.ts:75— memory.runMemoryCommand has cyclomatic complexity 28 (threshold 15). Of this number, 22 points are the body's own statements and 6 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.
benchmark-self-learning.main (cyclomatic 28) v3/@claude-flow/cli/scripts/benchmark-self-learning.mjs:38— benchmark-self-learning.main 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.
memory-bridge.bridgeGetEntry (cyclomatic 28) v3/@claude-flow/cli/src/memory/memory-bridge.ts:1716— memory-bridge.bridgeGetEntry 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.
WorkerDaemon.runWorkerLogic (cyclomatic 28) REDACTED:1569— WorkerDaemon.runWorkerLogic has cyclomatic complexity 28 (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.
mod-projection.collectModCandidates (cyclomatic 28) v3/@claude-flow/cli/src/guidance/mod-projection.ts:109— mod-projection.collectModCandidates has cyclomatic complexity 28 (threshold 15). Of this number, 23 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
CapabilityAlgebra.satisfiesConstraints (cyclomatic 28) v3/@claude-flow/guidance/src/capabilities.ts:533— CapabilityAlgebra.satisfiesConstraints 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.
HttpTransport.handleHttpRequest (cyclomatic 28) REDACTED:421— HttpTransport.handleHttpRequest 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.
AgentDBBackend.matchesFilters (cyclomatic 28) v3/@claude-flow/memory/src/agentdb-backend.ts:1013— AgentDBBackend.matchesFilters has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
inbound-dispatcher.dispatchInbound (cyclomatic 28) v3/@claude-flow/plugin-agent-federation/src/application/inbound-dispatcher.ts:271— inbound-dispatcher.dispatchInbound 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.
product-plane.validateSemanticValue (cyclomatic 28) v3/@claude-flow/security/src/policy/product-plane.ts:884— product-plane.validateSemanticValue 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.
mcp-tools.metaMonitorHandler (cyclomatic 28) REDACTED:543— mcp-tools.metaMonitorHandler 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.
mcp-tools.topologyOptimizeHandler::generateEdges (cyclomatic 28) v3/plugins/neural-coordination/src/mcp-tools.ts:310— mcp-tools.topologyOptimizeHandler::generateEdges 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.
DagBridge.resolveDependencies (cyclomatic 28) v3/plugins/quantum-optimizer/src/bridges/dag-bridge.ts:278— DagBridge.resolveDependencies has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 13 of the 28 points are its own statements and the rest belongs to 4 function items inside it that branch (resolvePackage, a function literal at line 329, a function literal at line 400, …). 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.
evolve.evolveLines (cyclomatic 27) plugins/ruflo-console/hooks/evolve.ts:92— evolve.evolveLines has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 2 of the 27 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 95, 113, 127, …). 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.settingsView (cyclomatic 27) plugins/ruflo-console/hooks/views/settings.ts:340— settings.settingsView has cyclomatic complexity 27 (threshold 15). Of this number, 17 points are the body's own statements and 10 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
boot-cyber.drawCyber (cyclomatic 27) plugins/ruflo-console/hooks/gfx/boot-cyber.ts:163— boot-cyber.drawCyber has cyclomatic complexity 27 (threshold 15). Of this number, 19 points are the body's own statements and 8 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.
orbital.orbitalGlobe (cyclomatic 27) plugins/ruflo-console/hooks/gfx/orbital.ts:81— orbital.orbitalGlobe 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.
harness-codex.summarizeCodex (cyclomatic 27) plugins/ruflo-console/hooks/data/harness-codex.ts:28— harness-codex.summarizeCodex has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 2 of the 27 points are its own statements and the rest belongs to one function literal inside it that branches (line 32). 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.
burn.main (cyclomatic 27) plugins/ruflo-cost-tracker/scripts/burn.mjs:54— burn.main 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.
audit-list.main (cyclomatic 27) plugins/ruflo-metaharness/scripts/audit-list.mjs:76— audit-list.main has cyclomatic complexity 27 (threshold 15). Of this number, 23 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.
shapes.normalise (cyclomatic 27) plugins/ruflo-protector/hooks/shapes.ts:115— shapes.normalise has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
benchmark-seed-corpus.main (cyclomatic 27) scripts/benchmark-seed-corpus.mjs:339— benchmark-seed-corpus.main has cyclomatic complexity 27 (threshold 15). Of this number, 21 points are the body's own statements and 6 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
render-tui-svg.rowId (cyclomatic 27) scripts/render-tui-svg.mjs:84— render-tui-svg.rowId has cyclomatic complexity 27 (threshold 15). Of this number, 24 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.
speculative-exploration.explore (cyclomatic 27) v3/@claude-flow/cli/src/agenticow/speculative-exploration.ts:167— speculative-exploration.explore 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.
pheromone-adaptive.recordApscSignal (cyclomatic 27) v3/@claude-flow/cli/src/services/pheromone-adaptive.ts:156— pheromone-adaptive.recordApscSignal has cyclomatic complexity 27 (threshold 15). Of this number, 24 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.
memory-bridge.bridgeSearchPatterns (cyclomatic 27) v3/@claude-flow/cli/src/memory/memory-bridge.ts:2638— memory-bridge.bridgeSearchPatterns 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.
output-verifier.verifyAndEscalate (cyclomatic 27) v3/@claude-flow/cli/src/ruvector/output-verifier.ts:209— output-verifier.verifyAndEscalate 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.
evm-parse.parseMetadata (cyclomatic 27) v3/@claude-flow/cli/src/rure/evm-parse.ts:88— evm-parse.parseMetadata 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.
executor.executeUpgrade (cyclomatic 27) v3/@claude-flow/cli/src/init/executor.ts:556— executor.executeUpgrade 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.
executor.executeUpgradeWithMissing (cyclomatic 27) v3/@claude-flow/cli/src/init/executor.ts:787— executor.executeUpgradeWithMissing 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.
executor.detectExistingRufloMCP (cyclomatic 27) v3/@claude-flow/cli/src/init/executor.ts:996— executor.detectExistingRufloMCP 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.
managed-memory-worker.executeManagedMemory (cyclomatic 27) v3/@claude-flow/cli/src/services/managed-memory-worker.ts:33— managed-memory-worker.executeManagedMemory 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.
resource-admission.validate (cyclomatic 27) v3/@claude-flow/performance/src/resource-admission.ts:105— resource-admission.validate has cyclomatic complexity 27 (threshold 15). Of this number, 25 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
agent-card.validateAgentCard (cyclomatic 27) REDACTED:211— agent-card.validateAgentCard has cyclomatic complexity 27 (threshold 15). Of this number, 14 points are the body's own statements and 13 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.
cli-commands.createCliCommands (cyclomatic 27) v3/@claude-flow/plugin-agent-federation/src/cli-commands.ts:32— cli-commands.createCliCommands has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 1 of the 27 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 220, 169, 317, …). 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.
mcp-tools.collectiveMemoryHandler (cyclomatic 27) v3/plugins/neural-coordination/src/mcp-tools.ts:519— mcp-tools.collectiveMemoryHandler 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.
SonaBridge.createMockModule (cyclomatic 27) v3/plugins/ruvector-upstream/src/bridges/sona.ts:212— SonaBridge.createMockModule has cyclomatic complexity 27 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
mission-loop.tickPlan (cyclomatic 26) plugins/ruflo-console/hooks/mission-loop.ts:220— mission-loop.tickPlan has cyclomatic complexity 26 (threshold 15). Of this number, 24 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, 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.
mission-advisor-live.runConsult (cyclomatic 26) plugins/ruflo-console/hooks/mission-advisor-live.ts:78— mission-advisor-live.runConsult has cyclomatic complexity 26 (threshold 15). Of this number, 18 points are the body's own statements and 8 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
bar.barView (cyclomatic 26) plugins/ruflo-console/hooks/views/bar.ts:232— bar.barView has cyclomatic complexity 26 (threshold 15). Of this number, 15 points are the body's own statements and 11 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
steps.stepsRows (cyclomatic 26) plugins/ruflo-console/hooks/views/steps.ts:98— steps.stepsRows has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 10 of the 26 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 116, 105, 119, …). 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.
memmap.memmapRows (cyclomatic 26) plugins/ruflo-console/hooks/views/memmap.ts:61— memmap.memmapRows 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.
wf-control.controlActions (cyclomatic 26) REDACTED:235— wf-control.controlActions has cyclomatic complexity 26 (threshold 15). Of this number, 22 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
workflows.workflowsView (cyclomatic 26) plugins/ruflo-console/hooks/views/workflows.ts:136— workflows.workflowsView has cyclomatic complexity 26 (threshold 15). Of this number, 24 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
wf-convo.conversationRows (cyclomatic 26) plugins/ruflo-console/hooks/views/wf-convo.ts:92— wf-convo.conversationRows 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.
pane.tabs (cyclomatic 26) plugins/ruflo-console/hooks/views/pane.ts:110— pane.tabs has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 9 of the 26 points are its own statements and the rest belongs to 4 function items inside it that branch (tab, isTab, a function literal at line 161, …). 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.
managed-workflows.dynamicConfig (cyclomatic 26) v3/@claude-flow/cli/src/services/managed-workflows.ts:141— managed-workflows.dynamicConfig has cyclomatic complexity 26 (threshold 15). Of this number, 25 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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.
benchmark-models-midtier.main (cyclomatic 26) scripts/benchmark-models-midtier.mjs:424— benchmark-models-midtier.main has cyclomatic complexity 26 (threshold 15). Of this number, 14 points are the body's own statements and 12 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
session-tools.restoreMemorySnapshot (cyclomatic 26) v3/@claude-flow/cli/src/mcp-tools/session-tools.ts:311— session-tools.restoreMemorySnapshot 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.
daemon.startBackgroundDaemon (cyclomatic 26) v3/@claude-flow/cli/src/commands/daemon.ts:484— daemon.startBackgroundDaemon 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.
hive-mind.spawnClaudeCodeInstance (cyclomatic 26) v3/@claude-flow/cli/src/commands/hive-mind.ts:186— hive-mind.spawnClaudeCodeInstance 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.
security-code-patterns.codeLinesOf (cyclomatic 26) v3/@claude-flow/cli/src/commands/security-code-patterns.ts:123— security-code-patterns.codeLinesOf has cyclomatic complexity 26 (threshold 15). Of this number, 25 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AgentDBAdapter.applyFilters (cyclomatic 26) v3/@claude-flow/memory/src/agentdb-adapter.ts:999— AgentDBAdapter.applyFilters 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 one function literal inside it that branches (line 1003). 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.
MoERouter.updateExpertWeights (cyclomatic 26) v3/@claude-flow/neural/src/moe-router.ts:476— MoERouter.updateExpertWeights has cyclomatic complexity 26 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
adr.parseAdr (cyclomatic 25) plugins/ruflo-console/hooks/data/adr.ts:268— adr.parseAdr 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.
events-ui.eventsModel (cyclomatic 25) plugins/ruflo-console/hooks/events-ui.ts:85— events-ui.eventsModel 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.
agentdb-mod.agentdbModRows (cyclomatic 25) plugins/ruflo-console/hooks/views/agentdb-mod.ts:15— agentdb-mod.agentdbModRows 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.
controller.createController.readAll (cyclomatic 25) plugins/ruflo-console/hooks/controller.ts:105— controller.createController.readAll 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.
model-tools.settlePending (cyclomatic 25) plugins/ruflo-console/hooks/model-tools.ts:254— model-tools.settlePending has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
health.summarize (cyclomatic 25) plugins/ruflo-cost-tracker/scripts/health.mjs:181— health.summarize 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.
summary.gather (cyclomatic 25) plugins/ruflo-cost-tracker/scripts/summary.mjs:66— summary.gather has cyclomatic complexity 25 (threshold 15). Of this number, 23 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
managed-learning-loop.inputOf (cyclomatic 25) v3/@claude-flow/cli/src/services/managed-learning-loop.ts:10— managed-learning-loop.inputOf has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
memory-initializer.getHNSWIndex (cyclomatic 25) v3/@claude-flow/cli/src/memory/memory-initializer.ts:629— memory-initializer.getHNSWIndex has cyclomatic complexity 25 (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.
harness-flywheel.evaluateFlywheelCandidate (cyclomatic 25) v3/@claude-flow/cli/src/services/harness-flywheel.ts:159— harness-flywheel.evaluateFlywheelCandidate has cyclomatic complexity 25 (threshold 15). Of this number, 20 points are the body's own statements and 5 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.
http-fetch-tools.isPrivateOrLoopback (cyclomatic 25) v3/@claude-flow/cli/src/mcp-tools/http-fetch-tools.ts:71— http-fetch-tools.isPrivateOrLoopback 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.
graph-analyzer.buildDependencyGraph (cyclomatic 25) v3/@claude-flow/cli/src/ruvector/graph-analyzer.ts:328— graph-analyzer.buildDependencyGraph has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 12 of the 25 points are its own statements and the rest belongs to 3 function items inside it that branch (scanDir, processFile, a function literal at line 359). 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.
MCPServerManager.startStdioServer (cyclomatic 25) REDACTED:707— MCPServerManager.startStdioServer has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 12 of the 25 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 842, 764, 722, …). 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.
ExecutionDashboard.ExecutionDashboard (cyclomatic 25) v3/goal_ui/src/components/agents/ExecutionDashboard.tsx:34— ExecutionDashboard.ExecutionDashboard has cyclomatic complexity 25 (threshold 15). Of this number, 21 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
workflows.buildRun.agents (cyclomatic 24) plugins/ruflo-console/hooks/data/workflows.ts:320— workflows.buildRun.agents has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
stream.claudeParser (cyclomatic 24) plugins/ruflo-console/hooks/stream.ts:130— stream.claudeParser 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 one function literal inside it that branches (line 133). 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.
event-query.tokens (cyclomatic 24) REDACTED:103— event-query.tokens 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.
event-sources.apEvents (cyclomatic 24) plugins/ruflo-console/hooks/data/event-sources.ts:65— event-sources.apEvents 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.
wf-events.eventsBetween (cyclomatic 24) plugins/ruflo-console/hooks/data/wf-events.ts:25— wf-events.eventsBetween 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.
adr-palette.adrPalette (cyclomatic 24) plugins/ruflo-console/hooks/adr-palette.ts:20— adr-palette.adrPalette has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 4 of the 24 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 25, a function literal at line 78, local, …). 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.
memory-lab.parseInput (cyclomatic 24) plugins/ruflo-console/hooks/memory-lab.ts:68— memory-lab.parseInput 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.
run.runTui (cyclomatic 24) plugins/ruflo-console/tui/run.ts:264— run.runTui 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. This shape REPEATS in the file: one other method here (run.runTui::onKey) 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. This is NOT this file's highest cyclomatic complexity: run.keyOf (cyclomatic 32) 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.
ruflo-hook.main (cyclomatic 24) REDACTED:568— ruflo-hook.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.
rabitq-index.buildRabitqIndex (cyclomatic 24) v3/@claude-flow/cli/src/memory/rabitq-index.ts:84— rabitq-index.buildRabitqIndex 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.
memory-initializer.repairVectorIndexes (cyclomatic 24) v3/@claude-flow/cli/src/memory/memory-initializer.ts:1755— memory-initializer.repairVectorIndexes has cyclomatic complexity 24 (threshold 15). Of this number, 22 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.
HeadlessWorkerExecutor.simpleGlob::scanDir (cyclomatic 24) v3/@claude-flow/cli/src/services/headless-worker-executor.ts:1232— HeadlessWorkerExecutor.simpleGlob::scanDir 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.
output-verifier.bracketsBalanced (cyclomatic 24) v3/@claude-flow/cli/src/ruvector/output-verifier.ts:113— output-verifier.bracketsBalanced 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.
search.searchPatterns (cyclomatic 24) v3/@claude-flow/cli/src/transfer/store/search.ts:16— search.searchPatterns has cyclomatic complexity 24 (threshold 15). Of this number, 17 points are the body's own statements and 7 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.
cuda-fatbin.walkFatbin (cyclomatic 24) v3/@claude-flow/cli/src/rure/cuda-fatbin.ts:52— cuda-fatbin.walkFatbin 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.
http-fetch-tools.httpFetchExecute (cyclomatic 24) v3/@claude-flow/cli/src/mcp-tools/http-fetch-tools.ts:184— http-fetch-tools.httpFetchExecute 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.
policy-enforcer.appendAuditLog (cyclomatic 24) v3/@claude-flow/cli/src/mcp-tools/policy-enforcer.ts:206— policy-enforcer.appendAuditLog 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.
DualModeOrchestrator.resolveWorkerEnvelope (cyclomatic 24) v3/@claude-flow/codex/src/dual-mode/orchestrator.ts:575— DualModeOrchestrator.resolveWorkerEnvelope has cyclomatic complexity 24 (threshold 15). Of this number, 18 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
index.createV3ProgressWorker (cyclomatic 24) v3/@claude-flow/hooks/src/workers/index.ts:1843— index.createV3ProgressWorker 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 3 function literals inside it that branch (lines 1844, 1922, 1923). 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.
evaluator.constraintsPass (cyclomatic 24) v3/@claude-flow/security/src/policy/evaluator.ts:20— evaluator.constraintsPass has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CognitiveBridge.createMockModule (cyclomatic 24) v3/plugins/cognitive-kernel/src/bridges/cognitive-bridge.ts:253— CognitiveBridge.createMockModule 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.
mcp-tools.workingMemoryHandler (cyclomatic 24) REDACTED:77— mcp-tools.workingMemoryHandler 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.
server.createPublisherService.server (cyclomatic 23) REDACTED:157— server.createPublisherService.server 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.
recall.parseRecallLog (cyclomatic 23) plugins/ruflo-console/hooks/data/recall.ts:240— recall.parseRecallLog has cyclomatic complexity 23 (threshold 15). Of this number, 17 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.
optimizer.diagnose (cyclomatic 23) plugins/ruflo-console/hooks/optimizer.ts:37— optimizer.diagnose 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.
wf-cost-live.refreshWfGuards (cyclomatic 23) plugins/ruflo-console/hooks/wf-cost-live.ts:135— wf-cost-live.refreshWfGuards has cyclomatic complexity 23 (threshold 15). Of this number, 13 points are the body's own statements and 10 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
wf-drill-body.files (cyclomatic 23) REDACTED:112— wf-drill-body.files has cyclomatic complexity 23 (threshold 15). Of this number, 21 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
wf-worktrees.line (cyclomatic 23) plugins/ruflo-console/hooks/views/wf-worktrees.ts:81— wf-worktrees.line 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.
mission-control.missionControlView (cyclomatic 23) plugins/ruflo-console/hooks/views/mission-control.ts:248— mission-control.missionControlView has cyclomatic complexity 23 (threshold 15). Of this number, 21 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ai-page.aiFrame (cyclomatic 23) plugins/ruflo-console/tui/ai-page.ts:40— ai-page.aiFrame 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, 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.
_ledger.grokRows (cyclomatic 23) plugins/ruflo-cost-tracker/scripts/_ledger.mjs:205— _ledger.grokRows has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
evolve.main (cyclomatic 23) plugins/ruflo-metaharness/scripts/evolve.mjs:315— evolve.main 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, 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.
RuosHostAdapter.stream (cyclomatic 23) plugins/ruflo-ruos/scripts/lib/adapter.mjs:267— RuosHostAdapter.stream 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.
managed-learning.evaluate (cyclomatic 23) v3/@claude-flow/cli/src/services/managed-learning.ts:134— managed-learning.evaluate has cyclomatic complexity 23 (threshold 15). Of this number, 20 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.
benchmark-intelligence.main (cyclomatic 23) scripts/benchmark-intelligence.mjs:594— benchmark-intelligence.main 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 branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
benchmark-models.main (cyclomatic 23) scripts/benchmark-models.mjs:263— benchmark-models.main has cyclomatic complexity 23 (threshold 15). Of this number, 13 points are the body's own statements and 10 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RvfaPatcher.applyPatch (cyclomatic 23) v3/@claude-flow/cli/src/appliance/rvfa-distribution.ts:228— RvfaPatcher.applyPatch 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.
messages.isValidMessage (cyclomatic 23) v3/@claude-flow/cli/src/funnel/messages.ts:84— messages.isValidMessage has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
HeadlessWorkerExecutor.executeInternal (cyclomatic 23) v3/@claude-flow/cli/src/services/headless-worker-executor.ts:960— HeadlessWorkerExecutor.executeInternal 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.
binary-parse.parsePe (cyclomatic 23) v3/@claude-flow/cli/src/rure/binary-parse.ts:173— binary-parse.parsePe has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 5 of the 23 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 214, a function literal at line 193, a function literal at line 238, …). 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.
graph-analyzer.fallbackMinCut (cyclomatic 23) v3/@claude-flow/cli/src/ruvector/graph-analyzer.ts:522— graph-analyzer.fallbackMinCut 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.
graph-analyzer.exportToDot (cyclomatic 23) v3/@claude-flow/cli/src/ruvector/graph-analyzer.ts:1150— graph-analyzer.exportToDot has cyclomatic complexity 23 (threshold 15). Of this number, 20 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.
analyze.fallbackAnalyze (cyclomatic 23) v3/@claude-flow/cli/src/commands/analyze.ts:1317— analyze.fallbackAnalyze has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
doctor.checkMemoryIntegrity (cyclomatic 23) REDACTED:885— doctor.checkMemoryIntegrity 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.
CLI.showCommandHelp (cyclomatic 23) v3/@claude-flow/cli/src/index.ts:461— CLI.showCommandHelp has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
managed-memory-worker.requestOf (cyclomatic 23) v3/@claude-flow/cli/src/services/managed-memory-worker.ts:20— managed-memory-worker.requestOf 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.validateAgentsMd (cyclomatic 23) v3/@claude-flow/codex/src/validators/index.ts:86— index.validateAgentsMd has cyclomatic complexity 23 (threshold 15). Of this number, 21 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
StatuslineGenerator.generateStatusline (cyclomatic 23) v3/@claude-flow/hooks/src/statusline/index.ts:138— StatuslineGenerator.generateStatusline has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AutoMemoryBridge.importFromAutoMemory (cyclomatic 23) v3/@claude-flow/memory/src/auto-memory-bridge.ts:380— AutoMemoryBridge.importFromAutoMemory 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.
AgentDBAdapter.bulkInsert (cyclomatic 23) v3/@claude-flow/memory/src/agentdb-adapter.ts:489— AgentDBAdapter.bulkInsert has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
dependency-graph.satisfiesVersion (cyclomatic 23) v3/@claude-flow/plugins/src/registry/dependency-graph.ts:82— dependency-graph.satisfiesVersion 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.
AnthropicProvider.buildRequest (cyclomatic 23) v3/@claude-flow/providers/src/anthropic-provider.ts:308— AnthropicProvider.buildRequest 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, 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.
CohereProvider.buildRequest (cyclomatic 23) v3/@claude-flow/providers/src/cohere-provider.ts:295— CohereProvider.buildRequest has cyclomatic complexity 23 (threshold 15). Of this number, 20 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
product-plane.validateAuthoritativeReference (cyclomatic 23) v3/@claude-flow/security/src/policy/product-plane.ts:556— product-plane.validateAuthoritativeReference 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.
server-entry.parseArgs (cyclomatic 23) v3/mcp/server-entry.ts:29— server-entry.parseArgs 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.
wasm-loader.criticalPathFallback (cyclomatic 23) v3/plugins/gastown-bridge/src/wasm-loader.ts:668— wasm-loader.criticalPathFallback has cyclomatic complexity 23 (threshold 15). Of this number, 21 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, 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.
QuantumEngine.buildRipsComplex (cyclomatic 23) v3/plugins/prime-radiant/src/engines/QuantumEngine.ts:394— QuantumEngine.buildRipsComplex has cyclomatic complexity 23 (threshold 15). Of this number, 14 points are the body's own statements and 9 belong to 3 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
TopologyOptimizer.suggestOptimizations (cyclomatic 23) v3/plugins/teammate-plugin/src/topology-optimizer.ts:324— TopologyOptimizer.suggestOptimizations has cyclomatic complexity 23 (threshold 15). Of this number, 20 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.
command.answer (cyclomatic 22) plugins/ruflo-agentdb/hooks/command.ts:16— command.answer 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.
mission-ledger.loadLedger (cyclomatic 22) plugins/ruflo-console/hooks/mission-ledger.ts:100— mission-ledger.loadLedger has cyclomatic complexity 22 (threshold 15). Of this number, 20 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.
alerts.alertsOf (cyclomatic 22) plugins/ruflo-console/hooks/data/alerts.ts:31— alerts.alertsOf 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.
adr.adrsView (cyclomatic 22) plugins/ruflo-console/hooks/views/adr.ts:120— adr.adrsView has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ap-pick.effectsOf (cyclomatic 22) plugins/ruflo-console/hooks/ap-pick.ts:53— ap-pick.effectsOf 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.
recall-rows.recallRows (cyclomatic 22) plugins/ruflo-console/hooks/views/recall-rows.ts:93— recall-rows.recallRows has cyclomatic complexity 22 (threshold 15). Of this number, 18 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
timeline.timelineView (cyclomatic 22) plugins/ruflo-console/hooks/views/timeline.ts:66— timeline.timelineView has cyclomatic complexity 22 (threshold 15). Of this number, 19 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.
wf-cost.usageOfTranscript (cyclomatic 22) REDACTED:38— wf-cost.usageOfTranscript 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.
wf-detail.list (cyclomatic 22) plugins/ruflo-console/hooks/views/wf-detail.ts:179— wf-detail.list 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.
wf-page.workflowsPage (cyclomatic 22) plugins/ruflo-console/hooks/views/wf-page.ts:43— wf-page.workflowsPage has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
advise.advise (cyclomatic 22) plugins/ruflo-cost-tracker/scripts/advise.mjs:20— advise.advise has cyclomatic complexity 22 (threshold 15). Of this number, 18 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
evolve.buildDiagnosis (cyclomatic 22) plugins/ruflo-metaharness/scripts/evolve.mjs:219— evolve.buildDiagnosis has cyclomatic complexity 22 (threshold 15). Of this number, 17 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
index.registerRureOffer (cyclomatic 22) plugins/ruflo-mods/hooks/rure-offer/index.ts:32— index.registerRureOffer has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 49, 37). 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.
selfcheck.missingFromClone (cyclomatic 22) plugins/ruflo-mods/hooks/selfcheck.ts:44— selfcheck.missingFromClone has cyclomatic complexity 22 (threshold 15). Of this number, 18 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.
ruos.parseEvents (cyclomatic 22) plugins/ruflo-swarm/hooks/reader/ruos.ts:91— ruos.parseEvents 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.
benchmark-intelligence.benchMoeGate (cyclomatic 22) scripts/benchmark-intelligence.mjs:384— benchmark-intelligence.benchMoeGate has cyclomatic complexity 22 (threshold 15). Of this number, 17 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
benchmark-intelligence.printMarkdown (cyclomatic 22) scripts/benchmark-intelligence.mjs:490— benchmark-intelligence.printMarkdown 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.
PromptManager.select (cyclomatic 22) v3/@claude-flow/cli/src/prompt.ts:64— PromptManager.select has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 3 of the 22 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 113, displayChoices, a function literal at line 104, …). 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.
policy-ledger-anchor.assessAnchorsChecked (cyclomatic 22) v3/@claude-flow/cli/src/services/policy-ledger-anchor.ts:358— policy-ledger-anchor.assessAnchorsChecked 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.
diff-classifier.getGitDiffNumstat (cyclomatic 22) v3/@claude-flow/cli/src/ruvector/diff-classifier.ts:473— diff-classifier.getGitDiffNumstat has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (diff-classifier.getGitDiffNumstatAsync) 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.
diff-classifier.getGitDiffNumstatAsync (cyclomatic 22) v3/@claude-flow/cli/src/ruvector/diff-classifier.ts:548— diff-classifier.getGitDiffNumstatAsync has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (diff-classifier.getGitDiffNumstat) 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.
dotnet-parse.parseInto (cyclomatic 22) v3/@claude-flow/cli/src/rure/dotnet-parse.ts:163— dotnet-parse.parseInto has cyclomatic complexity 22 (threshold 15). 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
mod-projection.buildModProjection (cyclomatic 22) v3/@claude-flow/cli/src/guidance/mod-projection.ts:43— mod-projection.buildModProjection has cyclomatic complexity 22 (threshold 15). Of this number, 14 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: mod-projection.parseModObservations (cyclomatic 27) 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.
executor.copyAgents (cyclomatic 22) v3/@claude-flow/cli/src/init/executor.ts:1260— executor.copyAgents 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.
CommandParser.parseFlag (cyclomatic 22) v3/@claude-flow/cli/src/parser.ts:306— CommandParser.parseFlag 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.
files.listSessions (cyclomatic 22) v3/@claude-flow/codex/src/activity/files.ts:67— files.listSessions 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.
index.parseYamlFrontmatter (cyclomatic 22) v3/@claude-flow/codex/src/validators/index.ts:696— index.parseYamlFrontmatter 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.
index.parseToml (cyclomatic 22) v3/@claude-flow/codex/src/validators/index.ts:780— index.parseToml 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.
DualModeOrchestrator.buildDependencyLevels (cyclomatic 22) v3/@claude-flow/codex/src/dual-mode/orchestrator.ts:404— DualModeOrchestrator.buildDependencyLevels has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity· cli.program.command("init").description("Initialize a new Codex project with AGENTS.md and skills").option("-t, --template < (cyclomatic 22) · ×1
cli.program.command("init").description("Initialize a new Codex project with AGENTS.md and skills").option("-t, --template < (cyclomatic 22) v3/@claude-flow/codex/src/cli.ts:91— cli.program.command("init").description("Initialize a new Codex project with AGENTS.md and skills").option("-t, --template < 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.
generators.generateClaudeLocalMd (cyclomatic 22) v3/@claude-flow/guidance/src/generators.ts:314— generators.generateClaudeLocalMd has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
HookExecutor.execute (cyclomatic 22) v3/@claude-flow/hooks/src/executor/index.ts:50— HookExecutor.execute 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.
VectorOps.search (cyclomatic 22) v3/@claude-flow/plugins/src/integrations/ruvector/ruvector-bridge.ts:504— VectorOps.search has cyclomatic complexity 22 (threshold 15). Of this number, 16 points are the body's own statements and 6 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.
system-tools.handleSystemHealth (cyclomatic 22) v3/mcp/tools/system-tools.ts:521— system-tools.handleSystemHealth 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.
MinCutBridge.findOptimalCuts (cyclomatic 22) v3/plugins/code-intelligence/src/bridges/mincut-bridge.ts:102— MinCutBridge.findOptimalCuts 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.
mcp-tools.getAllRelatedFiles (cyclomatic 22) v3/plugins/code-intelligence/src/mcp-tools.ts:836— mcp-tools.getAllRelatedFiles has cyclomatic complexity 22 (threshold 15). Of this number, 14 points are the body's own statements and 8 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.
mcp-tools.cognitiveLoadHandler (cyclomatic 22) REDACTED:903— mcp-tools.cognitiveLoadHandler 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.
JsFallbackWasmLoader.parseFormula (cyclomatic 22) v3/plugins/gastown-bridge/src/formula/executor.ts:388— JsFallbackWasmLoader.parseFormula 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.
verifyAccessToken (cyclomatic 22) plugins/ruflo-x-gateway/src/oauth.mjs:85— verifyAccessToken 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.
managed.parseManagedLearning (cyclomatic 21) plugins/ruflo-console/hooks/data/managed.ts:87— managed.parseManagedLearning has cyclomatic complexity 21 (threshold 15). Of this number, 17 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, 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.
starts.startSpec (cyclomatic 21) plugins/ruflo-console/hooks/starts.ts:48— starts.startSpec has cyclomatic complexity 21 (threshold 15). Of this number, 17 points are the body's own statements and 4 belong to 3 function literals inside it that branch. 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.
mission-loop.parseLoop (cyclomatic 21) plugins/ruflo-console/hooks/mission-loop.ts:168— mission-loop.parseLoop has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
secure.resultRows (cyclomatic 21) plugins/ruflo-console/hooks/views/secure.ts:80— secure.resultRows has cyclomatic complexity 21 (threshold 15). Of this number, 18 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
learning-pulse.pulseRows (cyclomatic 21) plugins/ruflo-console/hooks/views/learning-pulse.ts:17— learning-pulse.pulseRows has cyclomatic complexity 21 (threshold 15). Of this number, 15 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.
harness-claude.claudeAdapter.scan (cyclomatic 21) plugins/ruflo-console/hooks/data/harness-claude.ts:225— harness-claude.claudeAdapter.scan has cyclomatic complexity 21 (threshold 15). Of this number, 16 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.
wf-guide.guideActions (cyclomatic 21) plugins/ruflo-console/hooks/data/wf-guide.ts:151— wf-guide.guideActions has cyclomatic complexity 21 (threshold 15). Of this number, 20 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.
wf-saved-live.syncSavedViews (cyclomatic 21) plugins/ruflo-console/hooks/wf-saved-live.ts:95— wf-saved-live.syncSavedViews 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.
bench.runAnthropicBaseline (cyclomatic 21) plugins/ruflo-cost-tracker/scripts/bench.mjs:331— bench.runAnthropicBaseline has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
command.answer (cyclomatic 21) plugins/ruflo-ddd/hooks/command.ts:16— command.answer has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
redblue.buildUpstreamArgs (cyclomatic 21) plugins/ruflo-metaharness/scripts/redblue.mjs:133— redblue.buildUpstreamArgs 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.
policy.createToaster.run (cyclomatic 21) plugins/ruflo-mods/hooks/toast/policy.ts:309— policy.createToaster.run 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.
policy.constraintsPass (cyclomatic 21) plugins/ruflo-mods/hooks/guard/policy.ts:130— policy.constraintsPass has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
adr-digest.entriesOf (cyclomatic 21) plugins/ruflo-swarm/hooks/adr-digest.ts:47— adr-digest.entriesOf 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.
registration.verifyRegistration (cyclomatic 21) plugins/ruflo-x-gateway/src/registration.mjs:31— registration.verifyRegistration has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
managed-learning.observationOf (cyclomatic 21) v3/@claude-flow/cli/src/services/managed-learning.ts:38— managed-learning.observationOf has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
managed-learning-loop.cycleLearning (cyclomatic 21) v3/@claude-flow/cli/src/services/managed-learning-loop.ts:26— managed-learning-loop.cycleLearning has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
pretrain-from-github.main (cyclomatic 21) v3/@claude-flow/cli/scripts/pretrain-from-github.mjs:188— pretrain-from-github.main has cyclomatic complexity 21 (threshold 15). Of this number, 16 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
append-conditions.validateAppendConditions (cyclomatic 21) v3/@claude-flow/cli/src/memory/append-conditions.ts:11— append-conditions.validateAppendConditions 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 one function literal inside it that branches (line 13). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
intelligence.recordTrajectory (cyclomatic 21) v3/@claude-flow/cli/src/memory/intelligence.ts:1234— intelligence.recordTrajectory has cyclomatic complexity 21 (threshold 15). Of this number, 17 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
memory-bridge.bridgeHierarchicalRecall (cyclomatic 21) v3/@claude-flow/cli/src/memory/memory-bridge.ts:3589— memory-bridge.bridgeHierarchicalRecall has cyclomatic complexity 21 (threshold 15). Of this number, 14 points are the body's own statements and 7 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.
HeadlessWorkerExecutor.executeClaudeCode (cyclomatic 21) v3/@claude-flow/cli/src/services/headless-worker-executor.ts:1341— HeadlessWorkerExecutor.executeClaudeCode 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 10 function literals inside it that branch (lines 1360, 1424, 1506, …). 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.
harness-flywheel-generations.runFlywheelGeneration (cyclomatic 21) v3/@claude-flow/cli/src/services/harness-flywheel-generations.ts:242— harness-flywheel-generations.runFlywheelGeneration has cyclomatic complexity 21 (threshold 15). Of this number, 16 points are the body's own statements and 5 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.
hooks-tools.loadPendingTrajectory (cyclomatic 21) v3/@claude-flow/cli/src/mcp-tools/hooks-tools.ts:548— hooks-tools.loadPendingTrajectory 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, 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.
progress-tools.calculateProgress (cyclomatic 21) v3/@claude-flow/cli/src/mcp-tools/progress-tools.ts:110— progress-tools.calculateProgress 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.
claims-store.readClaimsStore (cyclomatic 21) v3/@claude-flow/cli/src/services/claims-store.ts:9— claims-store.readClaimsStore has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
binary-parse.parseMachO (cyclomatic 21) v3/@claude-flow/cli/src/rure/binary-parse.ts:256— binary-parse.parseMachO has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 5 of the 21 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 269, u32, u64). 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.
live-harness.detectHost (cyclomatic 21) v3/@claude-flow/cli/src/services/live-harness.ts:212— live-harness.detectHost 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.
live-harness.teamsIn (cyclomatic 21) v3/@claude-flow/cli/src/services/live-harness.ts:378— live-harness.teamsIn has cyclomatic complexity 21 (threshold 15). Of this number, 19 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.
memory-distill.resolveDistillConfig (cyclomatic 21) v3/@claude-flow/cli/src/commands/memory-distill.ts:79— memory-distill.resolveDistillConfig 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.
CommandParser.validateFlags (cyclomatic 21) v3/@claude-flow/cli/src/parser.ts:630— CommandParser.validateFlags 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.
index.runCodexLoop (cyclomatic 21) v3/@claude-flow/codex/src/loop/index.ts:116— index.runCodexLoop 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.
analyzer.formatValidationReport (cyclomatic 21) REDACTED:2201— analyzer.formatValidationReport 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.
ManifestValidator.computeRiskScore (cyclomatic 21) v3/@claude-flow/guidance/src/manifest-validator.ts:266— ManifestValidator.computeRiskScore 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.
ProviderAdapter.selectProvider (cyclomatic 21) v3/@claude-flow/integration/src/provider-adapter.ts:454— ProviderAdapter.selectProvider 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.
SqlJsBackend.query (cyclomatic 21) v3/@claude-flow/memory/src/sqljs-backend.ts:447— SqlJsBackend.query 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.
inbound-dispatcher.canonicalizeJcsValue (cyclomatic 21) v3/@claude-flow/plugin-agent-federation/src/application/inbound-dispatcher.ts:142— inbound-dispatcher.canonicalizeJcsValue 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.
IndexTuner.analyzeWorkload (cyclomatic 21) v3/@claude-flow/plugins/src/integrations/ruvector/self-learning.ts:1083— IndexTuner.analyzeWorkload has cyclomatic complexity 21 (threshold 15). Of this number, 18 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
OpenAIProvider.buildRequest (cyclomatic 21) v3/@claude-flow/providers/src/openai-provider.ts:374— OpenAIProvider.buildRequest 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, 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.
TaskHooksManager.analyzeTask (cyclomatic 21) v3/@claude-flow/shared/src/hooks/task-hooks.ts:260— TaskHooksManager.analyzeTask 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.
ReviseResearchForm.ReviseResearchForm (cyclomatic 21) v3/goal_ui/src/components/ReviseResearchForm.tsx:98— ReviseResearchForm.ReviseResearchForm has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 8 of the 21 points are its own statements and the rest belongs to 11 function items inside it that branch (optimizeConfig, addFocusArea, addExcludeTopic, …). 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.
system-tools.handleSystemStatus (cyclomatic 21) v3/mcp/tools/system-tools.ts:199— system-tools.handleSystemStatus 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.
GNNBridge.predictImpact (cyclomatic 21) v3/plugins/code-intelligence/src/bridges/gnn-bridge.ts:253— GNNBridge.predictImpact 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.
quantum-topology.computePersistenceDiagram (cyclomatic 21) v3/plugins/prime-radiant/src/tools/quantum-topology.ts:224— quantum-topology.computePersistenceDiagram has cyclomatic complexity 21 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
codex-mod-runtime.runCodexHook (cyclomatic 20) scripts/lib/codex-mod-runtime.mjs:70— codex-mod-runtime.runCodexHook has cyclomatic complexity 20 (threshold 15). Of this number, 17 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.
parse-adrs.parseLinks (cyclomatic 20) plugins/ruflo-adr/scripts/lib/parse-adrs.mjs:169— parse-adrs.parseLinks has cyclomatic complexity 20 (threshold 15). Of this number, 17 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, 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.
pod-tick.validatePodTemplate (cyclomatic 20) plugins/ruflo-business-pods/scripts/pod-tick.mjs:113— pod-tick.validatePodTemplate 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.
rure.cudaLines (cyclomatic 20) plugins/ruflo-console/hooks/data/rure.ts:182— rure.cudaLines has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 7 of the 20 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 192, a function literal at line 193, a function literal at line 210, …). 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.
adr-write.statusIn (cyclomatic 20) plugins/ruflo-console/hooks/data/adr-write.ts:181— adr-write.statusIn has cyclomatic complexity 20 (threshold 15). Of this number, 16 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
secure.scanReader (cyclomatic 20) plugins/ruflo-console/hooks/secure.ts:123— secure.scanReader 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.
activity-store.decodeLane (cyclomatic 20) plugins/ruflo-console/hooks/data/activity-store.ts:150— activity-store.decodeLane has cyclomatic complexity 20 (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.
adr.planStatus (cyclomatic 20) plugins/ruflo-console/hooks/adr.ts:305— adr.planStatus 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.
claims.claimsView (cyclomatic 20) plugins/ruflo-console/hooks/views/claims.ts:13— claims.claimsView has cyclomatic complexity 20 (threshold 15). Of this number, 13 points are the body's own statements and 7 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.
ap-adapt.propose (cyclomatic 20) plugins/ruflo-console/hooks/data/ap-adapt.ts:110— ap-adapt.propose has cyclomatic complexity 20 (threshold 15). Of this number, 17 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
event-query.unsafeGroup (cyclomatic 20) REDACTED:49— event-query.unsafeGroup 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.
event-query.parseQuery (cyclomatic 20) REDACTED:164— event-query.parseQuery 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.
activity-live.feedLanes (cyclomatic 20) plugins/ruflo-console/hooks/activity-live.ts:137— activity-live.feedLanes 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.
sessions.previewRows (cyclomatic 20) plugins/ruflo-console/hooks/views/sessions.ts:49— sessions.previewRows 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.
workflows-read.readWorkflowRuns (cyclomatic 20) plugins/ruflo-console/hooks/data/workflows-read.ts:67— workflows-read.readWorkflowRuns has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 2 of the 20 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 93, 83). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
wf-guide.nestingOf (cyclomatic 20) plugins/ruflo-console/hooks/data/wf-guide.ts:33— wf-guide.nestingOf has cyclomatic complexity 20 (threshold 15). Of this number, 17 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
wf-convo-live.sendSpec (cyclomatic 20) plugins/ruflo-console/hooks/wf-convo-live.ts:131— wf-convo-live.sendSpec has cyclomatic complexity 20 (threshold 15). Of this number, 13 points are the body's own statements and 7 belong to 5 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
skill-md.checkSkillMd (cyclomatic 20) REDACTED:47— skill-md.checkSkillMd has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
wf-triage.classifyAgent (cyclomatic 20) plugins/ruflo-console/hooks/data/wf-triage.ts:55— wf-triage.classifyAgent 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.
render-theme-svg.rowId (cyclomatic 20) plugins/ruflo-console/scripts/render-theme-svg.mjs:29— render-theme-svg.rowId has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 6 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 41, flush). 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.
track.summarizeSession (cyclomatic 20) plugins/ruflo-cost-tracker/scripts/track.mjs:44— track.summarizeSession 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.
policy.decodeRing (cyclomatic 20) plugins/ruflo-mods/hooks/toast/policy.ts:132— policy.decodeRing 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.
rootdelete.hasRootDelete::finishWord (cyclomatic 20) plugins/ruflo-protector/hooks/rootdelete.ts:17— rootdelete.hasRootDelete::finishWord 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. This shape REPEATS in the file: one other method here (rootdelete.hasRootDelete) 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.
controller.runAction (cyclomatic 20) plugins/ruflo-swarm/hooks/actions/controller.ts:40— controller.runAction 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.
managed-memory-client.requestOf (cyclomatic 20) v3/@claude-flow/cli/src/services/managed-memory-client.ts:17— managed-memory-client.requestOf 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.
pretrain-from-github.harvestCommits (cyclomatic 20) v3/@claude-flow/cli/scripts/pretrain-from-github.mjs:68— pretrain-from-github.harvestCommits has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
run-beir-rrf-ablation.main (cyclomatic 20) v3/@claude-flow/cli/scripts/run-beir-rrf-ablation.mjs:82— run-beir-rrf-ablation.main has cyclomatic complexity 20 (threshold 15). Of this number, 12 points are the body's own statements and 8 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.
memory-bridge.bridgeDeleteHierarchical (cyclomatic 20) v3/@claude-flow/cli/src/memory/memory-bridge.ts:2946— memory-bridge.bridgeDeleteHierarchical 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.
memory-initializer.getEntry (cyclomatic 20) v3/@claude-flow/cli/src/memory/memory-initializer.ts:3753— memory-initializer.getEntry has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 3813). 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.
policy-runtime.appendArchiveDurably (cyclomatic 20) v3/@claude-flow/cli/src/services/policy-runtime.ts:276— policy-runtime.appendArchiveDurably 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.
gcs.uploadToGCS (cyclomatic 20) v3/@claude-flow/cli/src/transfer/storage/gcs.ts:100— gcs.uploadToGCS 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.
graph-analyzer.analyzeGraph (cyclomatic 20) v3/@claude-flow/cli/src/ruvector/graph-analyzer.ts:1046— graph-analyzer.analyzeGraph has cyclomatic complexity 20 (threshold 15). Of this number, 15 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
init.initCodexAction (cyclomatic 20) v3/@claude-flow/cli/src/commands/init.ts:499— init.initCodexAction 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.
status.performHealthCheck (cyclomatic 20) v3/@claude-flow/cli/src/commands/status.ts:394— status.performHealthCheck 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.
ruvector-training.initializeTraining (cyclomatic 20) v3/@claude-flow/cli/src/services/ruvector-training.ts:310— ruvector-training.initializeTraining 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.
CodexInitializer.installRufloCorePlugin (cyclomatic 20) v3/@claude-flow/codex/src/initializer.ts:493— CodexInitializer.installRufloCorePlugin has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
analyzer.formatABReport (cyclomatic 20) REDACTED:2975— analyzer.formatABReport 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.
RvfBackend.loadFromDisk (cyclomatic 20) v3/@claude-flow/memory/src/rvf-backend.ts:538— RvfBackend.loadFromDisk 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.
MemoryConsolidator.dedup (cyclomatic 20) v3/@claude-flow/memory/src/consolidator.ts:248— MemoryConsolidator.dedup 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.
VectorOps.insert (cyclomatic 20) v3/@claude-flow/plugins/src/integrations/ruvector/ruvector-bridge.ts:677— VectorOps.insert 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.
RuVectorProvider.doStreamComplete (cyclomatic 20) v3/@claude-flow/providers/src/ruvector-provider.ts:341— RuVectorProvider.doStreamComplete 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.
PathValidator.validateSync (cyclomatic 20) v3/@claude-flow/security/src/path-validator.ts:483— PathValidator.validateSync 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.
AgenticPolicyEngine.applyBudget (cyclomatic 20) v3/@claude-flow/security/src/policy/engine.ts:271— AgenticPolicyEngine.applyBudget 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.Index (cyclomatic 20) v3/goal_ui/src/pages/Index.tsx:128— Index.Index has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (Index.Index::executeResearch) 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.
StateAssessmentCard.StateAssessmentCard (cyclomatic 20) v3/goal_ui/src/components/StateAssessmentCard.tsx:15— StateAssessmentCard.StateAssessmentCard has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 2 of the 20 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 108, a function literal at line 168, a function literal at line 227, …). 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.
memory-tools.handleListMemory (cyclomatic 20) v3/mcp/tools/memory-tools.ts:269— memory-tools.handleListMemory has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 7 of the 20 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 312, 288). 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.
task-tools.handleListTasks (cyclomatic 20) v3/mcp/tools/task-tools.ts:307— task-tools.handleListTasks has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 372, 328). 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.
MinCutBridge.spectralPartition (cyclomatic 20) v3/plugins/code-intelligence/src/bridges/mincut-bridge.ts:410— MinCutBridge.spectralPartition has cyclomatic complexity 20 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
mcp-tools.analyzeQueryPatterns (cyclomatic 20) v3/plugins/perf-optimizer/src/mcp-tools.ts:777— mcp-tools.analyzeQueryPatterns 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.
verify.memoryListJson (cyclomatic 19) plugins/ruflo-adr/scripts/verify.mjs:38— verify.memoryListJson 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.
missions.parseMissions.missions (cyclomatic 19) plugins/ruflo-console/hooks/data/missions.ts:41— missions.parseMissions.missions has cyclomatic complexity 19 (threshold 15). Of this number, 11 points are the body's own statements and 8 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
mission-loop.status (cyclomatic 19) plugins/ruflo-console/hooks/mission-loop.ts:125— mission-loop.status has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
notices.noticesBetween (cyclomatic 19) plugins/ruflo-console/hooks/notices.ts:51— notices.noticesBetween 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.
hive.proposalsSection (cyclomatic 19) plugins/ruflo-console/hooks/views/hive.ts:223— hive.proposalsSection has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
wf-cost.parsePriceBook (cyclomatic 19) REDACTED:101— wf-cost.parsePriceBook 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.
wf-send.payloadOf (cyclomatic 19) plugins/ruflo-console/hooks/data/wf-send.ts:67— wf-send.payloadOf 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.
wf-compare.pair (cyclomatic 19) plugins/ruflo-console/hooks/data/wf-compare.ts:76— wf-compare.pair 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.
ask-claude.askActions (cyclomatic 19) plugins/ruflo-console/hooks/ask-claude.ts:140— ask-claude.askActions 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 7 function items inside it that branch (a function literal at line 166, deliver::ask, deliver, …). 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.
bench.runLlmBaseline (cyclomatic 19) plugins/ruflo-cost-tracker/scripts/bench.mjs:244— bench.runLlmBaseline 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.
projection.main (cyclomatic 19) plugins/ruflo-cost-tracker/scripts/projection.mjs:77— projection.main has cyclomatic complexity 19 (threshold 15). Of this number, 17 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.
adr-digest.blockOf (cyclomatic 19) plugins/ruflo-swarm/hooks/adr-digest.ts:91— adr-digest.blockOf 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
gaia-audit.checkNoWork (cyclomatic 19) plugins/ruflo-workflows/scripts/gaia-audit.mjs:333— gaia-audit.checkNoWork 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.
index.app.post("/chat/completions") (cyclomatic 19) REDACTED:1634— index.app.post("/chat/completions") 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.
managed-learning-store.recallLearning (cyclomatic 19) v3/@claude-flow/cli/src/services/managed-learning-store.ts:151— managed-learning-store.recallLearning 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.
InMemoryClaimRepository.query (cyclomatic 19) v3/@claude-flow/claims/src/infrastructure/claim-repository.ts:186— InMemoryClaimRepository.query 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, 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.
mcp-server.handleMessage (cyclomatic 19) v3/@claude-flow/cli/bin/mcp-server.js:127— mcp-server.handleMessage 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.
memory-bridge.rabitqSearchAndRerank (cyclomatic 19) v3/@claude-flow/cli/src/memory/memory-bridge.ts:2161— memory-bridge.rabitqSearchAndRerank has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
memory-bridge.bridgeSearchBruteForceCosine (cyclomatic 19) v3/@claude-flow/cli/src/memory/memory-bridge.ts:2238— memory-bridge.bridgeSearchBruteForceCosine has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
memory-initializer.purgeNamespace (cyclomatic 19) v3/@claude-flow/cli/src/memory/memory-initializer.ts:4158— memory-initializer.purgeNamespace has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 4181). 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.
SONAOptimizer.getRoutingSuggestion (cyclomatic 19) v3/@claude-flow/cli/src/memory/sona-optimizer.ts:446— SONAOptimizer.getRoutingSuggestion 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, 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.
MCPServerManager.handleMCPMessage (cyclomatic 19) REDACTED:908— MCPServerManager.handleMCPMessage 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.
mod-sources.readModGuidanceSources (cyclomatic 19) v3/@claude-flow/cli/src/guidance/mod-sources.ts:74— mod-sources.readModGuidanceSources has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 8 of the 19 points are its own statements and the rest belongs to one function item inside it that branches (read). 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.
live-harness.collectLiveHarness (cyclomatic 19) v3/@claude-flow/cli/src/services/live-harness.ts:431— live-harness.collectLiveHarness has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: 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.
export.exportPatterns (cyclomatic 19) v3/@claude-flow/cli/src/transfer/export.ts:21— export.exportPatterns has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
start.parseSimpleYaml (cyclomatic 19) v3/@claude-flow/cli/src/commands/start.ts:25— start.parseSimpleYaml 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.
native-training.runNativeTraining (cyclomatic 19) v3/@claude-flow/cli/src/services/native-training.ts:86— native-training.runNativeTraining 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.
validator.validateUpdate (cyclomatic 19) v3/@claude-flow/cli/src/update/validator.ts:54— validator.validateUpdate 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.
metaharness.dispatchFlywheel (cyclomatic 19) v3/@claude-flow/cli/src/commands/metaharness.ts:95— metaharness.dispatchFlywheel 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.
index.convertSettingsToToml (cyclomatic 19) v3/@claude-flow/codex/src/migrations/index.ts:706— index.convertSettingsToToml 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.
index.benchmark (cyclomatic 19) v3/@claude-flow/integration/src/index.ts:346— index.benchmark has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SQLiteBackend.query (cyclomatic 19) v3/@claude-flow/memory/src/sqlite-backend.ts:351— SQLiteBackend.query has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
QueryBuilder.build (cyclomatic 19) v3/@claude-flow/memory/src/query-builder.ts:344— QueryBuilder.build has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ReasoningBankAdapter.consolidate (cyclomatic 19) v3/@claude-flow/neural/src/reasoningbank-adapter.ts:356— ReasoningBankAdapter.consolidate 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.
AnthropicProvider.doStreamComplete (cyclomatic 19) v3/@claude-flow/providers/src/anthropic-provider.ts:172— AnthropicProvider.doStreamComplete 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.
GoogleProvider.buildRequest (cyclomatic 19) v3/@claude-flow/providers/src/google-provider.ts:298— GoogleProvider.buildRequest 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, 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.
AgenticPolicyEngine.verifyLedger (cyclomatic 19) v3/@claude-flow/security/src/policy/engine.ts:205— AgenticPolicyEngine.verifyLedger 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.
mcp-composition-inspector.inspectToolComposition (cyclomatic 19) v3/@claude-flow/security/src/mcp-composition-inspector.ts:205— mcp-composition-inspector.inspectToolComposition 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.
GitCommitHook.processCommitMessage (cyclomatic 19) v3/@claude-flow/shared/src/hooks/safety/git-commit.ts:279— GitCommitHook.processCommitMessage 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.
RaftConsensus.handleInboundRaftMessage (cyclomatic 19) v3/@claude-flow/swarm/src/consensus/raft.ts:102— RaftConsensus.handleInboundRaftMessage 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.
Index.Index::executeResearch (cyclomatic 19) v3/goal_ui/src/pages/Index.tsx:599— Index.Index::executeResearch has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (Index.Index) 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.
task-tools.handleTaskDependencies (cyclomatic 19) v3/mcp/tools/task-tools.ts:726— task-tools.handleTaskDependencies has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
MinCutBridge.minSTCut (cyclomatic 19) v3/plugins/code-intelligence/src/bridges/mincut-bridge.ts:221— MinCutBridge.minSTCut 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.
mcp-tools.performSemanticSearch (cyclomatic 19) v3/plugins/code-intelligence/src/mcp-tools.ts:735— mcp-tools.performSemanticSearch has cyclomatic complexity 19 (threshold 15). Of this number, 10 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.
HyperbolicBridge.embedHierarchy (cyclomatic 19) v3/plugins/hyperbolic-reasoning/src/bridges/hyperbolic-bridge.ts:141— HyperbolicBridge.embedHierarchy has cyclomatic complexity 19 (threshold 15). Of this number, 16 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, 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.
CategoryEngine.initializeBuiltinFunctors (cyclomatic 19) v3/plugins/prime-radiant/src/engines/CategoryEngine.ts:245— CategoryEngine.initializeBuiltinFunctors 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 9 function literals inside it that branch (lines 337, 352, 368, …). 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.
quantum-topology.buildRipsComplex (cyclomatic 19) v3/plugins/prime-radiant/src/tools/quantum-topology.ts:68— quantum-topology.buildRipsComplex has cyclomatic complexity 19 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
CognitiveBridge.createMockModule (cyclomatic 19) v3/plugins/ruvector-upstream/src/bridges/cognitive.ts:192— CognitiveBridge.createMockModule 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.
(anonymous) (cyclomatic 19) REDACTED:1634— (anonymous) 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.
workflows.parseTranscript (cyclomatic 18) plugins/ruflo-console/hooks/data/workflows.ts:183— workflows.parseTranscript 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.
mh-lab.summary (cyclomatic 18) plugins/ruflo-console/hooks/mh-lab.ts:209— mh-lab.summary has cyclomatic complexity 18 (threshold 15). Of this number, 15 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.
changelog.parseChangelog (cyclomatic 18) plugins/ruflo-console/hooks/data/changelog.ts:60— changelog.parseChangelog 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.
ap-journal.receiptOf (cyclomatic 18) plugins/ruflo-console/hooks/data/ap-journal.ts:50— ap-journal.receiptOf has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
wf-file.resolveExportPath (cyclomatic 18) plugins/ruflo-console/hooks/data/wf-file.ts:28— wf-file.resolveExportPath has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
mission-loop.loopRows (cyclomatic 18) plugins/ruflo-console/hooks/views/mission-loop.ts:12— mission-loop.loopRows 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.
activity-store.decodePrefs (cyclomatic 18) plugins/ruflo-console/hooks/data/activity-store.ts:233— activity-store.decodePrefs has cyclomatic complexity 18 (threshold 15). 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: 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.
automate.resultRows (cyclomatic 18) plugins/ruflo-console/hooks/views/automate.ts:53— automate.resultRows has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
cost.costView (cyclomatic 18) plugins/ruflo-console/hooks/views/cost.ts:57— cost.costView 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.
whatsnew.whatsnewView (cyclomatic 18) plugins/ruflo-console/hooks/views/whatsnew.ts:50— whatsnew.whatsnewView has cyclomatic complexity 18 (threshold 15). Of this number, 15 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.
adr.detail (cyclomatic 18) plugins/ruflo-console/hooks/views/adr.ts:48— adr.detail 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.
hive-chamber.drawChamber (cyclomatic 18) plugins/ruflo-console/hooks/gfx/hive-chamber.ts:41— hive-chamber.drawChamber has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
event-export.resolveTarget (cyclomatic 18) plugins/ruflo-console/hooks/data/event-export.ts:29— event-export.resolveTarget has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
mods.modsRows (cyclomatic 18) plugins/ruflo-console/hooks/views/mods.ts:36— mods.modsRows 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.
memory-lab.resultRows (cyclomatic 18) plugins/ruflo-console/hooks/views/memory-lab.ts:104— memory-lab.resultRows 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.
FactsIncr.fold (cyclomatic 18) plugins/ruflo-console/hooks/data/wf-incr.ts:153— FactsIncr.fold 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.
workflows.header (cyclomatic 18) plugins/ruflo-console/hooks/views/workflows.ts:38— workflows.header 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
wf-worktrees.boardRows (cyclomatic 18) plugins/ruflo-console/hooks/views/wf-worktrees.ts:110— wf-worktrees.boardRows 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.
wf-replay.stepReplay (cyclomatic 18) plugins/ruflo-console/hooks/data/wf-replay.ts:171— wf-replay.stepReplay 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.
terminal.screenOf (cyclomatic 18) plugins/ruflo-console/hooks/views/terminal.ts:41— terminal.screenOf 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.
xruv.networkRows (cyclomatic 18) plugins/ruflo-console/hooks/views/xruv.ts:115— xruv.networkRows has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
xruv.resultRows (cyclomatic 18) plugins/ruflo-console/hooks/views/xruv.ts:228— xruv.resultRows 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.
cost.projectSpend (cyclomatic 18) plugins/ruflo-console/hooks/cost.ts:28— cost.projectSpend has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, 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.
mission-palette.missionPalette (cyclomatic 18) plugins/ruflo-console/hooks/mission-palette.ts:21— mission-palette.missionPalette has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 42, local, 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.
ruflo-hook.invokeHook (cyclomatic 18) REDACTED:334— ruflo-hook.invokeHook 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.
attention.attentionLine (cyclomatic 18) plugins/ruflo-mods/hooks/attention.ts:17— attention.attentionLine 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.
ranked-context.rankedContext (cyclomatic 18) plugins/ruflo-mods/hooks/route/ranked-context.ts:111— ranked-context.rankedContext has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
command.answer (cyclomatic 18) plugins/ruflo-plugin-creator/hooks/command.ts:42— command.answer 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.
ledger.createLedger (cyclomatic 18) plugins/ruflo-ruos/scripts/lib/ledger.mjs:92— ledger.createLedger has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 4 of the 18 points are its own statements and the rest belongs to 4 function items inside it that branch (safeCall, a function literal at line 174, a function literal at line 190, …). 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.
pane.selection (cyclomatic 18) plugins/ruflo-swarm/hooks/views/pane.tsx:113— pane.selection 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.
adr-digest.readAdrDigest (cyclomatic 18) plugins/ruflo-swarm/hooks/adr-digest.ts:132— adr-digest.readAdrDigest has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, 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.
managed-run-store.executeManagedControl (cyclomatic 18) v3/@claude-flow/cli/src/services/managed-run-store.ts:65— managed-run-store.executeManagedControl has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, 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.
MctsExplorer.explore (cyclomatic 18) v3/@claude-flow/browser/src/application/mcts-explorer.ts:80— MctsExplorer.explore 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
run-beir-bge.main (cyclomatic 18) v3/@claude-flow/cli/scripts/run-beir-bge.mjs:191— run-beir-bge.main 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.
messages.displayWidth (cyclomatic 18) v3/@claude-flow/cli/src/funnel/messages.ts:48— messages.displayWidth has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
helper-refresh.refreshOneHelpersDirLocked (cyclomatic 18) v3/@claude-flow/cli/src/init/helper-refresh.ts:383— helper-refresh.refreshOneHelpersDirLocked 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.
PromptManager.autocomplete (cyclomatic 18) v3/@claude-flow/cli/src/prompt.ts:490— PromptManager.autocomplete has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 547, displayChoices, filterChoices, …). 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.
intelligence.compactPatterns (cyclomatic 18) v3/@claude-flow/cli/src/memory/intelligence.ts:1643— intelligence.compactPatterns 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.
memory-bridge.dropCacheIfDbChangedElsewhere (cyclomatic 18) v3/@claude-flow/cli/src/memory/memory-bridge.ts:666— memory-bridge.dropCacheIfDbChangedElsewhere 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.
memory-bridge.bridgeDeleteCausalEdge (cyclomatic 18) v3/@claude-flow/cli/src/memory/memory-bridge.ts:3051— memory-bridge.bridgeDeleteCausalEdge 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.
memory-bridge.bridgeBatchOperation (cyclomatic 18) v3/@claude-flow/cli/src/memory/memory-bridge.ts:3669— memory-bridge.bridgeBatchOperation has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
memory-bridge.bridgeContextSynthesize (cyclomatic 18) v3/@claude-flow/cli/src/memory/memory-bridge.ts:3772— memory-bridge.bridgeContextSynthesize 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.
memory-initializer.verifyMemoryInit (cyclomatic 18) v3/@claude-flow/cli/src/memory/memory-initializer.ts:2761— memory-initializer.verifyMemoryInit 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.
flywheel-receipt.verifyFlywheelReceipt (cyclomatic 18) v3/@claude-flow/cli/src/services/flywheel-receipt.ts:595— flywheel-receipt.verifyFlywheelReceipt 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.
hooks-tools.getIntelligenceStatsFromMemory (cyclomatic 18) v3/@claude-flow/cli/src/mcp-tools/hooks-tools.ts:719— hooks-tools.getIntelligenceStatsFromMemory has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 4 of the 18 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 765, 740, 759, …). 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.
hooks-tools.assessCommandRisk (cyclomatic 18) v3/@claude-flow/cli/src/mcp-tools/hooks-tools.ts:972— hooks-tools.assessCommandRisk 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.
session-tools.captureMemorySnapshot (cyclomatic 18) v3/@claude-flow/cli/src/mcp-tools/session-tools.ts:189— session-tools.captureMemorySnapshot 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.
cuda-fatbin.lz4Block (cyclomatic 18) v3/@claude-flow/cli/src/rure/cuda-fatbin.ts:136— cuda-fatbin.lz4Block 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.
catalog.classify (cyclomatic 18) v3/@claude-flow/cli/src/mods/command-registry/catalog.ts:92— catalog.classify has cyclomatic complexity 18 (threshold 15). Of this number, 14 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
fold.checkObservation (cyclomatic 18) v3/@claude-flow/cli/src/missions/fold.ts:38— fold.checkObservation 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.
daemon.stopAllDaemons (cyclomatic 18) v3/@claude-flow/cli/src/commands/daemon.ts:721— daemon.stopAllDaemons 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.
plugin-resolve.resolveFindings (cyclomatic 18) v3/@claude-flow/cli/src/mods/plugin-resolve.ts:164— plugin-resolve.resolveFindings 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.
probe.partialInstallFindings (cyclomatic 18) v3/@claude-flow/cli/src/mods/probe.ts:97— probe.partialInstallFindings has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
executor.executeInit (cyclomatic 18) v3/@claude-flow/cli/src/init/executor.ts:176— executor.executeInit 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.
weight-eft.runRemoteTrain (cyclomatic 18) v3/@claude-flow/cli/src/services/weight-eft.ts:431— weight-eft.runRemoteTrain has cyclomatic complexity 18 (threshold 15). Of this number, 14 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.
PluginManager.installFromNpm (cyclomatic 18) v3/@claude-flow/cli/src/plugins/manager.ts:221— PluginManager.installFromNpm 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.
bge-embedder.getBgeEmbedder (cyclomatic 18) v3/@claude-flow/cli/src/memory/bge-embedder.ts:37— bge-embedder.getBgeEmbedder has cyclomatic complexity 18 (threshold 15). 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, 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.
ActivityParser.event (cyclomatic 18) v3/@claude-flow/codex/src/activity/parser.ts:90— ActivityParser.event 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.
viewer.wrap (cyclomatic 18) v3/@claude-flow/codex/src/activity/viewer.ts:111— viewer.wrap has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
index.generateAgentsMdFromParsed (cyclomatic 18) v3/@claude-flow/codex/src/migrations/index.ts:585— index.generateAgentsMdFromParsed 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.
cli.createRunCommand (cyclomatic 18) v3/@claude-flow/codex/src/dual-mode/cli.ts:37— cli.createRunCommand 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 literals inside it that branch (lines 54, 90, 138, …). 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.
Validator.validate (cyclomatic 18) REDACTED:21— Validator.validate 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.
analyzer.extractMetrics (cyclomatic 18) REDACTED:847— analyzer.extractMetrics 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.
ConformanceRunner.runReplayTest (cyclomatic 18) v3/@claude-flow/guidance/src/conformance-kit.ts:890— ConformanceRunner.runReplayTest 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.
hooks-daemon.main (cyclomatic 18) v3/@claude-flow/hooks/bin/hooks-daemon.js:30— hooks-daemon.main 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.
StatuslineGenerator.generateSafeStatusline (cyclomatic 18) v3/@claude-flow/hooks/src/statusline/index.ts:292— StatuslineGenerator.generateSafeStatusline 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.
llm-hooks.extractPatternFromResponse (cyclomatic 18) v3/@claude-flow/hooks/src/llm/llm-hooks.ts:464— llm-hooks.extractPatternFromResponse 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.
MultiModelRouter.scoreModels (cyclomatic 18) REDACTED:831— MultiModelRouter.scoreModels has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to one function literal inside it that branches (line 842). 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.
ToolRegistry.execute (cyclomatic 18) v3/@claude-flow/mcp/src/tool-registry.ts:290— ToolRegistry.execute 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.
auto-memory-bridge.parseMarkdownEntries (cyclomatic 18) v3/@claude-flow/memory/src/auto-memory-bridge.ts:950— auto-memory-bridge.parseMarkdownEntries 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.
DecisionTransformer.transformerLayer (cyclomatic 18) v3/@claude-flow/neural/src/algorithms/decision-transformer.ts:348— DecisionTransformer.transformerLayer has cyclomatic complexity 18 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
resource-admission.decideResourceAdmission (cyclomatic 18) v3/@claude-flow/performance/src/resource-admission.ts:58— resource-admission.decideResourceAdmission 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.
OllamaProvider.buildRequest (cyclomatic 18) v3/@claude-flow/providers/src/ollama-provider.ts:304— OllamaProvider.buildRequest has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, 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.
RvfEventLog.replayFile (cyclomatic 18) v3/@claude-flow/shared/src/events/rvf-event-log.ts:357— RvfEventLog.replayFile 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.
APIContractValidator.compareContracts (cyclomatic 18) v3/@claude-flow/testing/src/regression/api-contract.ts:359— APIContractValidator.compareContracts 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.
V2CompatibilityValidator.validateCLI (cyclomatic 18) v3/@claude-flow/testing/src/v2-compat/compatibility-validator.ts:470— V2CompatibilityValidator.validateCLI has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
GtBridge.execGt (cyclomatic 18) v3/plugins/gastown-bridge/src/bridges/gt-bridge.ts:404— GtBridge.execGt has cyclomatic complexity 18 (threshold 15). Of this number, 9 points are the body's own statements and 9 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.
wasm-loader.parseTomlFallback (cyclomatic 18) v3/plugins/gastown-bridge/src/wasm-loader.ts:431— wasm-loader.parseTomlFallback 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.
WasmLoaderAdapter.parseFormula (cyclomatic 18) v3/plugins/gastown-bridge/src/index.ts:482— WasmLoaderAdapter.parseFormula 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.
TopologyOptimizer.dijkstraFallback (cyclomatic 18) v3/plugins/teammate-plugin/src/topology-optimizer.ts:539— TopologyOptimizer.dijkstraFallback 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.
ruvector_gnn_wasm::dag::find_cycle_nodes_internal (cyclomatic 18) v3/plugins/gastown-bridge/wasm/ruvector-gnn-wasm/src/dag.rs:159— ruvector_gnn_wasm::dag::find_cycle_nodes_internal has cyclomatic complexity 18 (threshold 15). Of this number, 12 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
createGithubQuery.repo (cyclomatic 18) plugins/ruflo-x-gateway/src/github-query.mjs:285— createGithubQuery.repo 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.
guard.extras (cyclomatic 17) plugins/ruflo-agentdb/hooks/guard.ts:16— guard.extras has cyclomatic complexity 17 (threshold 15). Of this number, 15 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.
expand.expandTruncated (cyclomatic 17) plugins/ruflo-agentdb/hooks/expand.ts:12— expand.expandTruncated has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 23). 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.
pod-tick.runTick (cyclomatic 17) plugins/ruflo-business-pods/scripts/pod-tick.mjs:318— pod-tick.runTick 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.
files.readBounded (cyclomatic 17) plugins/ruflo-console/hooks/data/files.ts:67— files.readBounded 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.
recall.readRecall (cyclomatic 17) plugins/ruflo-console/hooks/data/recall.ts:354— recall.readRecall has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
managed.managedRuns (cyclomatic 17) plugins/ruflo-console/hooks/data/managed.ts:114— managed.managedRuns 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 116, 119, 120). 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.parseConfig (cyclomatic 17) plugins/ruflo-console/hooks/settings.ts:136— settings.parseConfig has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
secure.verdictLines (cyclomatic 17) plugins/ruflo-console/hooks/secure.ts:174— secure.verdictLines 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.
activity-store.decodeEvent (cyclomatic 17) plugins/ruflo-console/hooks/data/activity-store.ts:67— activity-store.decodeEvent 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.
activity-io.flush (cyclomatic 17) plugins/ruflo-console/hooks/activity-io.ts:112— activity-io.flush 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.
adr.loadAdrs (cyclomatic 17) plugins/ruflo-console/hooks/adr.ts:112— adr.loadAdrs has cyclomatic complexity 17 (threshold 15). Of this number, 13 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.
agent.agentView (cyclomatic 17) plugins/ruflo-console/hooks/views/agent.ts:10— agent.agentView has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
cost-providers.providerRows (cyclomatic 17) plugins/ruflo-console/hooks/views/cost-providers.ts:24— cost-providers.providerRows has cyclomatic complexity 17 (threshold 15). Of this number, 15 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.
neon.neonPicture (cyclomatic 17) plugins/ruflo-console/hooks/gfx/neon.ts:162— neon.neonPicture 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.
workflows-nav.walk (cyclomatic 17) plugins/ruflo-console/hooks/data/workflows-nav.ts:37— workflows-nav.walk 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.
workflows.agentCell (cyclomatic 17) plugins/ruflo-console/hooks/views/workflows.ts:73— workflows.agentCell 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.
wf-live.refreshWorkflows (cyclomatic 17) plugins/ruflo-console/hooks/wf-live.ts:55— wf-live.refreshWorkflows 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.
wf-trail.deeper (cyclomatic 17) plugins/ruflo-console/hooks/data/wf-trail.ts:57— wf-trail.deeper 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.
wf-detail.ensureLoaded (cyclomatic 17) plugins/ruflo-console/hooks/views/wf-detail.ts:71— wf-detail.ensureLoaded 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.
wf-search.searchPanel (cyclomatic 17) plugins/ruflo-console/hooks/views/wf-search.ts:58— wf-search.searchPanel 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.
wf-convo-live.watchSpec (cyclomatic 17) plugins/ruflo-console/hooks/wf-convo-live.ts:190— wf-convo-live.watchSpec has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 215). 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.
skill-md.inferStack (cyclomatic 17) REDACTED:142— skill-md.inferStack has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
skills-lab.scanProject (cyclomatic 17) plugins/ruflo-console/hooks/skills-lab.ts:152— skills-lab.scanProject 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 item inside it that branches (walk). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
update-flow.applyUpdate (cyclomatic 17) plugins/ruflo-console/hooks/update-flow.ts:94— update-flow.applyUpdate 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.
mh-lab.resultRows (cyclomatic 17) plugins/ruflo-console/hooks/views/mh-lab.ts:41— mh-lab.resultRows 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.
wf-replay.buildTimeline (cyclomatic 17) plugins/ruflo-console/hooks/data/wf-replay.ts:35— wf-replay.buildTimeline has cyclomatic complexity 17 (threshold 15). Of this number, 11 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.
wf-replay.boardAt (cyclomatic 17) plugins/ruflo-console/hooks/data/wf-replay.ts:87— wf-replay.boardAt has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
wf-saved.savedBody (cyclomatic 17) plugins/ruflo-console/hooks/views/wf-saved.ts:16— wf-saved.savedBody has cyclomatic complexity 17 (threshold 15). Of this number, 14 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.
ruflo-hook.acquireSlot (cyclomatic 17) REDACTED:109— ruflo-hook.acquireSlot 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.
ruflo-hook.invokeBackground (cyclomatic 17) REDACTED:292— ruflo-hook.invokeBackground 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.
conversation.main (cyclomatic 17) plugins/ruflo-cost-tracker/scripts/conversation.mjs:25— conversation.main 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 branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
counterfactual.main (cyclomatic 17) plugins/ruflo-cost-tracker/scripts/counterfactual.mjs:77— counterfactual.main 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.
mcp-scan.main (cyclomatic 17) plugins/ruflo-metaharness/scripts/mcp-scan.mjs:44— mcp-scan.main has cyclomatic complexity 17 (threshold 15). 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: 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.
shapes.bashFlags (cyclomatic 17) plugins/ruflo-protector/hooks/shapes.ts:99— shapes.bashFlags 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.
index.getGuidance (cyclomatic 17) REDACTED:379— index.getGuidance has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 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.
benchmark-intelligence.benchHnsw (cyclomatic 17) scripts/benchmark-intelligence.mjs:144— benchmark-intelligence.benchHnsw has cyclomatic complexity 17 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
causal-recovery-store.classifyBreak (cyclomatic 17) v3/@claude-flow/browser/src/infrastructure/causal-recovery-store.ts:199— causal-recovery-store.classifyBreak 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.
GoapPreflightService.preflight (cyclomatic 17) v3/@claude-flow/browser/src/application/goap-preflight.ts:81— GoapPreflightService.preflight has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
events.recordFunnelEvent (cyclomatic 17) v3/@claude-flow/cli/src/funnel/events.ts:112— events.recordFunnelEvent 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.
promo.getFunnelPromo (cyclomatic 17) v3/@claude-flow/cli/src/funnel/promo.ts:98— promo.getFunnelPromo 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.
memory-bridge.bridgeRouteTask (cyclomatic 17) v3/@claude-flow/cli/src/memory/memory-bridge.ts:3357— memory-bridge.bridgeRouteTask 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.
memory-bridge.contextEpisodeFrom (cyclomatic 17) v3/@claude-flow/cli/src/memory/memory-bridge.ts:3732— memory-bridge.contextEpisodeFrom 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.
proven-config.isSuitable (cyclomatic 17) v3/@claude-flow/cli/src/config/proven-config.ts:170— proven-config.isSuitable 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.
harness-flywheel-generations.checkServedChampionDrift (cyclomatic 17) v3/@claude-flow/cli/src/services/harness-flywheel-generations.ts:332— harness-flywheel-generations.checkServedChampionDrift has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
PluginDiscoveryService.discoverRegistry (cyclomatic 17) v3/@claude-flow/cli/src/plugins/store/discovery.ts:192— PluginDiscoveryService.discoverRegistry 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.
cuda-fatbin.readPayload (cyclomatic 17) v3/@claude-flow/cli/src/rure/cuda-fatbin.ts:201— cuda-fatbin.readPayload 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.
transitions.validatePlan (cyclomatic 17) v3/@claude-flow/cli/src/missions/transitions.ts:88— transitions.validatePlan 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.
MCPServerManager.startHttpServer (cyclomatic 17) REDACTED:1050— MCPServerManager.startHttpServer has cyclomatic complexity 17 (threshold 15). 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: 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.
doctor.checkProxyProcess (cyclomatic 17) REDACTED:1933— doctor.checkProxyProcess 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.
helper-commands.pinToUserHelpers (cyclomatic 17) v3/@claude-flow/cli/src/init/helper-commands.ts:130— helper-commands.pinToUserHelpers 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.
executor.writeHelpers (cyclomatic 17) v3/@claude-flow/cli/src/init/executor.ts:1375— executor.writeHelpers 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.
GitHubSync.claimOnGitHub (cyclomatic 17) v3/@claude-flow/cli/src/services/claim-service.ts:920— GitHubSync.claimOnGitHub 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.
GitHubSync.releaseOnGitHub (cyclomatic 17) v3/@claude-flow/cli/src/services/claim-service.ts:1004— GitHubSync.releaseOnGitHub 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.
CLI.showHelp (cyclomatic 17) v3/@claude-flow/cli/src/index.ts:357— CLI.showHelp 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.
lucene-bm25.step1b (cyclomatic 17) v3/@claude-flow/cli/src/memory/lucene-bm25.ts:85— lucene-bm25.step1b 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.
headless.parseArgs (cyclomatic 17) v3/@claude-flow/cli/src/runtime/headless.ts:64— headless.parseArgs has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity· cli.program.command("migrate").description("Migrate from Claude Code (CLAUDE.md) to Codex (AGENTS.md)").option("-f, --from < (cyclomatic 17) · ×1
cli.program.command("migrate").description("Migrate from Claude Code (CLAUDE.md) to Codex (AGENTS.md)").option("-f, --from < (cyclomatic 17) v3/@claude-flow/codex/src/cli.ts:422— cli.program.command("migrate").description("Migrate from Claude Code (CLAUDE.md) to Codex (AGENTS.md)").option("-f, --from < 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.
analyzer.splitOversizedSections (cyclomatic 17) REDACTED:1324— analyzer.splitOversizedSections has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to one function item inside it that branches (flushSection). 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.
DeterministicToolGateway.validateSchema (cyclomatic 17) v3/@claude-flow/guidance/src/gateway.ts:352— DeterministicToolGateway.validateSchema 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.
ManifestValidator.validateRequiredFields (cyclomatic 17) v3/@claude-flow/guidance/src/manifest-validator.ts:606— ManifestValidator.validateRequiredFields 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.
WorkerManager.checkAlerts (cyclomatic 17) v3/@claude-flow/hooks/src/workers/index.ts:549— WorkerManager.checkAlerts 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.
HttpTransport.setupMiddleware (cyclomatic 17) REDACTED:185— HttpTransport.setupMiddleware has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 198, 255, 240). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
MemoryGraph.detectCommunities (cyclomatic 17) v3/@claude-flow/memory/src/memory-graph.ts:250— MemoryGraph.detectCommunities 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.
RvfBackend.query (cyclomatic 17) v3/@claude-flow/memory/src/rvf-backend.ts:346— RvfBackend.query 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.
verify-cross-platform.main (cyclomatic 17) v3/@claude-flow/memory/verify-cross-platform.ts:27— verify-cross-platform.main has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PluginRegistry.readExtensionPoints (cyclomatic 17) v3/@claude-flow/plugins/src/registry/plugin-registry.ts:407— PluginRegistry.readExtensionPoints 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.
EnhancedPluginRegistry.readExtensionPoints (cyclomatic 17) v3/@claude-flow/plugins/src/registry/enhanced-plugin-registry.ts:643— EnhancedPluginRegistry.readExtensionPoints 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.
GoogleProvider.doStreamComplete (cyclomatic 17) v3/@claude-flow/providers/src/google-provider.ts:165— GoogleProvider.doStreamComplete 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.
OpenAIProvider.doStreamComplete (cyclomatic 17) v3/@claude-flow/providers/src/openai-provider.ts:222— OpenAIProvider.doStreamComplete 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.
FederationTransport.constructor (cyclomatic 17) v3/@claude-flow/swarm/src/consensus/federation-transport.ts:88— FederationTransport.constructor 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 98). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
GoalInput.GoalInput (cyclomatic 17) v3/goal_ui/src/components/GoalInput.tsx:16— GoalInput.GoalInput has cyclomatic complexity 17 (threshold 15). 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 items inside it that branch (generateGoals, a function literal at line 136, handleSubmit). 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.
mcp-tools.attentionControlHandler (cyclomatic 17) REDACTED:374— mcp-tools.attentionControlHandler 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.
FormulaExecutor.runStep (cyclomatic 17) v3/plugins/gastown-bridge/src/formula/executor.ts:1184— FormulaExecutor.runStep 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.
AttentionBridge.createMockModule (cyclomatic 17) v3/plugins/neural-coordination/src/bridges/attention-bridge.ts:246— AttentionBridge.createMockModule has cyclomatic complexity 17 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
mcp-tools.determineBottleneckType (cyclomatic 17) v3/plugins/perf-optimizer/src/mcp-tools.ts:582— mcp-tools.determineBottleneckType 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.
prepare-publish.updatePackageJson (cyclomatic 17) v3/scripts/prepare-publish.js:59— prepare-publish.updatePackageJson 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.
WorkflowEngine.runWorkflow (cyclomatic 17) v3/src/task-execution/application/WorkflowEngine.ts:367— WorkflowEngine.runWorkflow 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.
createGithubQuery.search (cyclomatic 17) plugins/ruflo-x-gateway/src/github-query.mjs:258— createGithubQuery.search has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to 6 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
guard.verdict (cyclomatic 16) plugins/ruflo-browser/hooks/guard.ts:36— guard.verdict 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.
anatole.parseAlertLine (cyclomatic 16) plugins/ruflo-console/hooks/data/anatole.ts:119— anatole.parseAlertLine has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
workflows.buildRun (cyclomatic 16) plugins/ruflo-console/hooks/data/workflows.ts:312— workflows.buildRun 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.
wf-targets.parseConfig (cyclomatic 16) plugins/ruflo-console/hooks/data/wf-targets.ts:90— wf-targets.parseConfig 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.
devtools.brainLines (cyclomatic 16) plugins/ruflo-console/hooks/data/devtools.ts:118— devtools.brainLines 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.
room.roomFeed (cyclomatic 16) plugins/ruflo-console/hooks/data/room.ts:60— room.roomFeed has cyclomatic complexity 16 (threshold 15). Of this number, 13 points are the body's own statements and 3 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
menu-style.badgesOf (cyclomatic 16) plugins/ruflo-console/hooks/menu-style.ts:24— menu-style.badgesOf 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.
evolve.loopStagesOf (cyclomatic 16) plugins/ruflo-console/hooks/gfx/evolve.ts:20— evolve.loopStagesOf has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
plugin-catalog.catalogView (cyclomatic 16) plugins/ruflo-console/hooks/views/plugin-catalog.ts:108— plugin-catalog.catalogView 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.
anatole.statusRows (cyclomatic 16) plugins/ruflo-console/hooks/views/anatole.ts:53— anatole.statusRows has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
event-sources.runEvents (cyclomatic 16) plugins/ruflo-console/hooks/data/event-sources.ts:33— event-sources.runEvents has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
events-parts.detailRows (cyclomatic 16) plugins/ruflo-console/hooks/views/events-parts.ts:66— events-parts.detailRows 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.
sessions-attention.attentionOf (cyclomatic 16) plugins/ruflo-console/hooks/data/sessions-attention.ts:53— sessions-attention.attentionOf has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
harness-codex.codexAdapter.scan (cyclomatic 16) plugins/ruflo-console/hooks/data/harness-codex.ts:153— harness-codex.codexAdapter.scan 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.
ActivityIncr.fold (cyclomatic 16) plugins/ruflo-console/hooks/data/wf-incr-activity.ts:49— ActivityIncr.fold 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.
workflows.inspect (cyclomatic 16) plugins/ruflo-console/hooks/views/workflows.ts:91— workflows.inspect has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
wf-links.linkAgents (cyclomatic 16) plugins/ruflo-console/hooks/data/wf-links.ts:90— wf-links.linkAgents 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.
wf-convo.threadRows (cyclomatic 16) plugins/ruflo-console/hooks/views/wf-convo.ts:60— wf-convo.threadRows 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.
mission-claude.claudeActions.verify (cyclomatic 16) plugins/ruflo-console/hooks/mission-claude.ts:135— mission-claude.claudeActions.verify has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 153). 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.
skills-more.previewRows (cyclomatic 16) plugins/ruflo-console/hooks/views/skills-more.ts:40— skills-more.previewRows 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.
vector.entryRow (cyclomatic 16) plugins/ruflo-console/hooks/views/vector.ts:56— vector.entryRow 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.
vector.resultRows (cyclomatic 16) plugins/ruflo-console/hooks/views/vector.ts:98— vector.resultRows 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.
bench-startup.graph (cyclomatic 16) plugins/ruflo-console/scripts/bench-startup.mjs:31— bench-startup.graph has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 2 function items inside it that branch (walk, walk::count). 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.
ansi.rasterLines (cyclomatic 16) plugins/ruflo-console/tui/ansi.ts:230— ansi.rasterLines 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.
health.main (cyclomatic 16) plugins/ruflo-cost-tracker/scripts/health.mjs:89— health.main has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
session.summarizeMessages (cyclomatic 16) plugins/ruflo-cost-tracker/scripts/session.mjs:92— session.summarizeMessages 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.
track.main (cyclomatic 16) plugins/ruflo-cost-tracker/scripts/track.mjs:121— track.main has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ObservabilitySpanAdapter.exportAsSparseMatrix (cyclomatic 16) plugins/ruflo-graph-intelligence/src/adapters/observability-span-adapter.ts:56— ObservabilitySpanAdapter.exportAsSparseMatrix 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.
solver-bridge.singleEntryPageRank (cyclomatic 16) plugins/ruflo-graph-intelligence/src/infrastructure/solver-bridge.ts:68— solver-bridge.singleEntryPageRank 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.
genome.main (cyclomatic 16) plugins/ruflo-metaharness/scripts/genome.mjs:38— genome.main has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
learn.main (cyclomatic 16) plugins/ruflo-metaharness/scripts/learn.mjs:80— learn.main has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
similarity.main (cyclomatic 16) plugins/ruflo-metaharness/scripts/similarity.mjs:107— similarity.main has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FleetMcpClient.callTool (cyclomatic 16) plugins/ruflo-ruos/scripts/lib/fleet-mcp.mjs:96— FleetMcpClient.callTool 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.
topology.topologyLines (cyclomatic 16) plugins/ruflo-swarm/hooks/model/topology.ts:12— topology.topologyLines has cyclomatic complexity 16 (threshold 15). Of this number, 13 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
gaia-audit.checkGraderIsolation (cyclomatic 16) plugins/ruflo-workflows/scripts/gaia-audit.mjs:419— gaia-audit.checkGraderIsolation 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.
nostr-federation.connectAuthed (cyclomatic 16) plugins/ruflo-x-gateway/src/nostr-federation.mjs:33— nostr-federation.connectAuthed 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 3 function literals inside it that branch (lines 39, 37, 38). 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-supply-chain.main (cyclomatic 16) scripts/audit-supply-chain.mjs:326— audit-supply-chain.main has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
probe-host-live.main (cyclomatic 16) scripts/probe-host-live.mjs:423— probe-host-live.main has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
neural-router.tryCostOptimalRouteBatch (cyclomatic 16) v3/@claude-flow/cli/src/ruvector/neural-router.ts:808— neural-router.tryCostOptimalRouteBatch 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.
ModelRouter.selectModel (cyclomatic 16) v3/@claude-flow/cli/src/ruvector/model-router.ts:1015— ModelRouter.selectModel has cyclomatic complexity 16 (threshold 15). Of this number, 14 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.
engine.functionName (cyclomatic 16) v3/@claude-flow/cli/src/ruvector/codemods/engine.ts:242— engine.functionName 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.
memory-backup.backupMemoryDb (cyclomatic 16) v3/@claude-flow/cli/src/services/memory-backup.ts:173— memory-backup.backupMemoryDb has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
EWCConsolidator.updateFisherFromConfidences (cyclomatic 16) v3/@claude-flow/cli/src/memory/ewc-consolidation.ts:540— EWCConsolidator.updateFisherFromConfidences 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.
intelligence.readStatsForWrite (cyclomatic 16) v3/@claude-flow/cli/src/memory/intelligence.ts:862— intelligence.readStatsForWrite has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
memory-initializer.initializeMemoryDatabase (cyclomatic 16) v3/@claude-flow/cli/src/memory/memory-initializer.ts:1899— memory-initializer.initializeMemoryDatabase 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.
memory-initializer.deleteEntry (cyclomatic 16) v3/@claude-flow/cli/src/memory/memory-initializer.ts:3900— memory-initializer.deleteEntry 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.
evolve-proof.assembleBundle (cyclomatic 16) v3/@claude-flow/cli/src/services/evolve-proof.ts:206— evolve-proof.assembleBundle 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.
harness-project-anchor.parseTasks (cyclomatic 16) v3/@claude-flow/cli/src/services/harness-project-anchor.ts:85— harness-project-anchor.parseTasks 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.
policy-anchor-log.anchorEntries (cyclomatic 16) v3/@claude-flow/cli/src/services/policy-anchor-log.ts:97— policy-anchor-log.anchorEntries 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.
policy-runtime.lockOwnerIsDead (cyclomatic 16) v3/@claude-flow/cli/src/services/policy-runtime.ts:146— policy-runtime.lockOwnerIsDead 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.
WorkerDaemon.processDispatchQueue (cyclomatic 16) REDACTED:1061— WorkerDaemon.processDispatchQueue has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
DiffClassifier.parseHunks (cyclomatic 16) v3/@claude-flow/cli/src/ruvector/diff-classifier.ts:196— DiffClassifier.parseHunks has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body's own statements and 7 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
walk-files.walkAnalyzableFiles::visit (cyclomatic 16) v3/@claude-flow/cli/src/rure/walk-files.ts:39— walk-files.walkAnalyzableFiles::visit has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
binary-parse.parseBinary (cyclomatic 16) v3/@claude-flow/cli/src/rure/binary-parse.ts:319— binary-parse.parseBinary 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.
cuda-parse.readEntry (cyclomatic 16) v3/@claude-flow/cli/src/rure/cuda-parse.ts:97— cuda-parse.readEntry 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.
cuda-occupancy.occupancy (cyclomatic 16) v3/@claude-flow/cli/src/rure/cuda-occupancy.ts:94— cuda-occupancy.occupancy 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.
browser-tools.browserCommandFailure (cyclomatic 16) v3/@claude-flow/cli/src/mcp-tools/browser-tools.ts:21— browser-tools.browserCommandFailure 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.
service-url.configuredServiceUrl (cyclomatic 16) v3/@claude-flow/cli/src/mcp-tools/service-url.ts:8— service-url.configuredServiceUrl has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to one function item inside it that branches (normalize). 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.
daemon.killStaleDaemonsWindows (cyclomatic 16) v3/@claude-flow/cli/src/commands/daemon.ts:894— daemon.killStaleDaemonsWindows 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.
doctor.checkStaleSettingsNpx (cyclomatic 16) REDACTED:197— doctor.checkStaleSettingsNpx 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.
doctor.checkMemoryEmbeddingCoverage (cyclomatic 16) REDACTED:1058— doctor.checkMemoryEmbeddingCoverage 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.
executor.writeClaudeMd (cyclomatic 16) v3/@claude-flow/cli/src/init/executor.ts:2220— executor.writeClaudeMd 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.
mcp-composition-inspector.scanToolDescriptions (cyclomatic 16) v3/@claude-flow/cli/src/security/mcp-composition-inspector.ts:132— mcp-composition-inspector.scanToolDescriptions 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.
distill-oracle.labelResolved (cyclomatic 16) v3/@claude-flow/cli/src/services/distill-oracle.ts:193— distill-oracle.labelResolved 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.
ActivityViewer.key (cyclomatic 16) v3/@claude-flow/codex/src/activity/viewer.ts:34— ActivityViewer.key 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.
embedding-service.createEmbeddingServiceAsync (cyclomatic 16) v3/@claude-flow/embeddings/src/embedding-service.ts:939— embedding-service.createEmbeddingServiceAsync has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
analyzer.optimizeForSize (cyclomatic 16) REDACTED:361— analyzer.optimizeForSize has cyclomatic complexity 16 (threshold 15). Of this number, 13 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ContinueGate.evaluate (cyclomatic 16) v3/@claude-flow/guidance/src/continue-gate.ts:186— ContinueGate.evaluate 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.
ShardRetriever.indexShards (cyclomatic 16) REDACTED:221— ShardRetriever.indexShards 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.
MemoryGraph.computePageRank (cyclomatic 16) v3/@claude-flow/memory/src/memory-graph.ts:195— MemoryGraph.computePageRank has cyclomatic complexity 16 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
AutoMemoryBridge.curateIndex (cyclomatic 16) v3/@claude-flow/memory/src/auto-memory-bridge.ts:523— AutoMemoryBridge.curateIndex 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.
AgentDBHnswAdapter.search (cyclomatic 16) v3/@claude-flow/memory/src/agentdb-hnsw-adapter.ts:121— AgentDBHnswAdapter.search has cyclomatic complexity 16 (threshold 15). Of this number, 8 points are the body's own statements and 8 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.
HybridBackend.querySemanticScored (cyclomatic 16) v3/@claude-flow/memory/src/hybrid-backend.ts:382— HybridBackend.querySemanticScored 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.
PatternRecognizer.determinePatternType (cyclomatic 16) v3/@claude-flow/plugins/src/integrations/ruvector/self-learning.ts:1915— PatternRecognizer.determinePatternType 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.
ConfigLoader.load (cyclomatic 16) v3/@claude-flow/shared/src/core/config/loader.ts:163— ConfigLoader.load has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BashSafetyHook.analyzeCommand (cyclomatic 16) v3/@claude-flow/shared/src/hooks/safety/bash-safety.ts:380— BashSafetyHook.analyzeCommand 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.
swarm-tools.handleSwarmStatus (cyclomatic 16) v3/mcp/tools/swarm-tools.ts:198— swarm-tools.handleSwarmStatus has cyclomatic complexity 16 (threshold 15). 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
system-tools.handleSystemMetrics (cyclomatic 16) v3/mcp/tools/system-tools.ts:362— system-tools.handleSystemMetrics 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.
mcp-tools.getFilesInPath::walk (cyclomatic 16) v3/plugins/code-intelligence/src/mcp-tools.ts:668— mcp-tools.getFilesInPath::walk 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.
BdBridge.execBd (cyclomatic 16) v3/plugins/gastown-bridge/src/bridges/bd-bridge.ts:425— BdBridge.execBd has cyclomatic complexity 16 (threshold 15). Of this number, 8 points are the body's own statements and 8 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.
BdBridge.listBeads (cyclomatic 16) v3/plugins/gastown-bridge/src/bridges/bd-bridge.ts:704— BdBridge.listBeads 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.
GnnBridge.transitiveReduction (cyclomatic 16) v3/plugins/hyperbolic-reasoning/src/bridges/gnn-bridge.ts:462— GnnBridge.transitiveReduction has cyclomatic complexity 16 (threshold 15). Of this number, 8 points are the body's own statements and 8 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.
mcp-tools.semanticSearchHandler (cyclomatic 16) v3/plugins/hyperbolic-reasoning/src/mcp-tools.ts:434— mcp-tools.semanticSearchHandler has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to 4 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
QuantumEngine.computePersistenceDiagramJS (cyclomatic 16) v3/plugins/prime-radiant/src/engines/QuantumEngine.ts:258— QuantumEngine.computePersistenceDiagramJS has cyclomatic complexity 16 (threshold 15). Of this number, 14 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.
DagBridge.optimizeSchedule (cyclomatic 16) v3/plugins/quantum-optimizer/src/bridges/dag-bridge.ts:437— DagBridge.optimizeSchedule has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
mcp-tools.annealingSolveHandler (cyclomatic 16) v3/plugins/quantum-optimizer/src/mcp-tools.ts:72— mcp-tools.annealingSolveHandler 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.
publishToChannel (cyclomatic 16) plugins/ruflo-chatgpt-federation/src/publisher.mjs:68— publishToChannel has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body's own statements and 7 belong to 3 function literals inside it that branch. To reduce it, 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.
memory-distillation.runDistillation (cognitive 157) v3/@claude-flow/cli/src/services/memory-distillation.ts:140— memory-distillation.runDistillation has cognitive complexity 157 (threshold 15). Drivers by points: if/else 26 (79 pts), ternaries 11 (38 pts), loops 9 (24 pts), boolean chains 9, error handling 4 (7 pts) (nesting depth added 98). Of this number, 101 points are the body's own statements and 56 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.
createGateway (cognitive 146) REDACTED:71— createGateway has cognitive complexity 146 (threshold 15). Drivers by points: if/else 37 (48 pts), ternaries 30 (42 pts), boolean chains 38, error handling 6 (12 pts), other 4, loops 2 (nesting depth added 29). Most of this is not in the body itself: 13 of the 146 points are its own statements and the rest belongs to 62 function items inside it that branch (a function literal at line 426, a function literal at line 336, oauthContext, …). 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.
swarm.getSwarmStatus (cognitive 132) v3/@claude-flow/cli/src/commands/swarm.ts:65— swarm.getSwarmStatus has cognitive complexity 132 (threshold 15). Drivers by points: if/else 38 (71 pts), error handling 12 (29 pts), boolean chains 17, loops 6 (11 pts), ternaries 4 (nesting depth added 55). Of this number, 74 points are the body's own statements and 58 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.
diff.main (cognitive 128) plugins/ruflo-cost-tracker/scripts/diff.mjs:121— diff.main has cognitive complexity 128 (threshold 15). Drivers by points: ternaries 20 (60 pts), if/else 21 (38 pts), boolean chains 18, loops 4 (12 pts) (nesting depth added 65). Of this number, 120 points are the body's own statements and 8 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.
ControllerRegistry.createController (cognitive 115) v3/@claude-flow/memory/src/controller-registry.ts:751— ControllerRegistry.createController has cognitive complexity 115 (threshold 15). Drivers by points: if/else 28 (56 pts), error handling 14 (31 pts), ternaries 7 (15 pts), boolean chains 12, match/switch 1 (nesting depth added 53). Of this number, 100 points are the body's own statements and 15 belong to 4 function literals inside it that branch. The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
orbital.orbitalHeader (cognitive 112) plugins/ruflo-console/hooks/gfx/orbital.ts:143— orbital.orbitalHeader has cognitive complexity 112 (threshold 15). Drivers by points: ternaries 28 (75 pts), loops 10 (20 pts), if/else 7 (10 pts), boolean chains 7 (nesting depth added 60). Of this number, 65 points are the body's own statements and 47 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.
pane.paneView (cognitive 104) plugins/ruflo-console/hooks/views/pane.ts:324— pane.paneView has cognitive complexity 104 (threshold 15). Drivers by points: ternaries 37 (75 pts), boolean chains 24, if/else 5 (nesting depth added 38). Of this number, 101 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
frames.picturesOf (cognitive 102) plugins/ruflo-console/hooks/views/frames.ts:181— frames.picturesOf has cognitive complexity 102 (threshold 15). Drivers by points: ternaries 32 (72 pts), if/else 13 (22 pts), boolean chains 5, loops 1 (2 pts), match/switch 1 (nesting depth added 50). Of this number, 94 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
register.register (cognitive 101) plugins/ruflo-swarm/hooks/register.ts:72— register.register has cognitive complexity 101 (threshold 15). Drivers by points: if/else 33 (42 pts), boolean chains 31, ternaries 14 (22 pts), loops 3, error handling 2, match/switch 1 (nesting depth added 17). Most of this is not in the body itself: 3 of the 101 points are its own statements and the rest belongs to 19 function items inside it that branch (a function literal at line 440, refresh, answer, …). 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.
CLI.run (cognitive 99) v3/@claude-flow/cli/src/index.ts:93— CLI.run has cognitive complexity 99 (threshold 15). Drivers by points: if/else 37 (57 pts), boolean chains 23, error handling 5 (10 pts), ternaries 2 (6 pts), loops 2 (3 pts) (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
init.initClaudeAction (cognitive 98) v3/@claude-flow/cli/src/commands/init.ts:676— init.initClaudeAction has cognitive complexity 98 (threshold 15). Drivers by points: if/else 33 (44 pts), ternaries 11 (23 pts), error handling 6 (14 pts), boolean chains 13, loops 2 (4 pts) (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
memory-initializer.searchEntries (cognitive 96) v3/@claude-flow/cli/src/memory/memory-initializer.ts:3197— memory-initializer.searchEntries has cognitive complexity 96 (threshold 15). Drivers by points: if/else 23 (50 pts), boolean chains 19, error handling 5 (14 pts), loops 4 (8 pts), ternaries 4 (5 pts) (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
menu.menuView (cognitive 95) plugins/ruflo-console/hooks/views/menu.ts:73— menu.menuView has cognitive complexity 95 (threshold 15). Drivers by points: ternaries 34 (72 pts), if/else 7 (12 pts), boolean chains 10, loops 1 (nesting depth added 43). Of this number, 21 points are the body's own statements and 74 belong to 8 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.
wf-search.search (cognitive 94) plugins/ruflo-console/hooks/data/wf-search.ts:63— wf-search.search has cognitive complexity 94 (threshold 15). Drivers by points: if/else 19 (69 pts), loops 5 (11 pts), ternaries 3 (9 pts), boolean chains 5 (nesting depth added 62). Of this number, 92 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dangerous-command.hasRootDelete (cognitive 91) plugins/ruflo-mods/hooks/guard/dangerous-command.ts:12— dangerous-command.hasRootDelete has cognitive complexity 91 (threshold 15). Drivers by points: if/else 60 (121 pts), boolean chains 49, loops 8 (11 pts), ternaries 5 (10 pts) (nesting depth added 69). 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 (dangerous-command.hasRootDelete::firstGroup) 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.
schema-validator.validateSchema (cognitive 90) REDACTED:25— schema-validator.validateSchema has cognitive complexity 90 (threshold 15). Drivers by points: if/else 23 (47 pts), boolean chains 16, ternaries 3 (15 pts), loops 4 (12 pts) (nesting depth added 44). 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.
harness-claude.summarizeClaude (cognitive 84) plugins/ruflo-console/hooks/data/harness-claude.ts:52— harness-claude.summarizeClaude has cognitive complexity 84 (threshold 15). Drivers by points: if/else 27 (54 pts), boolean chains 20, ternaries 2 (8 pts), loops 1 (2 pts) (nesting depth added 34). Most of this is not in the body itself: 4 of the 84 points are its own statements and the rest belongs to one function literal inside it that branches (line 60). 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.
autopilot-state.discoverTasks (cognitive 84) v3/@claude-flow/cli/src/autopilot-state.ts:245— autopilot-state.discoverTasks has cognitive complexity 84 (threshold 15). Drivers by points: if/else 9 (30 pts), loops 5 (18 pts), error handling 4 (15 pts), boolean chains 13, ternaries 2 (8 pts) (nesting depth added 51). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
agent-execute-core.executeAgentTask (cognitive 83) v3/@claude-flow/cli/src/mcp-tools/agent-execute-core.ts:615— agent-execute-core.executeAgentTask has cognitive complexity 83 (threshold 15). Drivers by points: if/else 22 (32 pts), ternaries 13 (21 pts), boolean chains 17, error handling 4 (8 pts), loops 2 (5 pts) (nesting depth added 25). Of this number, 72 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.
CommandParser.parse (cognitive 82) v3/@claude-flow/cli/src/parser.ts:152— CommandParser.parse has cognitive complexity 82 (threshold 15). Drivers by points: if/else 19 (64 pts), boolean chains 13, loops 3 (5 pts) (nesting depth added 47). Of this number, 78 points are the body's own statements and 4 belong to 4 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
xruv.xruvLines (cognitive 80) plugins/ruflo-console/hooks/xruv.ts:152— xruv.xruvLines has cognitive complexity 80 (threshold 15). Drivers by points: ternaries 18 (50 pts), if/else 14 (24 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 44). Of this number, 68 points are the body's own statements and 12 belong to 3 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.
check-metaharness-pins.main (cognitive 80) scripts/check-metaharness-pins.mjs:139— check-metaharness-pins.main has cognitive complexity 80 (threshold 15). Drivers by points: if/else 17 (31 pts), ternaries 9 (24 pts), loops 6 (11 pts), error handling 5 (10 pts), boolean chains 4 (nesting depth added 39). Of this number, 79 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.
evm-parse.analyzeEvm (cognitive 79) v3/@claude-flow/cli/src/rure/evm-parse.ts:149— evm-parse.analyzeEvm has cognitive complexity 79 (threshold 15). Drivers by points: if/else 21 (53 pts), boolean chains 16, loops 4 (10 pts) (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.
mcp-tools.neuralConsensusHandler (cognitive 77) v3/plugins/neural-coordination/src/mcp-tools.ts:59— mcp-tools.neuralConsensusHandler has cognitive complexity 77 (threshold 15). Drivers by points: if/else 12 (44 pts), loops 8 (20 pts), boolean chains 6, ternaries 4 (6 pts), error handling 1 (nesting depth added 46). 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.
palette.paletteEntries (cognitive 76) plugins/ruflo-console/hooks/palette.ts:86— palette.paletteEntries has cognitive complexity 76 (threshold 15). Drivers by points: ternaries 13 (30 pts), loops 17 (21 pts), if/else 13 (20 pts), boolean chains 5 (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.
room.roomView (cognitive 74) plugins/ruflo-console/hooks/views/room.ts:50— room.roomView has cognitive complexity 74 (threshold 15). Drivers by points: ternaries 28 (57 pts), if/else 11 (12 pts), boolean chains 3, loops 2 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_ledger.codexRows (cognitive 74) plugins/ruflo-cost-tracker/scripts/_ledger.mjs:95— _ledger.codexRows has cognitive complexity 74 (threshold 15). Drivers by points: if/else 10 (50 pts), loops 5 (15 pts), boolean chains 9 (nesting depth added 50). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
orbital.orbitalMasthead (cognitive 73) plugins/ruflo-console/hooks/gfx/orbital.ts:261— orbital.orbitalMasthead has cognitive complexity 73 (threshold 15). Drivers by points: loops 12 (35 pts), if/else 9 (19 pts), ternaries 6 (17 pts), boolean chains 2 (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ap-live.apTick (cognitive 73) plugins/ruflo-console/hooks/ap-live.ts:321— ap-live.apTick has cognitive complexity 73 (threshold 15). Drivers by points: if/else 20 (30 pts), ternaries 10 (20 pts), boolean chains 17, loops 3 (5 pts), error handling 1 (nesting depth added 22). Of this number, 70 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.
server.createGateway.server (cognitive 73) REDACTED:426— server.createGateway.server has cognitive complexity 73 (threshold 15). Drivers by points: if/else 20 (30 pts), boolean chains 18, ternaries 6 (15 pts), error handling 5 (10 pts) (nesting depth added 24). Of this number, 68 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.
wf-send.sendTo (cognitive 72) plugins/ruflo-console/hooks/data/wf-send.ts:142— wf-send.sendTo has cognitive complexity 72 (threshold 15). Drivers by points: ternaries 16 (40 pts), if/else 11 (23 pts), boolean chains 8, match/switch 1 (nesting depth added 36). Of this number, 66 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
bindings.actionsOf (cognitive 72) plugins/ruflo-console/hooks/bindings.ts:63— bindings.actionsOf has cognitive complexity 72 (threshold 15). Drivers by points: if/else 35 (37 pts), ternaries 13 (18 pts), boolean chains 16, loops 1 (nesting depth added 7). None of this is in the body itself: all 72 points belong to 25 function items inside it that branch (a function literal at line 290, select, a function literal at line 265, …). 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.
createAiTeamService (cognitive 72) REDACTED:48— createAiTeamService has cognitive complexity 72 (threshold 15). Drivers by points: boolean chains 29, if/else 21, ternaries 17 (19 pts), other 2, error handling 1 (nesting depth added 2). Most of this is not in the body itself: 7 of the 72 points are its own statements and the rest belongs to 30 function items inside it that branch (a function literal at line 125, a function literal at line 79, a function literal at line 65, …). 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.
nav.groupedTabs (cognitive 71) plugins/ruflo-console/hooks/views/nav.ts:22— nav.groupedTabs has cognitive complexity 71 (threshold 15). Drivers by points: ternaries 40 (56 pts), boolean chains 11, if/else 3 (4 pts) (nesting depth added 17). Of this number, 28 points are the body's own statements and 43 belong to 13 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
overview.overviewView (cognitive 71) plugins/ruflo-console/hooks/views/overview.ts:17— overview.overviewView has cognitive complexity 71 (threshold 15). Drivers by points: ternaries 36 (53 pts), boolean chains 10, if/else 7, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
policy-ledger-anchor.archiveHasTailReceipt (cognitive 71) v3/@claude-flow/cli/src/services/policy-ledger-anchor.ts:147— policy-ledger-anchor.archiveHasTailReceipt has cognitive complexity 71 (threshold 15). Drivers by points: if/else 23 (48 pts), boolean chains 12, error handling 5 (9 pts), loops 2 (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.
FormulaExecutor.execute (cognitive 71) v3/plugins/gastown-bridge/src/formula/executor.ts:677— FormulaExecutor.execute has cognitive complexity 71 (threshold 15). Drivers by points: if/else 16 (39 pts), loops 5 (11 pts), ternaries 3 (9 pts), error handling 3 (7 pts), boolean chains 5 (nesting depth added 39). Of this number, 46 points are the body's own statements and 25 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.
events.diffEvents (cognitive 70) plugins/ruflo-console/hooks/data/events.ts:44— events.diffEvents has cognitive complexity 70 (threshold 15). Drivers by points: if/else 24 (36 pts), ternaries 6 (16 pts), loops 12 (13 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.
adr-lint.lint (cognitive 70) REDACTED:28— adr-lint.lint has cognitive complexity 70 (threshold 15). Drivers by points: if/else 18 (42 pts), loops 12 (19 pts), boolean chains 5, ternaries 1 (4 pts) (nesting depth added 34). Of this number, 69 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.
orbital.orbitalBoot (cognitive 70) plugins/ruflo-console/hooks/gfx/orbital.ts:314— orbital.orbitalBoot has cognitive complexity 70 (threshold 15). Drivers by points: ternaries 20 (37 pts), if/else 11 (18 pts), loops 6 (8 pts), boolean chains 7 (nesting depth added 26). Of this number, 44 points are the body's own statements and 26 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.
mission-launch.launchSteps (cognitive 70) plugins/ruflo-console/hooks/views/mission-launch.ts:15— mission-launch.launchSteps has cognitive complexity 70 (threshold 15). Drivers by points: ternaries 34 (63 pts), boolean chains 6, if/else 1 (nesting depth added 29). Of this number, 69 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.
guidance-cli.main (cognitive 70) v3/@claude-flow/hooks/src/cli/guidance-cli.ts:24— guidance-cli.main has cognitive complexity 70 (threshold 15). Drivers by points: boolean chains 27, if/else 12 (21 pts), ternaries 6 (12 pts), error handling 4 (9 pts), match/switch 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AgentStep.AgentStep (cognitive 69) v3/goal_ui/src/components/AgentStep.tsx:43— AgentStep.AgentStep has cognitive complexity 69 (threshold 15). Drivers by points: ternaries 26 (43 pts), boolean chains 24, if/else 2 (nesting depth added 17). Of this number, 66 points are the body's own statements and 3 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.
mcp-tools.topologyOptimizeHandler::generateEdges (cognitive 69) v3/plugins/neural-coordination/src/mcp-tools.ts:310— mcp-tools.topologyOptimizeHandler::generateEdges has cognitive complexity 69 (threshold 15). Drivers by points: if/else 9 (37 pts), loops 10 (28 pts), boolean chains 3, match/switch 1 (nesting depth added 46). 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. This shape REPEATS in the file: one other method here (mcp-tools.topologyOptimizeHandler) 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.
wf-activity.parseActivity (cognitive 68) plugins/ruflo-console/hooks/data/wf-activity.ts:116— wf-activity.parseActivity has cognitive complexity 68 (threshold 15). Drivers by points: if/else 16 (40 pts), ternaries 5 (15 pts), boolean chains 10, loops 2 (3 pts) (nesting depth added 35). Of this number, 67 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.
FlashAttention.cpuOptimizedAttention (cognitive 68) v3/@claude-flow/neural/src/flash-attention.ts:140— FlashAttention.cpuOptimizedAttention has cognitive complexity 68 (threshold 15). Drivers by points: loops 16 (44 pts), if/else 9 (19 pts), boolean chains 4, ternaries 1 (nesting depth added 38). 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.
themes.themesView (cognitive 66) plugins/ruflo-console/hooks/views/themes.ts:6— themes.themesView has cognitive complexity 66 (threshold 15). Drivers by points: ternaries 26 (50 pts), loops 7 (11 pts), if/else 4, boolean chains 1 (nesting depth added 28). Of this number, 63 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.
orbital.orbitalGlobe (cognitive 66) plugins/ruflo-console/hooks/gfx/orbital.ts:81— orbital.orbitalGlobe has cognitive complexity 66 (threshold 15). Drivers by points: ternaries 12 (44 pts), if/else 4 (13 pts), boolean chains 5, loops 3 (4 pts) (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
wf-events.eventsBetween (cognitive 66) plugins/ruflo-console/hooks/data/wf-events.ts:25— wf-events.eventsBetween has cognitive complexity 66 (threshold 15). Drivers by points: ternaries 9 (41 pts), if/else 5 (15 pts), loops 3 (6 pts), boolean chains 4 (nesting depth added 45). To reduce it, split the body into named stages: move each independent 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.register (cognitive 66) plugins/ruflo-console/hooks/register.ts:169— register.register has cognitive complexity 66 (threshold 15). Drivers by points: if/else 24 (27 pts), boolean chains 18, ternaries 12 (14 pts), error handling 5 (7 pts) (nesting depth added 7). Most of this is not in the body itself: 1 of the 66 points is its own statement and the rest belongs to 20 function literals inside it that branch (lines 403, 296, 344, …). 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.
JsonReader.value (cognitive 65) v3/@claude-flow/cli/src/services/policy-anchor-log.ts:42— JsonReader.value has cognitive complexity 65 (threshold 15). Drivers by points: if/else 19 (47 pts), boolean chains 11, ternaries 1 (4 pts), loops 2 (3 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
executor.copyCommands (cognitive 65) v3/@claude-flow/cli/src/init/executor.ts:1192— executor.copyCommands has cognitive complexity 65 (threshold 15). Drivers by points: if/else 27 (52 pts), boolean chains 12, loops 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
publishRegistry (cognitive 65) REDACTED:193— publishRegistry has cognitive complexity 65 (threshold 15). Drivers by points: if/else 17 (31 pts), error handling 6 (13 pts), loops 4 (9 pts), boolean chains 8, ternaries 1 (3 pts), match/switch 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.
createPublisherService (cognitive 65) REDACTED:58— createPublisherService has cognitive complexity 65 (threshold 15). Drivers by points: boolean chains 24, if/else 14 (17 pts), ternaries 8 (14 pts), error handling 5 (8 pts), other 2 (nesting depth added 12). Most of this is not in the body itself: 11 of the 65 points are its own statements and the rest belongs to 15 function items inside it that branch (a function literal at line 157, a function literal at line 138, authContext, …). 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.
policy-ledger-audit.verifyFullPolicyLedger (cognitive 64) v3/@claude-flow/cli/src/services/policy-ledger-audit.ts:115— policy-ledger-audit.verifyFullPolicyLedger has cognitive complexity 64 (threshold 15). Drivers by points: if/else 26 (51 pts), boolean chains 5, error handling 2 (4 pts), loops 2, ternaries 1 (2 pts) (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.
dotnet-parse.readTables (cognitive 64) v3/@claude-flow/cli/src/rure/dotnet-parse.ts:232— dotnet-parse.readTables has cognitive complexity 64 (threshold 15). Drivers by points: ternaries 13 (31 pts), if/else 12 (21 pts), loops 6 (10 pts), boolean chains 2 (nesting depth added 31). Of this number, 39 points are the body's own statements and 25 belong to 4 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.
probe.probeMods (cognitive 64) v3/@claude-flow/cli/src/mods/probe.ts:135— probe.probeMods has cognitive complexity 64 (threshold 15). Drivers by points: ternaries 26 (47 pts), error handling 6 (9 pts), boolean chains 5, if/else 3 (nesting depth added 24). Of this number, 52 points are the body's own statements and 12 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.
security-code-patterns.interpolatedExec (cognitive 64) v3/@claude-flow/cli/src/commands/security-code-patterns.ts:28— security-code-patterns.interpolatedExec has cognitive complexity 64 (threshold 15). Drivers by points: if/else 14 (39 pts), loops 6 (16 pts), ternaries 2 (5 pts), boolean chains 4 (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.
model-tools.answer (cognitive 63) plugins/ruflo-console/hooks/model-tools.ts:350— model-tools.answer has cognitive complexity 63 (threshold 15). Drivers by points: ternaries 18 (32 pts), if/else 19 (25 pts), boolean chains 5, error handling 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
svg.gridToSvg (cognitive 63) plugins/ruflo-console/hooks/gfx/svg.ts:97— svg.gridToSvg has cognitive complexity 63 (threshold 15). Drivers by points: if/else 12 (28 pts), loops 7 (23 pts), boolean chains 7, ternaries 2 (5 pts) (nesting depth added 35). Of this number, 57 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.
wf-alerts.evaluateGuards (cognitive 61) plugins/ruflo-console/hooks/data/wf-alerts.ts:129— wf-alerts.evaluateGuards has cognitive complexity 61 (threshold 15). Drivers by points: ternaries 7 (27 pts), if/else 8 (22 pts), boolean chains 6, loops 3 (6 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
anomaly.main (cognitive 60) plugins/ruflo-cost-tracker/scripts/anomaly.mjs:64— anomaly.main has cognitive complexity 60 (threshold 15). Drivers by points: if/else 22 (31 pts), ternaries 6 (15 pts), boolean chains 9, loops 2 (5 pts) (nesting depth added 21). Of this number, 59 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent 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-tui-svg.parseLine (cognitive 60) scripts/render-tui-svg.mjs:37— render-tui-svg.parseLine has cognitive complexity 60 (threshold 15). Drivers by points: if/else 24 (42 pts), boolean chains 9, loops 4 (6 pts), ternaries 1 (3 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
executor.executeUpgrade (cognitive 60) v3/@claude-flow/cli/src/init/executor.ts:556— executor.executeUpgrade has cognitive complexity 60 (threshold 15). Drivers by points: if/else 23 (34 pts), error handling 5 (12 pts), ternaries 3 (8 pts), loops 4 (6 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
redblue.main (cognitive 59) plugins/ruflo-metaharness/scripts/redblue.mjs:177— redblue.main has cognitive complexity 59 (threshold 15). Drivers by points: if/else 21 (30 pts), error handling 4 (13 pts), boolean chains 11, ternaries 2 (5 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
flywheel-transaction.promoteFlywheelCandidate (cognitive 59) v3/@claude-flow/cli/src/services/flywheel-transaction.ts:424— flywheel-transaction.promoteFlywheelCandidate has cognitive complexity 59 (threshold 15). Drivers by points: if/else 33 (49 pts), boolean chains 8, loops 1, ternaries 1 (nesting depth added 16). Most of this is not in the body itself: 9 of the 59 points are its own statements and the rest belongs to one function literal inside it that branches (line 440). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
REDACTED.render (cognitive 58) REDACTED:48— REDACTED.render has cognitive complexity 58 (threshold 15). Drivers by points: ternaries 18 (41 pts), if/else 7 (11 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 28). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
mission-control.missionActions (cognitive 58) plugins/ruflo-console/hooks/mission-control.ts:193— mission-control.missionActions has cognitive complexity 58 (threshold 15). Drivers by points: if/else 27 (30 pts), ternaries 15 (21 pts), boolean chains 7 (nesting depth added 9). None of this is in the body itself: all 58 points belong to 23 function items inside it that branch (a function literal at line 325, launch, research, …). 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.
command.answer (cognitive 58) plugins/ruflo-protector/hooks/command.ts:18— command.answer has cognitive complexity 58 (threshold 15). Drivers by points: ternaries 14 (31 pts), if/else 16 (21 pts), boolean chains 6 (nesting depth added 22). Of this number, 49 points are the body's own statements and 9 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EnhancedModelRouter.route (cognitive 58) REDACTED:382— EnhancedModelRouter.route has cognitive complexity 58 (threshold 15). Drivers by points: ternaries 10 (26 pts), if/else 11 (19 pts), boolean chains 7, error handling 2 (6 pts) (nesting depth added 28). Of this number, 49 points are the body's own statements and 9 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.
ap-envelope.validateEnvelope (cognitive 57) plugins/ruflo-console/hooks/data/ap-envelope.ts:114— ap-envelope.validateEnvelope has cognitive complexity 57 (threshold 15). Drivers by points: if/else 24 (32 pts), boolean chains 15, loops 7 (8 pts), ternaries 2 (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
boot.bootPicture (cognitive 57) plugins/ruflo-console/hooks/gfx/boot.ts:109— boot.bootPicture has cognitive complexity 57 (threshold 15). Drivers by points: ternaries 13 (41 pts), if/else 6 (9 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 32). Of this number, 55 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ai.openAi (cognitive 57) plugins/ruflo-console/tui/ai.ts:77— ai.openAi has cognitive complexity 57 (threshold 15). Drivers by points: if/else 31 (35 pts), ternaries 8 (12 pts), boolean chains 8, loops 2 (nesting depth added 8). Most of this is not in the body itself: 2 of the 57 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 225, run, cardFor, …). 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.
memory-bridge.bridgeStoreEntry (cognitive 57) v3/@claude-flow/cli/src/memory/memory-bridge.ts:1035— memory-bridge.bridgeStoreEntry has cognitive complexity 57 (threshold 15). Drivers by points: if/else 18 (22 pts), boolean chains 14, ternaries 9 (12 pts), error handling 7 (9 pts) (nesting depth added 9). Of this number, 54 points are the body's own statements and 3 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.
WorkerDaemon.initializeWorkerStates (cognitive 57) REDACTED:826— WorkerDaemon.initializeWorkerStates has cognitive complexity 57 (threshold 15). Drivers by points: if/else 11 (24 pts), boolean chains 14, loops 4 (9 pts), ternaries 2 (8 pts), error handling 1 (2 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cli.program.command("validate").alias("check").description("Validate AGENTS.md, SKILL.md, or config.toml files").option("-f, (cognitive 57) v3/@claude-flow/codex/src/cli.ts:268— cli.program.command("validate").alias("check").description("Validate AGENTS.md, SKILL.md, or config.toml files").option("-f, has cognitive complexity 57 (threshold 15). Drivers by points: if/else 21 (36 pts), loops 4 (8 pts), error handling 3 (6 pts), ternaries 1 (3 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
audit-trend.main (cognitive 56) plugins/ruflo-metaharness/scripts/audit-trend.mjs:115— audit-trend.main has cognitive complexity 56 (threshold 15). Drivers by points: if/else 16 (22 pts), ternaries 10 (17 pts), boolean chains 9, loops 3 (8 pts) (nesting depth added 18). Of this number, 50 points are the body's own statements and 6 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.
CapabilityAlgebra.satisfiesConstraints (cognitive 55) v3/@claude-flow/guidance/src/capabilities.ts:533— CapabilityAlgebra.satisfiesConstraints has cognitive complexity 55 (threshold 15). Drivers by points: if/else 13 (45 pts), boolean chains 7, match/switch 1 (2 pts), loops 1 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
generators.generateClaudeMd (cognitive 55) v3/@claude-flow/guidance/src/generators.ts:142— generators.generateClaudeMd has cognitive complexity 55 (threshold 15). Drivers by points: if/else 21 (25 pts), loops 9 (20 pts), boolean chains 10 (nesting depth added 15). 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.
sessions.sessionRows (cognitive 54) plugins/ruflo-console/hooks/views/sessions.ts:94— sessions.sessionRows has cognitive complexity 54 (threshold 15). Drivers by points: ternaries 16 (38 pts), if/else 9 (10 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 24). Of this number, 52 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.
runner.createRunner.execute (cognitive 54) plugins/ruflo-console/hooks/runner.ts:87— runner.createRunner.execute has cognitive complexity 54 (threshold 15). Drivers by points: ternaries 14 (20 pts), boolean chains 17, if/else 13 (16 pts), error handling 1 (nesting depth added 9). Of this number, 49 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
neural-router.resolveBackend (cognitive 54) v3/@claude-flow/cli/src/ruvector/neural-router.ts:320— neural-router.resolveBackend has cognitive complexity 54 (threshold 15). Drivers by points: if/else 13 (27 pts), error handling 6 (13 pts), ternaries 3 (6 pts), loops 2 (5 pts), boolean chains 3 (nesting depth added 27). Of this number, 42 points are the body's own statements and 12 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.
harness.runAgent (cognitive 53) plugins/ruflo-console/hooks/harness.ts:178— harness.runAgent has cognitive complexity 53 (threshold 15). Drivers by points: if/else 14 (19 pts), ternaries 10 (18 pts), boolean chains 10, loops 3 (4 pts), error handling 2 (nesting depth added 14). Of this number, 36 points are the body's own statements and 17 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.
ap-loop.tick (cognitive 53) plugins/ruflo-console/hooks/data/ap-loop.ts:238— ap-loop.tick has cognitive complexity 53 (threshold 15). Drivers by points: if/else 27 (31 pts), boolean chains 14, ternaries 4 (7 pts), loops 1 (nesting depth added 7). Of this number, 52 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
PromptManager.multiSelect (cognitive 53) v3/@claude-flow/cli/src/prompt.ts:294— PromptManager.multiSelect has cognitive complexity 53 (threshold 15). Drivers by points: if/else 18 (31 pts), ternaries 5 (10 pts), boolean chains 6, loops 4 (6 pts) (nesting depth added 20). Most of this is not in the body itself: 5 of the 53 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 358, displayChoices, a function literal at line 350, …). 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.
run.runTui::onKey (cognitive 52) plugins/ruflo-console/tui/run.ts:347— run.runTui::onKey has cognitive complexity 52 (threshold 15). Drivers by points: if/else 34 (40 pts), boolean chains 12 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This shape REPEATS in the file: one other method here (run.runTui) 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.
smoke-all-plugins.main (cognitive 52) scripts/smoke-all-plugins.mjs:249— smoke-all-plugins.main has cognitive complexity 52 (threshold 15). Drivers by points: if/else 19 (27 pts), loops 4 (10 pts), boolean chains 9, ternaries 4 (6 pts) (nesting depth added 16). Of this number, 45 points are the body's own statements and 7 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.
ModelRouter.route (cognitive 52) v3/@claude-flow/cli/src/ruvector/model-router.ts:619— ModelRouter.route has cognitive complexity 52 (threshold 15). Drivers by points: if/else 13 (21 pts), ternaries 7 (10 pts), loops 3 (8 pts), error handling 3 (7 pts), boolean chains 6 (nesting depth added 20). Of this number, 46 points are the body's own statements and 6 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.
benchmark-pretrained-retrieval.main (cognitive 52) v3/@claude-flow/cli/scripts/benchmark-pretrained-retrieval.mjs:105— benchmark-pretrained-retrieval.main has cognitive complexity 52 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 7 (14 pts), ternaries 11 (14 pts), boolean chains 3 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
binary-parse.parseElf (cognitive 52) v3/@claude-flow/cli/src/rure/binary-parse.ts:89— binary-parse.parseElf has cognitive complexity 52 (threshold 15). Drivers by points: if/else 10 (21 pts), ternaries 12 (16 pts), loops 6 (8 pts), boolean chains 4, error handling 1 (3 pts) (nesting depth added 19). None of this is in the body itself: all 52 points belong to 7 function items inside it that branch (a function literal at line 150, a function literal at line 107, a function literal at line 136, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
AgentFederationPlugin.initialize (cognitive 52) v3/@claude-flow/plugin-agent-federation/src/plugin.ts:90— AgentFederationPlugin.initialize has cognitive complexity 52 (threshold 15). Drivers by points: if/else 20 (23 pts), boolean chains 11, ternaries 8 (10 pts), error handling 5 (7 pts), loops 1 (nesting depth added 7). Of this number, 26 points are the body's own statements and 26 belong to 9 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.
cli-commands.createCliCommands (cognitive 52) v3/@claude-flow/plugin-iot-cognitum/src/cli-commands.ts:22— cli-commands.createCliCommands has cognitive complexity 52 (threshold 15). Drivers by points: if/else 25 (28 pts), loops 7 (14 pts), ternaries 4 (7 pts), boolean chains 3 (nesting depth added 13). None of this is in the body itself: all 52 points belong to 14 function literals inside it that branch (lines 181, 216, 521, …). 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.
event-query.tokens (cognitive 51) REDACTED:103— event-query.tokens has cognitive complexity 51 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 5 (13 pts), boolean chains 7, ternaries 2 (7 pts) (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.
events.eventsView (cognitive 51) plugins/ruflo-console/hooks/views/events.ts:36— events.eventsView has cognitive complexity 51 (threshold 15). Drivers by points: ternaries 13 (22 pts), if/else 16 (19 pts), boolean chains 6, loops 3 (4 pts) (nesting depth added 13). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
memory-initializer.listEntries (cognitive 51) v3/@claude-flow/cli/src/memory/memory-initializer.ts:3511— memory-initializer.listEntries has cognitive complexity 51 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 12, ternaries 6 (8 pts), error handling 2 (4 pts), loops 4 (nesting depth added 13). Of this number, 50 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.
security-code-patterns.codeLinesOf (cognitive 51) v3/@claude-flow/cli/src/commands/security-code-patterns.ts:123— security-code-patterns.codeLinesOf has cognitive complexity 51 (threshold 15). Drivers by points: if/else 13 (39 pts), boolean chains 7, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 28). Of this number, 49 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.
graph-analyzer.fallbackLouvain (cognitive 50) v3/@claude-flow/cli/src/ruvector/graph-analyzer.ts:644— graph-analyzer.fallbackLouvain has cognitive complexity 50 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 13 (19 pts), boolean chains 12 (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.
mcp-tools.taxonomicReasonHandler (cognitive 50) v3/plugins/hyperbolic-reasoning/src/mcp-tools.ts:198— mcp-tools.taxonomicReasonHandler has cognitive complexity 50 (threshold 15). Drivers by points: if/else 20 (38 pts), loops 2 (4 pts), ternaries 2 (4 pts), boolean chains 2, error handling 1, match/switch 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
event-sources.apEvents (cognitive 49) plugins/ruflo-console/hooks/data/event-sources.ts:65— event-sources.apEvents has cognitive complexity 49 (threshold 15). Drivers by points: if/else 13 (24 pts), ternaries 4 (16 pts), boolean chains 5, loops 2 (4 pts) (nesting depth added 25). 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.
wf-detail.list (cognitive 49) plugins/ruflo-console/hooks/views/wf-detail.ts:179— wf-detail.list has cognitive complexity 49 (threshold 15). Drivers by points: ternaries 11 (34 pts), if/else 5 (7 pts), loops 3 (6 pts), boolean chains 2 (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.
router-parallel-analyze.main (cognitive 49) plugins/ruflo-metaharness/scripts/router-parallel-analyze.mjs:74— router-parallel-analyze.main has cognitive complexity 49 (threshold 15). Drivers by points: ternaries 16 (25 pts), if/else 10 (13 pts), boolean chains 8, loops 2, error handling 1 (nesting depth added 12). Of this number, 45 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
smoke-github-safe-injection.runOne (cognitive 49) scripts/smoke-github-safe-injection.mjs:104— smoke-github-safe-injection.runOne has cognitive complexity 49 (threshold 15). Drivers by points: if/else 16 (34 pts), boolean chains 9, error handling 1 (3 pts), ternaries 1 (3 pts) (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
run-beir-hybrid.main (cognitive 49) v3/@claude-flow/cli/scripts/run-beir-hybrid.mjs:84— run-beir-hybrid.main has cognitive complexity 49 (threshold 15). Drivers by points: ternaries 11 (14 pts), if/else 9 (13 pts), boolean chains 12, loops 6 (10 pts) (nesting depth added 11). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CodexInitializer.initialize (cognitive 49) v3/@claude-flow/codex/src/initializer.ts:56— CodexInitializer.initialize has cognitive complexity 49 (threshold 15). Drivers by points: if/else 28 (36 pts), ternaries 3 (7 pts), error handling 2 (3 pts), boolean chains 2, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
product-plane.validateProductActionEnvelope (cognitive 49) v3/@claude-flow/security/src/policy/product-plane.ts:630— product-plane.validateProductActionEnvelope has cognitive complexity 49 (threshold 15). Drivers by points: if/else 17 (20 pts), ternaries 12 (14 pts), boolean chains 11, loops 2 (4 pts) (nesting depth added 7). Of this number, 44 points are the body's own statements and 5 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.
quantum-topology.computePersistenceDiagram (cognitive 49) v3/plugins/prime-radiant/src/tools/quantum-topology.ts:224— quantum-topology.computePersistenceDiagram has cognitive complexity 49 (threshold 15). Drivers by points: loops 9 (25 pts), if/else 6 (18 pts), boolean chains 6 (nesting depth added 28). 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.
createGithubQuery.get (cognitive 49) plugins/ruflo-x-gateway/src/github-query.mjs:185— createGithubQuery.get has cognitive complexity 49 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 13, error handling 6 (11 pts), ternaries 2 (4 pts) (nesting depth added 11). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
MemoryConsolidator.dedup (cognitive 48) v3/@claude-flow/memory/src/consolidator.ts:248— MemoryConsolidator.dedup has cognitive complexity 48 (threshold 15). Drivers by points: if/else 9 (29 pts), loops 6 (15 pts), boolean chains 4 (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.
mcp-tools.workingMemoryHandler (cognitive 48) REDACTED:77— mcp-tools.workingMemoryHandler has cognitive complexity 48 (threshold 15). Drivers by points: if/else 15 (33 pts), loops 3 (8 pts), ternaries 2 (4 pts), boolean chains 1, error handling 1, match/switch 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
bar.barParts (cognitive 47) plugins/ruflo-console/hooks/views/bar.ts:105— bar.barParts has cognitive complexity 47 (threshold 15). Drivers by points: ternaries 11 (24 pts), if/else 13, boolean chains 6, error handling 1 (2 pts), loops 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.
register.register (cognitive 47) plugins/ruflo-protector/hooks/register.ts:63— register.register has cognitive complexity 47 (threshold 15). Drivers by points: if/else 16 (22 pts), error handling 8 (10 pts), ternaries 6 (8 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 11). None of this is in the body itself: all 47 points belong to 10 function literals inside it that branch (lines 134, 190, 170, …). 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.
members.membersOf (cognitive 47) plugins/ruflo-swarm/hooks/model/members.ts:214— members.membersOf has cognitive complexity 47 (threshold 15). Drivers by points: ternaries 16 (34 pts), boolean chains 10, loops 2, if/else 1 (nesting depth added 18). Of this number, 39 points are the body's own statements and 8 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
github-query.createGithubQuery.get (cognitive 47) plugins/ruflo-x-gateway/src/github-query.mjs:185— github-query.createGithubQuery.get has cognitive complexity 47 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 13, error handling 6 (11 pts), ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
check-metaharness-compat.main (cognitive 47) scripts/check-metaharness-compat.mjs:32— check-metaharness-compat.main has cognitive complexity 47 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 11, ternaries 4 (8 pts), error handling 5 (6 pts), 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.
memory-initializer.recoverMemoryDatabase (cognitive 47) v3/@claude-flow/cli/src/memory/memory-initializer.ts:1628— memory-initializer.recoverMemoryDatabase has cognitive complexity 47 (threshold 15). Drivers by points: error handling 16 (25 pts), if/else 9 (13 pts), loops 5 (6 pts), boolean chains 2, ternaries 1 (nesting depth added 14). Of this number, 44 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.
cuda-fatbin.walkFatbin (cognitive 47) v3/@claude-flow/cli/src/rure/cuda-fatbin.ts:52— cuda-fatbin.walkFatbin has cognitive complexity 47 (threshold 15). Drivers by points: ternaries 7 (21 pts), if/else 8 (19 pts), boolean chains 4, loops 2 (3 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.
doctor.checkMemoryPersistenceDriver (cognitive 47) REDACTED:751— doctor.checkMemoryPersistenceDriver has cognitive complexity 47 (threshold 15). Drivers by points: if/else 15 (23 pts), error handling 6 (15 pts), boolean chains 8, ternaries 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
managed.parseManaged (cognitive 46) plugins/ruflo-console/hooks/data/managed.ts:37— managed.parseManaged has cognitive complexity 46 (threshold 15). Drivers by points: if/else 9 (17 pts), ternaries 7 (14 pts), boolean chains 12, loops 2 (3 pts) (nesting depth added 16). Of this number, 32 points are the body's own statements and 14 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.
federation.federationView (cognitive 46) plugins/ruflo-console/hooks/views/federation.ts:11— federation.federationView has cognitive complexity 46 (threshold 15). Drivers by points: ternaries 14 (25 pts), if/else 10, loops 3 (6 pts), boolean chains 5 (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.
pane.footer (cognitive 46) plugins/ruflo-console/hooks/views/pane.ts:201— pane.footer has cognitive complexity 46 (threshold 15). Drivers by points: ternaries 20 (33 pts), boolean chains 8, if/else 3, loops 1 (2 pts) (nesting depth added 14). Of this number, 45 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.
ansi.render (cognitive 46) plugins/ruflo-console/tui/ansi.ts:273— ansi.render has cognitive complexity 46 (threshold 15). Drivers by points: if/else 16 (19 pts), ternaries 10 (19 pts), boolean chains 8 (nesting depth added 12). Of this number, 42 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
bench.main (cognitive 46) plugins/ruflo-cost-tracker/scripts/bench.mjs:48— bench.main has cognitive complexity 46 (threshold 15). Drivers by points: ternaries 12 (15 pts), if/else 10 (14 pts), loops 4 (9 pts), boolean chains 5, error handling 2 (3 pts) (nesting depth added 13). Of this number, 45 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
rootdelete.hasRootDelete (cognitive 46) plugins/ruflo-protector/hooks/rootdelete.ts:4— rootdelete.hasRootDelete has cognitive complexity 46 (threshold 15). Drivers by points: if/else 25 (43 pts), boolean chains 24, loops 3 (5 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (rootdelete.hasRootDelete::finishWord) 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.
ManagedMemoryClient.run (cognitive 46) v3/@claude-flow/cli/src/services/managed-memory-client.ts:86— ManagedMemoryClient.run has cognitive complexity 46 (threshold 15). Drivers by points: if/else 21 (31 pts), ternaries 3 (7 pts), error handling 5 (6 pts), boolean chains 2 (nesting depth added 15). Most of this is not in the body itself: 14 of the 46 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 124, 115, 113, …). 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.
policy-enforcer.appendAuditLog (cognitive 46) v3/@claude-flow/cli/src/mcp-tools/policy-enforcer.ts:206— policy-enforcer.appendAuditLog has cognitive complexity 46 (threshold 15). Drivers by points: if/else 11 (26 pts), error handling 5 (12 pts), loops 2 (4 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VectorOps.insert (cognitive 46) v3/@claude-flow/plugins/src/integrations/ruvector/ruvector-bridge.ts:677— VectorOps.insert has cognitive complexity 46 (threshold 15). Drivers by points: if/else 8 (19 pts), ternaries 5 (11 pts), error handling 2 (7 pts), loops 3 (7 pts), boolean chains 2 (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.
TopologyOptimizer.suggestOptimizations (cognitive 46) v3/plugins/teammate-plugin/src/topology-optimizer.ts:324— TopologyOptimizer.suggestOptimizations has cognitive complexity 46 (threshold 15). Drivers by points: if/else 8 (25 pts), loops 7 (14 pts), boolean chains 6, ternaries 1 (nesting depth added 24). Of this number, 43 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.
event-query.parseQuery (cognitive 45) REDACTED:164— event-query.parseQuery has cognitive complexity 45 (threshold 15). Drivers by points: if/else 10 (26 pts), ternaries 5 (13 pts), error handling 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ai-guard.validateCodexArgv (cognitive 45) plugins/ruflo-console/tui/ai-guard.ts:22— ai-guard.validateCodexArgv has cognitive complexity 45 (threshold 15). Drivers by points: if/else 17 (29 pts), boolean chains 10, ternaries 2 (5 pts), loops 1 (nesting depth added 15). Of this number, 42 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
gaia-audit.main (cognitive 45) plugins/ruflo-workflows/scripts/gaia-audit.mjs:828— gaia-audit.main has cognitive complexity 45 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 9, ternaries 4 (9 pts), error handling 3 (5 pts), loops 2 (5 pts) (nesting depth added 14). Of this number, 44 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.
ManagedRunCollector.observe (cognitive 45) v3/@claude-flow/cli/src/services/managed-run-collector.ts:134— ManagedRunCollector.observe has cognitive complexity 45 (threshold 15). Drivers by points: if/else 16 (26 pts), boolean chains 10, ternaries 2 (5 pts), loops 2 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
memory-bridge.bridgeListEntries (cognitive 45) v3/@claude-flow/cli/src/memory/memory-bridge.ts:1551— memory-bridge.bridgeListEntries has cognitive complexity 45 (threshold 15). Drivers by points: if/else 11 (18 pts), ternaries 7 (10 pts), boolean chains 9, error handling 4 (6 pts), loops 2 (nesting depth added 12). Of this number, 44 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ts-walk.analyzeModuleSource::visit (cognitive 45) v3/@claude-flow/cli/src/rure/ts-walk.ts:99— ts-walk.analyzeModuleSource::visit has cognitive complexity 45 (threshold 15). Drivers by points: if/else 16 (25 pts), boolean chains 12, loops 2 (6 pts), ternaries 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
graph-analyzer.fallbackMinCut (cognitive 45) v3/@claude-flow/cli/src/ruvector/graph-analyzer.ts:522— graph-analyzer.fallbackMinCut has cognitive complexity 45 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 8 (17 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.
index.validateConfigToml (cognitive 45) v3/@claude-flow/codex/src/validators/index.ts:380— index.validateConfigToml has cognitive complexity 45 (threshold 15). Drivers by points: if/else 23 (36 pts), loops 4 (6 pts), boolean chains 3 (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.
mcp-composition-inspector.inspectToolComposition (cognitive 45) v3/@claude-flow/security/src/mcp-composition-inspector.ts:205— mcp-composition-inspector.inspectToolComposition has cognitive complexity 45 (threshold 15). Drivers by points: if/else 7 (26 pts), loops 5 (9 pts), ternaries 2 (6 pts), boolean chains 4 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Agents.Agents (cognitive 45) v3/goal_ui/src/pages/Agents.tsx:59— Agents.Agents has cognitive complexity 45 (threshold 15). Drivers by points: boolean chains 18, ternaries 6 (16 pts), if/else 11 (nesting depth added 10). Of this number, 29 points are the body's own statements and 16 belong to 9 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
system-tools.handleSystemHealth (cognitive 45) v3/mcp/tools/system-tools.ts:521— system-tools.handleSystemHealth has cognitive complexity 45 (threshold 15). Drivers by points: ternaries 5 (17 pts), if/else 8 (12 pts), error handling 4 (11 pts), boolean chains 4, loops 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SonaBridge.createMockModule (cognitive 45) v3/plugins/cognitive-kernel/src/bridges/sona-bridge.ts:272— SonaBridge.createMockModule has cognitive complexity 45 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 13 (20 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.
mcp-tools.collectiveMemoryHandler (cognitive 45) v3/plugins/neural-coordination/src/mcp-tools.ts:519— mcp-tools.collectiveMemoryHandler has cognitive complexity 45 (threshold 15). Drivers by points: if/else 14 (30 pts), loops 3 (7 pts), ternaries 2 (4 pts), boolean chains 2, error handling 1, match/switch 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mcp-tools.analyzeQueryPatterns (cognitive 45) v3/plugins/perf-optimizer/src/mcp-tools.ts:777— mcp-tools.analyzeQueryPatterns has cognitive complexity 45 (threshold 15). Drivers by points: ternaries 5 (22 pts), if/else 6 (15 pts), boolean chains 6, loops 2 (nesting depth added 26). 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.
evolve.evolveLines (cognitive 44) plugins/ruflo-console/hooks/evolve.ts:92— evolve.evolveLines has cognitive complexity 44 (threshold 15). Drivers by points: ternaries 11 (22 pts), if/else 13 (20 pts), boolean chains 2 (nesting depth added 18). Most of this is not in the body itself: 1 of the 44 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 95, 113, 127, …). 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.
boot-cyber.constellation (cognitive 44) plugins/ruflo-console/hooks/gfx/boot-cyber.ts:91— boot-cyber.constellation has cognitive complexity 44 (threshold 15). Drivers by points: ternaries 11 (30 pts), boolean chains 8, if/else 4 (5 pts), loops 1 (nesting depth added 20). Of this number, 33 points are the body's own statements and 11 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.
pictures.topologyPicture (cognitive 44) plugins/ruflo-console/hooks/gfx/pictures.ts:99— pictures.topologyPicture has cognitive complexity 44 (threshold 15). Drivers by points: ternaries 13 (24 pts), if/else 8 (9 pts), boolean chains 6, loops 3 (5 pts) (nesting depth added 14). Most of this is not in the body itself: 11 of the 44 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 160, 142, 129). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
wf-guide.nestingOf (cognitive 44) plugins/ruflo-console/hooks/data/wf-guide.ts:33— wf-guide.nestingOf has cognitive complexity 44 (threshold 15). Drivers by points: ternaries 9 (25 pts), loops 3 (8 pts), if/else 4 (7 pts), boolean chains 4 (nesting depth added 24). Of this number, 41 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ManagedProgress.accept (cognitive 44) v3/@claude-flow/cli/src/services/managed-workflows.ts:80— ManagedProgress.accept has cognitive complexity 44 (threshold 15). Drivers by points: if/else 20 (33 pts), boolean chains 10, loops 1 (nesting depth added 13). Of this number, 43 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
executor.executeUpgradeWithMissing (cognitive 44) v3/@claude-flow/cli/src/init/executor.ts:787— executor.executeUpgradeWithMissing has cognitive complexity 44 (threshold 15). Drivers by points: if/else 13 (26 pts), boolean chains 8, loops 4 (7 pts), ternaries 1 (2 pts), error handling 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
executor.detectExistingRufloMCP (cognitive 44) v3/@claude-flow/cli/src/init/executor.ts:996— executor.detectExistingRufloMCP has cognitive complexity 44 (threshold 15). Drivers by points: if/else 11 (30 pts), boolean chains 7, loops 3 (5 pts), error handling 1 (2 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MemoryGraph.detectCommunities (cognitive 44) v3/@claude-flow/memory/src/memory-graph.ts:250— MemoryGraph.detectCommunities has cognitive complexity 44 (threshold 15). Drivers by points: if/else 7 (26 pts), loops 6 (15 pts), boolean chains 3 (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.
PathValidator.validate (cognitive 44) v3/@claude-flow/security/src/path-validator.ts:295— PathValidator.validate has cognitive complexity 44 (threshold 15). Drivers by points: if/else 16 (30 pts), boolean chains 5, loops 4 (5 pts), error handling 2 (3 pts), 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.
stream.codexEvent (cognitive 43) plugins/ruflo-console/hooks/stream.ts:49— stream.codexEvent has cognitive complexity 43 (threshold 15). Drivers by points: if/else 6 (15 pts), ternaries 4 (14 pts), loops 3 (9 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 26). 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.
wf-links.linkAgents (cognitive 43) plugins/ruflo-console/hooks/data/wf-links.ts:90— wf-links.linkAgents has cognitive complexity 43 (threshold 15). Drivers by points: if/else 6 (21 pts), loops 6 (14 pts), ternaries 2 (6 pts), boolean chains 2 (nesting depth added 27). Of this number, 42 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
benchmark-seed-corpus.main (cognitive 43) scripts/benchmark-seed-corpus.mjs:339— benchmark-seed-corpus.main has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (22 pts), ternaries 6 (10 pts), loops 6 (8 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 17). Of this number, 31 points are the body's own statements and 12 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
memory-initializer.loadLocalEmbeddingChain (cognitive 43) v3/@claude-flow/cli/src/memory/memory-initializer.ts:2338— memory-initializer.loadLocalEmbeddingChain has cognitive complexity 43 (threshold 15). Drivers by points: if/else 15 (28 pts), boolean chains 7, error handling 4 (6 pts), ternaries 1 (2 pts) (nesting depth added 16). Of this number, 42 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.
daemon.renderAllDaemonsStatus (cognitive 43) v3/@claude-flow/cli/src/commands/daemon.ts:1119— daemon.renderAllDaemonsStatus has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (19 pts), ternaries 10 (13 pts), boolean chains 4, error handling 3 (4 pts), loops 2 (3 pts) (nesting depth added 12). Of this number, 20 points are the body's own statements and 23 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.
doctor.checkMcpServers (cognitive 43) REDACTED:1464— doctor.checkMcpServers has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 13, loops 3 (5 pts), ternaries 3 (4 pts), error handling 1 (2 pts) (nesting depth added 11). Of this number, 25 points are the body's own statements and 18 belong to 6 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.
MinCutBridge.findOptimalCuts (cognitive 43) v3/plugins/code-intelligence/src/bridges/mincut-bridge.ts:102— MinCutBridge.findOptimalCuts has cognitive complexity 43 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 6 (13 pts), boolean chains 4, ternaries 1 (4 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
timeline.timelineView (cognitive 42) plugins/ruflo-console/hooks/views/timeline.ts:66— timeline.timelineView has cognitive complexity 42 (threshold 15). Drivers by points: ternaries 16 (34 pts), if/else 4 (5 pts), loops 2 (3 pts) (nesting depth added 20). Of this number, 35 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
memmap.memmapRows (cognitive 42) plugins/ruflo-console/hooks/views/memmap.ts:61— memmap.memmapRows has cognitive complexity 42 (threshold 15). Drivers by points: ternaries 15 (31 pts), if/else 5 (6 pts), boolean chains 3, loops 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
wf-slots.registerSlot (cognitive 42) plugins/ruflo-console/hooks/views/wf-slots.ts:56— wf-slots.registerSlot has cognitive complexity 42 (threshold 15). Drivers by points: if/else 13 (16 pts), ternaries 5 (15 pts), boolean chains 11 (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.
RuosHostAdapter.stream (cognitive 42) plugins/ruflo-ruos/scripts/lib/adapter.mjs:267— RuosHostAdapter.stream has cognitive complexity 42 (threshold 15). Drivers by points: if/else 13 (28 pts), ternaries 2 (7 pts), boolean chains 6, loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cli.main (cognitive 42) plugins/ruflo-ruos/scripts/cli.mjs:121— cli.main has cognitive complexity 42 (threshold 15). Drivers by points: ternaries 13 (26 pts), if/else 7 (11 pts), loops 1 (3 pts), boolean chains 1, match/switch 1 (nesting depth added 19). 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.handleAutopilot (cognitive 42) REDACTED:1424— index.handleAutopilot has cognitive complexity 42 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 12, ternaries 3 (6 pts), error handling 2 (4 pts), loops 3 (4 pts) (nesting depth added 14). Of this number, 28 points are the body's own statements and 14 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.
pretrain-from-github.harvestCommits (cognitive 42) v3/@claude-flow/cli/scripts/pretrain-from-github.mjs:68— pretrain-from-github.harvestCommits has cognitive complexity 42 (threshold 15). Drivers by points: if/else 11 (28 pts), loops 5 (10 pts), boolean chains 3, error handling 1 (nesting depth added 22). Of this number, 40 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.
memory-bridge.bridgeRecordFeedback (cognitive 42) v3/@claude-flow/cli/src/memory/memory-bridge.ts:2743— memory-bridge.bridgeRecordFeedback has cognitive complexity 42 (threshold 15). Drivers by points: if/else 11 (17 pts), error handling 4 (9 pts), boolean chains 8, loops 2 (5 pts), ternaries 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
hooks-tools.routeTaskLocal (cognitive 42) v3/@claude-flow/cli/src/mcp-tools/hooks-tools.ts:1420— hooks-tools.routeTaskLocal has cognitive complexity 42 (threshold 15). Drivers by points: ternaries 14 (17 pts), if/else 10 (14 pts), boolean chains 9, error handling 1 (2 pts) (nesting depth added 8). Of this number, 36 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
cuda-fatbin.lz4Block (cognitive 42) v3/@claude-flow/cli/src/rure/cuda-fatbin.ts:136— cuda-fatbin.lz4Block has cognitive complexity 42 (threshold 15). Drivers by points: if/else 12 (32 pts), loops 4 (9 pts), boolean chains 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
graph-analyzer.buildDependencyGraph (cognitive 42) v3/@claude-flow/cli/src/ruvector/graph-analyzer.ts:328— graph-analyzer.buildDependencyGraph has cognitive complexity 42 (threshold 15). Drivers by points: if/else 13 (27 pts), loops 4 (6 pts), boolean chains 4, ternaries 1 (3 pts), error handling 2 (nesting depth added 18). Of this number, 22 points are the body's own statements and 20 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.
graph-analyzer.exportToDot (cognitive 42) v3/@claude-flow/cli/src/ruvector/graph-analyzer.ts:1150— graph-analyzer.exportToDot has cognitive complexity 42 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 7 (15 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 20). Of this number, 34 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.
ShardRetriever.scoreShards (cognitive 42) REDACTED:406— ShardRetriever.scoreShards has cognitive complexity 42 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 7, loops 3 (7 pts), ternaries 3 (7 pts) (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.
boot-cyber.drawCyber (cognitive 41) plugins/ruflo-console/hooks/gfx/boot-cyber.ts:163— boot-cyber.drawCyber has cognitive complexity 41 (threshold 15). Drivers by points: ternaries 18 (33 pts), boolean chains 4, if/else 4 (nesting depth added 15). Of this number, 30 points are the body's own statements and 11 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.
plugins.pluginsView (cognitive 41) plugins/ruflo-console/hooks/views/plugins.ts:15— plugins.pluginsView has cognitive complexity 41 (threshold 15). Drivers by points: ternaries 14 (25 pts), if/else 11 (12 pts), boolean chains 3, loops 1 (nesting depth added 12). Of this number, 34 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
terminal.terminalView (cognitive 41) plugins/ruflo-console/hooks/views/terminal.ts:100— terminal.terminalView has cognitive complexity 41 (threshold 15). Drivers by points: ternaries 23 (33 pts), boolean chains 3, if/else 3, loops 2 (nesting depth added 10). Of this number, 29 points are the body's own statements and 12 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.
burn.main (cognitive 41) plugins/ruflo-cost-tracker/scripts/burn.mjs:54— burn.main has cognitive complexity 41 (threshold 15). Drivers by points: if/else 16 (22 pts), ternaries 8 (13 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
agent-execute-core.callAnthropicMessages (cognitive 41) v3/@claude-flow/cli/src/mcp-tools/agent-execute-core.ts:171— agent-execute-core.callAnthropicMessages has cognitive complexity 41 (threshold 15). Drivers by points: boolean chains 23, ternaries 7 (9 pts), if/else 6 (8 pts), error handling 1 (nesting depth added 4). Of this number, 40 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.
intelligence.recordTrajectory (cognitive 41) v3/@claude-flow/cli/src/memory/intelligence.ts:1234— intelligence.recordTrajectory has cognitive complexity 41 (threshold 15). Drivers by points: if/else 8 (17 pts), ternaries 4 (12 pts), loops 2 (5 pts), error handling 3 (4 pts), boolean chains 3 (nesting depth added 21). Of this number, 36 points are the body's own statements and 5 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.
output-verifier.verifyAndEscalate (cognitive 41) v3/@claude-flow/cli/src/ruvector/output-verifier.ts:209— output-verifier.verifyAndEscalate has cognitive complexity 41 (threshold 15). Drivers by points: if/else 17 (20 pts), ternaries 7 (13 pts), boolean chains 6, loops 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.
http-fetch-tools.httpFetchExecute (cognitive 41) v3/@claude-flow/cli/src/mcp-tools/http-fetch-tools.ts:184— http-fetch-tools.httpFetchExecute has cognitive complexity 41 (threshold 15). Drivers by points: if/else 8 (19 pts), error handling 4 (8 pts), ternaries 5 (8 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
GoogleProvider.doStreamComplete (cognitive 41) v3/@claude-flow/providers/src/google-provider.ts:165— GoogleProvider.doStreamComplete has cognitive complexity 41 (threshold 15). Drivers by points: if/else 7 (24 pts), loops 3 (8 pts), error handling 2 (5 pts), boolean chains 4 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RuVectorProvider.doStreamComplete (cognitive 41) v3/@claude-flow/providers/src/ruvector-provider.ts:341— RuVectorProvider.doStreamComplete has cognitive complexity 41 (threshold 15). Drivers by points: if/else 9 (24 pts), error handling 3 (9 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ap-journal.parseLine (cognitive 40) plugins/ruflo-console/hooks/data/ap-journal.ts:64— ap-journal.parseLine has cognitive complexity 40 (threshold 15). Drivers by points: ternaries 11 (22 pts), boolean chains 13, if/else 3, error handling 1, match/switch 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.
ap-loop.foldJournal (cognitive 40) plugins/ruflo-console/hooks/data/ap-loop.ts:50— ap-loop.foldJournal has cognitive complexity 40 (threshold 15). Drivers by points: if/else 12 (30 pts), boolean chains 5, loops 3, match/switch 1 (2 pts) (nesting depth added 19). Of this number, 35 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.
activity-live.feedLanes (cognitive 40) plugins/ruflo-console/hooks/activity-live.ts:137— activity-live.feedLanes has cognitive complexity 40 (threshold 15). Drivers by points: if/else 6 (16 pts), ternaries 5 (14 pts), loops 6 (9 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.
wf-saved.decodeSaved (cognitive 40) plugins/ruflo-console/hooks/data/wf-saved.ts:39— wf-saved.decodeSaved has cognitive complexity 40 (threshold 15). Drivers by points: boolean chains 15, ternaries 9 (15 pts), if/else 5 (7 pts), loops 2, 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.
mission-control.missionControlView (cognitive 40) plugins/ruflo-console/hooks/views/mission-control.ts:248— mission-control.missionControlView has cognitive complexity 40 (threshold 15). Drivers by points: ternaries 13 (32 pts), if/else 6, boolean chains 2 (nesting depth added 19). Of this number, 39 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.
oia-audit.main (cognitive 40) plugins/ruflo-metaharness/scripts/oia-audit.mjs:124— oia-audit.main has cognitive complexity 40 (threshold 15). Drivers by points: ternaries 12 (19 pts), if/else 10 (13 pts), boolean chains 8 (nesting depth added 10). 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.
index.executeGoapSearch (cognitive 40) REDACTED:685— index.executeGoapSearch has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 15, loops 3 (4 pts) (nesting depth added 11). Of this number, 39 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.
doctor.checkStaleSettingsNpx (cognitive 40) REDACTED:197— doctor.checkStaleSettingsNpx has cognitive complexity 40 (threshold 15). Drivers by points: if/else 7 (22 pts), loops 4 (13 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 25). Of this number, 39 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.
files.listSessions (cognitive 40) v3/@claude-flow/codex/src/activity/files.ts:67— files.listSessions has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (25 pts), error handling 3 (7 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity· cli.program.command("migrate").description("Migrate from Claude Code (CLAUDE.md) to Codex (AGENTS.md)").option("-f, --from < (cognitive 40) · ×1
cli.program.command("migrate").description("Migrate from Claude Code (CLAUDE.md) to Codex (AGENTS.md)").option("-f, --from < (cognitive 40) v3/@claude-flow/codex/src/cli.ts:422— cli.program.command("migrate").description("Migrate from Claude Code (CLAUDE.md) to Codex (AGENTS.md)").option("-f, --from < has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (23 pts), loops 5 (15 pts), error handling 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OpenAIProvider.doStreamComplete (cognitive 40) v3/@claude-flow/providers/src/openai-provider.ts:222— OpenAIProvider.doStreamComplete has cognitive complexity 40 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 3 (8 pts), error handling 2 (5 pts), ternaries 1 (5 pts), boolean chains 4 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DevelopmentStep.DevelopmentStep (cognitive 40) v3/goal_ui/src/components/DevelopmentStep.tsx:30— DevelopmentStep.DevelopmentStep has cognitive complexity 40 (threshold 15). Drivers by points: boolean chains 37, if/else 2, ternaries 1. Of this number, 37 points are the body's own statements and 3 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
JsFallbackWasmLoader.parseFormula (cognitive 40) v3/plugins/gastown-bridge/src/formula/executor.ts:388— JsFallbackWasmLoader.parseFormula has cognitive complexity 40 (threshold 15). Drivers by points: if/else 17 (35 pts), boolean chains 3, error handling 1, 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.
ap-pick.effectsOf (cognitive 39) plugins/ruflo-console/hooks/ap-pick.ts:53— ap-pick.effectsOf has cognitive complexity 39 (threshold 15). Drivers by points: if/else 7 (23 pts), loops 3 (8 pts), boolean chains 6, ternaries 1 (2 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
command.answer (cognitive 39) plugins/ruflo-ddd/hooks/command.ts:16— command.answer has cognitive complexity 39 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 4 (9 pts), error handling 2 (7 pts), boolean chains 5, loops 2 (5 pts) (nesting depth added 19). Of this number, 38 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
benchmark-models-midtier.main (cognitive 39) scripts/benchmark-models-midtier.mjs:424— benchmark-models-midtier.main has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 12 (19 pts), if/else 8 (12 pts), loops 3 (4 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 14). Of this number, 18 points are the body's own statements and 21 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
neural-router.tryCostOptimalRoute (cognitive 39) v3/@claude-flow/cli/src/ruvector/neural-router.ts:554— neural-router.tryCostOptimalRoute has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 11, error handling 2 (3 pts), ternaries 2 (3 pts) (nesting depth added 8). Of this number, 36 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ProviderAdapter.selectProvider (cognitive 39) v3/@claude-flow/integration/src/provider-adapter.ts:454— ProviderAdapter.selectProvider has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (30 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
product-plane.validateSemanticValue (cognitive 39) v3/@claude-flow/security/src/policy/product-plane.ts:884— product-plane.validateSemanticValue has cognitive complexity 39 (threshold 15). Drivers by points: if/else 15 (29 pts), boolean chains 8, loops 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.
config-tools.handleValidateConfig (cognitive 39) v3/mcp/tools/config-tools.ts:352— config-tools.handleValidateConfig has cognitive complexity 39 (threshold 15). Drivers by points: if/else 17 (25 pts), boolean chains 14 (nesting depth added 8). Of this number, 27 points are the body's own statements and 12 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.
quantum-topology.buildRipsComplex (cognitive 39) v3/plugins/prime-radiant/src/tools/quantum-topology.ts:68— quantum-topology.buildRipsComplex has cognitive complexity 39 (threshold 15). Drivers by points: loops 10 (20 pts), if/else 7 (18 pts), boolean chains 1 (nesting depth added 21). 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.
swarm.swarmView (cognitive 38) plugins/ruflo-console/hooks/views/swarm.ts:29— swarm.swarmView has cognitive complexity 38 (threshold 15). Drivers by points: ternaries 13 (22 pts), if/else 8 (9 pts), boolean chains 6, loops 1 (nesting depth added 10). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
xruv.networkRows (cognitive 38) plugins/ruflo-console/hooks/views/xruv.ts:115— xruv.networkRows has cognitive complexity 38 (threshold 15). Drivers by points: ternaries 12 (33 pts), if/else 5 (nesting depth added 21). Of this number, 26 points are the body's own statements and 12 belong to 3 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.
benchmark-self-learning.main (cognitive 38) v3/@claude-flow/cli/scripts/benchmark-self-learning.mjs:38— benchmark-self-learning.main has cognitive complexity 38 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 7 (14 pts), loops 4 (5 pts), boolean chains 3, error handling 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rabitq-index.buildRabitqIndex (cognitive 38) v3/@claude-flow/cli/src/memory/rabitq-index.ts:84— rabitq-index.buildRabitqIndex has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (18 pts), error handling 5 (9 pts), loops 2 (5 pts), boolean chains 3, ternaries 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.
memory-initializer.getHNSWIndex (cognitive 38) v3/@claude-flow/cli/src/memory/memory-initializer.ts:629— memory-initializer.getHNSWIndex has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (14 pts), error handling 4 (10 pts), loops 3 (7 pts), boolean chains 6, ternaries 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
memory-initializer.storeEntry (cognitive 38) v3/@claude-flow/cli/src/memory/memory-initializer.ts:2962— memory-initializer.storeEntry has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 8, ternaries 6 (7 pts), error handling 4 (5 pts) (nesting depth added 7). Of this number, 27 points are the body's own statements and 11 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.
executor.mergeSettingsForUpgrade (cognitive 38) v3/@claude-flow/cli/src/init/executor.ts:340— executor.mergeSettingsForUpgrade has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 9, loops 2 (5 pts), ternaries 3 (5 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
status.performHealthCheck (cognitive 38) v3/@claude-flow/cli/src/commands/status.ts:394— status.performHealthCheck has cognitive complexity 38 (threshold 15). Drivers by points: ternaries 16 (34 pts), if/else 3, 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.
CommandParser.parseFlag (cognitive 38) v3/@claude-flow/cli/src/parser.ts:306— CommandParser.parseFlag has cognitive complexity 38 (threshold 15). Drivers by points: if/else 17 (29 pts), boolean chains 6, loops 1 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
index.convertSettingsToToml (cognitive 38) v3/@claude-flow/codex/src/migrations/index.ts:706— index.convertSettingsToToml has cognitive complexity 38 (threshold 15). Drivers by points: if/else 14 (23 pts), loops 2 (6 pts), ternaries 2 (5 pts), boolean chains 4 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DualModeOrchestrator.buildDependencyLevels (cognitive 38) v3/@claude-flow/codex/src/dual-mode/orchestrator.ts:404— DualModeOrchestrator.buildDependencyLevels has cognitive complexity 38 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 8 (12 pts), boolean chains 5 (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.
HttpTransport.handleHttpRequest (cognitive 38) REDACTED:421— HttpTransport.handleHttpRequest has cognitive complexity 38 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 7, ternaries 4 (7 pts), error handling 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AutoMemoryBridge.importFromAutoMemory (cognitive 38) v3/@claude-flow/memory/src/auto-memory-bridge.ts:380— AutoMemoryBridge.importFromAutoMemory has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 5 (12 pts), boolean chains 4, error handling 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mcp-tools.metaMonitorHandler (cognitive 38) REDACTED:543— mcp-tools.metaMonitorHandler has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (28 pts), ternaries 3 (5 pts), match/switch 1 (2 pts), boolean chains 1, error handling 1, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SonaBridge.createMockModule (cognitive 38) v3/plugins/ruvector-upstream/src/bridges/sona.ts:212— SonaBridge.createMockModule has cognitive complexity 38 (threshold 15). Drivers by points: loops 13 (20 pts), if/else 9 (15 pts), boolean chains 3 (nesting depth added 13). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
command.answer (cognitive 37) plugins/ruflo-agentdb/hooks/command.ts:16— command.answer has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 11 (23 pts), if/else 9 (13 pts), boolean chains 1 (nesting depth added 16). Of this number, 35 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.
ruflo-hook.acquireSlot (cognitive 37) REDACTED:109— ruflo-hook.acquireSlot has cognitive complexity 37 (threshold 15). Drivers by points: error handling 4 (13 pts), if/else 2 (8 pts), ternaries 3 (8 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
output-verifier.bracketsBalanced (cognitive 37) v3/@claude-flow/cli/src/ruvector/output-verifier.ts:113— output-verifier.bracketsBalanced has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (30 pts), boolean chains 6, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
evm-parse.parseMetadata (cognitive 37) v3/@claude-flow/cli/src/rure/evm-parse.ts:88— evm-parse.parseMetadata has cognitive complexity 37 (threshold 15). Drivers by points: if/else 16 (28 pts), boolean chains 7, loops 1, ternaries 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mod-projection.collectModCandidates (cognitive 37) v3/@claude-flow/cli/src/guidance/mod-projection.ts:109— mod-projection.collectModCandidates has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 5 (12 pts), boolean chains 5, ternaries 1 (3 pts), error handling 1 (nesting depth added 17). Of this number, 36 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.
executor.copyAgents (cognitive 37) v3/@claude-flow/cli/src/init/executor.ts:1260— executor.copyAgents has cognitive complexity 37 (threshold 15). Drivers by points: if/else 17 (31 pts), boolean chains 5, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
apply.applyMods (cognitive 37) v3/@claude-flow/cli/src/mods/apply.ts:114— apply.applyMods has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 10, loops 5 (8 pts), ternaries 3 (7 pts) (nesting depth added 8). Of this number, 34 points are the body's own statements and 3 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity· cli.program.command("init").description("Initialize a new Codex project with AGENTS.md and skills").option("-t, --template < (cognitive 37) · ×1
cli.program.command("init").description("Initialize a new Codex project with AGENTS.md and skills").option("-t, --template < (cognitive 37) v3/@claude-flow/codex/src/cli.ts:91— cli.program.command("init").description("Initialize a new Codex project with AGENTS.md and skills").option("-t, --template < has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (20 pts), loops 5 (14 pts), boolean chains 2, error handling 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
analyzer.formatABReport (cognitive 37) REDACTED:2975— analyzer.formatABReport has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 9 (18 pts), loops 5 (11 pts), if/else 6 (8 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DecisionTransformer.transformerLayer (cognitive 37) v3/@claude-flow/neural/src/algorithms/decision-transformer.ts:348— DecisionTransformer.transformerLayer has cognitive complexity 37 (threshold 15). Drivers by points: loops 17 (37 pts) (nesting depth added 20). 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.
parse-adrs.parseLinks (cognitive 36) plugins/ruflo-adr/scripts/lib/parse-adrs.mjs:169— parse-adrs.parseLinks has cognitive complexity 36 (threshold 15). Drivers by points: loops 11 (19 pts), if/else 7 (15 pts), boolean chains 2 (nesting depth added 16). Of this number, 32 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
server.createAiTeamService.server (cognitive 36) REDACTED:125— server.createAiTeamService.server has cognitive complexity 36 (threshold 15). Drivers by points: boolean chains 17, if/else 13, ternaries 3 (5 pts), error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
wf-drill-body.files (cognitive 36) REDACTED:112— wf-drill-body.files has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 11 (23 pts), if/else 9 (10 pts), boolean chains 2, loops 1 (nesting depth added 13). Of this number, 34 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
wf-triage.costRows (cognitive 36) plugins/ruflo-console/hooks/views/wf-triage.ts:115— wf-triage.costRows has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 10 (16 pts), if/else 10 (11 pts), loops 4 (5 pts), boolean chains 4 (nesting depth added 8). Of this number, 35 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dispatch.dispatch (cognitive 36) plugins/ruflo-console/hooks/dispatch.ts:91— dispatch.dispatch has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (21 pts), ternaries 3 (7 pts), boolean chains 5, error handling 1 (2 pts), match/switch 1 (nesting depth added 15). 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.
theme-demo.render (cognitive 36) plugins/ruflo-console/scripts/theme-demo.mts:28— theme-demo.render has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (18 pts), ternaries 8 (14 pts), boolean chains 4 (nesting depth added 9). Of this number, 29 points are the body's own statements and 7 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.
benchmark-intelligence.printMarkdown (cognitive 36) scripts/benchmark-intelligence.mjs:490— benchmark-intelligence.printMarkdown has cognitive complexity 36 (threshold 15). Drivers by points: if/else 19 (28 pts), boolean chains 6, loops 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.
MctsExplorer.explore (cognitive 36) v3/@claude-flow/browser/src/application/mcts-explorer.ts:80— MctsExplorer.explore has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (26 pts), loops 3 (5 pts), error handling 1 (2 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 18). Of this number, 35 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
start.startAction (cognitive 36) v3/@claude-flow/cli/src/commands/start.ts:90— start.startAction has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 11, error handling 3 (6 pts), ternaries 4 (6 pts) (nesting depth added 8). Of this number, 34 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.
CommandParser.getBooleanFlags (cognitive 36) v3/@claude-flow/cli/src/parser.ts:563— CommandParser.getBooleanFlags has cognitive complexity 36 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 6 (15 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CLI.showCommandHelp (cognitive 36) v3/@claude-flow/cli/src/index.ts:461— CLI.showCommandHelp has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 5 (13 pts), if/else 8 (11 pts), loops 4 (7 pts), boolean chains 5 (nesting depth added 14). Of this number, 35 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
session-hook.formatSessionStartOutput (cognitive 36) v3/@claude-flow/hooks/src/workers/session-hook.ts:104— session-hook.formatSessionStartOutput has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 4 (18 pts), if/else 6 (13 pts), boolean chains 5 (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
APIContractValidator.compareContracts (cognitive 36) v3/@claude-flow/testing/src/regression/api-contract.ts:359— APIContractValidator.compareContracts has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (27 pts), loops 4 (5 pts), boolean chains 4 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
QuantumEngine.buildRipsComplex (cognitive 36) v3/plugins/prime-radiant/src/engines/QuantumEngine.ts:394— QuantumEngine.buildRipsComplex has cognitive complexity 36 (threshold 15). Drivers by points: loops 6 (13 pts), if/else 4 (12 pts), boolean chains 11 (nesting depth added 15). Of this number, 27 points are the body's own statements and 9 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mcp-tools.handleMCPTool (cognitive 36) v3/plugins/teammate-plugin/src/mcp-tools.ts:536— mcp-tools.handleMCPTool has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (20 pts), ternaries 5 (11 pts), loops 1 (2 pts), boolean chains 1, error handling 1, match/switch 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
settings.settingsView (cognitive 35) plugins/ruflo-console/hooks/views/settings.ts:340— settings.settingsView has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 9 (12 pts), if/else 7 (11 pts), boolean chains 8, loops 2 (4 pts) (nesting depth added 9). Of this number, 26 points are the body's own statements and 9 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.
learning.learningView (cognitive 35) plugins/ruflo-console/hooks/views/learning.ts:72— learning.learningView has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 16 (23 pts), boolean chains 11, if/else 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
harness-track.settle (cognitive 35) plugins/ruflo-console/hooks/data/harness-track.ts:48— harness-track.settle has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 8, ternaries 2 (6 pts), error handling 2 (4 pts), loops 3 (nesting depth added 11). Of this number, 26 points are the body's own statements and 9 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
wf-worktrees.whyKept (cognitive 35) REDACTED:258— wf-worktrees.whyKept has cognitive complexity 35 (threshold 15). Drivers by points: if/else 17, ternaries 8 (16 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
benchmark-models.main (cognitive 35) scripts/benchmark-models.mjs:263— benchmark-models.main has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 10 (16 pts), if/else 7 (11 pts), loops 3 (4 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 13). Of this number, 16 points are the body's own statements and 19 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
render-tui-svg.rowId (cognitive 35) scripts/render-tui-svg.mjs:84— render-tui-svg.rowId has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (19 pts), ternaries 3 (8 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 11). Of this number, 31 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
memory-bridge.bridgeSearchEntries (cognitive 35) v3/@claude-flow/cli/src/memory/memory-bridge.ts:1378— memory-bridge.bridgeSearchEntries has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 8, ternaries 4 (7 pts), error handling 3 (5 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.
diff-classifier.getGitDiffNumstat (cognitive 35) v3/@claude-flow/cli/src/ruvector/diff-classifier.ts:473— diff-classifier.getGitDiffNumstat has cognitive complexity 35 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 6, ternaries 2 (6 pts), loops 2 (4 pts), match/switch 1 (3 pts), error handling 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (diff-classifier.getGitDiffNumstatAsync) 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.
diff-classifier.getGitDiffNumstatAsync (cognitive 35) v3/@claude-flow/cli/src/ruvector/diff-classifier.ts:548— diff-classifier.getGitDiffNumstatAsync has cognitive complexity 35 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 6, ternaries 2 (6 pts), loops 2 (4 pts), match/switch 1 (3 pts), error handling 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (diff-classifier.getGitDiffNumstat) 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.
daemon.stopAllDaemons (cognitive 35) v3/@claude-flow/cli/src/commands/daemon.ts:721— daemon.stopAllDaemons has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (20 pts), error handling 4 (9 pts), ternaries 1 (3 pts), loops 2, boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
index.validateSkillMd (cognitive 35) v3/@claude-flow/codex/src/validators/index.ts:215— index.validateSkillMd has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 8, loops 5 (7 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.
ReasoningBankAdapter.consolidate (cognitive 35) v3/@claude-flow/neural/src/reasoningbank-adapter.ts:356— ReasoningBankAdapter.consolidate has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (25 pts), loops 6 (8 pts), boolean chains 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
agent-card.validateAgentCard (cognitive 35) REDACTED:211— agent-card.validateAgentCard has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 9, loops 3 (5 pts) (nesting depth added 10). Most of this is not in the body itself: 13 of the 35 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 259, a function literal at line 231, requireString). 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.
inbound-dispatcher.dispatchInbound (cognitive 35) v3/@claude-flow/plugin-agent-federation/src/application/inbound-dispatcher.ts:271— inbound-dispatcher.dispatchInbound has cognitive complexity 35 (threshold 15). Drivers by points: if/else 15 (20 pts), error handling 4 (6 pts), ternaries 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.
product-plane.verifySignedProductActionEnvelope (cognitive 35) v3/@claude-flow/security/src/policy/product-plane.ts:1267— product-plane.verifySignedProductActionEnvelope has cognitive complexity 35 (threshold 15). Drivers by points: if/else 23 (25 pts), boolean chains 6, error handling 2, ternaries 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, 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.
MinCutBridge.spectralPartition (cognitive 35) v3/plugins/code-intelligence/src/bridges/mincut-bridge.ts:410— MinCutBridge.spectralPartition has cognitive complexity 35 (threshold 15). Drivers by points: loops 11 (20 pts), if/else 8 (15 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.
GnnBridge.transitiveReduction (cognitive 35) v3/plugins/hyperbolic-reasoning/src/bridges/gnn-bridge.ts:462— GnnBridge.transitiveReduction has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (28 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 20). Most of this is not in the body itself: 15 of the 35 points are its own statements and the rest belongs to one function item inside it that branches (hasIndirectPath). 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.
hive.proposalsSection (cognitive 34) plugins/ruflo-console/hooks/views/hive.ts:223— hive.proposalsSection has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 10 (23 pts), if/else 5 (7 pts), boolean chains 3, loops 1 (nesting depth added 15). Of this number, 33 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
wf-guide.guideActions (cognitive 34) plugins/ruflo-console/hooks/data/wf-guide.ts:151— wf-guide.guideActions has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 14 (29 pts), if/else 3, boolean chains 2 (nesting depth added 15). Of this number, 33 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
speculative-exploration.explore (cognitive 34) v3/@claude-flow/cli/src/agenticow/speculative-exploration.ts:167— speculative-exploration.explore has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 5, loops 4, ternaries 2 (4 pts), error handling 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LocalSonaCoordinator.distillLearning (cognitive 34) v3/@claude-flow/cli/src/memory/intelligence.ts:312— LocalSonaCoordinator.distillLearning has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (24 pts), loops 3 (6 pts), boolean chains 3, error handling 1 (nesting depth added 18). Of this number, 33 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.
mcp-tools.getAllRelatedFiles (cognitive 34) v3/plugins/code-intelligence/src/mcp-tools.ts:836— mcp-tools.getAllRelatedFiles has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 7 (11 pts), boolean chains 4, ternaries 2, error handling 1 (nesting depth added 12). Of this number, 23 points are the body's own statements and 11 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.
prepare-publish.updatePackageJson (cognitive 34) v3/scripts/prepare-publish.js:59— prepare-publish.updatePackageJson has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (23 pts), loops 4 (10 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.
wf-convo.conversationRows (cognitive 33) plugins/ruflo-console/hooks/views/wf-convo.ts:92— wf-convo.conversationRows has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 14 (22 pts), if/else 8, boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
events-args.applyEventsArgs (cognitive 33) plugins/ruflo-console/hooks/events-args.ts:15— events-args.applyEventsArgs has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 7, ternaries 4 (7 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
health.summarize (cognitive 33) plugins/ruflo-cost-tracker/scripts/health.mjs:181— health.summarize has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 5 (11 pts), boolean chains 5, match/switch 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.
managed-workflows.eventPage (cognitive 33) v3/@claude-flow/cli/src/services/managed-workflows.ts:19— managed-workflows.eventPage has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 17, if/else 9 (15 pts), loops 1 (nesting depth added 6). 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.
memory.runMemoryCommand (cognitive 33) v3/@claude-flow/cli-core/src/commands/memory.ts:75— memory.runMemoryCommand has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 4 (8 pts), boolean chains 5, loops 2 (4 pts), error handling 1, match/switch 1 (nesting depth added 13). Of this number, 22 points are the body's own statements and 11 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.
RvfaPatcher.applyPatch (cognitive 33) v3/@claude-flow/cli/src/appliance/rvfa-distribution.ts:228— RvfaPatcher.applyPatch has cognitive complexity 33 (threshold 15). Drivers by points: if/else 16 (24 pts), error handling 4 (5 pts), ternaries 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
pheromone-adaptive.recordApscSignal (cognitive 33) v3/@claude-flow/cli/src/services/pheromone-adaptive.ts:156— pheromone-adaptive.recordApscSignal has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 6, ternaries 4 (nesting depth added 10). Of this number, 31 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
harness-flywheel-generations.biasedGrid (cognitive 33) v3/@claude-flow/cli/src/services/harness-flywheel-generations.ts:219— harness-flywheel-generations.biasedGrid has cognitive complexity 33 (threshold 15). Drivers by points: loops 9 (19 pts), if/else 4 (13 pts), boolean chains 1 (nesting depth added 19). Of this number, 32 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, 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.
policy-anchor-log.anchorEntries (cognitive 33) v3/@claude-flow/cli/src/services/policy-anchor-log.ts:97— policy-anchor-log.anchorEntries has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (27 pts), loops 2 (5 pts), boolean chains 1 (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.
session-tools.restoreMemorySnapshot (cognitive 33) v3/@claude-flow/cli/src/mcp-tools/session-tools.ts:311— session-tools.restoreMemorySnapshot has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 7, ternaries 3 (5 pts), error handling 3 (4 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.
cuda-cubin.parseCubin (cognitive 33) v3/@claude-flow/cli/src/rure/cuda-cubin.ts:107— cuda-cubin.parseCubin has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 7 (10 pts), boolean chains 7, loops 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.
hive-mind.spawnClaudeCodeInstance (cognitive 33) v3/@claude-flow/cli/src/commands/hive-mind.ts:186— hive-mind.spawnClaudeCodeInstance has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 10, error handling 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 9). Of this number, 25 points are the body's own statements and 8 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
validator.validateUpdate (cognitive 33) v3/@claude-flow/cli/src/update/validator.ts:54— validator.validateUpdate has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (25 pts), boolean chains 5, 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.
CommandParser.buildAliases (cognitive 33) v3/@claude-flow/cli/src/parser.ts:436— CommandParser.buildAliases has cognitive complexity 33 (threshold 15). Drivers by points: if/else 6 (20 pts), loops 5 (13 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CommandParser.validateFlags (cognitive 33) v3/@claude-flow/cli/src/parser.ts:630— CommandParser.validateFlags has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 7, ternaries 1 (4 pts), loops 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
index.parseToml (cognitive 33) v3/@claude-flow/codex/src/validators/index.ts:780— index.parseToml has cognitive complexity 33 (threshold 15). Drivers by points: if/else 16 (28 pts), boolean chains 4, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReasoningBank.consolidate (cognitive 33) v3/@claude-flow/hooks/src/reasoningbank/index.ts:563— ReasoningBank.consolidate has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (23 pts), loops 4 (5 pts), ternaries 1 (4 pts), boolean chains 1 (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.
Quantizer.kMeans (cognitive 33) v3/@claude-flow/memory/src/hnsw-index.ts:1398— Quantizer.kMeans has cognitive complexity 33 (threshold 15). Drivers by points: loops 8 (20 pts), if/else 4 (13 pts) (nesting depth added 21). 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.
AgentDBAdapter.bulkInsert (cognitive 33) v3/@claude-flow/memory/src/agentdb-adapter.ts:489— AgentDBAdapter.bulkInsert has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 9 (12 pts), boolean chains 5 (nesting depth added 11). Of this number, 32 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.
memory-tools.handleListMemory (cognitive 33) v3/mcp/tools/memory-tools.ts:269— memory-tools.handleListMemory has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 6 (18 pts), if/else 5 (8 pts), boolean chains 3, error handling 1 (2 pts), match/switch 1 (2 pts) (nesting depth added 17). Most of this is not in the body itself: 10 of the 33 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 312, 288). 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.
CognitiveBridge.createMockModule (cognitive 33) v3/plugins/cognitive-kernel/src/bridges/cognitive-bridge.ts:253— CognitiveBridge.createMockModule has cognitive complexity 33 (threshold 15). Drivers by points: if/else 17 (25 pts), loops 6 (8 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.
HyperbolicBridge.embedHierarchy (cognitive 33) v3/plugins/hyperbolic-reasoning/src/bridges/hyperbolic-bridge.ts:141— HyperbolicBridge.embedHierarchy has cognitive complexity 33 (threshold 15). Drivers by points: loops 8 (16 pts), if/else 7 (14 pts), boolean chains 3 (nesting depth added 15). Of this number, 30 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
stream.claudeParser (cognitive 32) plugins/ruflo-console/hooks/stream.ts:130— stream.claudeParser has cognitive complexity 32 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 3 (10 pts), boolean chains 6, loops 2 (4 pts), match/switch 1 (nesting depth added 15). None of this is in the body itself: all 32 points belong to one function literal inside it that branches (line 133). 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.
workflows.workflowsView (cognitive 32) plugins/ruflo-console/hooks/views/workflows.ts:136— workflows.workflowsView has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 8 (13 pts), if/else 12, boolean chains 5, loops 1 (2 pts) (nesting depth added 6). Of this number, 30 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
update-flow.checkForUpdate (cognitive 32) plugins/ruflo-console/hooks/update-flow.ts:140— update-flow.checkForUpdate has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (18 pts), boolean chains 7, ternaries 5 (6 pts), error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
ruflo-hook.main (cognitive 32) REDACTED:568— ruflo-hook.main has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (16 pts), ternaries 4 (9 pts), boolean chains 7 (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.
summary.gather (cognitive 32) plugins/ruflo-cost-tracker/scripts/summary.mjs:66— summary.gather has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 14, loops 3 (7 pts), ternaries 5 (7 pts), if/else 2 (4 pts) (nesting depth added 8). 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.
solver-bridge.singleEntryPageRank (cognitive 32) plugins/ruflo-graph-intelligence/src/infrastructure/solver-bridge.ts:68— solver-bridge.singleEntryPageRank has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 6 (11 pts), boolean chains 1, 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.
drift-from-history.main (cognitive 32) plugins/ruflo-metaharness/scripts/drift-from-history.mjs:160— drift-from-history.main has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (16 pts), ternaries 8 (10 pts), boolean chains 5, error handling 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
memory-bridge.bridgeHierarchicalRecall (cognitive 32) v3/@claude-flow/cli/src/memory/memory-bridge.ts:3589— memory-bridge.bridgeHierarchicalRecall has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 8, ternaries 2 (3 pts), error handling 1 (nesting depth added 12). Most of this is not in the body itself: 15 of the 32 points are its own statements and the rest belongs to one function literal inside it that branches (line 3613). 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.
memory-initializer.purgeNamespace (cognitive 32) v3/@claude-flow/cli/src/memory/memory-initializer.ts:4158— memory-initializer.purgeNamespace has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 2 (6 pts), boolean chains 4, ternaries 2 (3 pts), error handling 1 (nesting depth added 14). Most of this is not in the body itself: 2 of the 32 points are its own statements and the rest belongs to one function literal inside it that branches (line 4181). 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.
policy-ledger-anchor.assessAnchorsChecked (cognitive 32) v3/@claude-flow/cli/src/services/policy-ledger-anchor.ts:358— policy-ledger-anchor.assessAnchorsChecked has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (24 pts), boolean chains 5, ternaries 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.
MCPServerManager.startStdioServer (cognitive 32) REDACTED:707— MCPServerManager.startStdioServer has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 7, ternaries 3 (7 pts), error handling 2 (4 pts), loops 1 (nesting depth added 10). Most of this is not in the body itself: 14 of the 32 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 842, 764, 761, …). 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.
executor.writeHelpers (cognitive 32) v3/@claude-flow/cli/src/init/executor.ts:1375— executor.writeHelpers has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
distill-oracle.labelResolved (cognitive 32) v3/@claude-flow/cli/src/services/distill-oracle.ts:193— distill-oracle.labelResolved has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 3 (4 pts), ternaries 1 (4 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ShardRetriever.indexShards (cognitive 32) REDACTED:221— ShardRetriever.indexShards has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 5 (12 pts), boolean chains 4 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MoERouter.updateExpertWeights (cognitive 32) v3/@claude-flow/neural/src/moe-router.ts:476— MoERouter.updateExpertWeights has cognitive complexity 32 (threshold 15). Drivers by points: loops 14 (19 pts), if/else 7 (9 pts), boolean chains 3, ternaries 1 (nesting depth added 7). 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.
AgenticPolicyEngine.applyBudget (cognitive 32) v3/@claude-flow/security/src/policy/engine.ts:271— AgenticPolicyEngine.applyBudget has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 4 (12 pts), boolean chains 6, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
loader.loadWasmBytes (cognitive 32) v3/plugins/gastown-bridge/src/wasm/loader.ts:90— loader.loadWasmBytes has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (28 pts), error handling 1 (2 pts), loops 1, ternaries 1 (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
GnnBridge.forward (cognitive 32) v3/plugins/hyperbolic-reasoning/src/bridges/gnn-bridge.ts:192— GnnBridge.forward has cognitive complexity 32 (threshold 15). Drivers by points: loops 10 (24 pts), if/else 3 (7 pts), boolean chains 1 (nesting depth added 18). 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.
QuantumEngine.computePersistenceDiagramJS (cognitive 32) v3/plugins/prime-radiant/src/engines/QuantumEngine.ts:258— QuantumEngine.computePersistenceDiagramJS has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (18 pts), ternaries 3 (9 pts), loops 3, boolean chains 2 (nesting depth added 16). Of this number, 30 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.
WorkflowEngine.runWorkflow (cognitive 32) v3/src/task-execution/application/WorkflowEngine.ts:367— WorkflowEngine.runWorkflow has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (20 pts), ternaries 2 (4 pts), boolean chains 3, loops 2 (3 pts), error handling 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
adr.adrsView (cognitive 31) plugins/ruflo-console/hooks/views/adr.ts:120— adr.adrsView has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 10 (18 pts), if/else 9 (10 pts), boolean chains 2, loops 1 (nesting depth added 9). Of this number, 29 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
events-ui.eventsModel (cognitive 31) plugins/ruflo-console/hooks/events-ui.ts:85— events-ui.eventsModel has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 8, loops 4, ternaries 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
controller.createController.readAll (cognitive 31) plugins/ruflo-console/hooks/controller.ts:105— controller.createController.readAll has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (18 pts), ternaries 2 (5 pts), boolean chains 4, loops 2 (3 pts), error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
trend.main (cognitive 31) plugins/ruflo-cost-tracker/scripts/trend.mjs:57— trend.main has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 6 (12 pts), boolean chains 9, if/else 9, loops 1 (nesting depth added 6). Of this number, 29 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
postinstall.findAllAgentdbBases (cognitive 31) v3/@claude-flow/cli/scripts/postinstall.cjs:52— postinstall.findAllAgentdbBases has cognitive complexity 31 (threshold 15). Drivers by points: if/else 5 (15 pts), error handling 3 (12 pts), loops 2 (4 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
intelligence.compactPatterns (cognitive 31) v3/@claude-flow/cli/src/memory/intelligence.ts:1643— intelligence.compactPatterns has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 4 (7 pts), boolean chains 4, ternaries 1 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
memory-bridge.bridgeSearchPatterns (cognitive 31) v3/@claude-flow/cli/src/memory/memory-bridge.ts:2638— memory-bridge.bridgeSearchPatterns has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 12, if/else 8 (11 pts), ternaries 3 (5 pts), error handling 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
policy-ledger-anchor.recordAnchor (cognitive 31) v3/@claude-flow/cli/src/services/policy-ledger-anchor.ts:418— policy-ledger-anchor.recordAnchor has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 8 (14 pts), boolean chains 8, if/else 7 (8 pts), error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WorkerDaemon.readDaemonConfigFromFile (cognitive 31) REDACTED:523— WorkerDaemon.readDaemonConfigFromFile has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 10, ternaries 9 (10 pts), if/else 5 (6 pts), error handling 3 (5 pts) (nesting depth added 4). Of this number, 29 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
progress-tools.calculateProgress (cognitive 31) v3/@claude-flow/cli/src/mcp-tools/progress-tools.ts:110— progress-tools.calculateProgress has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 6, error handling 3 (6 pts), loops 1 (2 pts), ternaries 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
probe.partialInstallFindings (cognitive 31) v3/@claude-flow/cli/src/mods/probe.ts:97— probe.partialInstallFindings has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (17 pts), error handling 2 (5 pts), loops 2 (5 pts), boolean chains 4 (nesting depth added 14). Of this number, 28 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.
mcp-composition-inspector.scanToolDescriptions (cognitive 31) v3/@claude-flow/cli/src/security/mcp-composition-inspector.ts:132— mcp-composition-inspector.scanToolDescriptions has cognitive complexity 31 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 8 (13 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.
index.validateAgentsMd (cognitive 31) v3/@claude-flow/codex/src/validators/index.ts:86— index.validateAgentsMd has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 8, loops 4 (5 pts) (nesting depth added 8). Of this number, 29 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.
index.extractMcpServers (cognitive 31) v3/@claude-flow/codex/src/migrations/index.ts:373— index.extractMcpServers has cognitive complexity 31 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 4 (11 pts), boolean chains 3, error handling 1 (3 pts) (nesting depth added 17). Of this number, 30 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ManifestValidator.validateRequiredFields (cognitive 31) v3/@claude-flow/guidance/src/manifest-validator.ts:606— ManifestValidator.validateRequiredFields has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (24 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HookExecutor.execute (cognitive 31) v3/@claude-flow/hooks/src/executor/index.ts:50— HookExecutor.execute has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 4, error handling 1 (2 pts), ternaries 2, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ResearchMode.rebuildClusters (cognitive 31) v3/@claude-flow/neural/src/modes/research.ts:251— ResearchMode.rebuildClusters has cognitive complexity 31 (threshold 15). Drivers by points: loops 9 (23 pts), if/else 3 (8 pts) (nesting depth added 19). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
FlashAttentionOptimizer.benchmarkMemory (cognitive 31) v3/@claude-flow/performance/src/attention-integration.ts:470— FlashAttentionOptimizer.benchmarkMemory has cognitive complexity 31 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 6 (12 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mcp-tools.createMcpTools (cognitive 31) v3/@claude-flow/plugin-iot-cognitum/src/mcp-tools.ts:12— mcp-tools.createMcpTools has cognitive complexity 31 (threshold 15). Drivers by points: error handling 27, if/else 3 (4 pts) (nesting depth added 1). None of this is in the body itself: all 31 points belong to 28 function items inside it that branch (a function literal at line 674, requireCoordinator, a function literal at line 37, …). 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.
AnthropicProvider.doStreamComplete (cognitive 31) v3/@claude-flow/providers/src/anthropic-provider.ts:172— AnthropicProvider.doStreamComplete has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 6, error handling 2 (5 pts), loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RvfEventLog.replayFile (cognitive 31) v3/@claude-flow/shared/src/events/rvf-event-log.ts:357— RvfEventLog.replayFile has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (24 pts), error handling 2 (4 pts), boolean chains 2, 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.
Index.Index::executeResearch (cognitive 31) v3/goal_ui/src/pages/Index.tsx:599— Index.Index::executeResearch has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (18 pts), boolean chains 7, error handling 2 (5 pts), loops 1 (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (Index.Index) 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.
mcp-tools.cognitiveLoadHandler (cognitive 31) REDACTED:903— mcp-tools.cognitiveLoadHandler has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (24 pts), ternaries 3 (5 pts), error handling 1, 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.
SyncBridge.syncToAgentDB (cognitive 31) v3/plugins/gastown-bridge/src/bridges/sync-bridge.ts:381— SyncBridge.syncToAgentDB has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (20 pts), ternaries 1 (4 pts), error handling 1 (3 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 19). Of this number, 29 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GasTownBridgePlugin.createBridgeFacade (cognitive 31) v3/plugins/gastown-bridge/src/index.ts:1281— GasTownBridgePlugin.createBridgeFacade has cognitive complexity 31 (threshold 15). Drivers by points: if/else 22, ternaries 6 (7 pts), boolean chains 2 (nesting depth added 1). Of this number, 29 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: 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.
AttentionBridge.createMockModule (cognitive 31) v3/plugins/neural-coordination/src/bridges/attention-bridge.ts:246— AttentionBridge.createMockModule has cognitive complexity 31 (threshold 15). Drivers by points: loops 11 (20 pts), if/else 5 (10 pts), boolean chains 1 (nesting depth added 14). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
executeTool (cognitive 31) REDACTED:780— executeTool has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 9, match/switch 1, other 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.
claims.claimsView (cognitive 30) plugins/ruflo-console/hooks/views/claims.ts:13— claims.claimsView has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 10 (18 pts), if/else 8 (10 pts), boolean chains 2 (nesting depth added 10). Of this number, 16 points are the body's own statements and 14 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.
learning-pulse.pulseRows (cognitive 30) plugins/ruflo-console/hooks/views/learning-pulse.ts:17— learning-pulse.pulseRows has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 13 (19 pts), if/else 6 (7 pts), loops 2 (4 pts) (nesting depth added 9). Of this number, 22 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.
wf-control.controlActions (cognitive 30) REDACTED:235— wf-control.controlActions has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 16 (21 pts), boolean chains 5, if/else 3 (4 pts) (nesting depth added 6). Of this number, 21 points are the body's own statements and 9 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
runner.createRunner.ask (cognitive 30) plugins/ruflo-console/hooks/runner.ts:275— runner.createRunner.ask has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 15, if/else 9 (10 pts), ternaries 4 (5 pts) (nesting depth added 2). Of this number, 29 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
_invoke.findLocalPackageDir (cognitive 30) plugins/ruflo-metaharness/scripts/_invoke.mjs:127— _invoke.findLocalPackageDir has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (21 pts), error handling 1 (5 pts), loops 2 (3 pts), ternaries 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
shapes.normalise (cognitive 30) plugins/ruflo-protector/hooks/shapes.ts:115— shapes.normalise has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 5, loops 2 (4 pts), ternaries 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
gaia-audit.checkGraderIsolation (cognitive 30) plugins/ruflo-workflows/scripts/gaia-audit.mjs:419— gaia-audit.checkGraderIsolation has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (14 pts), ternaries 4 (9 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
helper-refresh.acquireRefreshLock (cognitive 30) v3/@claude-flow/cli/src/init/helper-refresh.ts:152— helper-refresh.acquireRefreshLock has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (17 pts), error handling 4 (12 pts), loops 1 (nesting depth added 19). Of this number, 26 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.
memory-initializer.topKIndices (cognitive 30) v3/@claude-flow/cli/src/memory/memory-initializer.ts:1199— memory-initializer.topKIndices has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
evolve-proof.verifyReceiptBundle (cognitive 30) v3/@claude-flow/cli/src/services/evolve-proof.ts:366— evolve-proof.verifyReceiptBundle has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 11, if/else 9 (10 pts), ternaries 5 (7 pts), error handling 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
doctor.checkMemoryIntegrity (cognitive 30) REDACTED:885— doctor.checkMemoryIntegrity has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (10 pts), error handling 6 (9 pts), boolean chains 6, ternaries 3 (5 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
doctor.checkVersionFreshness (cognitive 30) REDACTED:1675— doctor.checkVersionFreshness has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 11, if/else 5 (9 pts), error handling 4 (5 pts), ternaries 2 (4 pts), loops 1 (nesting depth added 7). Of this number, 25 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CLI.showHelp (cognitive 30) v3/@claude-flow/cli/src/index.ts:357— CLI.showHelp has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 6 (10 pts), ternaries 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WorkerManager.checkAlerts (cognitive 30) v3/@claude-flow/hooks/src/workers/index.ts:549— WorkerManager.checkAlerts has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (21 pts), ternaries 2 (6 pts), boolean chains 2, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AgentDBAdapter.applyFilters (cognitive 30) v3/@claude-flow/memory/src/agentdb-adapter.ts:999— AgentDBAdapter.applyFilters has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 10, loops 1 (2 pts) (nesting depth added 5). None of this is in the body itself: all 30 points belong to one function literal inside it that branches (line 1003). 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.
GraphOperations.louvainCommunityDetection (cognitive 30) v3/@claude-flow/plugins/src/integrations/ruvector/gnn.ts:2456— GraphOperations.louvainCommunityDetection has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 8 (13 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.
ConfigLoader.load (cognitive 30) v3/@claude-flow/shared/src/core/config/loader.ts:163— ConfigLoader.load has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 2 (6 pts), boolean chains 3, error handling 1 (3 pts), ternaries 1 (nesting depth added 17). 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.
V2CompatibilityValidator.validateCLI (cognitive 30) v3/@claude-flow/testing/src/v2-compat/compatibility-validator.ts:470— V2CompatibilityValidator.validateCLI has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 7 (18 pts), boolean chains 7, loops 3 (5 pts) (nesting depth added 13). Of this number, 28 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.
createGithubQuery.repo (cognitive 30) plugins/ruflo-x-gateway/src/github-query.mjs:285— createGithubQuery.repo has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (15 pts), error handling 3 (7 pts), other 3, ternaries 2 (3 pts), boolean chains 1, 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.
changelog.parseChangelog (cognitive 29) plugins/ruflo-console/hooks/data/changelog.ts:60— changelog.parseChangelog has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 5, ternaries 2 (4 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.
write-via.viaHostFs (cognitive 29) plugins/ruflo-console/hooks/data/write-via.ts:105— write-via.viaHostFs has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 9, ternaries 2 (3 pts), match/switch 1 (nesting depth added 8). Of this number, 28 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
adr.parseAdr (cognitive 29) plugins/ruflo-console/hooks/data/adr.ts:268— adr.parseAdr has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (15 pts), ternaries 4 (6 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
bar.barView (cognitive 29) plugins/ruflo-console/hooks/views/bar.ts:232— bar.barView has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 8 (12 pts), if/else 6 (9 pts), boolean chains 6, loops 2 (nesting depth added 7). Of this number, 17 points are the body's own statements and 12 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.
secure.resultRows (cognitive 29) plugins/ruflo-console/hooks/views/secure.ts:80— secure.resultRows has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 12 (20 pts), if/else 5 (6 pts), boolean chains 2, loops 1 (nesting depth added 9). Of this number, 23 points are the body's own statements and 6 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.
event-query.unsafeGroup (cognitive 29) REDACTED:49— event-query.unsafeGroup has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (24 pts), boolean chains 4, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mods.modsRows (cognitive 29) plugins/ruflo-console/hooks/views/mods.ts:36— mods.modsRows has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 11 (22 pts), if/else 5 (6 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
agentdb-mod.agentdbModRows (cognitive 29) plugins/ruflo-console/hooks/views/agentdb-mod.ts:15— agentdb-mod.agentdbModRows has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 16 (23 pts), boolean chains 3, if/else 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.
wf-worktrees.line (cognitive 29) plugins/ruflo-console/hooks/views/wf-worktrees.ts:81— wf-worktrees.line has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 17 (25 pts), boolean chains 4 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
similarity.main (cognitive 29) plugins/ruflo-metaharness/scripts/similarity.mjs:107— similarity.main has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 5 (14 pts), if/else 7 (9 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
benchmark-intelligence.benchHnsw (cognitive 29) scripts/benchmark-intelligence.mjs:144— benchmark-intelligence.benchHnsw has cognitive complexity 29 (threshold 15). Drivers by points: loops 8 (17 pts), if/else 2 (6 pts), error handling 3 (5 pts), boolean chains 1 (nesting depth added 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
pretrain-from-github.main (cognitive 29) v3/@claude-flow/cli/scripts/pretrain-from-github.mjs:188— pretrain-from-github.main has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (15 pts), loops 3 (6 pts), ternaries 4 (5 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 9). Of this number, 24 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.
run-beir-rrf-ablation.main (cognitive 29) v3/@claude-flow/cli/scripts/run-beir-rrf-ablation.mjs:82— run-beir-rrf-ablation.main has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 5, ternaries 2 (5 pts), loops 4 (nesting depth added 9). Of this number, 15 points are the body's own statements and 14 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.
rvfa-format.validateHeader (cognitive 29) v3/@claude-flow/cli/src/appliance/rvfa-format.ts:143— rvfa-format.validateHeader has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 8, loops 1 (nesting depth added 5). Of this number, 28 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PromptManager.select (cognitive 29) v3/@claude-flow/cli/src/prompt.ts:64— PromptManager.select has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (12 pts), ternaries 4 (8 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 8). Most of this is not in the body itself: 3 of the 29 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 113, displayChoices, a function literal at line 104, …). 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.
memory-initializer.repairVectorIndexes (cognitive 29) v3/@claude-flow/cli/src/memory/memory-initializer.ts:1755— memory-initializer.repairVectorIndexes has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 5, error handling 3 (4 pts), loops 1, ternaries 1 (nesting depth added 7). Of this number, 27 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dotnet-parse.parseInto (cognitive 29) v3/@claude-flow/cli/src/rure/dotnet-parse.ts:163— dotnet-parse.parseInto has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 4 (6 pts), boolean chains 5 (nesting depth added 9). Most of this is not in the body itself: 12 of the 29 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 215, str). 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.
http-fetch-tools.isPrivateOrLoopback (cognitive 29) v3/@claude-flow/cli/src/mcp-tools/http-fetch-tools.ts:71— http-fetch-tools.isPrivateOrLoopback has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 7, 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.
live-harness.teamsIn (cognitive 29) v3/@claude-flow/cli/src/services/live-harness.ts:378— live-harness.teamsIn has cognitive complexity 29 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 4 (9 pts), boolean chains 7, error handling 2 (3 pts), loops 1 (nesting depth added 10). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
init.initCodexAction (cognitive 29) v3/@claude-flow/cli/src/commands/init.ts:499— init.initCodexAction has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 5 (7 pts), loops 3 (6 pts), boolean chains 1, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
native-training.runNativeTraining (cognitive 29) v3/@claude-flow/cli/src/services/native-training.ts:86— native-training.runNativeTraining has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (19 pts), error handling 3 (5 pts), boolean chains 2, loops 2, ternaries 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ActivityViewer.render (cognitive 29) v3/@claude-flow/codex/src/activity/viewer.ts:56— ActivityViewer.render has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 4 (13 pts), loops 1 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
generators.generateClaudeLocalMd (cognitive 29) v3/@claude-flow/guidance/src/generators.ts:314— generators.generateClaudeLocalMd has cognitive complexity 29 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 9 (11 pts), boolean chains 6 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
auto-memory-bridge.parseMarkdownEntries (cognitive 29) v3/@claude-flow/memory/src/auto-memory-bridge.ts:950— auto-memory-bridge.parseMarkdownEntries has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MemoryMigrator.processBatch (cognitive 29) v3/@claude-flow/memory/src/migration.ts:329— MemoryMigrator.processBatch has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 4, error handling 2 (4 pts), loops 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExecutionDashboard.ExecutionDashboard (cognitive 29) v3/goal_ui/src/components/agents/ExecutionDashboard.tsx:34— ExecutionDashboard.ExecutionDashboard has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 22 (27 pts), boolean chains 2 (nesting depth added 5). Of this number, 24 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
swarm-tools.handleSwarmStatus (cognitive 29) v3/mcp/tools/swarm-tools.ts:198— swarm-tools.handleSwarmStatus has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 6 (19 pts), if/else 4 (7 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 17). 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.
system-tools.handleSystemStatus (cognitive 29) v3/mcp/tools/system-tools.ts:199— system-tools.handleSystemStatus has cognitive complexity 29 (threshold 15). Drivers by points: error handling 5 (10 pts), if/else 9, ternaries 3 (7 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GNNBridge.predictImpact (cognitive 29) v3/plugins/code-intelligence/src/bridges/gnn-bridge.ts:253— GNNBridge.predictImpact has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 6 (7 pts), boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MinCutBridge.minSTCut (cognitive 29) v3/plugins/code-intelligence/src/bridges/mincut-bridge.ts:221— MinCutBridge.minSTCut has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 5 (6 pts), boolean chains 5 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
server.createAiTeamService.buildMcp (cognitive 28) REDACTED:59— server.createAiTeamService.buildMcp has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 13, if/else 8, boolean chains 7. None of this is in the body itself: all 28 points belong to 14 function literals inside it that branch (lines 79, 65, 95, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
server.createPublisherService.server (cognitive 28) REDACTED:157— server.createPublisherService.server has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 7, error handling 3 (6 pts), ternaries 3 (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.
recall.parseRecallLog (cognitive 28) plugins/ruflo-console/hooks/data/recall.ts:240— recall.parseRecallLog has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 6 (14 pts), if/else 4 (7 pts), boolean chains 4, error handling 1 (2 pts), loops 1 (nesting depth added 12). Of this number, 22 points are the body's own statements and 6 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.
mission-ledger.loadLedger (cognitive 28) plugins/ruflo-console/hooks/mission-ledger.ts:100— mission-ledger.loadLedger has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 5, loops 3, ternaries 2 (3 pts) (nesting depth added 7). Of this number, 26 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
optimizer.diagnose (cognitive 28) plugins/ruflo-console/hooks/optimizer.ts:37— optimizer.diagnose has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 4 (9 pts), boolean chains 6, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
pictures.strikeIn (cognitive 28) plugins/ruflo-console/hooks/gfx/pictures.ts:271— pictures.strikeIn has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 4 (7 pts), ternaries 2 (7 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
event-query.highlights (cognitive 28) REDACTED:287— event-query.highlights has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 5 (10 pts), boolean chains 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
event-sources.runEvents (cognitive 28) plugins/ruflo-console/hooks/data/event-sources.ts:33— event-sources.runEvents has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 3 (8 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 12). 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 into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
recall-rows.recallRows (cognitive 28) plugins/ruflo-console/hooks/views/recall-rows.ts:93— recall-rows.recallRows has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (13 pts), ternaries 8 (13 pts), boolean chains 2 (nesting depth added 6). Of this number, 21 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
skill-md.inferStack (cognitive 28) REDACTED:142— skill-md.inferStack has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 4 (8 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 13). Of this number, 26 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
pane.tabs (cognitive 28) plugins/ruflo-console/hooks/views/pane.ts:110— pane.tabs has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 12 (18 pts), boolean chains 7, if/else 3 (nesting depth added 6). Most of this is not in the body itself: 10 of the 28 points are its own statements and the rest belongs to 4 function items inside it that branch (tab, isTab, a function literal at line 161, …). 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.
_ledger.grokRows (cognitive 28) plugins/ruflo-cost-tracker/scripts/_ledger.mjs:205— _ledger.grokRows has cognitive complexity 28 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 10, loops 2 (4 pts), ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
track.summarizeSession (cognitive 28) plugins/ruflo-cost-tracker/scripts/track.mjs:44— track.summarizeSession has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 11, 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.
audit-list.main (cognitive 28) plugins/ruflo-metaharness/scripts/audit-list.mjs:76— audit-list.main has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 12, if/else 8 (10 pts), ternaries 2 (4 pts), loops 2 (nesting depth added 4). Of this number, 24 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
redblue.buildUpstreamArgs (cognitive 28) plugins/ruflo-metaharness/scripts/redblue.mjs:133— redblue.buildUpstreamArgs has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 3, ternaries 1 (2 pts), match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
server.createGateway.buildMcp (cognitive 28) REDACTED:211— server.createGateway.buildMcp has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 12 (13 pts), if/else 7 (8 pts), boolean chains 3, error handling 1 (2 pts), loops 2 (nesting depth added 3). Most of this is not in the body itself: 5 of the 28 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 336, a function literal at line 215, a function literal at line 290, …). 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.app.post("/chat/completions") (cognitive 28) REDACTED:1634— index.app.post("/chat/completions") has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (17 pts), error handling 3 (5 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
benchmark-intelligence.main (cognitive 28) scripts/benchmark-intelligence.mjs:594— benchmark-intelligence.main has cognitive complexity 28 (threshold 15). Drivers by points: error handling 6 (12 pts), boolean chains 9, if/else 7 (nesting depth added 6). Of this number, 27 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
memory-bridge.bridgeGetEntry (cognitive 28) v3/@claude-flow/cli/src/memory/memory-bridge.ts:1716— memory-bridge.bridgeGetEntry has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 15, if/else 6, error handling 4 (5 pts), ternaries 1 (2 pts) (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
HeadlessWorkerExecutor.simpleGlob::scanDir (cognitive 28) v3/@claude-flow/cli/src/services/headless-worker-executor.ts:1232— HeadlessWorkerExecutor.simpleGlob::scanDir has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 4, ternaries 1 (2 pts), error handling 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
policy-runtime.appendArchiveDurably (cognitive 28) v3/@claude-flow/cli/src/services/policy-runtime.ts:276— policy-runtime.appendArchiveDurably has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 4, error handling 2 (4 pts), loops 2, ternaries 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
transitions.validatePlan (cognitive 28) v3/@claude-flow/cli/src/missions/transitions.ts:88— transitions.validatePlan has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 6 (9 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.
metaharness.dispatchFlywheel (cognitive 28) v3/@claude-flow/cli/src/commands/metaharness.ts:95— metaharness.dispatchFlywheel has cognitive complexity 28 (threshold 15). Drivers by points: if/else 17 (24 pts), boolean chains 3, 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.
index.parseYamlFrontmatter (cognitive 28) v3/@claude-flow/codex/src/validators/index.ts:696— index.parseYamlFrontmatter has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 4, error handling 1 (3 pts), loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
index.createV3ProgressWorker (cognitive 28) v3/@claude-flow/hooks/src/workers/index.ts:1843— index.createV3ProgressWorker has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 7 (8 pts), boolean chains 5, loops 3 (nesting depth added 7). None of this is in the body itself: all 28 points belong to 3 function literals inside it that branch (lines 1844, 1922, 1923). 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.
VectorOps.search (cognitive 28) v3/@claude-flow/plugins/src/integrations/ruvector/ruvector-bridge.ts:504— VectorOps.search has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (20 pts), boolean chains 4, loops 1 (2 pts), ternaries 2 (nesting depth added 5). Of this number, 22 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
mcp-tools.getFilesInPath::walk (cognitive 28) v3/plugins/code-intelligence/src/mcp-tools.ts:668— mcp-tools.getFilesInPath::walk has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (20 pts), error handling 3 (5 pts), boolean chains 2, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
wasm-loader.criticalPathFallback (cognitive 28) v3/plugins/gastown-bridge/src/wasm-loader.ts:668— wasm-loader.criticalPathFallback has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 11, loops 8 (11 pts), if/else 4 (6 pts) (nesting depth added 5). 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 into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TopologyOptimizer.dijkstraFallback (cognitive 28) v3/plugins/teammate-plugin/src/topology-optimizer.ts:539— TopologyOptimizer.dijkstraFallback has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 5 (7 pts), boolean chains 5, 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.
(anonymous) (cognitive 28) REDACTED:1634— (anonymous) has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (17 pts), error handling 3 (5 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
guard.extras (cognitive 27) plugins/ruflo-agentdb/hooks/guard.ts:16— guard.extras has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (7 pts), boolean chains 5 (nesting depth added 12). Of this number, 25 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.
workflows.parseTranscript (cognitive 27) plugins/ruflo-console/hooks/data/workflows.ts:183— workflows.parseTranscript has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 7, loops 2 (4 pts), ternaries 3 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
managed.managedRuns (cognitive 27) plugins/ruflo-console/hooks/data/managed.ts:114— managed.managedRuns has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 10 (22 pts), boolean chains 4, if/else 1 (nesting depth added 12). Most of this is not in the body itself: 1 of the 27 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 116, 119, 120). 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.
mission-advisor-live.runConsult (cognitive 27) plugins/ruflo-console/hooks/mission-advisor-live.ts:78— mission-advisor-live.runConsult has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (12 pts), ternaries 4 (6 pts), loops 3 (5 pts), boolean chains 3, error handling 1 (nesting depth added 6). Of this number, 19 points are the body's own statements and 8 belong to 3 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
room.roomFeed (cognitive 27) plugins/ruflo-console/hooks/data/room.ts:60— room.roomFeed has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 4 (7 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 12). Of this number, 24 points are the body's own statements and 3 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cost.costView (cognitive 27) plugins/ruflo-console/hooks/views/cost.ts:57— cost.costView has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 11 (19 pts), if/else 3 (4 pts), boolean chains 3, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
whatsnew.whatsnewView (cognitive 27) plugins/ruflo-console/hooks/views/whatsnew.ts:50— whatsnew.whatsnewView has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 11 (21 pts), if/else 5, boolean chains 1 (nesting depth added 10). Of this number, 21 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
workflows.header (cognitive 27) plugins/ruflo-console/hooks/views/workflows.ts:38— workflows.header has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 14 (24 pts), boolean chains 3 (nesting depth added 10). Of this number, 25 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
wf-page.workflowsPage (cognitive 27) plugins/ruflo-console/hooks/views/wf-page.ts:43— wf-page.workflowsPage has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 8 (11 pts), if/else 7 (10 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 7). Of this number, 23 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
helper-refresh.writeCriticalHelpers (cognitive 27) v3/@claude-flow/cli/src/init/helper-refresh.ts:267— helper-refresh.writeCriticalHelpers has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 4 (9 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
memory-bridge.bridgeDeleteHierarchical (cognitive 27) v3/@claude-flow/cli/src/memory/memory-bridge.ts:2946— memory-bridge.bridgeDeleteHierarchical has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (11 pts), error handling 5 (9 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
proven-config.isSuitable (cognitive 27) v3/@claude-flow/cli/src/config/proven-config.ts:170— proven-config.isSuitable has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
inventory.scanModHooksFromSource (cognitive 27) v3/@claude-flow/cli/src/mods/command-registry/inventory.ts:218— inventory.scanModHooksFromSource has cognitive complexity 27 (threshold 15). Drivers by points: loops 7 (16 pts), if/else 5 (11 pts) (nesting depth added 15). Most of this is not in the body itself: 7 of the 27 points are its own statements and the rest belongs to one function item inside it that branches (walk). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
coverage-reader.readCoverageFromDisk (cognitive 27) v3/@claude-flow/cli/src/commands/coverage-reader.ts:46— coverage-reader.readCoverageFromDisk has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (16 pts), error handling 3 (8 pts), loops 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
plugin-resolve.resolveFindings (cognitive 27) v3/@claude-flow/cli/src/mods/plugin-resolve.ts:164— plugin-resolve.resolveFindings has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 8 (17 pts), if/else 5 (6 pts), boolean chains 3, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
activation.installAndActivateProxy (cognitive 27) REDACTED:151— activation.installAndActivateProxy has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 4 (13 pts), if/else 5 (10 pts), error handling 2 (4 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
analyzer.extractMetrics (cognitive 27) REDACTED:847— analyzer.extractMetrics has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 4, 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.
analyzer.formatValidationReport (cognitive 27) REDACTED:2201— analyzer.formatValidationReport has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 8 (16 pts), loops 4 (7 pts), if/else 3, match/switch 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.
SwarmAdapter.coordinateWithAttention (cognitive 27) v3/@claude-flow/integration/src/swarm-adapter.ts:595— SwarmAdapter.coordinateWithAttention has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 3 (10 pts), if/else 4 (8 pts), loops 4 (6 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 14). Of this number, 25 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dependency-graph.satisfiesVersion (cognitive 27) v3/@claude-flow/plugins/src/registry/dependency-graph.ts:82— dependency-graph.satisfiesVersion has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 5 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RaftConsensus.handleInboundRaftMessage (cognitive 27) v3/@claude-flow/swarm/src/consensus/raft.ts:102— RaftConsensus.handleInboundRaftMessage has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 5 (9 pts), boolean chains 4, loops 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.
chart.ChartTooltipContent (cognitive 27) REDACTED:103— chart.ChartTooltipContent has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 14, ternaries 6 (9 pts), if/else 4 (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 2 function literals inside it that branch (lines 163, 123). 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.
wasm-loader.parseTomlFallback (cognitive 27) v3/plugins/gastown-bridge/src/wasm-loader.ts:431— wasm-loader.parseTomlFallback has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 6, 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.
WasmLoaderAdapter.parseFormula (cognitive 27) v3/plugins/gastown-bridge/src/index.ts:482— WasmLoaderAdapter.parseFormula has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 6, 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.
mcp-tools.annealingSolveHandler (cognitive 27) v3/plugins/quantum-optimizer/src/mcp-tools.ts:72— mcp-tools.annealingSolveHandler has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (4 pts), ternaries 2 (4 pts), boolean chains 2, error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reduceClaims (cognitive 27) plugins/ruflo-x-gateway/src/claims.mjs:9— reduceClaims has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (20 pts), ternaries 1 (3 pts), boolean chains 2, loops 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
workflows.buildRun (cognitive 26) plugins/ruflo-console/hooks/data/workflows.ts:312— workflows.buildRun has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 10 (23 pts), boolean chains 3 (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
steps.stepsRows (cognitive 26) plugins/ruflo-console/hooks/views/steps.ts:98— steps.stepsRows has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 9 (13 pts), if/else 7, boolean chains 6 (nesting depth added 4). Most of this is not in the body itself: 7 of the 26 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 116, 119, 105, …). 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.
neon.neonPicture (cognitive 26) plugins/ruflo-console/hooks/gfx/neon.ts:162— neon.neonPicture has cognitive complexity 26 (threshold 15). Drivers by points: loops 6 (10 pts), if/else 3 (7 pts), ternaries 3 (7 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
wf-cost.usageOfTranscript (cognitive 26) REDACTED:38— wf-cost.usageOfTranscript has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 6 (11 pts), if/else 5 (8 pts), boolean chains 3, error handling 1 (2 pts), loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
wf-replay.boardRows (cognitive 26) plugins/ruflo-console/hooks/views/wf-replay.ts:92— wf-replay.boardRows has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 6 (16 pts), if/else 3 (6 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ObservabilitySpanAdapter.exportAsSparseMatrix (cognitive 26) plugins/ruflo-graph-intelligence/src/adapters/observability-span-adapter.ts:56— ObservabilitySpanAdapter.exportAsSparseMatrix has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 6 (8 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
evolve.buildDiagnosis (cognitive 26) plugins/ruflo-metaharness/scripts/evolve.mjs:219— evolve.buildDiagnosis has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 7, ternaries 3 (6 pts), if/else 5, error handling 3 (4 pts), loops 3 (4 pts) (nesting depth added 5). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
adr-digest.entriesOf (cognitive 26) plugins/ruflo-swarm/hooks/adr-digest.ts:47— adr-digest.entriesOf has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 8, ternaries 2 (4 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
gaia-audit.checkNoWork (cognitive 26) plugins/ruflo-workflows/scripts/gaia-audit.mjs:333— gaia-audit.checkNoWork has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 5, loops 1, ternaries 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
oauth.verifyAccessToken (cognitive 26) plugins/ruflo-x-gateway/src/oauth.mjs:85— oauth.verifyAccessToken has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 6, ternaries 4 (5 pts), error handling 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
audit-exit-bypass-antipattern.auditFile (cognitive 26) scripts/audit-exit-bypass-antipattern.mjs:124— audit-exit-bypass-antipattern.auditFile has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (14 pts), ternaries 2 (5 pts), boolean chains 3, loops 2 (3 pts), error handling 1 (nesting depth added 13). Of this number, 25 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GoapPreflightService.preflight (cognitive 26) v3/@claude-flow/browser/src/application/goap-preflight.ts:81— GoapPreflightService.preflight has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 5, ternaries 2 (5 pts), loops 1 (nesting depth added 12). Of this number, 24 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run-beir-bge.main (cognitive 26) v3/@claude-flow/cli/scripts/run-beir-bge.mjs:191— run-beir-bge.main has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 5 (7 pts), loops 4 (6 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LocalReasoningBank.loadFromDisk (cognitive 26) v3/@claude-flow/cli/src/memory/intelligence.ts:475— LocalReasoningBank.loadFromDisk has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 2 (6 pts), boolean chains 2, error handling 1 (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
memory-tools.ensureInitialized (cognitive 26) REDACTED:455— memory-tools.ensureInitialized has cognitive complexity 26 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 2 (7 pts), error handling 2 (6 pts), loops 1 (4 pts), boolean chains 2 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
harness-flywheel.retrievalPolicyNeighbors (cognitive 26) v3/@claude-flow/cli/src/services/harness-flywheel.ts:122— harness-flywheel.retrievalPolicyNeighbors has cognitive complexity 26 (threshold 15). Drivers by points: if/else 4 (16 pts), loops 3 (6 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.
policy-archive-scan.reverseArchiveRecords (cognitive 26) v3/@claude-flow/cli/src/services/policy-archive-scan.ts:7— policy-archive-scan.reverseArchiveRecords has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 3 (5 pts), ternaries 1 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
search.searchPlugins (cognitive 26) v3/@claude-flow/cli/src/plugins/store/search.ts:16— search.searchPlugins has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 13, if/else 11, match/switch 1, ternaries 1. Of this number, 24 points are the body's own statements and 2 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
walk-files.walkAnalyzableFiles::visit (cognitive 26) v3/@claude-flow/cli/src/rure/walk-files.ts:39— walk-files.walkAnalyzableFiles::visit has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (16 pts), error handling 3 (6 pts), boolean chains 3, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
binary-parse.parsePe (cognitive 26) v3/@claude-flow/cli/src/rure/binary-parse.ts:173— binary-parse.parsePe has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 4 (5 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 8). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to 5 function items inside it that branch (a function literal at line 214, a function literal at line 193, a function literal at line 238, …). 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.
hooks-daemon.main (cognitive 26) v3/@claude-flow/hooks/bin/hooks-daemon.js:30— hooks-daemon.main has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 3 (6 pts), ternaries 1 (4 pts), loops 1 (3 pts), boolean chains 2, 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.
ProviderAdapter.executeWithProvider (cognitive 26) v3/@claude-flow/integration/src/provider-adapter.ts:576— ProviderAdapter.executeWithProvider has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (22 pts), error handling 1 (2 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.
HNSWIndex.searchLayer (cognitive 26) v3/@claude-flow/memory/src/hnsw-index.ts:830— HNSWIndex.searchLayer has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 2 (3 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AgentDBBackend.matchesFilters (cognitive 26) v3/@claude-flow/memory/src/agentdb-backend.ts:1013— AgentDBBackend.matchesFilters has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14, boolean chains 12. 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.
HnswLite.search (cognitive 26) v3/@claude-flow/memory/src/rvf-backend.ts:70— HnswLite.search has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SqlJsBackend.query (cognitive 26) v3/@claude-flow/memory/src/sqljs-backend.ts:447— SqlJsBackend.query has cognitive complexity 26 (threshold 15). Drivers by points: if/else 18 (24 pts), boolean chains 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.
AnthropicProvider.buildRequest (cognitive 26) v3/@claude-flow/providers/src/anthropic-provider.ts:308— AnthropicProvider.buildRequest has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 8, ternaries 3 (5 pts) (nesting depth added 4). Of this number, 25 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: 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.
PathValidator.validateSync (cognitive 26) v3/@claude-flow/security/src/path-validator.ts:483— PathValidator.validateSync has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 4 (5 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JsFallbackWasmLoader.resolveStepDependencies (cognitive 26) v3/plugins/gastown-bridge/src/formula/executor.ts:506— JsFallbackWasmLoader.resolveStepDependencies has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 5 (8 pts) (nesting depth added 14). Of this number, 25 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mcp-tools.analyzeBottlenecks (cognitive 26) v3/plugins/perf-optimizer/src/mcp-tools.ts:519— mcp-tools.analyzeBottlenecks has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 3 (12 pts), boolean chains 6, if/else 3 (6 pts), loops 2 (nesting depth added 12). 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.
mh-lab.summary (cognitive 25) plugins/ruflo-console/hooks/mh-lab.ts:209— mh-lab.summary has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 6 (13 pts), if/else 8 (9 pts), boolean chains 3 (nesting depth added 8). Of this number, 18 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
secure.scanReader (cognitive 25) plugins/ruflo-console/hooks/secure.ts:123— secure.scanReader has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 9 (14 pts), boolean chains 6, if/else 2 (3 pts), loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mission-guidance.startGuidance (cognitive 25) plugins/ruflo-console/hooks/mission-guidance.ts:104— mission-guidance.startGuidance has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 3 (4 pts), boolean chains 3, error handling 2 (nesting depth added 6). Most of this is not in the body itself: 3 of the 25 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 179, tick, add, …). 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.
alerts.alertsOf (cognitive 25) plugins/ruflo-console/hooks/data/alerts.ts:31— alerts.alertsOf has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 6, ternaries 2 (5 pts), loops 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
boot.drawFrame (cognitive 25) plugins/ruflo-console/hooks/gfx/boot.ts:79— boot.drawFrame has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 8 (20 pts), loops 4, if/else 1 (nesting depth added 12). Of this number, 15 points are the body's own statements and 10 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
harness-codex.codexAdapter.scan (cognitive 25) plugins/ruflo-console/hooks/data/harness-codex.ts:153— harness-codex.codexAdapter.scan has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 4 (6 pts), ternaries 2 (4 pts), boolean chains 3, error handling 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
memory-lab.resultRows (cognitive 25) plugins/ruflo-console/hooks/views/memory-lab.ts:104— memory-lab.resultRows has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 11 (18 pts), if/else 5 (6 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.
metaharness.metaharnessView (cognitive 25) plugins/ruflo-console/hooks/views/metaharness.ts:12— metaharness.metaharnessView has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 9 (18 pts), if/else 4, loops 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
terminal.screenOf (cognitive 25) plugins/ruflo-console/hooks/views/terminal.ts:41— terminal.screenOf has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 4 (12 pts), if/else 4 (6 pts), loops 2 (3 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 12). Of this number, 22 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
advise.advise (cognitive 25) plugins/ruflo-cost-tracker/scripts/advise.mjs:20— advise.advise has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 7, loops 4 (nesting depth added 5). Of this number, 22 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
bench.runAnthropicBaseline (cognitive 25) plugins/ruflo-cost-tracker/scripts/bench.mjs:331— bench.runAnthropicBaseline has cognitive complexity 25 (threshold 15). Drivers by points: error handling 3 (7 pts), if/else 4 (6 pts), ternaries 2 (6 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 11). Of this number, 24 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
policy.createToaster.run (cognitive 25) plugins/ruflo-mods/hooks/toast/policy.ts:309— policy.createToaster.run has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 5, 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.
gaia-audit.checkDynamicEval (cognitive 25) plugins/ruflo-workflows/scripts/gaia-audit.mjs:625— gaia-audit.checkDynamicEval has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (6 pts), ternaries 2 (5 pts), boolean chains 3 (nesting depth added 13). Of this number, 24 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
github-query.createGithubQuery.repo (cognitive 25) plugins/ruflo-x-gateway/src/github-query.mjs:285— github-query.createGithubQuery.repo has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (15 pts), error handling 3 (7 pts), boolean chains 1, loops 1, ternaries 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WorkStealingService.detectStaleWork (cognitive 25) v3/@claude-flow/claims/src/application/work-stealing-service.ts:450— WorkStealingService.detectStaleWork has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 3, boolean chains 2 (nesting depth added 11). Of this number, 24 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
memory-bridge.bridgeDeleteCausalEdge (cognitive 25) v3/@claude-flow/cli/src/memory/memory-bridge.ts:3051— memory-bridge.bridgeDeleteCausalEdge has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (10 pts), error handling 4 (7 pts), ternaries 2 (5 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
harness-flywheel.evaluateFlywheelCandidate (cognitive 25) v3/@claude-flow/cli/src/services/harness-flywheel.ts:159— harness-flywheel.evaluateFlywheelCandidate has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 8 (9 pts), boolean chains 4, loops 2, error handling 1 (nesting depth added 3). Of this number, 20 points are the body's own statements and 5 belong to 4 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
policy-runtime.acquireLock (cognitive 25) v3/@claude-flow/cli/src/services/policy-runtime.ts:197— policy-runtime.acquireLock has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (15 pts), error handling 3 (7 pts), boolean chains 1, loops 1, ternaries 1 (nesting depth added 14). Of this number, 21 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.
WorkerDaemon.processDispatchQueue (cognitive 25) REDACTED:1061— WorkerDaemon.processDispatchQueue has cognitive complexity 25 (threshold 15). Drivers by points: error handling 7 (15 pts), if/else 5 (6 pts), ternaries 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DiffClassifier.parseHunks (cognitive 25) v3/@claude-flow/cli/src/ruvector/diff-classifier.ts:196— DiffClassifier.parseHunks has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 5 (11 pts), if/else 6 (10 pts), boolean chains 3, loops 1 (nesting depth added 10). Of this number, 18 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.
PluginDiscoveryService.discoverRegistry (cognitive 25) v3/@claude-flow/cli/src/plugins/store/discovery.ts:192— PluginDiscoveryService.discoverRegistry has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 5 (10 pts), boolean chains 3, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
daemon.startBackgroundDaemon (cognitive 25) v3/@claude-flow/cli/src/commands/daemon.ts:484— daemon.startBackgroundDaemon has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 7, error handling 2 (3 pts), ternaries 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
executor.copySkills (cognitive 25) v3/@claude-flow/cli/src/init/executor.ts:1141— executor.copySkills has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
executor.writeClaudeMd (cognitive 25) v3/@claude-flow/cli/src/init/executor.ts:2220— executor.writeClaudeMd has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 2 (5 pts), boolean chains 4, error handling 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
memory-distill.resolveDistillConfig (cognitive 25) v3/@claude-flow/cli/src/commands/memory-distill.ts:79— memory-distill.resolveDistillConfig has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 4, ternaries 1 (3 pts), error handling 1 (2 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
index.generateValidationReport (cognitive 25) v3/@claude-flow/codex/src/validators/index.ts:609— index.generateValidationReport has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (7 pts), ternaries 3 (7 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
index.generateAgentsMdFromParsed (cognitive 25) v3/@claude-flow/codex/src/migrations/index.ts:585— index.generateAgentsMdFromParsed has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10, loops 5 (10 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DeterministicToolGateway.validateSchema (cognitive 25) v3/@claude-flow/guidance/src/gateway.ts:352— DeterministicToolGateway.validateSchema has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 4 (5 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
index.searchDDDPatterns (cognitive 25) v3/@claude-flow/hooks/src/workers/index.ts:1713— index.searchDDDPatterns has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 2 (3 pts), error handling 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
verify-cross-platform.main (cognitive 25) v3/@claude-flow/memory/verify-cross-platform.ts:27— verify-cross-platform.main has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 5 (9 pts), if/else 6 (8 pts), error handling 5, loops 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GraphOperations.labelPropagationCommunityDetection (cognitive 25) v3/@claude-flow/plugins/src/integrations/ruvector/gnn.ts:2645— GraphOperations.labelPropagationCommunityDetection has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 6 (11 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CohereProvider.doStreamComplete (cognitive 25) v3/@claude-flow/providers/src/cohere-provider.ts:169— CohereProvider.doStreamComplete has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 4, error handling 2 (4 pts), loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
evaluator.constraintsPass (cognitive 25) v3/@claude-flow/security/src/policy/evaluator.ts:20— evaluator.constraintsPass has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 11, if/else 10 (11 pts), ternaries 2 (3 pts) (nesting depth added 2). Of this number, 24 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: 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.
MinCutBridge.edmondsKarp (cognitive 25) v3/plugins/code-intelligence/src/bridges/mincut-bridge.ts:511— MinCutBridge.edmondsKarp has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 6 (11 pts), boolean chains 3 (nesting depth added 12). Of this number, 13 points are the body's own statements and 12 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.
AttentionBridge.alignClauses (cognitive 25) v3/plugins/legal-contracts/src/bridges/attention-bridge.ts:183— AttentionBridge.alignClauses has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 2 (3 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DAGBridge.calculateSchedule (cognitive 25) v3/plugins/legal-contracts/src/bridges/dag-bridge.ts:462— DAGBridge.calculateSchedule has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 7 (9 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DagBridge.optimizeSchedule (cognitive 25) v3/plugins/quantum-optimizer/src/bridges/dag-bridge.ts:437— DagBridge.optimizeSchedule has cognitive complexity 25 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 4 (11 pts), boolean chains 1, match/switch 1 (nesting depth added 13). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
CognitiveBridge.createMockModule (cognitive 25) v3/plugins/ruvector-upstream/src/bridges/cognitive.ts:192— CognitiveBridge.createMockModule has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 6 (8 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.
hive.waveOf (cognitive 24) plugins/ruflo-console/hooks/data/hive.ts:101— hive.waveOf has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 5 (16 pts), if/else 3 (6 pts), boolean chains 1, loops 1 (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
adr-write.statusIn (cognitive 24) plugins/ruflo-console/hooks/data/adr-write.ts:181— adr-write.statusIn has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 6, ternaries 1 (nesting depth added 5). Of this number, 21 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
automate.resultRows (cognitive 24) plugins/ruflo-console/hooks/views/automate.ts:53— automate.resultRows has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 10 (16 pts), if/else 5 (6 pts), boolean chains 1, loops 1 (nesting depth added 7). 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.
adr.detail (cognitive 24) plugins/ruflo-console/hooks/views/adr.ts:48— adr.detail has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 8 (14 pts), if/else 5 (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.
harness-claude.claudeAdapter.scan (cognitive 24) plugins/ruflo-console/hooks/data/harness-claude.ts:225— harness-claude.claudeAdapter.scan has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 3 (5 pts), boolean chains 4, loops 3, error handling 1 (nesting depth added 7). Of this number, 21 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.
wf-worktrees.boardRows (cognitive 24) plugins/ruflo-console/hooks/views/wf-worktrees.ts:110— wf-worktrees.boardRows has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 12 (19 pts), if/else 4, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
model-tools.settlePending (cognitive 24) plugins/ruflo-console/hooks/model-tools.ts:254— model-tools.settlePending has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 8 (10 pts), if/else 8, boolean chains 6 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
_ledger.claudeRows (cognitive 24) plugins/ruflo-cost-tracker/scripts/_ledger.mjs:62— _ledger.claudeRows has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (12 pts), ternaries 2 (6 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
health.main (cognitive 24) plugins/ruflo-cost-tracker/scripts/health.mjs:89— health.main has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (15 pts), ternaries 2 (5 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ruos.parseEvents (cognitive 24) plugins/ruflo-swarm/hooks/reader/ruos.ts:91— ruos.parseEvents has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 10, ternaries 4 (7 pts), if/else 4 (6 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
managed-learning.evaluate (cognitive 24) v3/@claude-flow/cli/src/services/managed-learning.ts:134— managed-learning.evaluate has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 7, loops 3 (4 pts), ternaries 1 (nesting depth added 6). Of this number, 22 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.
guard-probe-worker.calibrate (cognitive 24) scripts/lib/guard-probe-worker.mjs:50— guard-probe-worker.calibrate has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (15 pts), loops 3 (6 pts), ternaries 1 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
validate-input.validateAgentSpawn (cognitive 24) v3/@claude-flow/cli-core/src/mcp-tools/validate-input.ts:304— validate-input.validateAgentSpawn has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 1 (4 pts), error handling 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ModelRouter.selectModel (cognitive 24) v3/@claude-flow/cli/src/ruvector/model-router.ts:1015— ModelRouter.selectModel has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 5, loops 1 (3 pts), ternaries 2 (3 pts) (nesting depth added 10). Of this number, 22 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
promo.getFunnelPromo (cognitive 24) v3/@claude-flow/cli/src/funnel/promo.ts:98— promo.getFunnelPromo has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (18 pts), ternaries 2 (5 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HeadlessWorkerExecutor.executeInternal (cognitive 24) v3/@claude-flow/cli/src/services/headless-worker-executor.ts:960— HeadlessWorkerExecutor.executeInternal has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 12, if/else 7 (8 pts), ternaries 2 (3 pts), error handling 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
harness-flywheel-generations.runFlywheelGeneration (cognitive 24) v3/@claude-flow/cli/src/services/harness-flywheel-generations.ts:242— harness-flywheel-generations.runFlywheelGeneration has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 5, ternaries 4, boolean chains 2, error handling 1 (nesting depth added 4). Of this number, 19 points are the body's own statements and 5 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.
client.resolveIPNS (cognitive 24) v3/@claude-flow/cli/src/transfer/ipfs/client.ts:62— client.resolveIPNS has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (16 pts), ternaries 2 (4 pts), error handling 1 (2 pts), boolean chains 1, 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.
analyze.fallbackAnalyze (cognitive 24) v3/@claude-flow/cli/src/commands/analyze.ts:1317— analyze.fallbackAnalyze has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 7, ternaries 4 (7 pts), loops 6, if/else 2 (4 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ruvector-training.initializeTraining (cognitive 24) v3/@claude-flow/cli/src/services/ruvector-training.ts:310— ruvector-training.initializeTraining has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 7, error handling 4 (5 pts), ternaries 2 (4 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CommandParser.getFlagScope (cognitive 24) v3/@claude-flow/cli/src/parser.ts:531— CommandParser.getFlagScope has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 6 (8 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.
managed-memory-worker.executeManagedMemory (cognitive 24) v3/@claude-flow/cli/src/services/managed-memory-worker.ts:33— managed-memory-worker.executeManagedMemory has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 6, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
index.runCodexLoop (cognitive 24) v3/@claude-flow/codex/src/loop/index.ts:116— index.runCodexLoop has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 5, ternaries 3 (4 pts), error handling 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
hyperbolic.hyperbolicCentroid (cognitive 24) v3/@claude-flow/embeddings/src/hyperbolic.ts:282— hyperbolic.hyperbolicCentroid has cognitive complexity 24 (threshold 15). Drivers by points: loops 10 (17 pts), if/else 3 (4 pts), ternaries 1 (3 pts) (nesting depth added 10). 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.
TemporalStore.query (cognitive 24) v3/@claude-flow/guidance/src/temporal.ts:344— TemporalStore.query has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (19 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.
HttpTransport.setupMiddleware (cognitive 24) REDACTED:185— HttpTransport.setupMiddleware has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 6 (nesting depth added 7). Most of this is not in the body itself: 7 of the 24 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 198, 240, 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.
MemoryGraph.computePageRank (cognitive 24) v3/@claude-flow/memory/src/memory-graph.ts:195— MemoryGraph.computePageRank has cognitive complexity 24 (threshold 15). Drivers by points: loops 6 (11 pts), if/else 4 (8 pts), boolean chains 5 (nesting depth added 9). 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.
RvfBackend.loadFromDisk (cognitive 24) v3/@claude-flow/memory/src/rvf-backend.ts:538— RvfBackend.loadFromDisk has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 3, error handling 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MemoryMigrator.parseMarkdownEntry (cognitive 24) v3/@claude-flow/memory/src/migration.ts:653— MemoryMigrator.parseMarkdownEntry has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (11 pts), error handling 2 (7 pts), boolean chains 3, loops 1 (2 pts), ternaries 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MemoryConsolidator.mergeGroup (cognitive 24) v3/@claude-flow/memory/src/consolidator.ts:181— MemoryConsolidator.mergeGroup has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 5 (10 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cli-commands.createCliCommands (cognitive 24) v3/@claude-flow/plugin-agent-federation/src/cli-commands.ts:32— cli-commands.createCliCommands has cognitive complexity 24 (threshold 15). Drivers by points: if/else 17, boolean chains 3, loops 1 (2 pts), match/switch 1, ternaries 1 (nesting depth added 1). None of this is in the body itself: all 24 points belong to 6 function literals inside it that branch (lines 220, 169, 97, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
PluginRegistry.readExtensionPoints (cognitive 24) v3/@claude-flow/plugins/src/registry/plugin-registry.ts:407— PluginRegistry.readExtensionPoints has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16 (24 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.
EnhancedPluginRegistry.readExtensionPoints (cognitive 24) v3/@claude-flow/plugins/src/registry/enhanced-plugin-registry.ts:643— EnhancedPluginRegistry.readExtensionPoints has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16 (24 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.
IndexTuner.analyzeWorkload (cognitive 24) v3/@claude-flow/plugins/src/integrations/ruvector/self-learning.ts:1083— IndexTuner.analyzeWorkload has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 10, if/else 3 (7 pts), ternaries 4, loops 2 (3 pts) (nesting depth added 5). Of this number, 21 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.
product-plane.validateRuViewSemanticObservation (cognitive 24) v3/@claude-flow/security/src/policy/product-plane.ts:957— product-plane.validateRuViewSemanticObservation has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 9, if/else 9, ternaries 5 (6 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
HookExecutor.execute (cognitive 24) v3/@claude-flow/shared/src/hooks/executor.ts:65— HookExecutor.execute has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 4, ternaries 2 (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.
TaskHooksManager.analyzeTask (cognitive 24) v3/@claude-flow/shared/src/hooks/task-hooks.ts:260— TaskHooksManager.analyzeTask has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
FederationTransport.constructor (cognitive 24) v3/@claude-flow/swarm/src/consensus/federation-transport.ts:88— FederationTransport.constructor has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 5 (nesting depth added 8). None of this is in the body itself: all 24 points belong to one function literal inside it that branches (line 98). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
mcp-tools.performSemanticSearch (cognitive 24) v3/plugins/code-intelligence/src/mcp-tools.ts:735— mcp-tools.performSemanticSearch has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 6, loops 4 (5 pts), error handling 1 (2 pts), ternaries 1 (nesting depth added 6). Of this number, 14 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.
codex-mod-runtime.runCodexHook (cognitive 23) scripts/lib/codex-mod-runtime.mjs:70— codex-mod-runtime.runCodexHook has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 3 (5 pts), boolean chains 4, error handling 2 (3 pts), loops 1 (nesting depth added 5). Of this number, 18 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mission-loop.statusFromEvents (cognitive 23) plugins/ruflo-console/hooks/mission-loop.ts:201— mission-loop.statusFromEvents has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 5 (20 pts), boolean chains 2, loops 1 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
mission-loop.tickPlan (cognitive 23) plugins/ruflo-console/hooks/mission-loop.ts:220— mission-loop.tickPlan has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 8, ternaries 2 (nesting depth added 1). Of this number, 21 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: 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.
hive-chamber.drawChamber (cognitive 23) plugins/ruflo-console/hooks/gfx/hive-chamber.ts:41— hive-chamber.drawChamber has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 12 (18 pts), boolean chains 2, if/else 2, loops 1 (nesting depth added 6). Of this number, 20 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
harness-codex.summarizeCodex (cognitive 23) plugins/ruflo-console/hooks/data/harness-codex.ts:28— harness-codex.summarizeCodex has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 10, ternaries 1 (nesting depth added 2). None of this is in the body itself: all 23 points belong to one function literal inside it that branches (line 32). 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.
sessions.previewRows (cognitive 23) plugins/ruflo-console/hooks/views/sessions.ts:49— sessions.previewRows has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 6 (8 pts), boolean chains 3, loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
skills-lab.scanProject (cognitive 23) plugins/ruflo-console/hooks/skills-lab.ts:152— skills-lab.scanProject has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 9). Most of this is not in the body itself: 11 of the 23 points are its own statements and the rest belongs to one function item inside it that branches (walk). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
mh-lab.resultRows (cognitive 23) plugins/ruflo-console/hooks/views/mh-lab.ts:41— mh-lab.resultRows has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 10 (16 pts), if/else 5 (6 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.
skills-more.previewRows (cognitive 23) plugins/ruflo-console/hooks/views/skills-more.ts:40— skills-more.previewRows has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 7 (16 pts), if/else 4, boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ask-claude.askActions (cognitive 23) plugins/ruflo-console/hooks/ask-claude.ts:140— ask-claude.askActions has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 8 (11 pts), if/else 8, boolean chains 2, error handling 2 (nesting depth added 3). None of this is in the body itself: all 23 points belong to 7 function items inside it that branch (a function literal at line 166, a function literal at line 208, deliver::ask, …). 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.
adr-palette.adrPalette (cognitive 23) plugins/ruflo-console/hooks/adr-palette.ts:20— adr-palette.adrPalette has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 14 (15 pts), boolean chains 6, if/else 2 (nesting depth added 1). Most of this is not in the body itself: 4 of the 23 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 25, local, 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.
render-theme-svg.rowId (cognitive 23) plugins/ruflo-console/scripts/render-theme-svg.mjs:29— render-theme-svg.rowId has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 3 (7 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 6). Most of this is not in the body itself: 7 of the 23 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 41, flush). 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.
ai-page.aiFrame (cognitive 23) plugins/ruflo-console/tui/ai-page.ts:40— ai-page.aiFrame has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 16 (18 pts), boolean chains 3, if/else 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.
bench.runLlmBaseline (cognitive 23) plugins/ruflo-cost-tracker/scripts/bench.mjs:244— bench.runLlmBaseline has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 7 (9 pts), boolean chains 5, error handling 2 (4 pts), if/else 3 (4 pts), loops 1 (nesting depth added 5). 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, 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.
projection.main (cognitive 23) plugins/ruflo-cost-tracker/scripts/projection.mjs:77— projection.main has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 4 (7 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 5). Of this number, 21 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dangerous-command.hasRootDelete::firstGroup (cognitive 23) plugins/ruflo-mods/hooks/guard/dangerous-command.ts:56— dangerous-command.hasRootDelete::firstGroup has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 7, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (dangerous-command.hasRootDelete) 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.
managed-learning-loop.cycleLearning (cognitive 23) v3/@claude-flow/cli/src/services/managed-learning-loop.ts:26— managed-learning-loop.cycleLearning has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 4 (6 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 6). Of this number, 21 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
probe-host-live.main (cognitive 23) scripts/probe-host-live.mjs:423— probe-host-live.main has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 7 (14 pts), if/else 4, boolean chains 3, loops 2 (nesting depth added 7). Of this number, 21 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
flywheel-generations.localGrid (cognitive 23) v3/@claude-flow/cli/scripts/flywheel-generations.mjs:99— flywheel-generations.localGrid has cognitive complexity 23 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 1 (6 pts), boolean chains 2 (nesting depth added 15). Of this number, 21 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, 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.
messages.isValidMessage (cognitive 23) v3/@claude-flow/cli/src/funnel/messages.ts:84— messages.isValidMessage has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 7 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
agent-tools.determineAgentModel (cognitive 23) v3/@claude-flow/cli/src/mcp-tools/agent-tools.ts:171— agent-tools.determineAgentModel has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (10 pts), error handling 2 (6 pts), ternaries 2 (6 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
memory-bridge.rabitqSearchAndRerank (cognitive 23) v3/@claude-flow/cli/src/memory/memory-bridge.ts:2161— memory-bridge.rabitqSearchAndRerank has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 7, error handling 2 (4 pts), loops 3 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
memory-initializer.verifyMemoryInit (cognitive 23) v3/@claude-flow/cli/src/memory/memory-initializer.ts:2761— memory-initializer.verifyMemoryInit has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 8 (14 pts), error handling 6, boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
session-tools.captureMemorySnapshot (cognitive 23) v3/@claude-flow/cli/src/mcp-tools/session-tools.ts:189— session-tools.captureMemorySnapshot has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (8 pts), loops 3 (6 pts), boolean chains 4, error handling 3 (4 pts), ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
gcs.uploadToGCS (cognitive 23) v3/@claude-flow/cli/src/transfer/storage/gcs.ts:100— gcs.uploadToGCS has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 6, error handling 3 (5 pts), ternaries 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
fold.checkObservation (cognitive 23) v3/@claude-flow/cli/src/missions/fold.ts:38— fold.checkObservation has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CoverageRouter.parseLcov (cognitive 23) v3/@claude-flow/cli/src/ruvector/coverage-router.ts:141— CoverageRouter.parseLcov has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
graph-analyzer.analyzeGraph (cognitive 23) v3/@claude-flow/cli/src/ruvector/graph-analyzer.ts:1046— graph-analyzer.analyzeGraph has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, loops 4, ternaries 3 (nesting depth added 4). Of this number, 16 points are the body's own statements and 7 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
live-harness.detectHost (cognitive 23) v3/@claude-flow/cli/src/services/live-harness.ts:212— live-harness.detectHost has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
helper-commands.pinToUserHelpers (cognitive 23) v3/@claude-flow/cli/src/init/helper-commands.ts:130— helper-commands.pinToUserHelpers has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
executor.executeInit (cognitive 23) v3/@claude-flow/cli/src/init/executor.ts:176— executor.executeInit has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (18 pts), error handling 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
apply.removeMods (cognitive 23) v3/@claude-flow/cli/src/mods/apply.ts:197— apply.removeMods has cognitive complexity 23 (threshold 15). Drivers by points: loops 5 (14 pts), if/else 3 (5 pts), ternaries 1 (4 pts) (nesting depth added 14). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
start.parseSimpleYaml (cognitive 23) v3/@claude-flow/cli/src/commands/start.ts:25— start.parseSimpleYaml has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GitHubSync.claimOnGitHub (cognitive 23) v3/@claude-flow/cli/src/services/claim-service.ts:920— GitHubSync.claimOnGitHub has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (11 pts), error handling 4 (8 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
StatuslineGenerator.getSystemMetrics (cognitive 23) v3/@claude-flow/hooks/src/statusline/index.ts:543— StatuslineGenerator.getSystemMetrics has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (13 pts), error handling 3 (4 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 10). Most of this is not in the body itself: 10 of the 23 points are its own statements and the rest belongs to one function item inside it that branches (countLines). 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.
HNSWIndex.removePoint (cognitive 23) v3/@claude-flow/memory/src/hnsw-index.ts:412— HNSWIndex.removePoint has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (7 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.
ResearchMode.processBatch (cognitive 23) v3/@claude-flow/neural/src/modes/research.ts:348— ResearchMode.processBatch has cognitive complexity 23 (threshold 15). Drivers by points: loops 6 (15 pts), if/else 3 (8 pts) (nesting depth added 14). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
OllamaProvider.doStreamComplete (cognitive 23) v3/@claude-flow/providers/src/ollama-provider.ts:166— OllamaProvider.doStreamComplete has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 4, error handling 2 (4 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.
AgenticPolicyEngine.verifyLedger (cognitive 23) v3/@claude-flow/security/src/policy/engine.ts:205— AgenticPolicyEngine.verifyLedger has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 3 (6 pts), boolean chains 4, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GitCommitHook.processCommitMessage (cognitive 23) v3/@claude-flow/shared/src/hooks/safety/git-commit.ts:279— GitCommitHook.processCommitMessage has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 4, loops 1 (2 pts), ternaries 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
V2CompatibilityValidator.validateAPI (cognitive 23) v3/@claude-flow/testing/src/v2-compat/compatibility-validator.ts:685— V2CompatibilityValidator.validateAPI has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 6 (15 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 10). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
task-tools.handleListTasks (cognitive 23) v3/mcp/tools/task-tools.ts:307— task-tools.handleListTasks has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 5 (12 pts), if/else 7, error handling 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 8). Most of this is not in the body itself: 9 of the 23 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 372, 328). 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.
server-entry.parseArgs (cognitive 23) v3/mcp/server-entry.ts:29— server-entry.parseArgs has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (15 pts), boolean chains 5, match/switch 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.
QuantumEngine.buildFiltration (cognitive 23) v3/plugins/prime-radiant/src/engines/QuantumEngine.ts:448— QuantumEngine.buildFiltration has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 3 (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.
mission-control.derive (cognitive 22) plugins/ruflo-console/hooks/mission-control.ts:63— mission-control.derive has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 5 (20 pts), boolean chains 1, loops 1 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
managed.managedRunRows (cognitive 22) plugins/ruflo-console/hooks/views/managed.ts:13— managed.managedRunRows has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 4 (6 pts), boolean chains 1 (nesting depth added 8). Of this number, 15 points are the body's own statements and 7 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
evolve.treeLine (cognitive 22) plugins/ruflo-console/hooks/views/evolve.ts:90— evolve.treeLine has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 10 (22 pts) (nesting depth added 12). 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.
hive-strip.drawTicker (cognitive 22) plugins/ruflo-console/hooks/gfx/hive-strip.ts:129— hive-strip.drawTicker has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 5 (13 pts), if/else 3 (5 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 11). Most of this is not in the body itself: 3 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 138). 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.
events-parts.detailRows (cognitive 22) plugins/ruflo-console/hooks/views/events-parts.ts:66— events-parts.detailRows has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 9 (14 pts), if/else 4, loops 2 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sessions-attention.attentionOf (cognitive 22) plugins/ruflo-console/hooks/data/sessions-attention.ts:53— sessions-attention.attentionOf has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 2 (4 pts), boolean chains 3, loops 1 (nesting depth added 9). Of this number, 19 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.
workflows-read.readWorkflowRuns (cognitive 22) plugins/ruflo-console/hooks/data/workflows-read.ts:67— workflows-read.readWorkflowRuns has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5, ternaries 3 (5 pts) (nesting depth added 6). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 93, 83). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
wf-search.searchPanel (cognitive 22) plugins/ruflo-console/hooks/views/wf-search.ts:58— wf-search.searchPanel has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 7 (11 pts), if/else 6 (7 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 6). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
wf-convo.threadRows (cognitive 22) plugins/ruflo-console/hooks/views/wf-convo.ts:60— wf-convo.threadRows has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 9 (15 pts), loops 2 (3 pts), boolean chains 2, if/else 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
xruv.resultRows (cognitive 22) plugins/ruflo-console/hooks/views/xruv.ts:228— xruv.resultRows has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 7 (12 pts), if/else 6 (7 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ruflo-hook.invokeBackground (cognitive 22) REDACTED:292— ruflo-hook.invokeBackground has cognitive complexity 22 (threshold 15). Drivers by points: error handling 4 (8 pts), ternaries 5 (7 pts), if/else 4 (6 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_ruflo-cli.findRufloOnPath (cognitive 22) plugins/ruflo-cost-tracker/scripts/_ruflo-cli.mjs:86— _ruflo-cli.findRufloOnPath has cognitive complexity 22 (threshold 15). Drivers by points: if/else 3 (10 pts), ternaries 2 (5 pts), error handling 1 (3 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
export.gather (cognitive 22) plugins/ruflo-cost-tracker/scripts/export.mjs:23— export.gather has cognitive complexity 22 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 3 (7 pts), boolean chains 6, ternaries 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
summary.asMarkdown (cognitive 22) plugins/ruflo-cost-tracker/scripts/summary.mjs:151— summary.asMarkdown has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2 (4 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
solver-bridge.neumann (cognitive 22) plugins/ruflo-graph-intelligence/src/infrastructure/solver-bridge.ts:179— solver-bridge.neumann has cognitive complexity 22 (threshold 15). Drivers by points: loops 7 (12 pts), if/else 4 (10 pts) (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
_invoke.findRufloOnPath (cognitive 22) plugins/ruflo-metaharness/scripts/_invoke.mjs:361— _invoke.findRufloOnPath has cognitive complexity 22 (threshold 15). Drivers by points: if/else 3 (10 pts), ternaries 2 (5 pts), error handling 1 (3 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ranked-context.rankedContext (cognitive 22) plugins/ruflo-mods/hooks/route/ranked-context.ts:111— ranked-context.rankedContext has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 5, loops 3 (4 pts) (nesting depth added 6). Of this number, 17 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
audit-exit-bypass-antipattern.main (cognitive 22) scripts/audit-exit-bypass-antipattern.mjs:161— audit-exit-bypass-antipattern.main has cognitive complexity 22 (threshold 15). Drivers by points: loops 4 (13 pts), if/else 6 (8 pts), ternaries 1 (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
managed-workflows.dynamicConfig (cognitive 22) v3/@claude-flow/cli/src/services/managed-workflows.ts:141— managed-workflows.dynamicConfig has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 10, if/else 6 (7 pts), ternaries 4 (5 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.
guard-probe-report.renderReport (cognitive 22) scripts/lib/guard-probe-report.mjs:7— guard-probe-report.renderReport has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 7 (15 pts), loops 3, boolean chains 2, if/else 1 (2 pts) (nesting depth added 9). Of this number, 16 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WorkflowManager.validateVariables (cognitive 22) v3/@claude-flow/browser/src/infrastructure/workflow-templates.ts:395— WorkflowManager.validateVariables has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (13 pts), boolean chains 5, match/switch 1 (3 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.
memory-backup.backupMemoryDb (cognitive 22) v3/@claude-flow/cli/src/services/memory-backup.ts:173— memory-backup.backupMemoryDb has cognitive complexity 22 (threshold 15). Drivers by points: error handling 8 (15 pts), if/else 6, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EWCConsolidator.updateFisherFromConfidences (cognitive 22) v3/@claude-flow/cli/src/memory/ewc-consolidation.ts:540— EWCConsolidator.updateFisherFromConfidences has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 5 (7 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
memory-initializer.getEntry (cognitive 22) v3/@claude-flow/cli/src/memory/memory-initializer.ts:3753— memory-initializer.getEntry has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 8, if/else 6 (7 pts), error handling 2 (3 pts), ternaries 2 (3 pts), loops 1 (nesting depth added 3). Most of this is not in the body itself: 9 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 3813). 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.
PatternDownloader.fetchFromIPFS (cognitive 22) v3/@claude-flow/cli/src/transfer/store/download.ts:156— PatternDownloader.fetchFromIPFS has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 2 (4 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
browser-intent-tools.pollForResult (cognitive 22) v3/@claude-flow/cli/src/mcp-tools/browser-intent-tools.ts:442— browser-intent-tools.pollForResult has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (9 pts), error handling 2 (7 pts), ternaries 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
daemon.killStaleDaemonsWindows (cognitive 22) v3/@claude-flow/cli/src/commands/daemon.ts:894— daemon.killStaleDaemonsWindows has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 3, error handling 2 (3 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
doctor.checkEncryptionAtRest (cognitive 22) REDACTED:2497— doctor.checkEncryptionAtRest has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 3 (8 pts), error handling 2 (3 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.
executor.writeSettings (cognitive 22) v3/@claude-flow/cli/src/init/executor.ts:916— executor.writeSettings has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 5, error handling 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GitHubSync.releaseOnGitHub (cognitive 22) v3/@claude-flow/cli/src/services/claim-service.ts:1004— GitHubSync.releaseOnGitHub has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (10 pts), error handling 4 (8 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity· cli.program.command("doctor").description("Check system health and dependencies").action() (cognitive 22) · ×1
cli.program.command("doctor").description("Check system health and dependencies").action() (cognitive 22) v3/@claude-flow/codex/src/cli.ts:619— cli.program.command("doctor").description("Check system health and dependencies").action() has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (14 pts), ternaries 2 (5 pts), error handling 2, loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Validator.validate (cognitive 22) REDACTED:21— Validator.validate has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (16 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.
StatuslineGenerator.generateStatusline (cognitive 22) v3/@claude-flow/hooks/src/statusline/index.ts:138— StatuslineGenerator.generateStatusline has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 10 (12 pts), if/else 10 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
Quantizer.productQuantize (cognitive 22) v3/@claude-flow/memory/src/hnsw-index.ts:1255— Quantizer.productQuantize has cognitive complexity 22 (threshold 15). Drivers by points: loops 5 (13 pts), if/else 4 (7 pts), boolean chains 2 (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ReasoningBank.retrieve (cognitive 22) v3/@claude-flow/neural/src/reasoning-bank.ts:257— ReasoningBank.retrieve has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 4 (8 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ProductQuantizer.trainCodebook (cognitive 22) v3/@claude-flow/plugins/src/integrations/ruvector/quantization.ts:743— ProductQuantizer.trainCodebook has cognitive complexity 22 (threshold 15). Drivers by points: loops 6 (15 pts), if/else 3 (7 pts) (nesting depth added 13). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
CohereProvider.buildRequest (cognitive 22) v3/@claude-flow/providers/src/cohere-provider.ts:295— CohereProvider.buildRequest has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 9, if/else 8, ternaries 4 (5 pts) (nesting depth added 1). Of this number, 19 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
BashSafetyHook.analyzeCommand (cognitive 22) v3/@claude-flow/shared/src/hooks/safety/bash-safety.ts:380— BashSafetyHook.analyzeCommand has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (5 pts), ternaries 4, 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.
GNNBridge.detectCommunities (cognitive 22) v3/plugins/code-intelligence/src/bridges/gnn-bridge.ts:345— GNNBridge.detectCommunities has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 5 (8 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GNNBridge.extractImports (cognitive 22) v3/plugins/code-intelligence/src/bridges/gnn-bridge.ts:505— GNNBridge.extractImports has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 4 (8 pts), boolean chains 2, ternaries 1 (2 pts), 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.
GNNBridge.computeEmbeddingsJS (cognitive 22) v3/plugins/code-intelligence/src/bridges/gnn-bridge.ts:649— GNNBridge.computeEmbeddingsJS has cognitive complexity 22 (threshold 15). Drivers by points: loops 7 (16 pts), if/else 3 (6 pts) (nesting depth added 12). 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.
MinCutBridge.computeDistances (cognitive 22) v3/plugins/code-intelligence/src/bridges/mincut-bridge.ts:587— MinCutBridge.computeDistances has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 6 (10 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.
mcp-tools.attentionControlHandler (cognitive 22) REDACTED:374— mcp-tools.attentionControlHandler has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (7 pts), loops 2 (5 pts), error handling 2 (4 pts), ternaries 2 (4 pts), boolean chains 1, match/switch 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.
GtBridge.execGt (cognitive 22) v3/plugins/gastown-bridge/src/bridges/gt-bridge.ts:404— GtBridge.execGt has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 6, ternaries 1 (2 pts), error handling 1 (nesting depth added 5). Most of this is not in the body itself: 9 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 440). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
FormulaExecutor.runStep (cognitive 22) v3/plugins/gastown-bridge/src/formula/executor.ts:1184— FormulaExecutor.runStep has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3, ternaries 2 (3 pts), loops 1 (2 pts), error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ConvoyObserver.findCycleNodesJS (cognitive 22) v3/plugins/gastown-bridge/src/convoy/observer.ts:1008— ConvoyObserver.findCycleNodesJS has cognitive complexity 22 (threshold 15). Drivers by points: if/else 3 (14 pts), loops 4 (8 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PatientEmbeddingGenerator.generateEmbedding (cognitive 22) v3/plugins/healthcare-clinical/src/bridges/hnsw-bridge.ts:61— PatientEmbeddingGenerator.generateEmbedding has cognitive complexity 22 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 5 (10 pts) (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
DAGBridge.topologicalSort (cognitive 22) v3/plugins/legal-contracts/src/bridges/dag-bridge.ts:209— DAGBridge.topologicalSort has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 5 (7 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.
DagBridge.resolveDependencies (cognitive 22) v3/plugins/quantum-optimizer/src/bridges/dag-bridge.ts:278— DagBridge.resolveDependencies has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (28 pts), loops 9 (14 pts), boolean chains 2, match/switch 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (DagBridge.resolveDependencies::resolvePackage) 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.
missions.parseMissions.missions (cognitive 21) plugins/ruflo-console/hooks/data/missions.ts:41— missions.parseMissions.missions has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 9 (12 pts), boolean chains 6, if/else 3 (nesting depth added 3). Most of this is not in the body itself: 10 of the 21 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 51, 57, 71). 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.
adr.loadAdrs (cognitive 21) plugins/ruflo-console/hooks/adr.ts:112— adr.loadAdrs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (5 pts), boolean chains 4, ternaries 1 (2 pts), error handling 1 (nesting depth added 7). Of this number, 19 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
commands.parseRuflo (cognitive 21) plugins/ruflo-console/hooks/commands.ts:34— commands.parseRuflo has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 10 (20 pts), match/switch 1 (nesting depth added 10). 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.
cost-providers.providerRows (cognitive 21) plugins/ruflo-console/hooks/views/cost-providers.ts:24— cost-providers.providerRows has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 7 (12 pts), if/else 6, loops 2, boolean chains 1 (nesting depth added 5). Of this number, 17 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
pictures.edges (cognitive 21) plugins/ruflo-console/hooks/gfx/pictures.ts:75— pictures.edges has cognitive complexity 21 (threshold 15). Drivers by points: loops 5 (12 pts), if/else 5 (6 pts), boolean chains 3 (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
pictures.occasionalGlitch (cognitive 21) plugins/ruflo-console/hooks/gfx/pictures.ts:310— pictures.occasionalGlitch has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (6 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
memory-health.findClusters (cognitive 21) plugins/ruflo-console/hooks/data/memory-health.ts:175— memory-health.findClusters has cognitive complexity 21 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 5 (6 pts), ternaries 3 (6 pts), boolean chains 1 (nesting depth added 9). Of this number, 18 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
wf-convo-live.sendSpec (cognitive 21) plugins/ruflo-console/hooks/wf-convo-live.ts:131— wf-convo-live.sendSpec has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 8 (10 pts), if/else 6 (7 pts), boolean chains 3, loops 1 (nesting depth added 3). Of this number, 13 points are the body's own statements and 8 belong to 5 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
wf-saved.savedBody (cognitive 21) plugins/ruflo-console/hooks/views/wf-saved.ts:16— wf-saved.savedBody has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 14 (19 pts), boolean chains 1, if/else 1 (nesting depth added 5). Of this number, 17 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
vector.resultRows (cognitive 21) plugins/ruflo-console/hooks/views/vector.ts:98— vector.resultRows has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 9 (14 pts), if/else 5 (6 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BrowserCausalAdapter.exportAsSparseMatrix (cognitive 21) plugins/ruflo-graph-intelligence/src/adapters/browser-causal-adapter.ts:85— BrowserCausalAdapter.exportAsSparseMatrix has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 6 (8 pts), boolean chains 2, 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.
evolve.main (cognitive 21) plugins/ruflo-metaharness/scripts/evolve.mjs:315— evolve.main has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18, boolean chains 3. Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: 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.
selfcheck.missingFromClone (cognitive 21) plugins/ruflo-mods/hooks/selfcheck.ts:44— selfcheck.missingFromClone has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 7 (10 pts), boolean chains 7, if/else 2 (3 pts), loops 1 (nesting depth added 4). Of this number, 19 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ledger.createLedger (cognitive 21) plugins/ruflo-ruos/scripts/lib/ledger.mjs:92— ledger.createLedger has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 5 (7 pts), if/else 4 (5 pts), loops 3 (4 pts), boolean chains 3, error handling 2 (nesting depth added 4). Most of this is not in the body itself: 3 of the 21 points are its own statements and the rest belongs to 4 function items inside it that branch (safeCall, a function literal at line 174, a function literal at line 190, …). 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.
gaia-audit.parseResults (cognitive 21) plugins/ruflo-workflows/scripts/gaia-audit.mjs:225— gaia-audit.parseResults has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (13 pts), ternaries 1 (4 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 11). Of this number, 16 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
gaia-audit.checkOracleLeakage (cognitive 21) plugins/ruflo-workflows/scripts/gaia-audit.mjs:377— gaia-audit.checkOracleLeakage has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 3 (8 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 10). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
index.getGuidance (cognitive 21) REDACTED:379— index.getGuidance has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 7, ternaries 3 (6 pts) (nesting depth added 5). Of this number, 12 points are the body's own statements and 9 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.
audit-hook-commands.collectCommands (cognitive 21) scripts/audit-hook-commands.mjs:42— audit-hook-commands.collectCommands has cognitive complexity 21 (threshold 15). Drivers by points: if/else 3 (7 pts), loops 3 (6 pts), boolean chains 5, 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.
statusline-generator.generateStatuslineScript (cognitive 21) v3/@claude-flow/cli/src/init/statusline-generator.ts:77— statusline-generator.generateStatuslineScript has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (12 pts), error handling 2 (4 pts), boolean chains 2, loops 1 (2 pts), ternaries 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WorkflowCompiler.toYaml (cognitive 21) v3/@claude-flow/browser/src/application/workflow-compiler.ts:129— WorkflowCompiler.toYaml has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 3 (5 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.
LoadBalancer.rebalance (cognitive 21) v3/@claude-flow/claims/src/application/load-balancer.ts:468— LoadBalancer.rebalance has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 12). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
neural-router.tryCostOptimalRouteBatch (cognitive 21) v3/@claude-flow/cli/src/ruvector/neural-router.ts:808— neural-router.tryCostOptimalRouteBatch has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 4, error handling 2 (4 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 6). Of this number, 13 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
grid-search-retrieval.main (cognitive 21) v3/@claude-flow/cli/scripts/grid-search-retrieval.mjs:116— grid-search-retrieval.main has cognitive complexity 21 (threshold 15). Drivers by points: loops 10 (16 pts), if/else 3, boolean chains 2 (nesting depth added 6). Of this number, 19 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, 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.
run-beir-nfcorpus.main (cognitive 21) v3/@claude-flow/cli/scripts/run-beir-nfcorpus.mjs:119— run-beir-nfcorpus.main has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 5, loops 3 (4 pts), ternaries 2 (3 pts) (nesting depth added 6). Of this number, 19 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.
binary-parse.parseMachO (cognitive 21) v3/@claude-flow/cli/src/rure/binary-parse.ts:256— binary-parse.parseMachO has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 4 (7 pts), if/else 4 (6 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 7). Most of this is not in the body itself: 2 of the 21 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 269, u32, u64). 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.
agentdb-tools.simplePersonalizedPageRank (cognitive 21) v3/@claude-flow/cli/src/mcp-tools/agentdb-tools.ts:1301— agentdb-tools.simplePersonalizedPageRank has cognitive complexity 21 (threshold 15). Drivers by points: loops 6 (11 pts), if/else 5 (10 pts) (nesting depth added 10). 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.
mcp-client.applyContentBoundaryGuardrail (cognitive 21) v3/@claude-flow/cli/src/mcp-client.ts:313— mcp-client.applyContentBoundaryGuardrail has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 2, error handling 1 (2 pts), loops 1, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
doctor.checkMetaharnessDeclaredPackages (cognitive 21) REDACTED:2269— doctor.checkMetaharnessDeclaredPackages has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (12 pts), error handling 2 (4 pts), loops 2, ternaries 1 (2 pts), boolean chains 1 (nesting depth added 8). Of this number, 15 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.
settings-risk-scanner.scanSettingsForRisk (cognitive 21) REDACTED:151— settings-risk-scanner.scanSettingsForRisk has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 11). Most of this is not in the body itself: 8 of the 21 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 161, 177, 158). 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.
init.maybeInstallSkillsSh (cognitive 21) v3/@claude-flow/cli/src/commands/init.ts:338— init.maybeInstallSkillsSh has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 2 (5 pts), error handling 3 (4 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
verify.repoPathToInstalledPath (cognitive 21) v3/@claude-flow/cli/src/commands/verify.ts:84— verify.repoPathToInstalledPath has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (6 pts), error handling 2 (4 pts), ternaries 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CodexInitializer.installRufloCorePlugin (cognitive 21) v3/@claude-flow/codex/src/initializer.ts:493— CodexInitializer.installRufloCorePlugin has cognitive complexity 21 (threshold 15). Drivers by points: error handling 6 (7 pts), ternaries 4 (7 pts), boolean chains 4, if/else 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CapabilityAlgebra.check (cognitive 21) v3/@claude-flow/guidance/src/capabilities.ts:336— CapabilityAlgebra.check has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 4, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
index.benchmark (cognitive 21) v3/@claude-flow/integration/src/index.ts:346— index.benchmark has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13, boolean chains 4, loops 2 (4 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
smart-retrieval.sessionRoundRobin (cognitive 21) v3/@claude-flow/memory/src/smart-retrieval.ts:432— smart-retrieval.sessionRoundRobin has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 4 (7 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SQLiteBackend.query (cognitive 21) v3/@claude-flow/memory/src/sqlite-backend.ts:351— SQLiteBackend.query has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
self-consistency.selfConsistency (cognitive 21) v3/@claude-flow/neural/src/utils/self-consistency.ts:64— self-consistency.selfConsistency has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HttpTransport.handleHttpRequest (cognitive 21) REDACTED:386— HttpTransport.handleHttpRequest has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 4, ternaries 1 (3 pts), error handling 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MessageBus.processQueues (cognitive 21) v3/@claude-flow/swarm/src/message-bus.ts:492— MessageBus.processQueues has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
V2CompatibilityValidator.validateHooks (cognitive 21) v3/@claude-flow/testing/src/v2-compat/compatibility-validator.ts:609— V2CompatibilityValidator.validateHooks has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 7 (16 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sanitizers.redactSensitiveFields (cognitive 21) v3/plugins/gastown-bridge/src/sanitizers.ts:464— sanitizers.redactSensitiveFields has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (5 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TopologyOptimizer.computeAllPaths (cognitive 21) v3/plugins/teammate-plugin/src/topology-optimizer.ts:241— TopologyOptimizer.computeAllPaths has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
(anonymous) (cognitive 21) ruflo/src/nginx/static/welcome.js:148— (anonymous) has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 3 (5 pts), ternaries 1 (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.
pod-tick.validatePodTemplate (cognitive 20) plugins/ruflo-business-pods/scripts/pod-tick.mjs:113— pod-tick.validatePodTemplate has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17 (18 pts), boolean chains 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
full-text.wrapFull (cognitive 20) plugins/ruflo-console/hooks/full-text.ts:58— full-text.wrapFull has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (7 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.
wf-targets.parseConfig (cognitive 20) plugins/ruflo-console/hooks/data/wf-targets.ts:90— wf-targets.parseConfig has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 5, 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.
mission-advisor.streamsOf (cognitive 20) plugins/ruflo-console/hooks/mission-advisor.ts:43— mission-advisor.streamsOf has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 3 (6 pts), boolean chains 4, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mission-loop.loopRows (cognitive 20) plugins/ruflo-console/hooks/views/mission-loop.ts:12— mission-loop.loopRows has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 4 (7 pts), boolean chains 6 (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.
evolve.loopStagesOf (cognitive 20) plugins/ruflo-console/hooks/gfx/evolve.ts:20— evolve.loopStagesOf has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 12 (18 pts), boolean chains 1, if/else 1 (nesting depth added 6). Of this number, 19 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
evolve.policyRows (cognitive 20) plugins/ruflo-console/hooks/views/evolve.ts:117— evolve.policyRows has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 11 (18 pts), boolean chains 1, if/else 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
workflows.inspect (cognitive 20) plugins/ruflo-console/hooks/views/workflows.ts:91— workflows.inspect has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 9 (12 pts), if/else 6 (8 pts) (nesting depth added 5). Of this number, 16 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
wf-trail.deeper (cognitive 20) plugins/ruflo-console/hooks/data/wf-trail.ts:57— wf-trail.deeper has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6 (14 pts), if/else 2 (3 pts), boolean chains 2, match/switch 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.
wf-send.payloadOf (cognitive 20) plugins/ruflo-console/hooks/data/wf-send.ts:67— wf-send.payloadOf has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6 (14 pts), if/else 3 (5 pts), match/switch 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.
wf-worktrees.makerOf (cognitive 20) REDACTED:150— wf-worktrees.makerOf has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 2 (9 pts), loops 3 (6 pts), if/else 1 (4 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
wf-worktrees.removalSpec.run (cognitive 20) plugins/ruflo-console/hooks/views/wf-worktrees.ts:164— wf-worktrees.removalSpec.run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 5, ternaries 3 (5 pts), error handling 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mission-claude.claudeActions.verify (cognitive 20) plugins/ruflo-console/hooks/mission-claude.ts:135— mission-claude.claudeActions.verify has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 10 (14 pts), if/else 3 (4 pts), boolean chains 1, loops 1 (nesting depth added 5). Most of this is not in the body itself: 4 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 153). 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.
wf-triage.classifyAgent (cognitive 20) plugins/ruflo-console/hooks/data/wf-triage.ts:55— wf-triage.classifyAgent has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 6, boolean chains 4 (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.
memory-lab.parseInput (cognitive 20) plugins/ruflo-console/hooks/memory-lab.ts:68— memory-lab.parseInput has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6 (12 pts), boolean chains 5, if/else 1 (2 pts), match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
run.runTui (cognitive 20) plugins/ruflo-console/tui/run.ts:264— run.runTui has cognitive complexity 20 (threshold 15). Drivers by points: if/else 51 (62 pts), boolean chains 30, ternaries 10 (13 pts), loops 1 (nesting depth added 14). 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. This shape REPEATS in the file: one other method here (run.runTui::onKey) 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.
conversation.main (cognitive 20) plugins/ruflo-cost-tracker/scripts/conversation.mjs:25— conversation.main has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 7, if/else 4 (6 pts), loops 4 (6 pts), ternaries 1 (nesting depth added 4). Of this number, 17 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.
counterfactual.main (cognitive 20) plugins/ruflo-cost-tracker/scripts/counterfactual.mjs:77— counterfactual.main has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 6 (8 pts), loops 3, boolean chains 1 (nesting depth added 4). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
command.answer (cognitive 20) plugins/ruflo-docs/hooks/command.ts:16— command.answer has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 5 (6 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 7). 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.
genome.main (cognitive 20) plugins/ruflo-metaharness/scripts/genome.mjs:38— genome.main has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 5, ternaries 1 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
score.main (cognitive 20) plugins/ruflo-metaharness/scripts/score.mjs:40— score.main has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 4 (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.
state.statusText (cognitive 20) plugins/ruflo-mods/hooks/state.ts:131— state.statusText has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 3 (7 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sublinear-adapter.neumannSeries (cognitive 20) plugins/ruflo-neural-trader/src/sublinear-adapter.mjs:148— sublinear-adapter.neumannSeries has cognitive complexity 20 (threshold 15). Drivers by points: loops 6 (10 pts), if/else 3 (9 pts), boolean chains 1 (nesting depth added 10). 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.
FleetMcpClient.callTool (cognitive 20) plugins/ruflo-ruos/scripts/lib/fleet-mcp.mjs:96— FleetMcpClient.callTool has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 2 (4 pts), boolean chains 3, 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.
audit-supply-chain.main (cognitive 20) scripts/audit-supply-chain.mjs:326— audit-supply-chain.main has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 5, loops 2 (4 pts), ternaries 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.
benchmark-intelligence.benchMoeGate (cognitive 20) scripts/benchmark-intelligence.mjs:384— benchmark-intelligence.benchMoeGate has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 9, if/else 3 (4 pts), ternaries 4, error handling 2, loops 1 (nesting depth added 1). Of this number, 15 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
probe-mod-guards.runPlugin (cognitive 20) scripts/probe-mod-guards.mjs:102— probe-mod-guards.runPlugin has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 3 (7 pts), loops 1 (nesting depth added 8). Of this number, 14 points are the body's own statements and 6 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.
helper-refresh.refreshOneHelpersDirLocked (cognitive 20) v3/@claude-flow/cli/src/init/helper-refresh.ts:383— helper-refresh.refreshOneHelpersDirLocked has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 2 (3 pts), boolean chains 2, 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.
PromptManager.autocomplete (cognitive 20) v3/@claude-flow/cli/src/prompt.ts:490— PromptManager.autocomplete has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (11 pts), ternaries 2 (4 pts), boolean chains 3, loops 2 (nesting depth added 3). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 5 function items inside it that branch (a function literal at line 547, displayChoices, filterChoices, …). 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.
memory-bridge.bridgeBatchOperation (cognitive 20) v3/@claude-flow/cli/src/memory/memory-bridge.ts:3669— memory-bridge.bridgeBatchOperation has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 4, loops 2 (4 pts), error handling 2 (3 pts), match/switch 1 (nesting depth added 6). Of this number, 18 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
memory-initializer.initializeMemoryDatabase (cognitive 20) v3/@claude-flow/cli/src/memory/memory-initializer.ts:1899— memory-initializer.initializeMemoryDatabase has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 4, ternaries 2 (4 pts), error handling 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SONAOptimizer.getRoutingSuggestion (cognitive 20) v3/@claude-flow/cli/src/memory/sona-optimizer.ts:446— SONAOptimizer.getRoutingSuggestion has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 8, if/else 6 (8 pts), error handling 2 (4 pts) (nesting depth added 4). Of this number, 18 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
flywheel-receipt.verifyFlywheelReceipt (cognitive 20) v3/@claude-flow/cli/src/services/flywheel-receipt.ts:595— flywheel-receipt.verifyFlywheelReceipt has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 3, error handling 2, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
coverage-router.loadProjectCoverage (cognitive 20) v3/@claude-flow/cli/src/ruvector/coverage-router.ts:528— coverage-router.loadProjectCoverage has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), error handling 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
daemon.killStaleDaemonsPosix (cognitive 20) v3/@claude-flow/cli/src/commands/daemon.ts:848— daemon.killStaleDaemonsPosix has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3, error handling 2 (3 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
export.exportPatterns (cognitive 20) v3/@claude-flow/cli/src/transfer/export.ts:21— export.exportPatterns has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 7, ternaries 4 (5 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
PluginManager.installFromNpm (cognitive 20) v3/@claude-flow/cli/src/plugins/manager.ts:221— PluginManager.installFromNpm has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 5 (6 pts), boolean chains 2, error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
host-statusline.sectionHeaderKey (cognitive 20) v3/@claude-flow/cli/templates/grok/scripts/host-statusline.mjs:112— host-statusline.sectionHeaderKey has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 4, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
viewer.wrap (cognitive 20) v3/@claude-flow/codex/src/activity/viewer.ts:111— viewer.wrap has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 7, ternaries 2 (7 pts), if/else 1 (3 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RvfEmbeddingCache.loadFromFile (cognitive 20) v3/@claude-flow/embeddings/src/rvf-embedding-cache.ts:488— RvfEmbeddingCache.loadFromFile has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 3 (4 pts), ternaries 2 (4 pts), error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ThreatDetector.analyzeInput (cognitive 20) v3/@claude-flow/guidance/src/adversarial.ts:278— ThreatDetector.analyzeInput has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ShardRetriever.selectWithContradictionCheck (cognitive 20) REDACTED:518— ShardRetriever.selectWithContradictionCheck has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 10). 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.
ManifestValidator.computeRiskScore (cognitive 20) v3/@claude-flow/guidance/src/manifest-validator.ts:266— ManifestValidator.computeRiskScore has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14, boolean chains 6. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
OfficialHooksBridge.officialToV3Event (cognitive 20) v3/@claude-flow/hooks/src/bridge/official-hooks-bridge.ts:234— OfficialHooksBridge.officialToV3Event has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ToolRegistry.execute (cognitive 20) v3/@claude-flow/mcp/src/tool-registry.ts:290— ToolRegistry.execute has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 3 (6 pts), boolean chains 3, error handling 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HNSWIndex.searchLayerOptimized (cognitive 20) v3/@claude-flow/memory/src/hnsw-index.ts:894— HNSWIndex.searchLayerOptimized has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MemoryConsolidator.sweepExpired (cognitive 20) v3/@claude-flow/memory/src/consolidator.ts:118— MemoryConsolidator.sweepExpired has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 5 (6 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GraphOperations.shortestPath (cognitive 20) v3/@claude-flow/plugins/src/integrations/ruvector/gnn.ts:2319— GraphOperations.shortestPath has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 5 (7 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OpenAIProvider.buildRequest (cognitive 20) v3/@claude-flow/providers/src/openai-provider.ts:374— OpenAIProvider.buildRequest has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 12, if/else 7, ternaries 1. Of this number, 16 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.
AgenticPolicyEngine.verifyReceipt (cognitive 20) v3/@claude-flow/security/src/policy/engine.ts:169— AgenticPolicyEngine.verifyReceipt has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 11, if/else 8, error handling 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.
ruflo_watermark.__wbg_load (cognitive 20) v3/@claude-flow/watermark/web/ruflo_watermark.js:313— ruflo_watermark.__wbg_load has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), error handling 1 (3 pts), boolean chains 2, match/switch 1 (nesting depth added 8). Of this number, 19 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReviseResearchForm.ReviseResearchForm (cognitive 20) v3/goal_ui/src/components/ReviseResearchForm.tsx:98— ReviseResearchForm.ReviseResearchForm has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 10, if/else 5, ternaries 4, error handling 1. Most of this is not in the body itself: 7 of the 20 points are its own statements and the rest belongs to 11 function items inside it that branch (optimizeConfig, addFocusArea, addExcludeTopic, …). 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.
memory-tools.handleSearchMemory (cognitive 20) v3/mcp/tools/memory-tools.ts:174— memory-tools.handleSearchMemory has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 2 (5 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 8). Of this number, 17 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GnnBridge.buildEntailmentGraph (cognitive 20) v3/plugins/hyperbolic-reasoning/src/bridges/gnn-bridge.ts:290— GnnBridge.buildEntailmentGraph has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 7 (9 pts), ternaries 1 (nesting depth added 8). Of this number, 18 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AttentionBridge.computeCrossAttention (cognitive 20) v3/plugins/legal-contracts/src/bridges/attention-bridge.ts:107— AttentionBridge.computeCrossAttention has cognitive complexity 20 (threshold 15). Drivers by points: loops 5 (10 pts), if/else 7 (9 pts), boolean chains 1 (nesting depth added 7). 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.
DAGBridge.findCriticalPathInternal (cognitive 20) v3/plugins/legal-contracts/src/bridges/dag-bridge.ts:386— DAGBridge.findCriticalPathInternal has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 7 (8 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PerfFpgaBridge.evaluateConfig (cognitive 20) v3/plugins/perf-optimizer/src/bridges/fpga-bridge.ts:594— PerfFpgaBridge.evaluateConfig has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (19 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.
DagBridge.resolveDependencies::resolvePackage (cognitive 20) v3/plugins/quantum-optimizer/src/bridges/dag-bridge.ts:313— DagBridge.resolveDependencies::resolvePackage has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (5 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. This shape REPEATS in the file: one other method here (DagBridge.resolveDependencies) 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.
publishToChannel (cognitive 20) plugins/ruflo-chatgpt-federation/src/publisher.mjs:68— publishToChannel has cognitive complexity 20 (threshold 15). Drivers by points: error handling 6 (10 pts), if/else 6 (7 pts), boolean chains 2, other 1 (nesting depth added 5). Of this number, 11 points are the body's own statements and 9 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
wf-targets.targetsOf (cognitive 19) plugins/ruflo-console/hooks/data/wf-targets.ts:143— wf-targets.targetsOf has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 4 (5 pts), loops 5, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
wf-targets.parseMentions (cognitive 19) plugins/ruflo-console/hooks/data/wf-targets.ts:176— wf-targets.parseMentions has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 10). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rure.cudaLines (cognitive 19) plugins/ruflo-console/hooks/data/rure.ts:182— rure.cudaLines has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 10, boolean chains 9. Most of this is not in the body itself: 6 of the 19 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 192, a function literal at line 193, a function literal at line 210, …). 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.
wf-file.resolveExportPath (cognitive 19) plugins/ruflo-console/hooks/data/wf-file.ts:28— wf-file.resolveExportPath has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8, ternaries 4 (6 pts), boolean chains 5 (nesting depth added 2). Of this number, 17 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
activity-store.decodeLane (cognitive 19) plugins/ruflo-console/hooks/data/activity-store.ts:150— activity-store.decodeLane has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, 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.
adr.planStatus (cognitive 19) plugins/ruflo-console/hooks/adr.ts:305— adr.planStatus has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 5, 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.
evolve.resultRows (cognitive 19) plugins/ruflo-console/hooks/views/evolve.ts:177— evolve.resultRows has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 8 (12 pts), if/else 5 (6 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
grounding.mentionsStack (cognitive 19) plugins/ruflo-console/hooks/grounding.ts:50— grounding.mentionsStack has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 6, ternaries 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FactsIncr.fold (cognitive 19) plugins/ruflo-console/hooks/data/wf-incr.ts:153— FactsIncr.fold has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 4 (6 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
wf-drill-body.itemBody (cognitive 19) REDACTED:212— wf-drill-body.itemBody has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 8 (13 pts), if/else 3, boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
bench.main (cognitive 19) plugins/ruflo-console/scripts/bench.ts:36— bench.main has cognitive complexity 19 (threshold 15). Drivers by points: loops 8 (14 pts), if/else 1 (2 pts), ternaries 2, boolean chains 1 (nesting depth added 7). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, 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.
ansi.rasterLines (cognitive 19) plugins/ruflo-console/tui/ansi.ts:230— ansi.rasterLines has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 4 (7 pts), if/else 3 (5 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CostAttributionAdapter.exportAsSparseMatrix (cognitive 19) plugins/ruflo-graph-intelligence/src/adapters/cost-attribution-adapter.ts:59— CostAttributionAdapter.exportAsSparseMatrix has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 5 (6 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
policy.constraintsPass (cognitive 19) plugins/ruflo-mods/hooks/guard/policy.ts:130— policy.constraintsPass has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 10, 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.
index.registerRureOffer (cognitive 19) plugins/ruflo-mods/hooks/rure-offer/index.ts:32— index.registerRureOffer has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 6, error handling 1 (2 pts), loops 2 (nesting depth added 3). None of this is in the body itself: all 19 points belong to 2 function literals inside it that branch (lines 49, 37). 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.
adr-digest.blockOf (cognitive 19) plugins/ruflo-swarm/hooks/adr-digest.ts:91— adr-digest.blockOf has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 4 (6 pts), boolean chains 4, loops 1 (nesting depth added 4). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
gaia-audit.parseCliArgs (cognitive 19) plugins/ruflo-workflows/scripts/gaia-audit.mjs:747— gaia-audit.parseCliArgs has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), ternaries 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
stage-internal-runtime-bundles.stageInternalRuntimeBundles (cognitive 19) scripts/stage-internal-runtime-bundles.mjs:171— stage-internal-runtime-bundles.stageInternalRuntimeBundles has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 5 (8 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
audit-skill-frontmatter.discoverSkills (cognitive 19) scripts/audit-skill-frontmatter.mjs:50— audit-skill-frontmatter.discoverSkills has cognitive complexity 19 (threshold 15). Drivers by points: error handling 4 (8 pts), if/else 3 (7 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.
audit-supply-chain.runCveAudit (cognitive 19) scripts/audit-supply-chain.mjs:116— audit-supply-chain.runCveAudit has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), error handling 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
managed-learning-store.recallLearning (cognitive 19) v3/@claude-flow/cli/src/services/managed-learning-store.ts:151— managed-learning-store.recallLearning has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, error handling 2 (3 pts), loops 1 (nesting depth added 5). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check-guard-tool-names.gather (cognitive 19) scripts/check-guard-tool-names.mjs:73— check-guard-tool-names.gather has cognitive complexity 19 (threshold 15). Drivers by points: loops 7 (16 pts), if/else 1 (2 pts), ternaries 1 (nesting depth added 10). 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.
managed-outcome-verifier.verifyHostManifest (cognitive 19) scripts/managed-outcome-verifier.mts:106— managed-outcome-verifier.verifyHostManifest has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 8, if/else 8, loops 2 (3 pts) (nesting depth added 1). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
managed-agent-tools.maRequest (cognitive 19) v3/@claude-flow/cli/src/mcp-tools/managed-agent-tools.ts:57— managed-agent-tools.maRequest has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 2, loops 1 (2 pts), ternaries 2, 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.
smoke-windows-hook-execution.findHookCommand (cognitive 19) REDACTED:82— smoke-windows-hook-execution.findHookCommand has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InMemoryClaimRepository.query (cognitive 19) v3/@claude-flow/claims/src/infrastructure/claim-repository.ts:186— InMemoryClaimRepository.query has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, ternaries 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 3). Of this number, 15 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body: 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.
mcp-server.handleMessage (cognitive 19) v3/@claude-flow/cli/bin/mcp-server.js:127— mcp-server.handleMessage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 2 (5 pts), error handling 2 (3 pts), boolean chains 2, match/switch 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.
append-conditions.assertAppendConditions (cognitive 19) v3/@claude-flow/cli/src/memory/append-conditions.ts:30— append-conditions.assertAppendConditions has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 3, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
memory-bridge.dropCacheIfDbChangedElsewhere (cognitive 19) v3/@claude-flow/cli/src/memory/memory-bridge.ts:666— memory-bridge.dropCacheIfDbChangedElsewhere has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (10 pts), error handling 4 (5 pts), boolean chains 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.
memory-bridge.bridgeSearchBruteForceCosine (cognitive 19) v3/@claude-flow/cli/src/memory/memory-bridge.ts:2238— memory-bridge.bridgeSearchBruteForceCosine has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 5, error handling 3 (4 pts), loops 1, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
memory-initializer.generateLocalEmbedding (cognitive 19) v3/@claude-flow/cli/src/memory/memory-initializer.ts:2589— memory-initializer.generateLocalEmbedding has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 3 (9 pts), boolean chains 4, if/else 3 (4 pts), error handling 1 (2 pts) (nesting depth added 8). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
memory-initializer.deleteEntry (cognitive 19) v3/@claude-flow/cli/src/memory/memory-initializer.ts:3900— memory-initializer.deleteEntry has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 4, ternaries 2 (3 pts), error handling 1, loops 1 (nesting depth added 4). Of this number, 13 points are the body's own statements and 6 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.
flywheel-proposer.validateCandidate (cognitive 19) v3/@claude-flow/cli/src/services/flywheel-proposer.ts:97— flywheel-proposer.validateCandidate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
policy-ledger-audit.records (cognitive 19) v3/@claude-flow/cli/src/services/policy-ledger-audit.ts:48— policy-ledger-audit.records has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 2 (6 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cuda-fatbin.readPayload (cognitive 19) v3/@claude-flow/cli/src/rure/cuda-fatbin.ts:201— cuda-fatbin.readPayload has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 4 (5 pts), boolean chains 2, error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
generate.generate (cognitive 19) v3/@claude-flow/cli/src/mods/command-registry/generate.ts:102— generate.generate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 4, loops 2 (3 pts), ternaries 3 (nesting depth added 6). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
coverage-reader.parseLcovInfo (cognitive 19) v3/@claude-flow/cli/src/commands/coverage-reader.ts:148— coverage-reader.parseLcovInfo has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 4 (8 pts), loops 1 (nesting depth added 5). Of this number, 10 points are the body's own statements and 9 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.
MCPServerManager.handleMCPMessage (cognitive 19) REDACTED:908— MCPServerManager.handleMCPMessage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 2 (5 pts), error handling 2 (3 pts), boolean chains 2, match/switch 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.
doctor.checkMemoryEmbeddingCoverage (cognitive 19) REDACTED:1058— doctor.checkMemoryEmbeddingCoverage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 2, error handling 2, 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.
message-compressor.compressMessage (cognitive 19) v3/@claude-flow/cli/src/swarm/message-compressor.ts:131— message-compressor.compressMessage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 5 (6 pts), ternaries 3 (nesting depth added 5). Of this number, 15 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
channel-guard.scanChannelMessage (cognitive 19) v3/@claude-flow/cli/src/security/channel-guard.ts:51— channel-guard.scanChannelMessage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 6 (9 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
weight-eft.runRemoteTrain (cognitive 19) v3/@claude-flow/cli/src/services/weight-eft.ts:431— weight-eft.runRemoteTrain has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (6 pts), boolean chains 5, error handling 3 (4 pts), ternaries 2 (3 pts), loops 1 (nesting depth added 3). Of this number, 15 points are the body's own statements and 4 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.
spinner.isValidVerb (cognitive 19) v3/@claude-flow/cli/src/commands/spinner.ts:84— spinner.isValidVerb has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 4, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
distill-tuning.tuneDistillation (cognitive 19) v3/@claude-flow/cli/src/services/distill-tuning.ts:200— distill-tuning.tuneDistillation has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (7 pts), loops 4 (7 pts), boolean chains 2, ternaries 1 (2 pts), error handling 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
deploy-seraphine.deploy (cognitive 19) v3/@claude-flow/cli/src/transfer/deploy-seraphine.ts:124— deploy-seraphine.deploy has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 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.
DualModeOrchestrator.runCollaboration (cognitive 19) v3/@claude-flow/codex/src/dual-mode/orchestrator.ts:336— DualModeOrchestrator.runCollaboration has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 10). Of this number, 13 points are the body's own statements and 6 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.
CodexWorktreeCoordinator.prepare (cognitive 19) v3/@claude-flow/codex/src/worktrees/coordinator.ts:43— CodexWorktreeCoordinator.prepare has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (8 pts), error handling 2 (4 pts), loops 3 (4 pts), ternaries 1 (2 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.
cli.createRunCommand (cognitive 19) v3/@claude-flow/codex/src/dual-mode/cli.ts:37— cli.createRunCommand has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 6 (9 pts), if/else 6, boolean chains 3, loops 1 (nesting depth added 3). None of this is in the body itself: all 19 points belong to 4 function literals inside it that branch (lines 54, 90, 138, …). 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.
embedding-service.createEmbeddingServiceAsync (cognitive 19) v3/@claude-flow/embeddings/src/embedding-service.ts:939— embedding-service.createEmbeddingServiceAsync has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), error handling 4 (8 pts), boolean chains 1, match/switch 1 (nesting depth added 8). Of this number, 16 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
analyzer.optimizeForSize (cognitive 19) REDACTED:361— analyzer.optimizeForSize has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 2, loops 1, ternaries 1 (nesting depth added 4). Of this number, 16 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.
channel-guard-worker.scanChannelMessage (cognitive 19) v3/@claude-flow/hooks/src/workers/channel-guard-worker.ts:142— channel-guard-worker.scanChannelMessage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 6 (9 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MCPServer.handleCompletion (cognitive 19) v3/@claude-flow/mcp/src/server.ts:883— MCPServer.handleCompletion has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (5 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.
AutoMemoryBridge.curateIndex (cognitive 19) v3/@claude-flow/memory/src/auto-memory-bridge.ts:523— AutoMemoryBridge.curateIndex has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 5, loops 2 (3 pts), ternaries 1 (2 pts), error handling 1 (nesting depth added 5). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RvfBackend.search (cognitive 19) v3/@claude-flow/memory/src/rvf-backend.ts:379— RvfBackend.search has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 3, 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.
AgentDBAdapter.queryByTags (cognitive 19) v3/@claude-flow/memory/src/agentdb-adapter.ts:919— AgentDBAdapter.queryByTags has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
database-provider.selectProvider (cognitive 19) v3/@claude-flow/memory/src/database-provider.ts:153— database-provider.selectProvider has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (18 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.
FlashAttentionOptimizer.benchmark (cognitive 19) v3/@claude-flow/performance/src/attention-integration.ts:242— FlashAttentionOptimizer.benchmark has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 5 (6 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
inbound-dispatcher.canonicalizeJcsValue (cognitive 19) v3/@claude-flow/plugin-agent-federation/src/application/inbound-dispatcher.ts:142— inbound-dispatcher.canonicalizeJcsValue has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, loops 1 (2 pts), ternaries 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.
PluginCollectionManager.searchPlugins (cognitive 19) v3/@claude-flow/plugins/src/collections/collection-manager.ts:400— PluginCollectionManager.searchPlugins has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RuVectorStream.buildSearchQuery (cognitive 19) v3/@claude-flow/plugins/src/integrations/ruvector/streaming.ts:393— RuVectorStream.buildSearchQuery has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 2, loops 1 (2 pts), ternaries 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
SecurityRegressionChecker.scanFile (cognitive 19) v3/@claude-flow/testing/src/regression/security-regression.ts:268— SecurityRegressionChecker.scanFile has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (12 pts), boolean chains 3, loops 2 (3 pts), error handling 1 (nesting depth added 9). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StateAssessmentCard.StateAssessmentCard (cognitive 19) v3/goal_ui/src/components/StateAssessmentCard.tsx:15— StateAssessmentCard.StateAssessmentCard has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 15, boolean chains 4. Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 4 function items inside it that branch (a function literal at line 108, a function literal at line 168, a function literal at line 227, …). 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.
QualityGates.QualityGates (cognitive 19) v3/goal_ui/src/components/agents/QualityGates.tsx:16— QualityGates.QualityGates has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 12 (18 pts), boolean chains 1 (nesting depth added 6). Most of this is not in the body itself: 9 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 49). 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.
HttpTransport.handleHttpRequest (cognitive 19) REDACTED:351— HttpTransport.handleHttpRequest has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, ternaries 1 (3 pts), error handling 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebSocketTransport.handleMessage (cognitive 19) REDACTED:347— WebSocketTransport.handleMessage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, error handling 2 (3 pts), ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
swarm-tools.handleScaleSwarm (cognitive 19) v3/mcp/tools/swarm-tools.ts:301— swarm-tools.handleScaleSwarm has cognitive complexity 19 (threshold 15). Drivers by points: loops 2 (6 pts), ternaries 3 (6 pts), if/else 3 (4 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SyncBridge.syncFromAgentDB (cognitive 19) v3/plugins/gastown-bridge/src/bridges/sync-bridge.ts:494— SyncBridge.syncFromAgentDB has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (8 pts), error handling 2 (4 pts), ternaries 1 (4 pts), loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FormulaExecutor.generateMolecules (cognitive 19) v3/plugins/gastown-bridge/src/formula/executor.ts:1053— FormulaExecutor.generateMolecules has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (8 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HealthcareGNNBridge.bfsPath (cognitive 19) v3/plugins/healthcare-clinical/src/bridges/gnn-bridge.ts:561— HealthcareGNNBridge.bfsPath has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NervousSystemBridge.coordinate (cognitive 19) v3/plugins/neural-coordination/src/bridges/nervous-system-bridge.ts:153— NervousSystemBridge.coordinate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 5 (7 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.
mcp-tools.topologyOptimizeHandler (cognitive 19) v3/plugins/neural-coordination/src/mcp-tools.ts:254— mcp-tools.topologyOptimizeHandler has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (44 pts), loops 13 (32 pts), boolean chains 9, ternaries 3 (5 pts), error handling 1, match/switch 1 (nesting depth added 53). 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 (mcp-tools.topologyOptimizeHandler::generateEdges) 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.
PerfFpgaBridge.getOptimalRatio (cognitive 19) v3/plugins/perf-optimizer/src/bridges/fpga-bridge.ts:298— PerfFpgaBridge.getOptimalRatio has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 5, boolean chains 4 (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.
CategoryEngine.initializeBuiltinFunctors (cognitive 19) v3/plugins/prime-radiant/src/engines/CategoryEngine.ts:245— CategoryEngine.initializeBuiltinFunctors has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 4, error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 3). None of this is in the body itself: all 19 points belong to 9 function literals inside it that branch (lines 337, 321, 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.
CohomologyEngine.detectContradictions (cognitive 19) v3/plugins/prime-radiant/src/engines/CohomologyEngine.ts:99— CohomologyEngine.detectContradictions has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (7 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.
memory-gate.handler (cognitive 19) v3/plugins/prime-radiant/src/tools/memory-gate.ts:148— memory-gate.handler has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 5 (6 pts), error handling 2 (3 pts), boolean chains 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.
DagBridge.criticalPath (cognitive 19) v3/plugins/quantum-optimizer/src/bridges/dag-bridge.ts:201— DagBridge.criticalPath has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 6 (8 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.
ruflo_watermark::bayes::gammq (cognitive 19) v3/crates/ruflo-watermark/src/bayes.rs:70— ruflo_watermark::bayes::gammq has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
compile.compileIntentToEnvelope (cognitive 18) plugins/ruflo-agntcy/src/casa/compile.ts:131— compile.compileIntentToEnvelope has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (5 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
guard.verdict (cognitive 18) plugins/ruflo-browser/hooks/guard.ts:36— guard.verdict has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 6, 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.
pod-tick.runTick (cognitive 18) plugins/ruflo-business-pods/scripts/pod-tick.mjs:318— pod-tick.runTick has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 6 (8 pts), if/else 5 (6 pts), error handling 2, boolean chains 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.
managed.parseManagedLearning (cognitive 18) plugins/ruflo-console/hooks/data/managed.ts:87— managed.parseManagedLearning has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 7, ternaries 5 (7 pts), if/else 4 (nesting depth added 2). Of this number, 15 points are the body's own statements and 3 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.
mh-lab.flatten (cognitive 18) plugins/ruflo-console/hooks/mh-lab.ts:143— mh-lab.flatten has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 2 (3 pts), ternaries 1 (3 pts), 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.
devtools.brainLines (cognitive 18) plugins/ruflo-console/hooks/data/devtools.ts:118— devtools.brainLines has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 3 (4 pts), boolean chains 3, loops 3 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
secure.verdictLines (cognitive 18) plugins/ruflo-console/hooks/secure.ts:174— secure.verdictLines has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 9 (13 pts), boolean chains 2, if/else 2, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
adr-scope.suggest (cognitive 18) plugins/ruflo-console/hooks/data/adr-scope.ts:62— adr-scope.suggest has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 3 (9 pts), boolean chains 4, if/else 2 (4 pts), loops 1 (nesting depth added 8). Of this number, 16 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
agent.agentView (cognitive 18) plugins/ruflo-console/hooks/views/agent.ts:10— agent.agentView has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 9 (11 pts), if/else 3, boolean chains 2, loops 2 (nesting depth added 2). Of this number, 15 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
plugin-catalog.detailRows (cognitive 18) plugins/ruflo-console/hooks/views/plugin-catalog.ts:56— plugin-catalog.detailRows has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 8 (12 pts), if/else 5 (6 pts) (nesting depth added 5). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
plugin-catalog.catalogView (cognitive 18) plugins/ruflo-console/hooks/views/plugin-catalog.ts:108— plugin-catalog.catalogView has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 9 (12 pts), if/else 3, boolean chains 2, loops 1 (nesting depth added 3). Of this number, 16 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: 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.
ap-adapt.evaluate (cognitive 18) plugins/ruflo-console/hooks/data/ap-adapt.ts:143— ap-adapt.evaluate has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 7 (14 pts), boolean chains 2, if/else 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.
event-sources.modEvents (cognitive 18) plugins/ruflo-console/hooks/data/event-sources.ts:159— event-sources.modEvents has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (7 pts), ternaries 2 (7 pts), loops 2 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
event-export.resolveTarget (cognitive 18) plugins/ruflo-console/hooks/data/event-export.ts:29— event-export.resolveTarget has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, boolean chains 4, ternaries 3 (4 pts) (nesting depth added 1). Of this number, 16 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: 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.
wf-cost-live.refreshWfGuards (cognitive 18) plugins/ruflo-console/hooks/wf-cost-live.ts:135— wf-cost-live.refreshWfGuards has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5, error handling 1, loops 1 (nesting depth added 3). Of this number, 9 points are the body's own statements and 9 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
wf-convo-live.watchSpec (cognitive 18) plugins/ruflo-console/hooks/wf-convo-live.ts:190— wf-convo-live.watchSpec has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 4 (6 pts), boolean chains 3 (nesting depth added 3). Most of this is not in the body itself: 5 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 215). 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.
wf-replay.boardAt (cognitive 18) plugins/ruflo-console/hooks/data/wf-replay.ts:87— wf-replay.boardAt has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 6 (8 pts), boolean chains 7, if/else 2, loops 1 (nesting depth added 2). Of this number, 13 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body: 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.
wf-compare.compareRuns (cognitive 18) plugins/ruflo-console/hooks/data/wf-compare.ts:88— wf-compare.compareRuns has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 2 (5 pts), boolean chains 4, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
xruv.identityRows (cognitive 18) plugins/ruflo-console/hooks/views/xruv.ts:72— xruv.identityRows has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 9 (12 pts), boolean chains 3, if/else 1 (2 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
result-lines.prettyLines (cognitive 18) plugins/ruflo-console/hooks/result-lines.ts:67— result-lines.prettyLines has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, loops 2, ternaries 1 (nesting depth added 6). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
watch-command.watchCommand (cognitive 18) plugins/ruflo-console/hooks/watch-command.ts:15— watch-command.watchCommand has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 6 (10 pts), if/else 4 (5 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
bench-startup.graph (cognitive 18) plugins/ruflo-console/scripts/bench-startup.mjs:31— bench-startup.graph has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 6, error handling 1, loops 1 (nesting depth added 4). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 2 function items inside it that branch (walk, walk::count). 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.
_ledger.walkGrokUsage (cognitive 18) plugins/ruflo-cost-tracker/scripts/_ledger.mjs:163— _ledger.walkGrokUsage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), error handling 3 (6 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.
compact.main (cognitive 18) plugins/ruflo-cost-tracker/scripts/compact.mjs:63— compact.main has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 2 (4 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
session.summarizeMessages (cognitive 18) plugins/ruflo-cost-tracker/scripts/session.mjs:92— session.summarizeMessages has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, if/else 4 (7 pts), error handling 1 (2 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
session.main (cognitive 18) plugins/ruflo-cost-tracker/scripts/session.mjs:124— session.main has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 4 (7 pts), boolean chains 2, loops 1 (nesting depth added 4). Of this number, 16 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
bench-recordpair-overhead.main (cognitive 18) plugins/ruflo-metaharness/scripts/bench-recordpair-overhead.mjs:88— bench-recordpair-overhead.main has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 2, loops 1 (nesting depth added 2). Of this number, 15 points are the body's own statements and 3 belong to 3 function items inside it that branch. To reduce it, 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.
mcp-scan.main (cognitive 18) plugins/ruflo-metaharness/scripts/mcp-scan.mjs:44— mcp-scan.main has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 4 (5 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 3). Of this number, 15 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, 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.
cli.record (cognitive 18) plugins/ruflo-ruos/scripts/cli.mjs:230— cli.record has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 4 (8 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
pane.selection (cognitive 18) plugins/ruflo-swarm/hooks/views/pane.tsx:113— pane.selection has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 10 (11 pts), boolean chains 6, if/else 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.
audit-neural-trader-safety.walk (cognitive 18) scripts/audit-neural-trader-safety.mjs:56— audit-neural-trader-safety.walk has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 2 (3 pts), ternaries 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
audit-supply-chain.runLockfileAudit (cognitive 18) scripts/audit-supply-chain.mjs:182— audit-supply-chain.runLockfileAudit has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
audit-vector-dim.walk (cognitive 18) scripts/audit-vector-dim.mjs:52— audit-vector-dim.walk has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 2 (3 pts), ternaries 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
benchmark-router.main (cognitive 18) scripts/benchmark-router.mjs:364— benchmark-router.main has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 4 (6 pts), ternaries 2 (nesting depth added 6). Of this number, 16 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ManagedRunCollector.refresh (cognitive 18) v3/@claude-flow/cli/src/services/managed-run-collector.ts:55— ManagedRunCollector.refresh has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (9 pts) (nesting depth added 3). Of this number, 16 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, 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.
inventory-capabilities.extractMcpTools (cognitive 18) scripts/inventory-capabilities.mjs:34— inventory-capabilities.extractMcpTools has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 4 (6 pts), ternaries 1 (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.
WorkflowCompiler.compile (cognitive 18) v3/@claude-flow/browser/src/application/workflow-compiler.ts:55— WorkflowCompiler.compile has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 3 (7 pts), if/else 2 (4 pts), boolean chains 3, error handling 1 (3 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
router-trajectory.pairTrajectoryRows (cognitive 18) v3/@claude-flow/cli/src/ruvector/router-trajectory.ts:326— router-trajectory.pairTrajectoryRows has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 3, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PromptManager.input (cognitive 18) v3/@claude-flow/cli/src/prompt.ts:194— PromptManager.input has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 1 (4 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EnhancedModelRouter.detectIntent (cognitive 18) REDACTED:304— EnhancedModelRouter.detectIntent has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (15 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.
memory-bridge.getRegistry (cognitive 18) v3/@claude-flow/cli/src/memory/memory-bridge.ts:245— memory-bridge.getRegistry has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 14, if/else 4. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
memory-initializer.ensureSchemaColumns (cognitive 18) v3/@claude-flow/cli/src/memory/memory-initializer.ts:1343— memory-initializer.ensureSchemaColumns has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (7 pts), error handling 3 (6 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 6). Most of this is not in the body itself: 4 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 1358). 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.
memory-initializer.withMemoryDbLock (cognitive 18) v3/@claude-flow/cli/src/memory/memory-initializer.ts:4115— memory-initializer.withMemoryDbLock has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), error handling 3 (7 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
diff-classifier.suggestReviewers (cognitive 18) v3/@claude-flow/cli/src/ruvector/diff-classifier.ts:788— diff-classifier.suggestReviewers has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 1, 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.
search.searchPatterns (cognitive 18) v3/@claude-flow/cli/src/transfer/store/search.ts:16— search.searchPatterns has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, boolean chains 6, match/switch 1, ternaries 1. Of this number, 16 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: 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.
PatternDownloader.downloadPattern (cognitive 18) v3/@claude-flow/cli/src/transfer/store/download.ts:43— PatternDownloader.downloadPattern has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 2, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
upload.uploadToIPFS (cognitive 18) v3/@claude-flow/cli/src/transfer/ipfs/upload.ts:208— upload.uploadToIPFS has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (7 pts), error handling 3 (6 pts), boolean chains 5 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
guidance-tools.discoverAgents (cognitive 18) v3/@claude-flow/cli/src/mcp-tools/guidance-tools.ts:345— guidance-tools.discoverAgents has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (4 pts), boolean chains 1, error handling 1 (nesting depth added 7). Of this number, 9 points are the body's own statements and 9 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.
doctor-native-addon.findBetterSqlite3Copies (cognitive 18) v3/@claude-flow/cli/src/commands/doctor-native-addon.ts:56— doctor-native-addon.findBetterSqlite3Copies has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 4 (7 pts), boolean chains 1, error handling 1 (nesting depth added 7). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to 2 function items inside it that branch (scanNodeModules, add). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
executor.writeStatusline (cognitive 18) v3/@claude-flow/cli/src/init/executor.ts:1511— executor.writeStatusline has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (14 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
plugin-repair.repairPluginInstall (cognitive 18) v3/@claude-flow/cli/src/mods/plugin-repair.ts:98— plugin-repair.repairPluginInstall has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 3 (7 pts), if/else 3 (4 pts), boolean chains 3, loops 2 (3 pts), error handling 1 (nesting depth added 6). Of this number, 15 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.
lucene-bm25.step1b (cognitive 18) v3/@claude-flow/cli/src/memory/lucene-bm25.ts:85— lucene-bm25.step1b has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 3, 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.
index.extractSettings (cognitive 18) v3/@claude-flow/codex/src/migrations/index.ts:442— index.extractSettings has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 5 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
analyzer.scoreStructure (cognitive 18) REDACTED:946— analyzer.scoreStructure has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, boolean chains 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CollusionDetector.detectRingTopologies (cognitive 18) v3/@claude-flow/guidance/src/adversarial.ts:530— CollusionDetector.detectRingTopologies has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 7). Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to one function item inside it that branches (dfs). 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.
generators.generateAgentMd (cognitive 18) v3/@claude-flow/guidance/src/generators.ts:441— generators.generateAgentMd has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
DaemonManager.executeDaemonTask (cognitive 18) v3/@claude-flow/hooks/src/daemons/index.ts:257— DaemonManager.executeDaemonTask has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 2, error handling 1 (nesting depth added 9). Of this number, 13 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.
index.createCacheWorker (cognitive 18) v3/@claude-flow/hooks/src/workers/index.ts:1617— index.createCacheWorker has cognitive complexity 18 (threshold 15). Drivers by points: error handling 3 (8 pts), if/else 2 (6 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). None of this is in the body itself: all 18 points belong to one function literal inside it that branches (line 1618). 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.
smart-retrieval.pickTimestamp (cognitive 18) v3/@claude-flow/memory/src/smart-retrieval.ts:239— smart-retrieval.pickTimestamp has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
QueryBuilder.build (cognitive 18) v3/@claude-flow/memory/src/query-builder.ts:344— QueryBuilder.build has cognitive complexity 18 (threshold 15). Drivers by points: if/else 18. 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.
PatternLearner.rebuildClusters (cognitive 18) v3/@claude-flow/neural/src/pattern-learner.ts:731— PatternLearner.rebuildClusters has cognitive complexity 18 (threshold 15). Drivers by points: loops 7 (12 pts), if/else 2 (5 pts), boolean chains 1 (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
federation-breaker-service.evaluatePolicy (cognitive 18) v3/@claude-flow/plugin-agent-federation/src/application/federation-breaker-service.ts:152— federation-breaker-service.evaluatePolicy has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HookRegistry.execute (cognitive 18) v3/@claude-flow/plugins/src/hooks/index.ts:124— HookRegistry.execute has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
product-plane.canonicalizeProductPlane (cognitive 18) v3/@claude-flow/security/src/policy/product-plane.ts:1090— product-plane.canonicalizeProductPlane has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TopologyManager.electLeader (cognitive 18) v3/@claude-flow/swarm/src/topology-manager.ts:201— TopologyManager.electLeader has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (18 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.
TopologyManager.rebalanceHybrid (cognitive 18) v3/@claude-flow/swarm/src/topology-manager.ts:568— TopologyManager.rebalanceHybrid has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 8). Of this number, 15 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UnifiedSwarmCoordinator.spawnAgent (cognitive 18) v3/@claude-flow/swarm/src/unified-coordinator.ts:1798— UnifiedSwarmCoordinator.spawnAgent has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 5, error handling 1 (3 pts), ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
setup-teardown.configureTestEnvironment (cognitive 18) v3/@claude-flow/testing/src/helpers/setup-teardown.ts:191— setup-teardown.configureTestEnvironment has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 4 (5 pts), ternaries 1 (2 pts) (nesting depth added 5). None of this is in the body itself: all 18 points belong to 4 function literals inside it that branch (lines 223, 203, 241, …). 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.
ResearchReportModal.ResearchReportModal::generateActionItems (cognitive 18) v3/goal_ui/src/components/ResearchReportModal.tsx:159— ResearchReportModal.ResearchReportModal::generateActionItems has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 9 (15 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
agent-tools.handleAgentStatus (cognitive 18) v3/mcp/tools/agent-tools.ts:302— agent-tools.handleAgentStatus has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 6, if/else 3 (5 pts), ternaries 2 (5 pts), error handling 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BdBridge.listBeads (cognitive 18) v3/plugins/gastown-bridge/src/bridges/bd-bridge.ts:704— BdBridge.listBeads has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11, loops 2 (4 pts), ternaries 1 (2 pts), boolean chains 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.
JsFallbackWasmLoader.detectCycle (cognitive 18) v3/plugins/gastown-bridge/src/formula/executor.ts:569— JsFallbackWasmLoader.detectCycle has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (4 pts) (nesting depth added 9). Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to one function item inside it that branches (dfs). 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.
ConvoyObserver.pollConvoyWithBackoff (cognitive 18) v3/plugins/gastown-bridge/src/convoy/observer.ts:615— ConvoyObserver.pollConvoyWithBackoff has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, ternaries 1 (2 pts), error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
wasm-loader.detectCyclesFallback (cognitive 18) v3/plugins/gastown-bridge/src/wasm-loader.ts:601— wasm-loader.detectCyclesFallback has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 5, boolean chains 1 (nesting depth added 7). Of this number, 9 points are the body's own statements and 9 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.
GnnBridge.computeTransitiveClosure (cognitive 18) v3/plugins/hyperbolic-reasoning/src/bridges/gnn-bridge.ts:416— GnnBridge.computeTransitiveClosure has cognitive complexity 18 (threshold 15). Drivers by points: if/else 2 (9 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 10). 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.
mcp-tools.hierarchyCompareHandler (cognitive 18) v3/plugins/hyperbolic-reasoning/src/mcp-tools.ts:567— mcp-tools.hierarchyCompareHandler has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 2 (4 pts), loops 2 (3 pts), boolean chains 1, 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.
mcp-tools.entailmentGraphHandler (cognitive 18) v3/plugins/hyperbolic-reasoning/src/mcp-tools.ts:707— mcp-tools.entailmentGraphHandler has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 3 (6 pts), boolean chains 1, error handling 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mcp-tools.generateMockConfigOptimization (cognitive 18) v3/plugins/perf-optimizer/src/mcp-tools.ts:996— mcp-tools.generateMockConfigOptimization has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 4 (5 pts), boolean chains 4, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
spectral-analyze.powerIteration (cognitive 18) v3/plugins/prime-radiant/src/tools/spectral-analyze.ts:33— spectral-analyze.powerIteration has cognitive complexity 18 (threshold 15). Drivers by points: loops 5 (10 pts), if/else 4 (8 pts) (nesting depth added 9). 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.
spectral-analyze.handler (cognitive 18) v3/plugins/prime-radiant/src/tools/spectral-analyze.ts:208— spectral-analyze.handler has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 3 (7 pts), if/else 5 (6 pts), error handling 2 (3 pts), boolean chains 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.
consensus-verify.handler (cognitive 18) v3/plugins/prime-radiant/src/tools/consensus-verify.ts:217— consensus-verify.handler has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 3 (7 pts), if/else 5 (6 pts), error handling 2 (3 pts), boolean chains 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.
quantum-topology.computeBettiNumbers (cognitive 18) v3/plugins/prime-radiant/src/tools/quantum-topology.ts:152— quantum-topology.computeBettiNumbers has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, loops 3, ternaries 1 (2 pts) (nesting depth added 4). Of this number, 16 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
createGithubQuery.search (cognitive 18) plugins/ruflo-x-gateway/src/github-query.mjs:258— createGithubQuery.search has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 3, ternaries 3, other 2 (nesting depth added 1). Of this number, 17 points are the body's own statements and 1 belongs to 6 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
verify.memoryListJson (cognitive 17) plugins/ruflo-adr/scripts/verify.mjs:38— verify.memoryListJson has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 4, ternaries 1 (2 pts), error handling 1, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
strategies.mutate (cognitive 17) plugins/ruflo-arena/src/domain/strategies.ts:161— strategies.mutate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6, loops 2 (5 pts), ternaries 2 (5 pts), boolean chains 1 (nesting depth added 6). Of this number, 12 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
recall.readRecall (cognitive 17) plugins/ruflo-console/hooks/data/recall.ts:354— recall.readRecall has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 7 (8 pts), boolean chains 5, if/else 4 (nesting depth added 1). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
skills.parseRepoList (cognitive 17) plugins/ruflo-console/hooks/data/skills.ts:249— skills.parseRepoList has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
settings.parseConfig (cognitive 17) plugins/ruflo-console/hooks/settings.ts:136— settings.parseConfig has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, ternaries 3 (4 pts), if/else 2 (3 pts), error handling 1, loops 1 (nesting depth added 2). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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.
card.withCards.Box (cognitive 17) plugins/ruflo-console/hooks/views/card.ts:35— card.withCards.Box has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 4, ternaries 2 (4 pts), loops 1 (nesting depth added 4). Of this number, 12 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
notices.noticesBetween (cognitive 17) plugins/ruflo-console/hooks/notices.ts:51— notices.noticesBetween has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 4, ternaries 1 (3 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
anatole.statusRows (cognitive 17) plugins/ruflo-console/hooks/views/anatole.ts:53— anatole.statusRows has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 12 (14 pts), boolean chains 2, if/else 1 (nesting depth added 2). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: 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.
flow.flowPicture (cognitive 17) plugins/ruflo-console/hooks/gfx/flow.ts:92— flow.flowPicture has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 6 (9 pts), if/else 4, boolean chains 3, loops 1 (nesting depth added 3). None of this is in the body itself: all 17 points belong to 2 function literals inside it that branch (lines 108, 98). 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.
hive.workersSection (cognitive 17) plugins/ruflo-console/hooks/views/hive.ts:200— hive.workersSection has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (14 pts), if/else 2, loops 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ap-adapt.propose (cognitive 17) plugins/ruflo-console/hooks/data/ap-adapt.ts:110— ap-adapt.propose has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 6 (8 pts), loops 1 (nesting depth added 2). 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, 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.
timeline-model.lanesIn (cognitive 17) plugins/ruflo-console/hooks/data/timeline-model.ts:219— timeline-model.lanesIn has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), loops 4 (5 pts), boolean chains 4, ternaries 1 (nesting depth added 3). Of this number, 11 points are the body's own statements and 6 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.
neural.trainingRows (cognitive 17) plugins/ruflo-console/hooks/views/neural.ts:31— neural.trainingRows has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 9 (14 pts), if/else 2, loops 1 (nesting depth added 5). Of this number, 14 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
manage.approvalsView (cognitive 17) plugins/ruflo-console/hooks/views/manage.ts:23— manage.approvalsView has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 7 (11 pts), boolean chains 3, if/else 3 (nesting depth added 4). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 33, 40). 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.
harness-ruflo.rufloRows (cognitive 17) plugins/ruflo-console/hooks/data/harness-ruflo.ts:57— harness-ruflo.rufloRows has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 6 (13 pts), boolean chains 2, loops 2 (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. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
memmap.memmapPicture (cognitive 17) plugins/ruflo-console/hooks/gfx/memmap.ts:152— memmap.memmapPicture has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 3, ternaries 1 (3 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.
wf-live.refreshWorkflows (cognitive 17) plugins/ruflo-console/hooks/wf-live.ts:55— wf-live.refreshWorkflows has cognitive complexity 17 (threshold 15). Drivers by points: error handling 3 (5 pts), loops 4 (5 pts), boolean chains 4, if/else 3 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
wf-drill-io.loadTranscript (cognitive 17) plugins/ruflo-console/hooks/data/wf-drill-io.ts:115— wf-drill-io.loadTranscript has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 3 (7 pts), if/else 5, 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.
wf-drill-body.log (cognitive 17) REDACTED:83— wf-drill-body.log has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 9 (13 pts), boolean chains 3, if/else 1 (nesting depth added 4). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 93). 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.
wf-saved-live.syncSavedViews (cognitive 17) plugins/ruflo-console/hooks/wf-saved-live.ts:95— wf-saved-live.syncSavedViews has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, error handling 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
wf-mission-script.draftScript (cognitive 17) plugins/ruflo-console/hooks/data/wf-mission-script.ts:91— wf-mission-script.draftScript has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 4, loops 2 (3 pts), boolean chains 2 (nesting depth added 3). Of this number, 10 points are the body's own statements and 7 belong to 3 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
wf-worktrees.parseProcs (cognitive 17) REDACTED:115— wf-worktrees.parseProcs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 3 (5 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
skill-md.checkSkillMd (cognitive 17) REDACTED:47— skill-md.checkSkillMd has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, boolean chains 6. Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
wf-replay.buildTimeline (cognitive 17) plugins/ruflo-console/hooks/data/wf-replay.ts:35— wf-replay.buildTimeline has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 6). 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.
wf-replay.replayBody (cognitive 17) plugins/ruflo-console/hooks/views/wf-replay.ts:122— wf-replay.replayBody has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 10 (14 pts), if/else 3 (nesting depth added 4). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: 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.
ap-panel.gates (cognitive 17) plugins/ruflo-console/hooks/views/ap-panel.ts:96— ap-panel.gates has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 11 (16 pts), boolean chains 1 (nesting depth added 5). 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.
mission-palette.missionPalette (cognitive 17) plugins/ruflo-console/hooks/mission-palette.ts:21— mission-palette.missionPalette has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 12 (13 pts), boolean chains 4 (nesting depth added 1). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 42, a function literal at line 56, local, …). 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.
ansi.decodeCells (cognitive 17) plugins/ruflo-console/tui/ansi.ts:161— ansi.decodeCells has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 2 (4 pts), boolean chains 2, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ruflo-hook.invokeHook (cognitive 17) REDACTED:334— ruflo-hook.invokeHook has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 6, ternaries 2, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
federation.bucket (cognitive 17) plugins/ruflo-cost-tracker/scripts/federation.mjs:58— federation.bucket has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 6, ternaries 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
track.main (cognitive 17) plugins/ruflo-cost-tracker/scripts/track.mjs:121— track.main has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, loops 2, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
drift-from-history.emitAndExit (cognitive 17) plugins/ruflo-metaharness/scripts/drift-from-history.mjs:90— drift-from-history.emitAndExit has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mint.main (cognitive 17) plugins/ruflo-metaharness/scripts/mint.mjs:72— mint.main has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (12 pts), loops 2 (5 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ledger.resolveCallTool (cognitive 17) plugins/ruflo-ruos/scripts/lib/ledger.mjs:64— ledger.resolveCallTool has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), error handling 3 (5 pts), loops 2, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
topology.topologyLines (cognitive 17) plugins/ruflo-swarm/hooks/model/topology.ts:12— topology.topologyLines has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 8 (14 pts), boolean chains 1, if/else 1, match/switch 1 (nesting depth added 6). Of this number, 11 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
gaia-audit.checkAnswerLeakage (cognitive 17) plugins/ruflo-workflows/scripts/gaia-audit.mjs:281— gaia-audit.checkAnswerLeakage has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 2 (4 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
gaia-audit.checkAnswerKeyReads (cognitive 17) plugins/ruflo-workflows/scripts/gaia-audit.mjs:576— gaia-audit.checkAnswerKeyReads has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 3 (6 pts), boolean chains 1, ternaries 1 (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.
audit-plugin-manifest.main (cognitive 17) scripts/audit-plugin-manifest.mjs:124— audit-plugin-manifest.main has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), loops 3 (8 pts), ternaries 1 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
audit-skill-frontmatter.main (cognitive 17) scripts/audit-skill-frontmatter.mjs:124— audit-skill-frontmatter.main has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), loops 3 (8 pts), ternaries 1 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
managed-memory-client.resultOf (cognitive 17) v3/@claude-flow/cli/src/services/managed-memory-client.ts:28— managed-memory-client.resultOf has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 6, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
managed-agent-tools.waitForIdle (cognitive 17) v3/@claude-flow/cli/src/mcp-tools/managed-agent-tools.ts:163— managed-agent-tools.waitForIdle has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 5, loops 1 (nesting depth added 6). Of this number, 15 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.
validate-input.validateEnv (cognitive 17) v3/@claude-flow/cli-core/src/mcp-tools/validate-input.ts:235— validate-input.validateEnv has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
benchmark-codemods.main (cognitive 17) v3/@claude-flow/cli/scripts/benchmark-codemods.mjs:40— benchmark-codemods.main has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 2 (4 pts), ternaries 1 (2 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.
lora-adapter.latestCheckpointInfo (cognitive 17) v3/@claude-flow/cli/src/ruvector/lora-adapter.ts:702— lora-adapter.latestCheckpointInfo has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 pts), boolean chains 1, 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.
memory-bridge.bridgeHierarchicalStore (cognitive 17) v3/@claude-flow/cli/src/memory/memory-bridge.ts:3520— memory-bridge.bridgeHierarchicalStore has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, error handling 1, ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GlobalAiBudget.acquireLock (cognitive 17) v3/@claude-flow/cli/src/services/global-ai-budget.ts:374— GlobalAiBudget.acquireLock has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), error handling 3 (7 pts), loops 1 (nesting depth added 10). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HeadlessWorkerExecutor.executeClaudeCode (cognitive 17) v3/@claude-flow/cli/src/services/headless-worker-executor.ts:1341— HeadlessWorkerExecutor.executeClaudeCode has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 6, if/else 5, error handling 3 (4 pts), ternaries 2 (nesting depth added 1). None of this is in the body itself: all 17 points belong to 10 function literals inside it that branch (lines 1424, 1360, 1506, …). 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.
WorkspaceLeaseRegistry.withLock (cognitive 17) v3/@claude-flow/cli/src/services/workspace-lease.ts:92— WorkspaceLeaseRegistry.withLock has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), error handling 3 (7 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RepoSupervisorRegistry.withLock (cognitive 17) v3/@claude-flow/cli/src/services/repo-supervisor.ts:98— RepoSupervisorRegistry.withLock has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), error handling 3 (7 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
flywheel-transaction.withStateLock (cognitive 17) v3/@claude-flow/cli/src/services/flywheel-transaction.ts:246— flywheel-transaction.withStateLock has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), error handling 3 (7 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
bounded-worker-pool.runBoundedPool.worker (cognitive 17) v3/@claude-flow/cli/src/services/bounded-worker-pool.ts:54— bounded-worker-pool.runBoundedPool.worker has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 3 (8 pts), if/else 3 (6 pts), error handling 1 (2 pts), loops 1 (nesting depth added 9). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
evolve-proof.assembleBundle (cognitive 17) v3/@claude-flow/cli/src/services/evolve-proof.ts:206— evolve-proof.assembleBundle has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 11 (14 pts), boolean chains 2, if/else 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
harness-flywheel-generations.withAttemptsLock (cognitive 17) v3/@claude-flow/cli/src/services/harness-flywheel-generations.ts:107— harness-flywheel-generations.withAttemptsLock has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), error handling 3 (7 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
harness-project-anchor.parseTasks (cognitive 17) v3/@claude-flow/cli/src/services/harness-project-anchor.ts:85— harness-project-anchor.parseTasks has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 6, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
flywheel-proposer.proposeFlywheelCandidates (cognitive 17) v3/@claude-flow/cli/src/services/flywheel-proposer.ts:180— flywheel-proposer.proposeFlywheelCandidates has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (15 pts), error handling 1, ternaries 1 (nesting depth added 5). Of this number, 15 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WorkerDaemon.runWorkerLogic (cognitive 17) REDACTED:1569— WorkerDaemon.runWorkerLogic has cognitive complexity 17 (threshold 15). Drivers by points: error handling 2 (5 pts), if/else 4 (5 pts), boolean chains 3, ternaries 1 (3 pts), match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
hooks-tools.suggestAgentsForTask (cognitive 17) v3/@claude-flow/cli/src/mcp-tools/hooks-tools.ts:930— hooks-tools.suggestAgentsForTask has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (3 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.
hooks-tools.assessCommandRisk (cognitive 17) v3/@claude-flow/cli/src/mcp-tools/hooks-tools.ts:972— hooks-tools.assessCommandRisk has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8, boolean chains 6, ternaries 2 (3 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
claims-store.readClaimsStore (cognitive 17) v3/@claude-flow/cli/src/services/claims-store.ts:9— claims-store.readClaimsStore has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 4, ternaries 2 (3 pts), loops 2, error handling 1 (nesting depth added 4). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
search.getPluginSearchSuggestions (cognitive 17) v3/@claude-flow/cli/src/plugins/store/search.ts:147— search.getPluginSearchSuggestions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
guidance-tools.discoverSkills (cognitive 17) v3/@claude-flow/cli/src/mcp-tools/guidance-tools.ts:377— guidance-tools.discoverSkills has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (4 pts), ternaries 1 (3 pts), error handling 1 (nesting depth added 7). Of this number, 9 points are the body's own statements and 8 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
catalog.classify (cognitive 17) v3/@claude-flow/cli/src/mods/command-registry/catalog.ts:92— catalog.classify has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, ternaries 2 (3 pts) (nesting depth added 3). Of this number, 14 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
doctor.checkHelperIntegrity (cognitive 17) REDACTED:272— doctor.checkHelperIntegrity has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, ternaries 2, loops 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, 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.
doctor.checkProxyProcess (cognitive 17) REDACTED:1933— doctor.checkProxyProcess has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (6 pts), ternaries 4 (6 pts), error handling 4, boolean chains 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
init.isBloatedRufloSkillDir::walk (cognitive 17) v3/@claude-flow/cli/src/commands/init.ts:308— init.isBloatedRufloSkillDir::walk has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), error handling 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
init.initGrokAction (cognitive 17) v3/@claude-flow/cli/src/commands/init.ts:398— init.initGrokAction has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 6 (8 pts), if/else 4, boolean chains 2, loops 1 (2 pts), error handling 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.
headless.parseArgs (cognitive 17) v3/@claude-flow/cli/src/runtime/headless.ts:64— headless.parseArgs has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 7 (8 pts), loops 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.
index.validateProfiles (cognitive 17) v3/@claude-flow/codex/src/validators/index.ts:1044— index.validateProfiles has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (7 pts), ternaries 2 (7 pts), loops 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
index.generateConfigTomlFromParsed (cognitive 17) v3/@claude-flow/codex/src/migrations/index.ts:833— index.generateConfigTomlFromParsed has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 5, loops 2 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
analyzer.splitOversizedSections (cognitive 17) REDACTED:1324— analyzer.splitOversizedSections has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 6, loops 3 (nesting depth added 2). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to one function item inside it that branches (flushSection). 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.
analyzer.trimToLineCount (cognitive 17) REDACTED:1486— analyzer.trimToLineCount has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3, boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ContinueGate.evaluate (cognitive 17) v3/@claude-flow/guidance/src/continue-gate.ts:186— ContinueGate.evaluate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 2, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
StatuslineGenerator.generateSafeStatusline (cognitive 17) v3/@claude-flow/hooks/src/statusline/index.ts:292— StatuslineGenerator.generateSafeStatusline has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 10 (12 pts), if/else 5 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
SONAAdapter.consolidatePatterns (cognitive 17) v3/@claude-flow/integration/src/sona-adapter.ts:677— SONAAdapter.consolidatePatterns has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HttpTransport.setupWebSocketHandlers (cognitive 17) REDACTED:362— HttpTransport.setupWebSocketHandlers has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 8). 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 366). 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.
HNSWIndex.insertNode (cognitive 17) v3/@claude-flow/memory/src/hnsw-index.ts:764— HNSWIndex.insertNode has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TieredMemoryStore.recall (cognitive 17) v3/@claude-flow/memory/src/tiered-memory.ts:419— TieredMemoryStore.recall has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 6). Of this number, 13 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AgentDBAdapter.update (cognitive 17) v3/@claude-flow/memory/src/agentdb-adapter.ts:289— AgentDBAdapter.update has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 2 (4 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
AgentDBAdapter.searchKeyword (cognitive 17) v3/@claude-flow/memory/src/agentdb-adapter.ts:873— AgentDBAdapter.searchKeyword has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AgentDBAdapter.loadFromDisk (cognitive 17) v3/@claude-flow/memory/src/agentdb-adapter.ts:1208— AgentDBAdapter.loadFromDisk has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (4 pts), loops 4, ternaries 2 (4 pts), error handling 3, boolean chains 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DecisionTransformer.forward (cognitive 17) v3/@claude-flow/neural/src/algorithms/decision-transformer.ts:228— DecisionTransformer.forward has cognitive complexity 17 (threshold 15). Drivers by points: loops 9 (16 pts), boolean chains 1 (nesting depth added 7). 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.
resource-admission.decideResourceAdmission (cognitive 17) v3/@claude-flow/performance/src/resource-admission.ts:58— resource-admission.decideResourceAdmission has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, boolean chains 3, ternaries 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
resource-admission.validate (cognitive 17) v3/@claude-flow/performance/src/resource-admission.ts:105— resource-admission.validate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10, boolean chains 7. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
RuVectorBridge.registerMCPTools (cognitive 17) v3/@claude-flow/plugins/src/integrations/ruvector/ruvector-bridge.ts:1236— RuVectorBridge.registerMCPTools has cognitive complexity 17 (threshold 15). Drivers by points: error handling 8, if/else 7 (8 pts), boolean chains 1 (nesting depth added 1). None of this is in the body itself: all 17 points belong to 8 function literals inside it that branch (lines 1417, 1530, 1378, …). 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.
RuVectorStream.insertBatch (cognitive 17) v3/@claude-flow/plugins/src/integrations/ruvector/streaming.ts:599— RuVectorStream.insertBatch has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 2 (5 pts), error handling 2 (4 pts), if/else 3 (4 pts), loops 3 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OptimizedProductQuantizer.orthogonalize (cognitive 17) v3/@claude-flow/plugins/src/integrations/ruvector/quantization.ts:1206— OptimizedProductQuantizer.orthogonalize has cognitive complexity 17 (threshold 15). Drivers by points: loops 6 (14 pts), if/else 2 (3 pts) (nesting depth added 9). 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.
quantization.estimateRecall (cognitive 17) v3/@claude-flow/plugins/src/integrations/ruvector/quantization.ts:1825— quantization.estimateRecall has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 4 (7 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.
migrations.runMigrationsFromCLI (cognitive 17) REDACTED:565— migrations.runMigrationsFromCLI has cognitive complexity 17 (threshold 15). Drivers by points: loops 3 (9 pts), if/else 4 (7 pts), match/switch 1 (nesting depth added 9). 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.
GoogleProvider.buildRequest (cognitive 17) v3/@claude-flow/providers/src/google-provider.ts:298— GoogleProvider.buildRequest has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8, boolean chains 7, ternaries 2. Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: 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.
OllamaProvider.buildRequest (cognitive 17) v3/@claude-flow/providers/src/ollama-provider.ts:304— OllamaProvider.buildRequest has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 7, ternaries 2. Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: 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.
V3ProgressService.countPackages (cognitive 17) v3/@claude-flow/shared/src/services/v3-progress.service.ts:371— V3ProgressService.countPackages has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 5, error handling 2 (3 pts), loops 1 (nesting depth added 5). Of this number, 15 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.
HttpTransport.setupMiddleware (cognitive 17) REDACTED:210— HttpTransport.setupMiddleware has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4 (nesting depth added 5). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 226). 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.
MaestroPlugin.executeAdaptive (cognitive 17) v3/@claude-flow/shared/src/plugins/official/maestro-plugin.ts:335— MaestroPlugin.executeAdaptive has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (6 pts), ternaries 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.
RegressionTestRunner.generateSummary (cognitive 17) v3/@claude-flow/testing/src/regression/regression-runner.ts:270— RegressionTestRunner.generateSummary has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (16 pts), ternaries 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
report-generator.generateEnhancedMarkdown (cognitive 17) v3/@claude-flow/testing/src/v2-compat/report-generator.ts:63— report-generator.generateEnhancedMarkdown has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 4 (6 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
GoalInput.GoalInput (cognitive 17) v3/goal_ui/src/components/GoalInput.tsx:16— GoalInput.GoalInput has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (5 pts), ternaries 2, error handling 1 (nesting depth added 1). 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 items inside it that branch (generateGoals, a function literal at line 136, handleSubmit). 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.
task-tools.handleTaskDependencies (cognitive 17) v3/mcp/tools/task-tools.ts:726— task-tools.handleTaskDependencies has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (6 pts), boolean chains 3, match/switch 2 (3 pts), ternaries 2 (3 pts), error handling 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
system-tools.handleSystemMetrics (cognitive 17) v3/mcp/tools/system-tools.ts:362— system-tools.handleSystemMetrics has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 6, if/else 5 (6 pts), error handling 1 (3 pts), ternaries 2 (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.
mcp-tools.buildSuggestedModules (cognitive 17) v3/plugins/code-intelligence/src/mcp-tools.ts:1136— mcp-tools.buildSuggestedModules has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 3 (4 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 8). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BdBridge.execBd (cognitive 17) v3/plugins/gastown-bridge/src/bridges/bd-bridge.ts:425— BdBridge.execBd has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 6, error handling 1 (nesting depth added 3). 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 459). 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.
ConvoyTracker.calculateProgress (cognitive 17) v3/plugins/gastown-bridge/src/convoy/tracker.ts:649— ConvoyTracker.calculateProgress has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 2, ternaries 1 (2 pts), error handling 1, loops 1 (nesting depth added 6). 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.
ConvoyObserver.detectCyclesJS (cognitive 17) v3/plugins/gastown-bridge/src/convoy/observer.ts:972— ConvoyObserver.detectCyclesJS has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (3 pts) (nesting depth added 9). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to one function item inside it that branches (dfs). 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.
WasmLoaderAdapter.resolveStepDependencies (cognitive 17) v3/plugins/gastown-bridge/src/index.ts:577— WasmLoaderAdapter.resolveStepDependencies has cognitive complexity 17 (threshold 15). Drivers by points: loops 6 (8 pts), if/else 3 (6 pts), boolean chains 3 (nesting depth added 5). 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.
mcp-tools.extractClauses (cognitive 17) REDACTED:553— mcp-tools.extractClauses has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (10 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.
mcp-tools.extractObligations (cognitive 17) REDACTED:908— mcp-tools.extractObligations has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (10 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.
CohomologyEngine.computeEnergyJS (cognitive 17) v3/plugins/prime-radiant/src/engines/CohomologyEngine.ts:179— CohomologyEngine.computeEnergyJS has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 4 (6 pts), 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.
quantum-topology.handler (cognitive 17) v3/plugins/prime-radiant/src/tools/quantum-topology.ts:332— quantum-topology.handler has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 3 (7 pts), if/else 5 (6 pts), error handling 2 (3 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TeammateBridge.spawnTeammate (cognitive 17) v3/plugins/teammate-plugin/src/teammate-bridge.ts:958— TeammateBridge.spawnTeammate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (17 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.
verifyAccessToken (cognitive 17) plugins/ruflo-chatgpt-federation/src/oauth.mjs:69— verifyAccessToken has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 3, error handling 2 (3 pts), ternaries 3, other 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
recall.screen (cognitive 16) plugins/ruflo-agentdb/hooks/recall.ts:100— recall.screen has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 2 (4 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
index.createArenaTools (cognitive 16) plugins/ruflo-arena/src/mcp-tools/index.ts:50— index.createArenaTools has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), error handling 6, loops 1, ternaries 1 (nesting depth added 2). None of this is in the body itself: all 16 points belong to 6 function literals inside it that branch (lines 187, 69, 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.
workflows.parseJournal (cognitive 16) plugins/ruflo-console/hooks/data/workflows.ts:134— workflows.parseJournal has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 2 (7 pts), boolean chains 4, if/else 3 (4 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
adr-write.supersedesIn (cognitive 16) plugins/ruflo-console/hooks/data/adr-write.ts:236— adr-write.supersedesIn has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 6 (8 pts), boolean chains 4, if/else 3 (4 pts) (nesting depth added 3). Of this number, 13 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mission-verify.verdictOf (cognitive 16) plugins/ruflo-console/hooks/mission-verify.ts:126— mission-verify.verdictOf has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 4, ternaries 3, loops 1 (nesting depth added 2). 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: 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.
plugin-catalog.pluginOf (cognitive 16) plugins/ruflo-console/hooks/data/plugin-catalog.ts:71— plugin-catalog.pluginOf has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 7 (10 pts), boolean chains 4, if/else 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
toasts.pullToasts (cognitive 16) plugins/ruflo-console/hooks/toasts.ts:88— toasts.pullToasts has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
adr.missionRows (cognitive 16) plugins/ruflo-console/hooks/views/adr.ts:87— adr.missionRows has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (7 pts), if/else 5, loops 2 (3 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
charts.gaugePicture (cognitive 16) plugins/ruflo-console/hooks/gfx/charts.ts:129— charts.gaugePicture has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 6 (13 pts), boolean chains 1, if/else 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.
hive-strip.drawShield (cognitive 16) plugins/ruflo-console/hooks/gfx/hive-strip.ts:38— hive-strip.drawShield has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 6 (10 pts), if/else 4, boolean chains 1, loops 1 (nesting depth added 4). 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 into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
harness-text.scanRecords (cognitive 16) plugins/ruflo-console/hooks/data/harness-text.ts:64— harness-text.scanRecords has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), error handling 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
memory-health.semanticDuplicates (cognitive 16) plugins/ruflo-console/hooks/data/memory-health.ts:333— memory-health.semanticDuplicates has cognitive complexity 16 (threshold 15). Drivers by points: loops 6 (9 pts), if/else 3 (6 pts), ternaries 1 (nesting depth added 6). 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, 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.
missions.observationRows (cognitive 16) plugins/ruflo-console/hooks/views/missions.ts:49— missions.observationRows has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (9 pts), if/else 6, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ActivityIncr.fold (cognitive 16) plugins/ruflo-console/hooks/data/wf-incr-activity.ts:49— ActivityIncr.fold has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 5, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
wf-detail.registerDrill (cognitive 16) plugins/ruflo-console/hooks/views/wf-detail.ts:260— wf-detail.registerDrill has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (3 pts), boolean chains 2, ternaries 1 (nesting depth added 6). Of this number, 12 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.
wf-anatole.boardRows (cognitive 16) plugins/ruflo-console/hooks/views/wf-anatole.ts:98— wf-anatole.boardRows has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, ternaries 5 (7 pts), boolean chains 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.
update-flow.applyUpdate (cognitive 16) plugins/ruflo-console/hooks/update-flow.ts:94— update-flow.applyUpdate has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 5 (7 pts), loops 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
model-fields.setField (cognitive 16) plugins/ruflo-console/hooks/model-fields.ts:11— model-fields.setField has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 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.
mission-advisor.advisorRows (cognitive 16) plugins/ruflo-console/hooks/views/mission-advisor.ts:14— mission-advisor.advisorRows has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 8 (12 pts), if/else 2, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
skills-more.authorRows (cognitive 16) plugins/ruflo-console/hooks/views/skills-more.ts:104— skills-more.authorRows has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (13 pts), loops 1 (2 pts), if/else 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ap-parked.parkedRows (cognitive 16) plugins/ruflo-console/hooks/views/ap-parked.ts:18— ap-parked.parkedRows has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 3, boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
vector.entryRow (cognitive 16) plugins/ruflo-console/hooks/views/vector.ts:56— vector.entryRow has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 8 (12 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
common.tagChip (cognitive 16) REDACTED:208— common.tagChip has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (15 pts), if/else 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
bench-workflows.disk (cognitive 16) plugins/ruflo-console/scripts/bench-workflows.mjs:181— bench-workflows.disk has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 6 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 7). Of this number, 12 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
run.paint (cognitive 16) plugins/ruflo-console/tui/run.ts:205— run.paint has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 8 (9 pts), if/else 4, boolean chains 2, error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
session.listAllJsonls (cognitive 16) plugins/ruflo-cost-tracker/scripts/session.mjs:52— session.listAllJsonls has cognitive complexity 16 (threshold 15). Drivers by points: error handling 3 (7 pts), if/else 3 (6 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_harness.parseMcpScanText (cognitive 16) plugins/ruflo-metaharness/scripts/_harness.mjs:298— _harness.parseMcpScanText has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, loops 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
learn.main (cognitive 16) plugins/ruflo-metaharness/scripts/learn.mjs:80— learn.main has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, ternaries 3, boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
attention.attentionLine (cognitive 16) plugins/ruflo-mods/hooks/attention.ts:17— attention.attentionLine has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 6 (9 pts), boolean chains 3, if/else 3, error handling 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dangerous-command.hasForkBomb (cognitive 16) plugins/ruflo-mods/hooks/guard/dangerous-command.ts:215— dangerous-command.hasForkBomb has cognitive complexity 16 (threshold 15). Drivers by points: loops 3 (5 pts), ternaries 2 (5 pts), boolean chains 3, if/else 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rootdelete.hasRootDelete::finishWord (cognitive 16) plugins/ruflo-protector/hooks/rootdelete.ts:17— rootdelete.hasRootDelete::finishWord has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 7 (8 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. This shape REPEATS in the file: one other method here (rootdelete.hasRootDelete) 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.
pane.prompts (cognitive 16) plugins/ruflo-swarm/hooks/views/pane.tsx:148— pane.prompts has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 8 (13 pts), if/else 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
github-query.createGithubQuery.search (cognitive 16) plugins/ruflo-x-gateway/src/github-query.mjs:258— github-query.createGithubQuery.search has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 3, ternaries 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
audit-exit-bypass-antipattern.discoverScripts (cognitive 16) scripts/audit-exit-bypass-antipattern.mjs:60— audit-exit-bypass-antipattern.discoverScripts has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), error handling 3 (5 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
smoke-all-plugins.runSmoke (cognitive 16) scripts/smoke-all-plugins.mjs:127— smoke-all-plugins.runSmoke has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 6 (8 pts), if/else 3, boolean chains 2, error handling 2, loops 1 (nesting depth added 2). None of this is in the body itself: all 16 points belong to 5 function literals inside it that branch (lines 154, 128, 141, …). 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.
smoke-init-scaffold-references.checkDeadToolReferences (cognitive 16) scripts/smoke-init-scaffold-references.mjs:202— smoke-init-scaffold-references.checkDeadToolReferences has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 3 (6 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.
smoke-init-scaffold-references.checkPluginMcpPinning (cognitive 16) scripts/smoke-init-scaffold-references.mjs:247— smoke-init-scaffold-references.checkPluginMcpPinning has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (5 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (3 pts), error handling 1 (2 pts) (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.
ClaudeFlowMemoryAdapter.list (cognitive 16) v3/@claude-flow/browser/src/infrastructure/memory-integration.ts:176— ClaudeFlowMemoryAdapter.list has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 5, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
causal-recovery-store.classifyBreak (cognitive 16) v3/@claude-flow/browser/src/infrastructure/causal-recovery-store.ts:199— causal-recovery-store.classifyBreak 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.
mint-champion.neighbors (cognitive 16) v3/@claude-flow/cli/scripts/mint-champion.mjs:88— mint-champion.neighbors has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (9 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RvfaReader.fromBuffer (cognitive 16) v3/@claude-flow/cli/src/appliance/rvfa-format.ts:310— RvfaReader.fromBuffer has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 2, boolean chains 1, error handling 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
events.recordFunnelEvent (cognitive 16) v3/@claude-flow/cli/src/funnel/events.ts:112— events.recordFunnelEvent has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (6 pts), boolean chains 4, ternaries 3, error handling 2, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
memory-backup.restoreMemoryDbFromBackup (cognitive 16) v3/@claude-flow/cli/src/services/memory-backup.ts:303— memory-backup.restoreMemoryDbFromBackup has cognitive complexity 16 (threshold 15). Drivers by points: error handling 5 (7 pts), if/else 6 (7 pts), loops 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
hybrid-retrieval.mmrRerank (cognitive 16) v3/@claude-flow/cli/src/memory/hybrid-retrieval.ts:199— hybrid-retrieval.mmrRerank has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
intelligence.recordStep (cognitive 16) v3/@claude-flow/cli/src/memory/intelligence.ts:1159— intelligence.recordStep has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, error handling 2 (3 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rabitq-index.searchRabitq (cognitive 16) v3/@claude-flow/cli/src/memory/rabitq-index.ts:236— rabitq-index.searchRabitq has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), error handling 3 (5 pts), loops 2, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
memory-bridge.bridgeDeleteCausalNode (cognitive 16) v3/@claude-flow/cli/src/memory/memory-bridge.ts:3139— memory-bridge.bridgeDeleteCausalNode has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), error handling 3 (4 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
memory-bridge.bridgeContextSynthesize (cognitive 16) v3/@claude-flow/cli/src/memory/memory-bridge.ts:3772— memory-bridge.bridgeContextSynthesize has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, boolean chains 5, error handling 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.
learned-routing.buildLearnedRoutingPatterns (cognitive 16) v3/@claude-flow/cli/src/services/learned-routing.ts:45— learned-routing.buildLearnedRoutingPatterns has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (9 pts), if/else 3 (5 pts), boolean chains 2 (nesting depth added 6). Of this number, 14 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, 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.
harness-flywheel-generations.checkServedChampionDrift (cognitive 16) v3/@claude-flow/cli/src/services/harness-flywheel-generations.ts:332— harness-flywheel-generations.checkServedChampionDrift has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6, boolean chains 4, error handling 2 (3 pts), loops 2, ternaries 1 (nesting depth added 1). Of this number, 12 points are the body's own statements and 4 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.
policy-runtime.reconcileLedger (cognitive 16) v3/@claude-flow/cli/src/services/policy-runtime.ts:700— policy-runtime.reconcileLedger has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 2 (5 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
hooks-tools.getIntelligenceStatsFromMemory (cognitive 16) v3/@claude-flow/cli/src/mcp-tools/hooks-tools.ts:719— hooks-tools.getIntelligenceStatsFromMemory has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 3, error handling 2, ternaries 2. Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 765, 740, 759, …). 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.
task-tools.updateAgents (cognitive 16) v3/@claude-flow/cli/src/mcp-tools/task-tools.ts:90— task-tools.updateAgents has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (3 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PatternDiscovery.resolveIPNS (cognitive 16) v3/@claude-flow/cli/src/transfer/store/discovery.ts:138— PatternDiscovery.resolveIPNS has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PatternDiscovery.fetchRegistry (cognitive 16) v3/@claude-flow/cli/src/transfer/store/discovery.ts:242— PatternDiscovery.fetchRegistry has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), error handling 4 (6 pts), boolean chains 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.
cuda-parse.readEntry (cognitive 16) v3/@claude-flow/cli/src/rure/cuda-parse.ts:97— cuda-parse.readEntry has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 4, ternaries 3, loops 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
business-pod-tools.loadTemplate (cognitive 16) v3/@claude-flow/cli/src/mcp-tools/business-pod-tools.ts:39— business-pod-tools.loadTemplate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (6 pts), ternaries 2 (5 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
install.readRecord (cognitive 16) v3/@claude-flow/cli/src/mods/install.ts:199— install.readRecord has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (6 pts), ternaries 2 (5 pts), boolean chains 2, loops 1 (2 pts), error handling 1 (nesting depth added 6). Of this number, 13 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
grok-generator.findBigIntKeyPath (cognitive 16) v3/@claude-flow/cli/src/init/grok-generator.ts:293— grok-generator.findBigIntKeyPath has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 2 (4 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
migrate-agent-detection.isPluginInstalled (cognitive 16) v3/@claude-flow/cli/src/commands/migrate-agent-detection.ts:69— migrate-agent-detection.isPluginInstalled has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
host-statusline.lineFor (cognitive 16) v3/@claude-flow/cli/templates/grok/scripts/host-statusline.mjs:252— host-statusline.lineFor has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, ternaries 5 (7 pts), boolean chains 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.
ActivityParser.event (cognitive 16) v3/@claude-flow/codex/src/activity/parser.ts:90— ActivityParser.event has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7, boolean chains 5, ternaries 3 (4 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
parser.resultStatus (cognitive 16) v3/@claude-flow/codex/src/activity/parser.ts:135— parser.resultStatus has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (6 pts), boolean chains 4, ternaries 2 (4 pts), error handling 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ActivityReader.feed (cognitive 16) v3/@claude-flow/codex/src/activity/reader.ts:72— ActivityReader.feed has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 1 (3 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ActivityViewer.key (cognitive 16) v3/@claude-flow/codex/src/activity/viewer.ts:34— ActivityViewer.key has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 5, ternaries 2 (3 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.
CodexInitializer.copyBundledSkills (cognitive 16) v3/@claude-flow/codex/src/initializer.ts:352— CodexInitializer.copyBundledSkills has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 3, ternaries 1 (3 pts), error handling 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CodexInitializer.registerMCPServer (cognitive 16) v3/@claude-flow/codex/src/initializer.ts:411— CodexInitializer.registerMCPServer has cognitive complexity 16 (threshold 15). Drivers by points: error handling 5 (6 pts), ternaries 3 (5 pts), if/else 3 (4 pts), boolean chains 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.
index.extractBehavioralRules (cognitive 16) v3/@claude-flow/codex/src/migrations/index.ts:496— index.extractBehavioralRules has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 2 (4 pts), 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.
index.generateMigrationReport (cognitive 16) v3/@claude-flow/codex/src/migrations/index.ts:1000— index.generateMigrationReport has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (6 pts), loops 3 (6 pts), boolean chains 3, 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.
DualModeOrchestrator.resolveWorkerEnvelope (cognitive 16) v3/@claude-flow/codex/src/dual-mode/orchestrator.ts:575— DualModeOrchestrator.resolveWorkerEnvelope has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 14, if/else 2. Of this number, 11 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
analyzer.extractRulesFromProse (cognitive 16) REDACTED:1274— analyzer.extractRulesFromProse has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DeterministicToolGateway.evaluate (cognitive 16) v3/@claude-flow/guidance/src/gateway.ts:165— DeterministicToolGateway.evaluate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ManifestValidator.validateDataPolicy (cognitive 16) v3/@claude-flow/guidance/src/manifest-validator.ts:526— ManifestValidator.validateDataPolicy has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UncertaintyLedger.query (cognitive 16) v3/@claude-flow/guidance/src/uncertainty.ts:297— UncertaintyLedger.query has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 4, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TemporalStore.enforceCapacity (cognitive 16) v3/@claude-flow/guidance/src/temporal.ts:616— TemporalStore.enforceCapacity has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 4 (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.
SwarmCommunication.generateHandoffContext (cognitive 16) v3/@claude-flow/hooks/src/swarm/index.ts:735— SwarmCommunication.generateHandoffContext has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (10 pts), if/else 6 (nesting depth added 5). 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.
MultiModelRouter.scoreModels (cognitive 16) REDACTED:831— MultiModelRouter.scoreModels has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 7, match/switch 1 (nesting depth added 1). None of this is in the body itself: all 16 points belong to one function literal inside it that branches (line 842). 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.
HybridBackend.querySemanticScored (cognitive 16) v3/@claude-flow/memory/src/hybrid-backend.ts:382— HybridBackend.querySemanticScored has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 7 (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.
MemoryMigrator.embedBatch (cognitive 16) v3/@claude-flow/memory/src/migration.ts:415— MemoryMigrator.embedBatch has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), error handling 2 (4 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 6). Of this number, 13 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReasoningBank.detectContradictions (cognitive 16) v3/@claude-flow/neural/src/reasoning-bank.ts:1202— ReasoningBank.detectContradictions has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (13 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.
ProviderRegistry.executeWithProvider (cognitive 16) v3/@claude-flow/plugins/src/providers/index.ts:240— ProviderRegistry.executeWithProvider has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BatchProcessor.processBatch (cognitive 16) v3/@claude-flow/plugins/src/integrations/ruvector/streaming.ts:1351— BatchProcessor.processBatch has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (10 pts), if/else 3 (6 pts) (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
retry.retry (cognitive 16) v3/@claude-flow/shared/src/resilience/retry.ts:95— retry.retry has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (9 pts), ternaries 1 (3 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RegressionTestRunner.runAll (cognitive 16) v3/@claude-flow/testing/src/regression/regression-runner.ts:135— RegressionTestRunner.runAll has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Index.Index (cognitive 16) v3/goal_ui/src/pages/Index.tsx:128— Index.Index has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 32, if/else 14 (28 pts), error handling 2 (5 pts), ternaries 4 (5 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. This shape REPEATS in the file: one other method here (Index.Index::executeResearch) 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.
swarm-tools.handleInitSwarm (cognitive 16) v3/mcp/tools/swarm-tools.ts:127— swarm-tools.handleInitSwarm has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (10 pts), boolean chains 3, error handling 1 (2 pts), if/else 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
config-tools.handleSaveConfig (cognitive 16) v3/mcp/tools/config-tools.ts:291— config-tools.handleSaveConfig has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), error handling 3 (5 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
task-tools.handleTaskStatus (cognitive 16) v3/mcp/tools/task-tools.ts:419— task-tools.handleTaskStatus has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 4, error handling 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.
mcp-tools.detectCircularDeps (cognitive 16) v3/plugins/code-intelligence/src/mcp-tools.ts:940— mcp-tools.detectCircularDeps has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 4, ternaries 1 (4 pts) (nesting depth added 7). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to one function item inside it that branches (findCycle). 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.
ConvoyObserver.checkCompletion (cognitive 16) v3/plugins/gastown-bridge/src/convoy/observer.ts:395— ConvoyObserver.checkCompletion has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 1 (3 pts), error handling 1 (2 pts), boolean chains 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.
GasTownBridgePlugin.zodToJsonSchema (cognitive 16) v3/plugins/gastown-bridge/src/index.ts:1214— GasTownBridgePlugin.zodToJsonSchema has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 1 (2 pts), ternaries 1 (2 pts), boolean chains 1, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DrugInteractionGraph.checkInteractions (cognitive 16) v3/plugins/healthcare-clinical/src/bridges/gnn-bridge.ts:140— DrugInteractionGraph.checkInteractions has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (8 pts), loops 3 (7 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.
mcp-tools.clinicalPathwaysHandler (cognitive 16) v3/plugins/healthcare-clinical/src/mcp-tools.ts:329— mcp-tools.clinicalPathwaysHandler has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 3 (4 pts), boolean chains 2, loops 1 (2 pts), error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HyperbolicBridge.computeEmbeddingMetrics (cognitive 16) v3/plugins/hyperbolic-reasoning/src/bridges/hyperbolic-bridge.ts:517— HyperbolicBridge.computeEmbeddingMetrics has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 2, loops 2, ternaries 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NervousSystemBridge.createMockModule (cognitive 16) v3/plugins/neural-coordination/src/bridges/nervous-system-bridge.ts:225— NervousSystemBridge.createMockModule has cognitive complexity 16 (threshold 15). Drivers by points: loops 7 (10 pts), if/else 3 (5 pts), ternaries 1 (nesting depth added 5). 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, 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.
DagBridge.topologicalSort (cognitive 16) v3/plugins/quantum-optimizer/src/bridges/dag-bridge.ts:137— DagBridge.topologicalSort has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 4 (5 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.
ExoticBridge.createMockModule (cognitive 16) v3/plugins/ruvector-upstream/src/bridges/exotic.ts:173— ExoticBridge.createMockModule has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (7 pts), if/else 4 (6 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Change-coupling hub: pane.ts → controller.ts, boot.ts, pictures.ts, frames.ts plugins/ruflo-console/hooks/views/pane.ts— `plugins/ruflo-console/hooks/views/pane.ts` changes together with 4 other files — `plugins/ruflo-console/hooks/controller.ts`, `plugins/ruflo-console/hooks/gfx/boot.ts`, `plugins/ruflo-console/hooks/gfx/pictures.ts`, `plugins/ruflo-console/hooks/views/frames.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 (18 lines × 2) v3/plugins/gastown-bridge/wasm/ruvector-gnn-wasm/src/critical.rs:144— v3/plugins/gastown-bridge/wasm/ruvector-gnn-wasm/src/critical.rs:144-161 | v3/plugins/gastown-bridge/wasm/ruvector-gnn-wasm/src/topo.rs:103-120 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (7–12 lines × 2) v3/crates/ruflo-watermark/src/tournament.rs:45— v3/crates/ruflo-watermark/src/tournament.rs:45-56 | v3/crates/ruflo-watermark/src/tournament.rs:88-94 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) v3/plugins/gastown-bridge/wasm/gastown-formula-wasm/src/parser.rs:153— v3/plugins/gastown-bridge/wasm/gastown-formula-wasm/src/parser.rs:153-164 | v3/plugins/gastown-bridge/wasm/gastown-formula-wasm/src/parser.rs:178-189 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) v3/plugins/gastown-bridge/wasm/ruvector-gnn-wasm/src/critical.rs:88— v3/plugins/gastown-bridge/wasm/ruvector-gnn-wasm/src/critical.rs:88-95 | v3/plugins/gastown-bridge/wasm/ruvector-gnn-wasm/src/dag.rs:177-184 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 3) v3/crates/ruflo-agntcy/src/envelope.rs:152— v3/crates/ruflo-agntcy/src/envelope.rs:152-157 | v3/crates/ruflo-agntcy/src/envelope.rs:169-174 | v3/crates/ruflo-agntcy/src/envelope.rs:184-189 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (6 lines × 2) v3/plugins/gastown-bridge/wasm/ruvector-gnn-wasm/src/dag.rs:166— v3/plugins/gastown-bridge/wasm/ruvector-gnn-wasm/src/dag.rs:166-171 | v3/plugins/gastown-bridge/wasm/ruvector-gnn-wasm/src/topo.rs:92-97 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 3) v3/plugins/gastown-bridge/wasm/gastown-formula-wasm/src/parser.rs:95— v3/plugins/gastown-bridge/wasm/gastown-formula-wasm/src/parser.rs:95-100 | v3/plugins/gastown-bridge/wasm/gastown-formula-wasm/src/parser.rs:152-156 | v3/plugins/gastown-bridge/wasm/gastown-formula-wasm/src/parser.rs:177-181 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Low coverage: plugins/ruflo-x-gateway/src/ws-proxy.mjs plugins/ruflo-x-gateway/src/ws-proxy.mjs:1— 40.9% line coverage (9/22).
IC1 · Incompleteness & stubs· Guard cannot change the result · ×1
Guard cannot change the result — returns what the code already falls through to REDACTED:315— The guard above `return "";` also returns `""`, so no input can make it matter. Implement the distinction that was intended, or delete the guard.
P12 · CI test-gate honesty· Changed-file filter skips the test gate for code the tests depend on · ×1
Changed-file filter skips the test gate for code the tests depend on .github/workflows/codex-activity.yml:11— `paths` runs `npm test -- --run tests/activity-files.test.ts tests/activity-parser.test.ts tests/activity-viewer.test.ts` (the tests of `v3/@claude-flow/codex`) only when a change touches `v3/@claude-flow/codex/**`, `scripts/smoke-codex-activity.mjs`, `.github/workflows/codex-activity.yml`, but those tests also depend on `v3/@claude-flow/cli`, `v3/@claude-flow/mcp`, `v3/@claude-flow/memory`, `v3/@claude-flow/neural`, `v3/@claude-flow/plugin-agent-federation`, `v3/@claude-flow/security`, `v3/@claude-flow/cli-core`, `v3/@claude-flow/shared` (e.g. `v3/@claude-flow/cli/vitest.config.ts`, `v3/@claude-flow/mcp/vitest.config.ts`) — a change there merges with them not run, and no unfiltered gate runs them. List the package's tests and its workspace dependencies in the filter, or drop it.
P12 · CI test-gate honesty· Test failure does not fail the CI gate · ×1
Test failure does not fail the CI gate REDACTED:36— `bash plugins/ruflo-cost-tracker/scripts/smoke.sh` runs the tests, and `|| miss="$miss test-codex-ledger-failed"` discards their exit status — a failing suite leaves the check green. Let the test command's failure fail the step (re-raise it after logging).
P12 · CI test-gate honesty· CI test gate excludes suites by filter · ×1
CI test gate excludes suites by filter REDACTED:33— `../../../node_modules/.bin/vitest run __tests__/mods/ --exclude '**/mods-cli-bin.test.ts'` drops 2 test(s) in 1 file(s) (e.g. `v3/@claude-flow/cli/__tests__/mods/mods-cli-bin.test.ts`), and no other gate runs them before merge. Run what it excludes in another job before merge (a complementary selection), or remove the exclusion.
Duplication concentrated across 21 sibling directories (230 clone groups) v3/@claude-flow/shared/src/types.ts:12— 230 duplicated blocks under v3/@claude-flow/ have copies in at least two of the sibling directories aidefence, browser, claims, cli, cli-core, codex (+15 more sibling(s) not listed) — 118 of them are reported below, and 112 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 230 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 230 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 230 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 46 sibling directories (164 clone groups) plugins/ruflo-console/hooks/toast-policy.ts:12— 164 duplicated blocks under plugins/ have copies in at least two of the sibling directories ruflo-adr, ruflo-agent, ruflo-agentdb, ruflo-agntcy, ruflo-ai-team, ruflo-aidefence (+40 more sibling(s) not listed) — 153 of them are reported below, and 11 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 164 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 164 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 164 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 (120 clone groups) v3/@claude-flow/shared/src/mcp/server.ts:18— 120 duplicated blocks under v3/ have copies in at least two of the sibling directories @claude-flow, goal_ui, mcp, plugins, src — 83 of them are reported below, and 37 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 120 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 120 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 120 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 (85 clone groups) plugins/ruflo-graph-intelligence/src/infrastructure/witness-signer.ts:29— 85 duplicated blocks under the repository root have copies in at least two of the sibling directories plugin, plugins, ruflo, scripts, v3 — 47 of them are reported below, and 38 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 85 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 85 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 85 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 13 sibling directories (85 clone groups) v3/plugins/cognitive-kernel/src/bridges/cognitive-bridge.ts:49— 85 duplicated blocks under v3/plugins/ have copies in at least two of the sibling directories code-intelligence, cognitive-kernel, financial-risk, gastown-bridge, healthcare-clinical, hyperbolic-reasoning (+7 more sibling(s) not listed) — 52 of them are reported below, and 33 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 85 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 85 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 85 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 15 sibling directories (55 clone groups) v3/@claude-flow/cli/src/commands/autopilot.ts:180— 55 duplicated blocks under v3/@claude-flow/cli/src/ have copies in at least two of the sibling directories appliance, commands, config, funnel, init, mcp-tools (+9 more sibling(s) not listed) — 37 of them are reported below, and 18 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 55 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 55 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 55 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 (7 clone groups) v3/@claude-flow/cli/bin/mcp-server.js:44— 7 duplicated blocks under v3/@claude-flow/cli/ have copies in at least two of the sibling directories bin, cloud-functions, scripts, src — 5 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 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 5 sibling directories (6 clone groups) ruflo/src/ruvocal/src/routes/api/v2/user/settings/+server.ts:84— 6 of the duplicated blocks reported below have copies in at least two of the sibling directories api, conversation, models, r, settings under ruflo/src/ruvocal/src/routes/. 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 2 sibling directories (6 clone groups) v3/goal_ui/src/components/agents/ExecutionDashboard.tsx:233— 6 duplicated blocks under v3/goal_ui/src/ have copies in at least two of the sibling directories components, pages — 2 of them are reported below, and 4 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 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 4 sibling directories (6 clone groups) v3/goal_ui/supabase/functions/generate-research-goal/index.ts:141— 6 duplicated blocks under v3/goal_ui/supabase/functions/ have copies in at least two of the sibling directories generate-action-items, generate-research-goal, optimize-research-config, research-step — 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 2 sibling directories (5 clone groups) ruflo/src/ruvocal/src/lib/server/conversation.ts:54— 5 duplicated blocks under ruflo/src/ruvocal/src/ have copies in at least two of the sibling directories lib, routes — 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) ruflo/src/ruvocal/src/lib/server/mcp/hf.ts:6— 5 duplicated blocks under ruflo/src/ruvocal/src/lib/ have copies in at least two of the sibling directories components, server, stores, types, utils, wasm — 3 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 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 (802 identical lines × 2 files) REDACTED:1— REDACTED:1 · REDACTED:1 — these 2 files are line-for-line copies of one another — 802 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 (404 identical lines × 2 files) v3/@claude-flow/shared/src/mcp/server.ts:18— v3/@claude-flow/shared/src/mcp/server.ts:18 · v3/mcp/server.ts:18 — these 2 files are line-for-line copies of one another — 404 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 (399 matched lines × 2 locations) · ×1
Duplicated block with local edits (399 matched lines × 2 locations) v3/plugins/gastown-bridge/src/bridges/bd-bridge.ts:56— v3/plugins/gastown-bridge/src/bridges/bd-bridge.ts:56 · v3/plugins/gastown-bridge/src/bridges/gt-bridge.ts:49 — the two spans are one implementation copied and then locally edited — 2009 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 (333 identical lines × 2 files) ruflo/src/mcp-bridge/test-harness.js:22— ruflo/src/mcp-bridge/test-harness.js:22 · ruflo/src/ruvocal/mcp-bridge/test-harness.js:22 — these 2 files are line-for-line copies of one another — 333 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 (309 matched lines × 2 locations) · ×1
Duplicated block with local edits (309 matched lines × 2 locations) REDACTED:37— REDACTED:37 · REDACTED:38 — the two spans are one implementation copied and then locally edited — 1883 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 (275 identical lines × 2 files) v3/@claude-flow/shared/src/mcp/tool-registry.ts:17— v3/@claude-flow/shared/src/mcp/tool-registry.ts:17 · v3/mcp/tool-registry.ts:17 — these 2 files are line-for-line copies of one another — 275 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 (257 identical lines × 2 files) v3/@claude-flow/shared/src/mcp/types.ts:23— v3/@claude-flow/shared/src/mcp/types.ts:23 · v3/mcp/types.ts:23 — these 2 files are line-for-line copies of one another — 257 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 (248 identical lines × 3 files) REDACTED:7— REDACTED:7 · REDACTED:15 · REDACTED:15 — these 3 files are line-for-line copies of one another — 248 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 (245 matched lines × 2 locations) · ×1
Duplicated block with local edits (245 matched lines × 2 locations) v3/goal_ui/src/components/AgentStep.tsx:5— v3/goal_ui/src/components/AgentStep.tsx:5 · v3/goal_ui/src/components/DevelopmentStep.tsx:5 — the two spans are one implementation copied and then locally edited — 1430 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 (241 identical lines × 4 files) plugins/ruflo-console/hooks/toast-policy.ts:12— plugins/ruflo-console/hooks/toast-policy.ts:12 · plugins/ruflo-mods/hooks/toast/policy.ts:12 · plugins/ruflo-protector/hooks/toast-policy.ts:12 · plugins/ruflo-swarm/hooks/toast-policy.ts:12 — these 4 files are line-for-line copies of one another — 241 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 (205 identical lines × 3 files) v3/@claude-flow/mcp/src/session-manager.ts:7— v3/@claude-flow/mcp/src/session-manager.ts:7 · v3/@claude-flow/shared/src/mcp/session-manager.ts:17 · v3/mcp/session-manager.ts:17 — these 3 files are line-for-line copies of one another — 205 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 (204 identical lines × 3 files) v3/@claude-flow/mcp/src/connection-pool.ts:7— v3/@claude-flow/mcp/src/connection-pool.ts:7 · v3/@claude-flow/shared/src/mcp/connection-pool.ts:16 · v3/mcp/connection-pool.ts:16 — these 3 files are line-for-line copies of one another — 204 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 (188 matched lines × 2 locations) · ×1
Duplicated block with local edits (188 matched lines × 2 locations) v3/plugins/cognitive-kernel/src/bridges/cognitive-bridge.ts:49— v3/plugins/cognitive-kernel/src/bridges/cognitive-bridge.ts:49 · v3/plugins/ruvector-upstream/src/bridges/cognitive.ts:41 — the two spans are one implementation copied and then locally edited — 1362 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 (183 identical lines × 2 files) v3/@claude-flow/shared/src/types.ts:12— v3/@claude-flow/shared/src/types.ts:12 · v3/@claude-flow/swarm/src/shared/types.ts:13 — these 2 files are line-for-line copies of one another — 183 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 (167 matched lines × 2 locations) · ×1
Duplicated block with local edits (167 matched lines × 2 locations) v3/@claude-flow/providers/src/anthropic-provider.ts:139— v3/@claude-flow/providers/src/anthropic-provider.ts:139 · v3/@claude-flow/providers/src/cohere-provider.ts:136 — the two spans are one implementation copied and then locally edited — 1137 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 (165 matched lines × 2 locations) · ×1
Duplicated block with local edits (165 matched lines × 2 locations) v3/@claude-flow/memory/src/sqlite-backend.ts:84— v3/@claude-flow/memory/src/sqlite-backend.ts:84 · v3/@claude-flow/memory/src/sqljs-backend.ts:87 — the two spans are one implementation copied and then locally edited — 973 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 (157 matched lines × 2 locations) · ×1
Duplicated block with local edits (157 matched lines × 2 locations) v3/@claude-flow/cli/src/commands/agent.ts:124— v3/@claude-flow/cli/src/commands/agent.ts:124 · v3/@claude-flow/cli/src/commands/task.ts:125 — the two spans are one implementation copied and then locally edited — 903 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) plugins/ruflo-neural-trader/src/signed-attribution.mjs:44— plugins/ruflo-neural-trader/src/signed-attribution.mjs:44 · plugins/ruflo-neural-trader/src/signed-attribution.ts:138 — the two spans are one implementation copied and then locally edited — 1218 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 (149 matched lines × 2 locations) · ×1
Duplicated block with local edits (149 matched lines × 2 locations) scripts/smoke-neural-trader-backtest-signing.mjs:47— scripts/smoke-neural-trader-backtest-signing.mjs:47 · scripts/smoke-neural-trader-feature-attribution.mjs:49 — the two spans are one implementation copied and then locally edited — 822 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 (147 matched lines × 2 locations) · ×1
Duplicated block with local edits (147 matched lines × 2 locations) v3/@claude-flow/cli/bin/mcp-server.js:44— v3/@claude-flow/cli/bin/mcp-server.js:44 · REDACTED:811 — the two spans are one implementation copied and then locally edited — 824 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 (147 identical lines × 3 files) v3/@claude-flow/mcp/src/transport/stdio.ts:7— v3/@claude-flow/mcp/src/transport/stdio.ts:7 · v3/@claude-flow/shared/src/mcp/transport/stdio.ts:14 · v3/mcp/transport/stdio.ts:14 — these 3 files are line-for-line copies of one another — 147 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 (144 matched lines × 2 locations) · ×1
Duplicated block with local edits (144 matched lines × 2 locations) v3/@claude-flow/neural/src/modes/balanced.ts:32— v3/@claude-flow/neural/src/modes/balanced.ts:32 · v3/@claude-flow/neural/src/modes/research.ts:35 — the two spans are one implementation copied and then locally edited — 981 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 (138 lines × 3 locations) v3/@claude-flow/mcp/src/types.ts:504— v3/@claude-flow/mcp/src/types.ts:504 · v3/@claude-flow/shared/src/mcp/types.ts:323 · v3/mcp/types.ts:325 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication· Duplicated block with local edits (136 matched lines × 2 locations) · ×1
Duplicated block with local edits (136 matched lines × 2 locations) v3/@claude-flow/shared/src/events.ts:19— v3/@claude-flow/shared/src/events.ts:19 · v3/@claude-flow/swarm/src/shared/events.ts:15 — the two spans are one implementation copied and then locally edited — 1022 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 (135 identical lines × 2 files) ruflo/src/nginx/static/welcome.js:1— ruflo/src/nginx/static/welcome.js:1 · ruflo/src/ruvocal/static/chatui/welcome.js:1 — these 2 files are line-for-line copies of one another — 135 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 (135 matched lines × 2 locations) · ×1
Duplicated block with local edits (135 matched lines × 2 locations) v3/plugins/cognitive-kernel/src/bridges/sona-bridge.ts:282— v3/plugins/cognitive-kernel/src/bridges/sona-bridge.ts:282 · v3/plugins/ruvector-upstream/src/bridges/sona.ts:220 — the two spans are one implementation copied and then locally edited — 1089 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 (130 identical lines × 3 files) v3/@claude-flow/mcp/src/transport/index.ts:12— v3/@claude-flow/mcp/src/transport/index.ts:12 · v3/@claude-flow/shared/src/mcp/transport/index.ts:22 · v3/mcp/transport/index.ts:21 — these 3 files are line-for-line copies of one another — 130 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 (129 matched lines × 2 locations) · ×1
Duplicated block with local edits (129 matched lines × 2 locations) v3/@claude-flow/providers/src/google-provider.ts:147— v3/@claude-flow/providers/src/google-provider.ts:147 · v3/@claude-flow/providers/src/ollama-provider.ts:148 — the two spans are one implementation copied and then locally edited — 813 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.
Complex function runMcpFlow (cyclomatic 131, cognitive 222) ruflo/src/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts:41— runMcpFlow has cyclomatic complexity 131 and cognitive complexity 222; 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 98, cognitive 119) v3/@claude-flow/cli/src/commands/hooks.ts:2327— (anonymous) has cyclomatic complexity 98 and cognitive complexity 119; 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 createController (cyclomatic 88, cognitive 104) v3/@claude-flow/memory/src/controller-registry.ts:751— createController has cyclomatic complexity 88 and cognitive complexity 104; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 87, cognitive 140) v3/@claude-flow/cli/src/commands/neural.ts:2806— (anonymous) has cyclomatic complexity 87 and cognitive complexity 140; 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 83, cognitive 112) v3/@claude-flow/cli/src/commands/neural.ts:2333— (anonymous) has cyclomatic complexity 83 and cognitive complexity 112; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 80, cognitive 117) v3/@claude-flow/cli/src/commands/neural.ts:38— (anonymous) has cyclomatic complexity 80 and cognitive complexity 117; 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 78, cognitive 98) ruflo/src/ruvocal/src/lib/server/textGeneration/mcp/wasmTools.test.ts:55— (anonymous) has cyclomatic complexity 78 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 diffEvents (cyclomatic 78, cognitive 94) plugins/ruflo-console/hooks/data/events.ts:44— diffEvents has cyclomatic complexity 78 and cognitive complexity 94; 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 main (cyclomatic 78, cognitive 70) · ×1
Complex function main (cyclomatic 78, cognitive 70) v3/@claude-flow/hooks/src/cli/guidance-cli.ts:24— main has cyclomatic complexity 78 and cognitive complexity 70; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity· Complex function run (cyclomatic 77, cognitive 103) · ×1
Complex function run (cyclomatic 77, cognitive 103) v3/@claude-flow/cli/src/index.ts:93— run has cyclomatic complexity 77 and cognitive complexity 103; 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 paneView (cyclomatic 77, cognitive 74) plugins/ruflo-console/hooks/views/pane.ts:324— paneView has cyclomatic complexity 77 and cognitive complexity 74; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 picturesOf (cyclomatic 75, cognitive 98) plugins/ruflo-console/hooks/views/frames.ts:181— picturesOf has cyclomatic complexity 75 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 execute (cyclomatic 72, cognitive 91) v3/@claude-flow/guidance/tests/analyzer.test.ts:1919— execute has cyclomatic complexity 72 and cognitive complexity 91; 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 validateEnvelope (cyclomatic 70, cognitive 60) plugins/ruflo-console/hooks/data/ap-envelope.ts:114— validateEnvelope has cyclomatic complexity 70 and cognitive complexity 60; 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 handler (cyclomatic 69, cognitive 119) v3/@claude-flow/cli/src/mcp-tools/hooks-tools.ts:3882— handler has cyclomatic complexity 69 and cognitive complexity 119; 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 69, cognitive 98) v3/@claude-flow/cli/src/commands/init.ts:676— (anonymous) has cyclomatic complexity 69 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 67, cognitive 121) v3/@claude-flow/cli/src/commands/security.ts:108— (anonymous) has cyclomatic complexity 67 and cognitive complexity 121; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function writeMessage (cyclomatic 67, cognitive 110) ruflo/src/ruvocal/src/routes/conversation/[id]/+page.svelte:103— writeMessage has cyclomatic complexity 67 and cognitive complexity 110; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 66, cognitive 132) v3/@claude-flow/cli/src/commands/daemon.ts:59— (anonymous) has cyclomatic complexity 66 and cognitive complexity 132; 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 66, cognitive 101) v3/@claude-flow/cli/src/commands/hooks.ts:4193— (anonymous) has cyclomatic complexity 66 and cognitive complexity 101; 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· v3/@claude-flow/cli/src/mcp-tools/hooks-tools.ts · ×1
v3/@claude-flow/cli/src/mcp-tools/hooks-tools.ts: 5357 lines of code v3/@claude-flow/cli/src/mcp-tools/hooks-tools.ts:1— v3/@claude-flow/cli/src/mcp-tools/hooks-tools.ts has 5357 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· v3/@claude-flow/cli/src/commands/hooks.ts · ×1
v3/@claude-flow/cli/src/commands/hooks.ts: 5143 lines of code v3/@claude-flow/cli/src/commands/hooks.ts:1— v3/@claude-flow/cli/src/commands/hooks.ts has 5143 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· v3/@claude-flow/cli/src/commands/neural.ts · ×1
v3/@claude-flow/cli/src/commands/neural.ts: 4313 lines of code v3/@claude-flow/cli/src/commands/neural.ts:1— v3/@claude-flow/cli/src/commands/neural.ts has 4313 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· v3/@claude-flow/cli/src/memory/memory-initializer.ts · ×1
v3/@claude-flow/cli/src/memory/memory-initializer.ts: 3823 lines of code v3/@claude-flow/cli/src/memory/memory-initializer.ts:1— v3/@claude-flow/cli/src/memory/memory-initializer.ts has 3823 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· v3/@claude-flow/cli/src/memory/memory-bridge.ts · ×1
v3/@claude-flow/cli/src/memory/memory-bridge.ts: 3692 lines of code v3/@claude-flow/cli/src/memory/memory-bridge.ts:1— v3/@claude-flow/cli/src/memory/memory-bridge.ts has 3692 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: 2892 lines of code REDACTED:1— REDACTED has 2892 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: 2831 lines of code REDACTED:1— REDACTED has 2831 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· v3/@claude-flow/plugins/src/integrations/ruvector/gnn.ts · ×1
v3/@claude-flow/plugins/src/integrations/ruvector/gnn.ts: 2681 lines of code v3/@claude-flow/plugins/src/integrations/ruvector/gnn.ts:1— v3/@claude-flow/plugins/src/integrations/ruvector/gnn.ts has 2681 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· v3/@claude-flow/cli/src/commands/memory.ts · ×1
v3/@claude-flow/cli/src/commands/memory.ts: 2205 lines of code v3/@claude-flow/cli/src/commands/memory.ts:1— v3/@claude-flow/cli/src/commands/memory.ts has 2205 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· v3/@claude-flow/cli/src/init/executor.ts · ×1
v3/@claude-flow/cli/src/init/executor.ts: 2131 lines of code v3/@claude-flow/cli/src/init/executor.ts:1— v3/@claude-flow/cli/src/init/executor.ts has 2131 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· v3/@claude-flow/plugins/src/integrations/ruvector/self-learning.ts · ×1
v3/@claude-flow/plugins/src/integrations/ruvector/self-learning.ts: 2092 lines of code v3/@claude-flow/plugins/src/integrations/ruvector/self-learning.ts:1— v3/@claude-flow/plugins/src/integrations/ruvector/self-learning.ts has 2092 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: 2083 lines of code REDACTED:1— REDACTED has 2083 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· v3/@claude-flow/cli/src/commands/analyze.ts · ×1
v3/@claude-flow/cli/src/commands/analyze.ts: 2072 lines of code v3/@claude-flow/cli/src/commands/analyze.ts:1— v3/@claude-flow/cli/src/commands/analyze.ts has 2072 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· v3/plugins/teammate-plugin/src/teammate-bridge.ts · ×1
v3/plugins/teammate-plugin/src/teammate-bridge.ts: 1989 lines of code v3/plugins/teammate-plugin/src/teammate-bridge.ts:1— v3/plugins/teammate-plugin/src/teammate-bridge.ts has 1989 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· v3/@claude-flow/cli/src/init/helpers-generator.ts · ×1
v3/@claude-flow/cli/src/init/helpers-generator.ts: 1831 lines of code v3/@claude-flow/cli/src/init/helpers-generator.ts:1— v3/@claude-flow/cli/src/init/helpers-generator.ts has 1831 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· v3/@claude-flow/swarm/src/unified-coordinator.ts · ×1
v3/@claude-flow/swarm/src/unified-coordinator.ts: 1818 lines of code v3/@claude-flow/swarm/src/unified-coordinator.ts:1— v3/@claude-flow/swarm/src/unified-coordinator.ts has 1818 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· v3/@claude-flow/claims/src/api/mcp-tools.ts · ×1
v3/@claude-flow/claims/src/api/mcp-tools.ts: 1807 lines of code v3/@claude-flow/claims/src/api/mcp-tools.ts:1— v3/@claude-flow/claims/src/api/mcp-tools.ts has 1807 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· v3/@claude-flow/plugins/src/integrations/ruvector/quantization.ts · ×1
v3/@claude-flow/plugins/src/integrations/ruvector/quantization.ts: 1803 lines of code v3/@claude-flow/plugins/src/integrations/ruvector/quantization.ts:1— v3/@claude-flow/plugins/src/integrations/ruvector/quantization.ts has 1803 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· v3/@claude-flow/hooks/src/workers/index.ts · ×1
v3/@claude-flow/hooks/src/workers/index.ts: 1801 lines of code v3/@claude-flow/hooks/src/workers/index.ts:1— v3/@claude-flow/hooks/src/workers/index.ts has 1801 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· v3/@claude-flow/plugins/src/integrations/ruvector/ruvector-bridge.ts · ×1
v3/@claude-flow/plugins/src/integrations/ruvector/ruvector-bridge.ts: 1786 lines of code v3/@claude-flow/plugins/src/integrations/ruvector/ruvector-bridge.ts:1— v3/@claude-flow/plugins/src/integrations/ruvector/ruvector-bridge.ts has 1786 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· v3/@claude-flow/plugins/src/integrations/ruvector/types.ts · ×1
v3/@claude-flow/plugins/src/integrations/ruvector/types.ts: 1776 lines of code v3/@claude-flow/plugins/src/integrations/ruvector/types.ts:1— v3/@claude-flow/plugins/src/integrations/ruvector/types.ts has 1776 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· v3/@claude-flow/swarm/src/queen-coordinator.ts · ×1
v3/@claude-flow/swarm/src/queen-coordinator.ts: 1775 lines of code v3/@claude-flow/swarm/src/queen-coordinator.ts:1— v3/@claude-flow/swarm/src/queen-coordinator.ts has 1775 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· v3/@claude-flow/cli/src/commands/init.ts · ×1
v3/@claude-flow/cli/src/commands/init.ts: 1767 lines of code v3/@claude-flow/cli/src/commands/init.ts:1— v3/@claude-flow/cli/src/commands/init.ts has 1767 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: 1753 lines of code REDACTED:1— REDACTED has 1753 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· v3/plugins/gastown-bridge/src/index.ts · ×1
v3/plugins/gastown-bridge/src/index.ts: 1740 lines of code v3/plugins/gastown-bridge/src/index.ts:1— v3/plugins/gastown-bridge/src/index.ts has 1740 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· v3/@claude-flow/cli/src/commands/daemon.ts · ×1
v3/@claude-flow/cli/src/commands/daemon.ts: 1719 lines of code v3/@claude-flow/cli/src/commands/daemon.ts:1— v3/@claude-flow/cli/src/commands/daemon.ts has 1719 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· v3/@claude-flow/plugins/src/integrations/ruvector/hyperbolic.ts · ×1
v3/@claude-flow/plugins/src/integrations/ruvector/hyperbolic.ts: 1718 lines of code v3/@claude-flow/plugins/src/integrations/ruvector/hyperbolic.ts:1— v3/@claude-flow/plugins/src/integrations/ruvector/hyperbolic.ts has 1718 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: 1713 lines of code REDACTED:1— REDACTED has 1713 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· v3/plugins/gastown-bridge/src/mcp-tools.ts · ×1
v3/plugins/gastown-bridge/src/mcp-tools.ts: 1676 lines of code v3/plugins/gastown-bridge/src/mcp-tools.ts:1— v3/plugins/gastown-bridge/src/mcp-tools.ts has 1676 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· v3/@claude-flow/cli/src/commands/embeddings.ts · ×1
v3/@claude-flow/cli/src/commands/embeddings.ts: 1642 lines of code v3/@claude-flow/cli/src/commands/embeddings.ts:1— v3/@claude-flow/cli/src/commands/embeddings.ts has 1642 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· v3/@claude-flow/cli/src/memory/intelligence.ts · ×1
v3/@claude-flow/cli/src/memory/intelligence.ts: 1578 lines of code v3/@claude-flow/cli/src/memory/intelligence.ts:1— v3/@claude-flow/cli/src/memory/intelligence.ts has 1578 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· v3/goal_ui/src/pages/Index.tsx · ×1
v3/goal_ui/src/pages/Index.tsx: 1573 lines of code v3/goal_ui/src/pages/Index.tsx:1— v3/goal_ui/src/pages/Index.tsx has 1573 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: 1559 lines of code REDACTED:1— REDACTED has 1559 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· v3/@claude-flow/plugins/src/integrations/ruvector/streaming.ts · ×1
v3/@claude-flow/plugins/src/integrations/ruvector/streaming.ts: 1497 lines of code v3/@claude-flow/plugins/src/integrations/ruvector/streaming.ts:1— v3/@claude-flow/plugins/src/integrations/ruvector/streaming.ts has 1497 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· v3/@claude-flow/cli/src/services/headless-worker-executor.ts · ×1
v3/@claude-flow/cli/src/services/headless-worker-executor.ts: 1482 lines of code v3/@claude-flow/cli/src/services/headless-worker-executor.ts:1— v3/@claude-flow/cli/src/services/headless-worker-executor.ts has 1482 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· v3/@claude-flow/cli/src/mcp-tools/agentdb-tools.ts · ×1
v3/@claude-flow/cli/src/mcp-tools/agentdb-tools.ts: 1463 lines of code v3/@claude-flow/cli/src/mcp-tools/agentdb-tools.ts:1— v3/@claude-flow/cli/src/mcp-tools/agentdb-tools.ts has 1463 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· v3/@claude-flow/cli/src/ruvector/model-router.ts · ×1
v3/@claude-flow/cli/src/ruvector/model-router.ts: 1430 lines of code v3/@claude-flow/cli/src/ruvector/model-router.ts:1— v3/@claude-flow/cli/src/ruvector/model-router.ts has 1430 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· v3/@claude-flow/cli/src/commands/security.ts · ×1
v3/@claude-flow/cli/src/commands/security.ts: 1377 lines of code v3/@claude-flow/cli/src/commands/security.ts:1— v3/@claude-flow/cli/src/commands/security.ts has 1377 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: 1376 lines of code REDACTED:1— REDACTED 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· v3/@claude-flow/cli/src/commands/hive-mind.ts · ×1
v3/@claude-flow/cli/src/commands/hive-mind.ts: 1339 lines of code v3/@claude-flow/cli/src/commands/hive-mind.ts:1— v3/@claude-flow/cli/src/commands/hive-mind.ts has 1339 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
Dead file (~756 LoC) v3/plugins/gastown-bridge/src/gupp/state.ts— no import path from any entry point (884 application, 408 tooling, 1695 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (v3/plugins/gastown-bridge/src/gupp/adapter.ts, v3/plugins/gastown-bridge/src/gupp/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 (~718 LoC) v3/plugins/gastown-bridge/src/gupp/adapter.ts— no import path from any entry point (884 application, 408 tooling, 1695 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (v3/plugins/gastown-bridge/src/gupp/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 (~697 LoC) v3/@claude-flow/neural/src/reasoningbank-adapter.ts— no import path from any entry point (884 application, 408 tooling, 1695 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 (~637 LoC) v3/goal_ui/src/components/ui/sidebar.tsx— no import path from any entry point (884 application, 408 tooling, 1695 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 (~591 LoC) v3/@claude-flow/security/src/CVE-REMEDIATION.ts— no import path from any entry point (884 application, 408 tooling, 1695 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 (~552 LoC) v3/@claude-flow/hooks/src/llm/llm-hooks.ts— no import path from any entry point (884 application, 408 tooling, 1695 test roots considered), but 2 in-repo import(s) from 1 other file(s) do name it (v3/@claude-flow/hooks/src/llm/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 (~521 LoC) v3/@claude-flow/neural/src/algorithms/decision-transformer.ts— no import path from any entry point (884 application, 408 tooling, 1695 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 (~516 LoC) v3/@claude-flow/memory/src/infrastructure/repositories/hybrid-memory-repository.ts— no import path from any entry point (884 application, 408 tooling, 1695 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (v3/@claude-flow/memory/src/infrastructure/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 (~509 LoC) v3/@claude-flow/neural/src/algorithms/curiosity.ts— no import path from any entry point (884 application, 408 tooling, 1695 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 (~508 LoC) v3/@claude-flow/shared/src/plugins/official/maestro-plugin.ts— no import path from any entry point (884 application, 408 tooling, 1695 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (v3/@claude-flow/shared/src/plugins/official/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 (~499 LoC) v3/@claude-flow/shared/src/hooks/example-usage.ts— no import path from any entry point (884 application, 408 tooling, 1695 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 (~486 LoC) v3/@claude-flow/neural/src/modes/research.ts— no import path from any entry point (884 application, 408 tooling, 1695 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 (~478 LoC) v3/@claude-flow/neural/src/algorithms/a2c.ts— no import path from any entry point (884 application, 408 tooling, 1695 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 (~441 LoC) v3/@claude-flow/testing/src/v2-compat/report-generator.ts— no import path from any entry point (884 application, 408 tooling, 1695 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 (~434 LoC) v3/@claude-flow/neural/src/modes/batch.ts— no import path from any entry point (884 application, 408 tooling, 1695 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 (~429 LoC) v3/@claude-flow/neural/src/algorithms/ppo.ts— no import path from any entry point (884 application, 408 tooling, 1695 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 (~409 LoC) v3/@claude-flow/neural/src/modes/edge.ts— no import path from any entry point (884 application, 408 tooling, 1695 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 (~403 LoC) v3/@claude-flow/memory/src/domain/services/memory-domain-service.ts— no import path from any entry point (884 application, 408 tooling, 1695 test roots considered), but 3 in-repo import(s) from 3 other file(s) do name it (v3/@claude-flow/memory/src/application/commands/store-memory.command.ts, v3/@claude-flow/memory/src/application/services/memory-application-service.ts, v3/@claude-flow/memory/src/domain/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 (~397 LoC) v3/goal_ui/supabase/functions/research-step/index.ts— no import path from any entry point (884 application, 408 tooling, 1695 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 (~383 LoC) v3/@claude-flow/neural/src/algorithms/sarsa.ts— no import path from any entry point (884 application, 408 tooling, 1695 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 (~382 LoC) v3/@claude-flow/neural/src/algorithms/dqn.ts— no import path from any entry point (884 application, 408 tooling, 1695 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 (~370 LoC) v3/@claude-flow/swarm/src/domain/entities/agent.ts— no import path from any entry point (884 application, 408 tooling, 1695 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 (~340 LoC) v3/goal_ui/supabase/functions/research-api/index.ts— no import path from any entry point (884 application, 408 tooling, 1695 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 (~333 LoC) v3/@claude-flow/neural/src/algorithms/q-learning.ts— no import path from any entry point (884 application, 408 tooling, 1695 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 (~330 LoC) v3/@claude-flow/shared/src/plugins/official/hive-mind-plugin.ts— no import path from any entry point (884 application, 408 tooling, 1695 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (v3/@claude-flow/shared/src/plugins/official/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 (~320 LoC) v3/@claude-flow/swarm/src/domain/services/coordination-service.ts— no import path from any entry point (884 application, 408 tooling, 1695 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (v3/@claude-flow/swarm/src/application/services/swarm-application-service.ts, v3/@claude-flow/swarm/src/domain/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 (~319 LoC) v3/@claude-flow/swarm/src/domain/entities/task.ts— no import path from any entry point (884 application, 408 tooling, 1695 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 (~313 LoC) v3/goal_ui/supabase/functions/optimize-research-config/index.ts— no import path from any entry point (884 application, 408 tooling, 1695 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 (~303 LoC) REDACTED— no import path from any entry point (884 application, 408 tooling, 1695 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 (~299 LoC) v3/@claude-flow/neural/src/modes/balanced.ts— no import path from any entry point (884 application, 408 tooling, 1695 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 (~296 LoC) v3/@claude-flow/security/src/domain/services/security-domain-service.ts— no import path from any entry point (884 application, 408 tooling, 1695 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (v3/@claude-flow/security/src/application/services/security-application-service.ts, v3/@claude-flow/security/src/domain/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 (~289 LoC) v3/@claude-flow/memory/src/domain/entities/memory-entry.ts— no import path from any entry point (884 application, 408 tooling, 1695 test roots considered), but 7 in-repo import(s) from 7 other file(s) do name it (v3/@claude-flow/memory/src/application/commands/store-memory.command.ts, v3/@claude-flow/memory/src/application/queries/search-memory.query.ts, v3/@claude-flow/memory/src/application/services/memory-application-service.ts and 4 more) — 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 (~256 LoC) v3/@claude-flow/neural/src/domain/services/learning-service.ts— no import path from any entry point (884 application, 408 tooling, 1695 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (v3/@claude-flow/neural/src/application/services/neural-application-service.ts, v3/@claude-flow/neural/src/domain/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 (~237 LoC) v3/@claude-flow/memory/src/application/queries/search-memory.query.ts— no import path from any entry point (884 application, 408 tooling, 1695 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (v3/@claude-flow/memory/src/application/index.ts, v3/@claude-flow/memory/src/application/services/memory-application-service.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
Unlisted import 'bson' ruflo/src/ruvocal/src/lib/types/ConvSidebar.ts:1— Imported only as a TYPE and declared in no reachable REDACTED. The import is erased at compile time, so nothing is installed and no runtime resolution depends on it — but type-checking a clean clone will fail. Declare the typings it resolves through (or the package itself) in the owning REDACTED.
Unused dependency '@iconify-json/bi' — Declared in ruflo/src/ruvocal/REDACTED 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 '@iconify-json/carbon' — Declared in ruflo/src/ruvocal/REDACTED 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 '@iconify-json/eos-icons' — Declared in ruflo/src/ruvocal/REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
S1 · Web-Security Posture· Password key derivation is priced too cheaply · ×1
Password key derivation is priced too cheaply v3/@claude-flow/cli/src/appliance/rvfa-runner.ts:272— This code fixes PBKDF2-SHA-256 at 100,000 iterations. A key-derivation function's only defence is the cost of ONE guess, and that cost is this number — the algorithm choice does not set it. Current OWASP guidance is 1,300,000 PBKDF2 iterations with HMAC-SHA1, 600,000 with SHA-256 and 210,000 with SHA-512; scrypt at N=2^17, r=8, p=1 (or an equivalent N·r·p product); Argon2id at 19 MiB of memory and 2 iterations (or an equivalent row); bcrypt at a work factor of at least 10. This figure divides the attacker's work by a factor of tens or hundreds against the same stolen hash, on hardware they already own. Where what is derived is short or low-entropy — a PIN, a numeric parental code, a four-character token — the whole keyspace falls in the time this parameter buys, and no salt or constant-time comparison changes that. Raise the count to the current published figure for the PRF you use, measure it on the slowest hardware that must run it (a target of roughly 100 ms per derivation is the usual budget), and read the value from configuration so a deployment can raise it again without a rebuild. Where the derived value must interoperate with a format someone else fixed, the count cannot move — derive a SEPARATE value for anything you own rather than inheriting the external format's price.
X14 · Bypassable address classification· IP classification is bypassable through an IPv4-in-IPv6 embedding · ×1
IP classification is bypassable through an IPv4-in-IPv6 embedding v3/@claude-flow/cli/src/mcp-tools/http-fetch-tools.ts:85— This function unwraps IPv4-MAPPED IPv6 (`::ffff:`, line 90) and then rejects `10.0.0.0/8` on its IPv4 path — but the IPv6 decision at line 85 classifies the address as written, and IPv4 reaches IPv6 through three MORE embeddings this function never mentions: IPv4-compatible (`::a.b.c.d`), 6to4 (`2002::/16`) and NAT64 (`64:ff9b::/96`). So `::10.0.0.1`, `2002:0a00:0001::` and `64:ff9b::10.0.0.0` all name a host inside `10.0.0.0/8` — the range this same function declares non-public — and all reach the IPv6 decision un-unwrapped, taking the opposite verdict. Unwrap every embedding to its IPv4 form before classifying, or reject any IPv6 address carrying an embedded IPv4 outright.
X15 · Unvalidated length from an untrusted reader· Length read from the parsed input is spent without ever being bounded · ×1
Length read from the parsed input is spent without ever being bounded v3/@claude-flow/embeddings/src/rvf-embedding-cache.ts:538— `dims` is read from the bytes being parsed at line 526 (`getUint32`), then used to size a `new Float32Array` at line 538 — and nowhere in its scope is `dims` bounded from above — compared to a limit, clamped, or checked against the input that remains (a zero or sign test, or the loop that counts up to it, bounds nothing). Whoever wrote those bytes therefore chooses the allocation directly: a 32-bit length asks for up to 4 GiB before a single byte of the payload is known to exist, which either exhausts the process's memory or throws a `RangeError` out of a parser whose failure path was written for malformed input, not for hostile input. Bound `dims` against the bytes actually remaining and a maximum the format allows before allocating.
X19 · Unrestored process-global state· Process-global state is restored only on the happy path · ×1
Process-global state is restored only on the happy path scripts/benchmark-router.mjs:136— `runIntegratedNeural` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — the `CLAUDE_FLOW_ROUTER_NEURAL` environment variable (set at line 137, cleared at line 168) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception thrown in between — or by a promise that rejects at an `await`, and while this function is suspended at one every other callback the event loop runs sees the moved value too: the process then keeps the overwritten value for the rest of its life, and every later relative path, child-process launch or config read in ANY module resolves against it. That failure is silent and remote from its cause — the function that breaks is not the function that moved the directory. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — the `cwd` and `env` options of `child_process.spawn`/`exec`/`execSync` (or `Deno.Command`) scope both to the CHILD — or build absolute paths with `path.resolve`. Where the global genuinely must move, wrap it `try`/`finally` so the restore runs on every path.
Classify ADR enforcement: ruflo-adr plugin contract — pinning, namespace coordination, smoke as contract, REFERENCE.md token-optimization pattern plugins/ruflo-adr/docs/adrs/0001-adr-plugin-pattern.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: Reconcile deleted ADRs — a real hard-delete primitive and a drop-and-rebuild reindex skill plugins/ruflo-adr/docs/adrs/0002-reconcile-deleted-adrs.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: ruflo-agent plugin contract — pinning, namespace coordination, ADR-070 integration cross-reference, smoke as contract plugins/ruflo-agent/docs/adrs/0001-wasm-contract.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: Bounded Managed Agents dynamic workflows plugins/ruflo-agent/docs/adrs/0003-managed-dynamic-workflows.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: First class managed console runs and verified advisory learning plugins/ruflo-agent/docs/adrs/0004-verified-learning-and-console.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: Optimize ruflo-agentdb — accurate surface, quantization opt-ins, controller-managed namespacing, smoke-as-contract plugins/ruflo-agentdb/docs/adrs/0001-agentdb-optimization.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: ADR-380 — AGNTCY/Outshift Runtime Integration: SLIM Transport, CASA Enforcement, IOC Coordination Events v3/docs/adr/ADR-380-agntcy-outshift-runtime-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: ADR-0001: Multi-tenant service boundary plugins/ruflo-ai-team/docs/adrs/0001-multitenant-service-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: ADR-0002: Approval and external-action boundary plugins/ruflo-ai-team/docs/adrs/0002-approval-and-external-action-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: ADR-0003: Tenant-scoped RuVector memory plugins/ruflo-ai-team/docs/adrs/0003-tenant-scoped-ruvector-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: ADR-0004: Metered unit budget plugins/ruflo-ai-team/docs/adrs/0004-metered-unit-budget.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: ruflo-aidefence plugin contract — pinning, namespace coordination, 3-gate pattern, smoke as contract plugins/ruflo-aidefence/docs/adrs/0001-aidefence-contract.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: ADR-0001: ruflo-arena plugin contract plugins/ruflo-arena/docs/adrs/0001-arena-contract.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: ruflo-autopilot plugin contract — pinning, namespace coordination, /loop integration, smoke as contract plugins/ruflo-autopilot/docs/adrs/0001-autopilot-contract.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: Adopt a session-as-skill architecture for ruflo-browser, backed by RVF, ruvector trajectories, and AgentDB plugins/ruflo-browser/docs/adrs/0001-browser-skills-architecture.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: ruflo-core plugin contract — pinning, MCP server contract, plugin-catalog discovery, smoke as contract plugins/ruflo-core/docs/adrs/0001-core-contract.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: ruflo-cost-tracker plugin contract — pinning, namespace-routing fix, federation budget integration, smoke as contract plugins/ruflo-cost-tracker/docs/adrs/0001-cost-tracker-contract.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: ruflo-cost-tracker — agentic-flow + Agent Booster integration, model-outcome feedback loop, optimize-worker consumption, tier-aware reporting plugins/ruflo-cost-tracker/docs/adrs/0002-agentic-flow-and-agent-booster-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: ruflo-cost-tracker — implementation arc from v0.4.0 to v0.15.0 (auto-capture, budget enforcement, model-outcome feedback, observability, federation consumer) plugins/ruflo-cost-tracker/docs/adrs/0003-implementation-arc-v0.5-to-v0.15.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: ruflo-daa plugin contract — pinning, namespace coordination, intelligence-pipeline alignment, smoke as contract plugins/ruflo-daa/docs/adrs/0001-daa-contract.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: ruflo-ddd plugin contract — pinning, namespace coordination, ADR cross-link, smoke as contract plugins/ruflo-ddd/docs/adrs/0001-ddd-contract.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: ruflo-docs plugin contract — pinning, namespace coordination, document-worker integration, smoke as contract plugins/ruflo-docs/docs/adrs/0001-docs-contract.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: ruflo-federation plugin contract — pinning, namespace coordination, 3-gate pattern alignment, ADR-097 budget integration, smoke as contract plugins/ruflo-federation/docs/adrs/0001-federation-contract.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: ruflo-goals plugin contract — pinning, namespace coordination + legacy mapping, GOAP/dossier workflow contract, smoke as contract plugins/ruflo-goals/docs/adrs/0001-goals-contract.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: Optimize ruflo-intelligence — surface completeness, 4-step pipeline, IPFS pattern transfer, namespace coordination with ruflo-agentdb plugins/ruflo-intelligence/docs/adrs/0001-intelligence-surface-completeness.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.
+ 445 more in this group — see findings.md.
D20 · ADR Quality· ADR lacks an enforcement field · ×283
ADR lacks an enforcement field v3/docs/adr/ADR-380-agntcy-outshift-runtime-integration.md:1— Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
ADR lacks an enforcement field v3/docs/adr/ADR-074-self-learning-wiring-2245.md:1— Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
ADR lacks an enforcement field v3/docs/adr/ADR-075-unified-learning-stats.md:1— Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
ADR lacks an enforcement field v3/docs/adr/ADR-076-structured-distillation.md:1— Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
ADR lacks an enforcement field v3/docs/adr/ADR-077-pretrain-from-history.md:1— Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
ADR lacks an enforcement field v3/docs/adr/ADR-078-hybrid-retrieval-and-outcome-signal.md:1— Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
ADR lacks an enforcement field v3/docs/adr/ADR-079-multifield-bm25-and-type-penalty.md:1— Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
ADR lacks an enforcement field v3/docs/adr/ADR-080-cross-encoder-reranker.md:1— Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
ADR lacks an enforcement field v3/docs/adr/ADR-081-labelled-corpus-and-ndcg.md:1— Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
ADR lacks an enforcement field v3/docs/adr/ADR-082-grid-search-retrieval-defaults.md:1— Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
ADR lacks an enforcement field v3/docs/adr/ADR-083-joint-rerank-grid.md:1— Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
ADR lacks an enforcement field v3/docs/adr/ADR-084-cross-repo-generalisation.md:1— Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
ADR lacks an enforcement field v3/docs/adr/ADR-085-beir-public-benchmark.md:1— Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
ADR lacks an enforcement field v3/docs/adr/ADR-085-issue-1425-comprehensive-remediation.md:1— Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
ADR lacks an enforcement field v3/docs/adr/ADR-086-ruvllm-native-intelligence-backend.md:1— Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
ADR lacks an enforcement field v3/docs/adr/ADR-086-silent-fallback-and-bootstrap.md:1— Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
ADR lacks an enforcement field v3/docs/adr/ADR-087-graph-node-native-backend.md:1— Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
ADR lacks an enforcement field v3/docs/adr/ADR-087-rrf-negative-result.md:1— Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
ADR lacks an enforcement field v3/docs/adr/ADR-088-longmemeval-benchmark.md:1— Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
ADR lacks an enforcement field v3/docs/adr/ADR-088-lucene-bm25-and-rerank.md:1— Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
ADR lacks an enforcement field v3/docs/adr/ADR-089-three-dataset-beir-and-upstream.md:1— Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
ADR lacks an enforcement field v3/docs/adr/ADR-090-bge-query-prefix-mixed.md:1— Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
ADR lacks an enforcement field v3/docs/adr/ADR-091-scidocs-and-config-divergence.md:1— Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
ADR lacks an enforcement field v3/docs/adr/ADR-092-mcp-tool-validation-bugfixes.md:1— Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
ADR lacks an enforcement field v3/docs/adr/ADR-093-mcp-audit-may-2026-remediation.md:1— Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
+ 258 more in this group — see findings.md.
P2 · Observability· Console output used as the logging channel · ×39
Console output used as the logging channel ruflo/src/ruvocal/static/wasm/rvagent_wasm.js:672— `ruflo/src/ruvocal/static/wasm/rvagent_wasm.js` reports through `console.*` at line 672 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel ruflo/src/ruvocal/static/wasm/rvagent_wasm.js:1467— `ruflo/src/ruvocal/static/wasm/rvagent_wasm.js` reports through `console.*` at line 1467 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel ruflo/src/ruvocal/static/wasm/rvagent_wasm.js:1501— `ruflo/src/ruvocal/static/wasm/rvagent_wasm.js` reports through `console.*` at line 1501 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel ruflo/src/ruvocal/static/wasm/rvagent_wasm.js:1521— `ruflo/src/ruvocal/static/wasm/rvagent_wasm.js` reports through `console.*` at line 1521 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel ruflo/src/ruvocal/src/routes/conversation/[id]/message/[messageId]/prompt/+server.ts:46— `ruflo/src/ruvocal/src/routes/conversation/[id]/message/[messageId]/prompt/+server.ts` reports through `console.*` at line 46 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel ruflo/src/ruvocal/src/routes/api/mcp/servers/+server.ts:16— `ruflo/src/ruvocal/src/routes/api/mcp/servers/+server.ts` reports through `console.*` at line 16 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel ruflo/src/ruvocal/src/lib/wasm/idb.ts:69— `ruflo/src/ruvocal/src/lib/wasm/idb.ts` reports through `console.*` at line 69 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel ruflo/src/ruvocal/src/lib/wasm/idb.ts:76— `ruflo/src/ruvocal/src/lib/wasm/idb.ts` reports through `console.*` at line 76 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel ruflo/src/ruvocal/src/lib/wasm/idb.ts:114— `ruflo/src/ruvocal/src/lib/wasm/idb.ts` reports through `console.*` at line 114 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel ruflo/src/ruvocal/src/lib/wasm/idb.ts:129— `ruflo/src/ruvocal/src/lib/wasm/idb.ts` reports through `console.*` at line 129 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel ruflo/src/ruvocal/src/lib/wasm/workerClient.ts:74— `ruflo/src/ruvocal/src/lib/wasm/workerClient.ts` reports through `console.*` at line 74 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel ruflo/src/ruvocal/src/lib/utils/loadAttachmentsFromUrls.ts:109— `ruflo/src/ruvocal/src/lib/utils/loadAttachmentsFromUrls.ts` reports through `console.*` at line 109 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel ruflo/src/ruvocal/src/lib/utils/mcpValidation.ts:28— `ruflo/src/ruvocal/src/lib/utils/mcpValidation.ts` reports through `console.*` at line 28 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel ruflo/src/ruvocal/src/lib/utils/mcpValidation.ts:35— `ruflo/src/ruvocal/src/lib/utils/mcpValidation.ts` reports through `console.*` at line 35 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel ruflo/src/ruvocal/src/lib/stores/mcpServers.ts:63— `ruflo/src/ruvocal/src/lib/stores/mcpServers.ts` reports through `console.*` at line 63 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel ruflo/src/ruvocal/src/lib/stores/mcpServers.ts:77— `ruflo/src/ruvocal/src/lib/stores/mcpServers.ts` reports through `console.*` at line 77 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel ruflo/src/ruvocal/src/lib/stores/mcpServers.ts:89— `ruflo/src/ruvocal/src/lib/stores/mcpServers.ts` reports through `console.*` at line 89 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel ruflo/src/ruvocal/src/lib/stores/mcpServers.ts:100— `ruflo/src/ruvocal/src/lib/stores/mcpServers.ts` reports through `console.*` at line 100 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel ruflo/src/ruvocal/src/lib/stores/mcpServers.ts:112— `ruflo/src/ruvocal/src/lib/stores/mcpServers.ts` reports through `console.*` at line 112 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel ruflo/src/ruvocal/src/lib/stores/mcpServers.ts:124— `ruflo/src/ruvocal/src/lib/stores/mcpServers.ts` reports through `console.*` at line 124 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel ruflo/src/ruvocal/src/lib/stores/mcpServers.ts:218— `ruflo/src/ruvocal/src/lib/stores/mcpServers.ts` reports through `console.*` at line 218 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel ruflo/src/ruvocal/src/lib/stores/mcpServers.ts:270— `ruflo/src/ruvocal/src/lib/stores/mcpServers.ts` reports through `console.*` at line 270 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel ruflo/src/ruvocal/src/lib/stores/mcpServers.ts:277— `ruflo/src/ruvocal/src/lib/stores/mcpServers.ts` reports through `console.*` at line 277 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel ruflo/src/ruvocal/src/lib/stores/mcpServers.ts:503— `ruflo/src/ruvocal/src/lib/stores/mcpServers.ts` reports through `console.*` at line 503 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Console output used as the logging channel ruflo/src/ruvocal/src/lib/stores/wasmMcp.ts:128— `ruflo/src/ruvocal/src/lib/stores/wasmMcp.ts` reports through `console.*` at line 128 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
Silent fallback default in catch plugins/ruflo-agentdb/hooks/fold.ts:13— `fold` 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 plugins/ruflo-agentdb/hooks/recall.ts:84— `parse` 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 plugins/ruflo-arena/src/persistence/run-store.ts:81— `list` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch plugins/ruflo-console/hooks/data/wf-targets.ts:131— `peersOf` 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 plugins/ruflo-console/hooks/updates.ts:129— `installedEntries` 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 plugins/ruflo-console/hooks/views/ap-panel.ts:72— `loadDraftFile` swallows every exception into `return 'the draft file is not JSON'` — 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 plugins/ruflo-cost-tracker/scripts/_ledger.mjs:57— `lines` 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 plugins/ruflo-cost-tracker/scripts/_sessions.mjs:32— `memoryListAllKeys` 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 plugins/ruflo-cost-tracker/scripts/federation.mjs:38— `memoryList` 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 plugins/ruflo-docs/hooks/command.ts:34— `answer` swallows every exception into `return 'No docs/ folder in this project.'` — 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 plugins/ruflo-goals/scripts/research-list.mjs:30— `cliLoad` 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 plugins/ruflo-metaharness/scripts/audit-list.mjs:62— `memList` 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 plugins/ruflo-mods/hooks/route/ranked-context.ts:100— `parseRanked` 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 plugins/ruflo-neural-trader/src/signed-artifact.mjs:66— `verifyBacktestArtifact` swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch plugins/ruflo-neural-trader/src/signed-attribution.mjs:58— `verifyAttributionArtifact` swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch plugins/ruflo-protector/hooks/store.ts:87— `parseAllow` 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 plugins/ruflo-protector/hooks/store.ts:117— `parseRing` 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 plugins/ruflo-protector/hooks/register.ts:19— `readText` swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch plugins/ruflo-workflows/hooks/command.ts:26— `answer` swallows every exception into `return 'Managed tool discovery unavailable; registration and readiness are 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 REDACTED:927— `hostnameOf` 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:1417— `safeParseArgs` 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:1575— `safeParseArgs` 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 ruflo/src/ruvocal/src/lib/server/generateFromDefaultEndpoint.ts:41— `generateFromDefaultEndpoint` 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 ruflo/src/ruvocal/src/lib/stores/wasmMcp.ts:267— `listGalleryTemplates` 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 ruflo/src/ruvocal/src/lib/stores/wasmMcp.ts:281— `searchGalleryTemplates` 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.
README/code drift CONTRIBUTING.md:17— CONTRIBUTING.md links to `docs/adr/`, but `docs/adr` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift README.md:470— README.md links to `verification.md`, but `verification.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift README.zh-CN.md:340— README.zh-CN.md links to `verification.md`, but `verification.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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 .claude-plugin/README.md:639— .claude-plugin/README.md links to `docs/USER_GUIDE.md`, but `.claude-plugin/docs/USER_GUIDE.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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 .claude-plugin/README.md:640— .claude-plugin/README.md links to `docs/API_REFERENCE.md`, but `.claude-plugin/docs/API_REFERENCE.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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 .claude-plugin/README.md:642— .claude-plugin/README.md links to `docs/TROUBLESHOOTING.md`, but `.claude-plugin/docs/TROUBLESHOOTING.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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 v3/README.md:449— v3/README.md links to `./docs/README.md`, but `v3/docs/README.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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 v3/README.md:450— v3/README.md links to `./docs/implementation/`, but `v3/docs/implementation` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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 v3/README.md:451— v3/README.md links to `./docs/guides/`, but `v3/docs/guides` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs/dream-cycle/dream-gist-2026-09-05.md:46— docs/dream-cycle/dream-gist-2026-09-05.md names Vitest 4, but the manifest declares `vitest` ^3.2.6. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs/dream-cycle/dream-gist-2026-09-07.md:45— docs/dream-cycle/dream-gist-2026-09-07.md names Vitest 4, but the manifest declares `vitest` ^3.2.6. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs/dream-cycle/dream-gist-2026-09-10.md:44— docs/dream-cycle/dream-gist-2026-09-10.md names Vitest 4, but the manifest declares `vitest` ^3.2.6. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs/dream-cycle/dream-gist-2026-09-21.md:41— docs/dream-cycle/dream-gist-2026-09-21.md names Vitest 4, but the manifest declares `vitest` ^3.2.6. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs/dream-cycle/dream-gist-2026-10-16.md:37— docs/dream-cycle/dream-gist-2026-10-16.md names Vitest 4, but the manifest declares `vitest` ^3.2.6. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift plugins/ruflo-neural-trader/README.md:215— plugins/ruflo-neural-trader/README.md links to `../../v3/docs/adr/ADR-125-memory-consolidation.md`, but `v3/docs/adr/ADR-125-memory-consolidation.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift plugins/ruflo-protector/README.md:3— plugins/ruflo-protector/README.md links to `../../v3/docs/adr/ADR-404-ruflo-as-a-mod.md`, but `v3/docs/adr/ADR-404-ruflo-as-a-mod.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift plugins/ruflo-ruvector/README.md:241— plugins/ruflo-ruvector/README.md links to `./docs/adrs/0001-pin-ruvector-0.3.3.md`, but `plugins/ruflo-ruvector/docs/adrs/0001-pin-ruvector-0.3.3.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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 v3/goal_ui/README.md:68— v3/goal_ui/README.md names Vite 5, but the manifest declares `vite` ^6.3.5. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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 v3/helpers/README.md:239— v3/helpers/README.md links to `./docs/platform-setup.md`, but `v3/helpers/docs/platform-setup.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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 v3/helpers/README.md:241— v3/helpers/README.md links to `./docs/api-reference.md`, but `v3/helpers/docs/api-reference.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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 v3/helpers/README.md:242— v3/helpers/README.md links to `./docs/troubleshooting.md`, but `v3/helpers/docs/troubleshooting.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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 v3/implementation/README.md:87— v3/implementation/README.md links to `../docs/adrs/`, but `v3/docs/adrs` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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 v3/@claude-flow/browser/README.md:710— v3/@claude-flow/browser/README.md links to `../../CONTRIBUTING.md`, but `v3/CONTRIBUTING.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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 v3/@claude-flow/cli/README.md:3— v3/@claude-flow/cli/README.md links to `ruflo/assets/ruflo-small.jpeg`, but `v3/@claude-flow/cli/ruflo/assets/ruflo-small.jpeg` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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 v3/@claude-flow/cli/README.md:21— v3/@claude-flow/cli/README.md links to `docs/assets/ruflo-explained/ch14.jpg`, but `v3/@claude-flow/cli/docs/assets/ruflo-explained/ch14.jpg` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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.
Duplicated predicate scripts/tune-cost-ceiling.mjs:154— `!!unifiedCal || Object.keys(calByBucket).length > 0` appears character-identically in 2 files — scripts/tune-cost-ceiling.mjs, scripts/tune-quality-bar.mjs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate ruflo/src/ruvocal/src/routes/api/conversation/[id]/message/[messageId]/+server.ts:26— `!(message.id === messageId) && message.ancestors && !message.ancestors.includes(messageId)` appears character-identically in 2 files — ruflo/src/ruvocal/src/routes/api/conversation/[id]/message/[messageId]/+server.ts, ruflo/src/ruvocal/src/routes/api/v2/conversations/[id]/message/[messageId]/+server.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:243— `!/["`$%!\r\n]/.test(p) && (process.platform === 'win32' || !p.includes('\\'))` appears character-identically in 2 files — REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:1105— `!CONFIG.hideCost && costInfo && costInfo.costUsd > 0` appears character-identically in 2 files — REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate v3/@claude-flow/cli/src/services/flywheel-receipt.ts:224— `!Number.isFinite(value) || Object.is(value, -0)` appears character-identically in 2 files — v3/@claude-flow/cli/src/services/flywheel-receipt.ts, v3/@claude-flow/plugin-agent-federation/src/application/inbound-dispatcher.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 v3/@claude-flow/cli/src/memory/intelligence.ts:674— `!a || !b || a.length === 0 || b.length === 0` appears character-identically in 3 files — v3/@claude-flow/cli/src/memory/intelligence.ts, v3/@claude-flow/cli/src/memory/memory-bridge.ts, v3/@claude-flow/cli/src/memory/memory-initializer.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:193— `!allowedOrigins || allowedOrigins.length === 0` appears character-identically in 2 files — REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate plugins/ruflo-neural-trader/src/signed-artifact.mjs:48— `!artifact || !artifact.witnessSignature || !trustedPublicKey` appears character-identically in 4 files — plugins/ruflo-neural-trader/src/signed-artifact.mjs, plugins/ruflo-neural-trader/src/signed-artifact.ts, plugins/ruflo-neural-trader/src/signed-attribution.mjs, plugins/ruflo-neural-trader/src/signed-attribution.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 v3/@claude-flow/cli/src/funnel/advisor-tip.ts:59— `!cache || !cache.headline || typeof cache._ts !== 'number'` appears character-identically in 2 files — v3/@claude-flow/cli/src/funnel/advisor-tip.ts, v3/@claude-flow/cli/src/funnel/insights.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 .claude/helpers/learning-service.mjs:356— `!candidates.has(neighborId) || candidates.get(neighborId) > dist` appears character-identically in 3 files — .claude/helpers/learning-service.mjs, v3/@claude-flow/cli/.claude/helpers/learning-service.mjs, v3/@claude-flow/mcp/.claude/helpers/learning-service.mjs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:181— `!client || client.ws.readyState !== WebSocket.OPEN` appears character-identically in 3 files — REDACTED, REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:284— `!client.isAuthenticated && this.config.auth?.enabled` appears character-identically in 3 files — REDACTED, REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate v3/@claude-flow/mcp/src/transport/index.ts:41— `!config || !('host' in config) || !('port' in config)` appears character-identically in 3 files — v3/@claude-flow/mcp/src/transport/index.ts, v3/@claude-flow/shared/src/mcp/transport/index.ts, v3/mcp/transport/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 .claude/helpers/learning-service.mjs:382— `!connections || connections.size <= this.config.hnsw.M` appears character-identically in 3 files — .claude/helpers/learning-service.mjs, v3/@claude-flow/cli/.claude/helpers/learning-service.mjs, v3/@claude-flow/mcp/.claude/helpers/learning-service.mjs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate .claude/helpers/intelligence.cjs:713— `!detailed || !Array.isArray(detailed.surfaced) || detailed.surfaced.length === 0` appears character-identically in 2 files — .claude/helpers/intelligence.cjs, v3/@claude-flow/cli/.claude/helpers/intelligence.cjs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate v3/@claude-flow/memory/src/agentdb-adapter.ts:964— `!embedding && query.content && this.config.embeddingGenerator` appears character-identically in 3 files — v3/@claude-flow/memory/src/agentdb-adapter.ts, v3/@claude-flow/memory/src/agentdb-backend.ts, v3/@claude-flow/memory/src/hybrid-backend.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 v3/@claude-flow/cli/scripts/run-beir-bge.mjs:178— `!existsSync(cachePath('ids')) || !existsSync(cachePath('f32'))` appears character-identically in 4 files — v3/@claude-flow/cli/scripts/run-beir-bge.mjs, v3/@claude-flow/cli/scripts/run-beir-hybrid.mjs, v3/@claude-flow/cli/scripts/run-beir-lucene-bm25.mjs, v3/@claude-flow/cli/scripts/run-beir-rrf-ablation.mjs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate plugins/ruflo-console/hooks/wf-cost-live.ts:137— `!force && state.isInteractive && !(state.pane.isOpen && state.pane.isShown)` appears character-identically in 2 files — plugins/ruflo-console/hooks/wf-cost-live.ts, plugins/ruflo-console/hooks/wf-live.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 v3/mcp/tools/sona-tools.js:312— `!input.category || p.category === input.category` appears character-identically in 2 files — v3/mcp/tools/sona-tools.js, v3/mcp/tools/sona-tools.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 v3/mcp/tools/hooks-tools.js:324— `!isDestructive || input.command.includes('--dry-run')` appears character-identically in 2 files — v3/mcp/tools/hooks-tools.js, v3/mcp/tools/hooks-tools.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate scripts/benchmark-models-midtier.mjs:393— `!judgeJson || typeof judgeJson !== 'object'` appears character-identically in 2 files — scripts/benchmark-models-midtier.mjs, scripts/benchmark-seed-corpus.mjs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate v3/@claude-flow/cli/src/services/managed-learning-store.ts:26— `!lstatSync(path).isFile() || lstatSync(path).isSymbolicLink()` appears character-identically in 2 files — v3/@claude-flow/cli/src/services/managed-learning-store.ts, v3/@claude-flow/cli/src/services/managed-run-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 .claude/helpers/intelligence.cjs:883— `!matchedIds || !Array.isArray(matchedIds)` appears character-identically in 2 files — .claude/helpers/intelligence.cjs, v3/@claude-flow/cli/.claude/helpers/intelligence.cjs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:265— `!model.version || !model.version.startsWith('1.')` appears character-identically in 2 files — REDACTED, v3/@claude-flow/neural/src/moe-router.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:493— `!name.startsWith('scan-') || !name.endsWith('.json')` appears character-identically in 2 files — REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Orphaned file v3/@claude-flow/plugin-iot-cognitum/src/plugin.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 v3/@claude-flow/plugin-agent-federation/src/application/trust-evaluator.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 v3/@claude-flow/plugin-iot-cognitum/src/domain/services/device-lifecycle-service.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 v3/@claude-flow/plugin-agent-federation/src/domain/services/audit-service.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 plugins/ruflo-arena/src/domain/strategies.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 v3/@claude-flow/plugin-agent-federation/src/domain/services/handshake-service.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 v3/@claude-flow/plugin-iot-cognitum/src/domain/services/firmware-orchestration-service.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 v3/@claude-flow/plugin-iot-cognitum/src/domain/services/anomaly-detection-service.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 plugins/ruflo-arena/src/domain/types.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 v3/@claude-flow/plugin-iot-cognitum/src/infrastructure/agentdb-telemetry-repository.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 plugins/ruflo-arena/src/cli.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 v3/@claude-flow/plugin-iot-cognitum/src/domain/services/sona-integration-service.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 v3/@claude-flow/plugin-iot-cognitum/src/domain/services/fleet-topology-service.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 v3/@claude-flow/plugin-iot-cognitum/src/domain/services/mesh-service.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 v3/@claude-flow/plugin-agent-federation/src/domain/entities/federation-session.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 v3/@claude-flow/plugin-agent-federation/src/domain/entities/federation-envelope.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 v3/@claude-flow/plugin-iot-cognitum/src/domain/services/telemetry-service.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 v3/@claude-flow/plugin-iot-cognitum/src/infrastructure/seed-client-factory.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 plugins/ruflo-arena/src/report/render.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 v3/@claude-flow/plugin-iot-cognitum/src/domain/services/witness-verification-service.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.
Interpolated log message defeats structured logging REDACTED:103— `debug` at line 103 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.debug({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.debug('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging ruflo/src/ruvocal/src/routes/api/v2/user/billing-orgs/+server.ts:27— `error` at line 27 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging ruflo/src/ruvocal/src/routes/api/v2/user/billing-orgs/+server.ts:51— `info` at line 51 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging ruflo/src/ruvocal/src/routes/api/mcp/health/+server.ts:108— `info` at line 108 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging ruflo/src/ruvocal/src/routes/api/mcp/health/+server.ts:115— `info` at line 115 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging ruflo/src/ruvocal/src/routes/api/mcp/health/+server.ts:171— `info` at line 171 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging ruflo/src/ruvocal/src/lib/server/adminToken.ts:58— `info` at line 58 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging ruflo/src/ruvocal/src/lib/server/metrics.ts:237— `info` at line 237 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging ruflo/src/ruvocal/src/lib/server/sendSlack.ts:21— `error` at line 21 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging ruflo/src/ruvocal/src/lib/server/textGeneration/generate.ts:248— `info` at line 248 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging ruflo/src/ruvocal/src/lib/server/database/postgres.ts:164— `warn` at line 164 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging ruflo/src/ruvocal/src/lib/migrations/migrations.ts:52— `debug` at line 52 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.debug({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.debug('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging ruflo/src/ruvocal/src/lib/migrations/migrations.ts:59— `debug` at line 59 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.debug({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.debug('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging ruflo/src/ruvocal/src/lib/migrations/migrations.ts:66— `debug` at line 66 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.debug({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.debug('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging ruflo/src/ruvocal/src/lib/migrations/migrations.ts:89— `error` at line 89 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Interpolated log message defeats structured logging ruflo/src/ruvocal/src/lib/migrations/routines/09-delete-empty-conversations.ts:73— `info` at line 73 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
Hand-rolled JSON/XML parsing via regex scripts/audit-fix-invariants.mjs:278— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex scripts/benchmark-models.mjs:135— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex plugins/ruflo-protector/hooks/scan.ts:16— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex plugins/ruflo-protector/hooks/scan.ts:18— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex plugins/ruflo-protector/hooks/scan.ts:19— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex plugins/ruflo-console/hooks/runner.ts:152— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex plugins/ruflo-console/hooks/runner.ts:153— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex plugins/ruflo-console/hooks/runner.ts:156— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex plugins/ruflo-console/hooks/data/failure.ts:22— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex plugins/ruflo-console/hooks/data/failure.ts:72— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex plugins/ruflo-console/hooks/data/vector.ts:138— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex REDACTED:90— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex plugins/ruflo-console/hooks/data/wf-send.ts:114— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
ADR declares no status v3/docs/adr/ADR-350-dream-cycle-swarm-trust-weighted-consensus.md:1— `v3/docs/adr/ADR-350-dream-cycle-swarm-trust-weighted-consensus.md` declares no status, while 284 of the 286 other records in `v3/docs/adr` do, so a reader cannot tell whether this decision is in force. Add a `Status:` line.
ADR declares no status v3/docs/adr/ADR-367-epistemic-working-memory-intelligence-pipeline.md:1— `v3/docs/adr/ADR-367-epistemic-working-memory-intelligence-pipeline.md` declares no status, while 284 of the 286 other records in `v3/docs/adr` do, so a reader cannot tell whether this decision is in force. Add a `Status:` line.
ADR declares no status v3/docs/adr/ADR-376-dream-cycle-intelligence-heterogeneous-ensemble-api.md:1— `v3/docs/adr/ADR-376-dream-cycle-intelligence-heterogeneous-ensemble-api.md` declares no status, while 284 of the 286 other records in `v3/docs/adr` do, so a reader cannot tell whether this decision is in force. Add a `Status:` line.
ADR declares no status v3/implementation/adrs/ADR-001-AGENT-IMPLEMENTATION.md:1— `v3/implementation/adrs/ADR-001-AGENT-IMPLEMENTATION.md` declares no status, while 80 of the 88 other records in `v3/implementation/adrs` do, so a reader cannot tell whether this decision is in force. Add a `Status:` line.
ADR declares no status v3/implementation/adrs/ADR-009-IMPLEMENTATION.md:1— `v3/implementation/adrs/ADR-009-IMPLEMENTATION.md` declares no status, while 80 of the 88 other records in `v3/implementation/adrs` do, so a reader cannot tell whether this decision is in force. Add a `Status:` line.
ADR declares no status v3/implementation/adrs/ADR-027-codex-ddd.md:1— `v3/implementation/adrs/ADR-027-codex-ddd.md` declares no status, while 80 of the 88 other records in `v3/implementation/adrs` do, so a reader cannot tell whether this decision is in force. Add a `Status:` line.
ADR declares no status v3/implementation/adrs/ADR-027-codex-package-analysis.md:1— `v3/implementation/adrs/ADR-027-codex-package-analysis.md` declares no status, while 80 of the 88 other records in `v3/implementation/adrs` do, so a reader cannot tell whether this decision is in force. Add a `Status:` line.
ADR declares no status v3/implementation/adrs/ADR-057-rvf-native-storage-backend.md:1— `v3/implementation/adrs/ADR-057-rvf-native-storage-backend.md` declares no status, while 80 of the 88 other records in `v3/implementation/adrs` do, so a reader cannot tell whether this decision is in force. Add a `Status:` line.
ADR declares no status v3/implementation/adrs/ADR-058-self-contained-ruflo-rvf-appliance.md:1— `v3/implementation/adrs/ADR-058-self-contained-ruflo-rvf-appliance.md` declares no status, while 80 of the 88 other records in `v3/implementation/adrs` do, so a reader cannot tell whether this decision is in force. Add a `Status:` line.
ADR declares no status v3/implementation/adrs/ADR-078-agent-llm-federation-plugin.md:1— `v3/implementation/adrs/ADR-078-agent-llm-federation-plugin.md` declares no status, while 80 of the 88 other records in `v3/implementation/adrs` do, so a reader cannot tell whether this decision is in force. Add a `Status:` line.
ADR declares no status v3/implementation/adrs/ADR-079-iot-cognitum-plugin.md:1— `v3/implementation/adrs/ADR-079-iot-cognitum-plugin.md` declares no status, while 80 of the 88 other records in `v3/implementation/adrs` do, so a reader cannot tell whether this decision is in force. Add a `Status:` line.
ADR declares no status v3/implementation/adrs/ADR-080-codex-auto-detect-on-init.md:1— `v3/implementation/adrs/ADR-080-codex-auto-detect-on-init.md` declares no status, while 80 of the 88 other records in `v3/implementation/adrs` do, so a reader cannot tell whether this decision is in force. Add a `Status:` line.
Fat interface: IAgentRepository (20 required operations) v3/@claude-flow/swarm/src/domain/repositories/agent-repository.interface.ts:39— `IAgentRepository` declares 20 required operations: `save`, `findById`, `findByName`, `delete`, `exists`, `saveMany`, `findByIds`, `deleteMany`, `findAll`, `findByStatus`, `findByRole`, `findByDomain`, `findByParent`, `findByCapability`, `findAvailable`, `getStatistics`, `count`, `initialize`, `shutdown`, `clear`. 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: ITaskRepository (22 required operations) v3/@claude-flow/swarm/src/domain/repositories/task-repository.interface.ts:41— `ITaskRepository` declares 22 required operations: `save`, `findById`, `delete`, `exists`, `saveMany`, `findByIds`, `deleteMany`, `findAll`, `findByStatus`, `findByPriority`, `findByAgent`, `findPending`, `findQueued`, `findRunning`, `findTimedOut`, `getNextTask`, `getTaskQueue`, `getStatistics`, `count`, `initialize`, `shutdown`, `clear`. 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: IMemoryBackend (16 required operations) v3/@claude-flow/memory/src/types.ts:308— `IMemoryBackend` declares 16 required operations: `initialize`, `shutdown`, `store`, `get`, `getByKey`, `update`, `delete`, `query`, `search`, `bulkInsert`, `bulkDelete`, `count`, `listNamespaces`, `clearNamespace`, `getStats`, `healthCheck`. 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: IMemoryRepository (27 required operations) v3/@claude-flow/memory/src/domain/repositories/memory-repository.interface.ts:77— `IMemoryRepository` declares 27 required operations: `save`, `findById`, `findByKey`, `findByCompositeKey`, `delete`, `exists`, `saveMany`, `findByIds`, `deleteMany`, `findAll`, `findByNamespace`, `findByType`, `findByStatus`, `searchByVector`, `findSimilar`, `findExpired`, `deleteExpired`, `findCold`, `archiveCold`, `getStatistics`, `count`, `listNamespaces`, `deleteNamespace`, `getNamespaceSize`, `initialize`, `shutdown`, `clear`. 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: IRuVectorClient (27 required operations) v3/@claude-flow/plugins/src/integrations/ruvector/types.ts:1737— `IRuVectorClient` declares 27 required operations: `connect`, `disconnect`, `isConnected`, `getConnectionInfo`, `search`, `batchSearch`, `insert`, `update`, `delete`, `bulkDelete`, `createIndex`, `dropIndex`, `rebuildIndex`, `getIndexStats`, `listIndices`, `computeAttention`, `runGNNLayer`, `buildGraph`, `hyperbolicEmbed`, `hyperbolicDistance`, `embed`, `embedBatch`, `transaction`, `vacuum`, `analyze`, `healthCheck`, `getStats`. 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: IUnifiedSwarmCoordinator (17 required operations) v3/@claude-flow/swarm/src/types.ts:544— `IUnifiedSwarmCoordinator` declares 17 required operations: `initialize`, `shutdown`, `pause`, `resume`, `registerAgent`, `unregisterAgent`, `getAgent`, `getAllAgents`, `submitTask`, `cancelTask`, `getTask`, `getAllTasks`, `proposeConsensus`, `broadcastMessage`, `getState`, `getMetrics`, `getPerformanceReport`. 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: IAgentRegistry (17 required operations) v3/@claude-flow/swarm/src/coordination/agent-registry.ts:33— `IAgentRegistry` declares 17 required operations: `register`, `unregister`, `isRegistered`, `spawn`, `terminate`, `getState`, `updateStatus`, `assignTask`, `completeTask`, `getDefinition`, `getAllAgents`, `getActiveAgents`, `getAgentsByDomain`, `getAgentsByCapability`, `heartbeat`, `getHealthStatus`, `onAgentEvent`. 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: ITaskOrchestrator (23 required operations) v3/@claude-flow/swarm/src/coordination/task-orchestrator.ts:38— `ITaskOrchestrator` declares 23 required operations: `createTask`, `createBatchTasks`, `queueTask`, `assignTask`, `startTask`, `completeTask`, `failTask`, `cancelTask`, `addDependency`, `removeDependency`, `getDependencies`, `getDependents`, `isBlocked`, `getBlockingTasks`, `getTask`, `getAllTasks`, `getTasksByStatus`, `getTasksByAgent`, `getTasksByDomain`, `getTasksByPhase`, `getNextTask`, `getPriorityQueue`, `getTaskMetrics`. 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: ISwarmHub (24 required operations) v3/@claude-flow/swarm/src/coordination/swarm-hub.ts:61— `ISwarmHub` declares 24 required operations: `initialize`, `shutdown`, `isInitialized`, `spawnAgent`, `spawnAllAgents`, `spawnAgentsByDomain`, `terminateAgent`, `submitTask`, `submitBatchTasks`, `assignNextTask`, `completeTask`, `getCurrentPhase`, `advancePhase`, `getPhaseDefinition`, `getMilestones`, `completeMilestone`, `sendMessage`, `broadcast`, `onMessage`, `getState`, `getMetrics`, `getAgentRegistry`, `getTaskOrchestrator`, `onSwarmEvent`. 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: IGasTownBridge (16 required operations) v3/plugins/gastown-bridge/src/types.ts:831— `IGasTownBridge` declares 16 required operations: `createBead`, `getReady`, `showBead`, `manageDependency`, `createConvoy`, `getConvoyStatus`, `trackConvoy`, `listFormulas`, `cookFormula`, `executeFormula`, `createFormula`, `sling`, `listAgents`, `sendMail`, `readMail`, `listMail`. 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: WasmModule (21 required operations) v3/plugins/prime-radiant/src/types.ts:318— `WasmModule` declares 21 required operations: `cohomology_compute_energy`, `cohomology_detect_contradictions`, `spectral_compute_eigenvalues`, `spectral_compute_gap`, `spectral_stability_index`, `causal_estimate_effect`, `causal_find_confounders`, `causal_backdoor_paths`, `quantum_betti_numbers`, `quantum_persistence_diagram`, `quantum_homology_classes`, `category_apply_morphism`, `category_compose`, `category_is_natural`, `hott_verify_proof`, `hott_infer_type`, `hott_normalize`, `hott_path_equivalent`, `hott_transport`, `alloc`, `dealloc`. 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.
DM2 · Strongly-typed ids· Primitive id on a domain type · ×11
Primitive id on a domain type: MemoryEntry.compositeKey v3/@claude-flow/memory/src/domain/entities/memory-entry.ts:146— `MemoryEntry.compositeKey` is a raw `string` — give it a strongly-typed id: a dedicated single-field type wrapping the `string`, in whatever form your language spells that.
Primitive id on a domain type: FederationNode.nodeId v3/@claude-flow/plugin-agent-federation/src/domain/entities/federation-node.ts:51— `FederationNode.nodeId` is a raw `string` — give it a strongly-typed id: a dedicated single-field type wrapping the `string`, in whatever form your language spells that.
Primitive id on a domain type: FederationNode.publicKey v3/@claude-flow/plugin-agent-federation/src/domain/entities/federation-node.ts:52— `FederationNode.publicKey` is a raw `string` — give it a strongly-typed id: a dedicated single-field type wrapping the `string`, in whatever form your language spells that.
Primitive id on a domain type: FederationEnvelope.envelopeId v3/@claude-flow/plugin-agent-federation/src/domain/entities/federation-envelope.ts:51— `FederationEnvelope.envelopeId` is a raw `string` — give it a strongly-typed id: a dedicated single-field type wrapping the `string`, in whatever form your language spells that.
Primitive id on a domain type: FederationEnvelope.sourceNodeId v3/@claude-flow/plugin-agent-federation/src/domain/entities/federation-envelope.ts:52— `FederationEnvelope.sourceNodeId` is a raw `string` — give it a strongly-typed id: a dedicated single-field type wrapping the `string`, in whatever form your language spells that.
Primitive id on a domain type: FederationEnvelope.targetNodeId v3/@claude-flow/plugin-agent-federation/src/domain/entities/federation-envelope.ts:53— `FederationEnvelope.targetNodeId` is a raw `string` — give it a strongly-typed id: a dedicated single-field type wrapping the `string`, in whatever form your language spells that.
Primitive id on a domain type: FederationEnvelope.sessionId v3/@claude-flow/plugin-agent-federation/src/domain/entities/federation-envelope.ts:54— `FederationEnvelope.sessionId` is a raw `string` — give it a strongly-typed id: a dedicated single-field type wrapping the `string`, in whatever form your language spells that.
Primitive id on a domain type: FederationSession.sessionId v3/@claude-flow/plugin-agent-federation/src/domain/entities/federation-session.ts:26— `FederationSession.sessionId` is a raw `string` — give it a strongly-typed id: a dedicated single-field type wrapping the `string`, in whatever form your language spells that.
Primitive id on a domain type: FederationSession.localNodeId v3/@claude-flow/plugin-agent-federation/src/domain/entities/federation-session.ts:27— `FederationSession.localNodeId` is a raw `string` — give it a strongly-typed id: a dedicated single-field type wrapping the `string`, in whatever form your language spells that.
Primitive id on a domain type: FederationSession.remoteNodeId v3/@claude-flow/plugin-agent-federation/src/domain/entities/federation-session.ts:28— `FederationSession.remoteNodeId` is a raw `string` — give it a strongly-typed id: a dedicated single-field type wrapping the `string`, in whatever form your language spells that.
Primitive id on a domain type: SecurityContext.principalId REDACTED:72— `SecurityContext.principalId` is a raw `string` — give it a strongly-typed id: a dedicated single-field type wrapping the `string`, in whatever form your language spells that.
Mock-dominated test: should log duration on success v3/plugins/test-intelligence/tests/mcp-tools.test.ts:484— This test sets up 4 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: should log duration on success v3/plugins/code-intelligence/tests/mcp-tools.test.ts:621— This test sets up 4 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: should emit events to event bus v3/@claude-flow/shared/src/hooks/hooks.test.ts:368— This test sets up 3 test doubles (for example `vi.fn`) 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: should emit vector events v3/@claude-flow/plugins/__tests__/ruvector-bridge.test.ts:1133— 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: should emit vector operation events v3/@claude-flow/plugins/__tests__/ruvector-integration.test.ts:851— This test sets up 3 test doubles (for example `vi.fn`) 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: should not call onTrustChange when trust level stays the same v3/@claude-flow/plugin-iot-cognitum/__tests__/unit/device-lifecycle-service.test.ts:447— This test sets up 3 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: tracks multiple devices independently v3/@claude-flow/plugin-iot-cognitum/__tests__/unit/firmware-watch-worker.test.ts:92— This test sets up 3 test doubles (for example `vi.fn`) 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: detects mesh partition when peer count drops to 0 v3/@claude-flow/plugin-iot-cognitum/__tests__/unit/mesh-sync-worker.test.ts:50— This test sets up 3 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: uses computeConfidencePenalty/updateFisherFromConfidences, never getPenalty([x],[y])/recordGradient v3/@claude-flow/cli/__tests__/ewc-distill-confidence-gate.test.ts:62— This test sets up 4 test doubles (for example `vi.spyOn`) against 1 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: should emit error event for execution failures v3/@claude-flow/cli/__tests__/services/headless-worker-executor.test.ts:874— This test sets up 3 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.
ADR not followed: ADR 401: Browser MCP Windows Shell Boundary v3/docs/adr/ADR-401-browser-mcp-windows-shell-boundary.md:27— v3/docs/adr/ADR-401-browser-mcp-windows-shell-boundary.md:27 rules out `shell`, but production code uses it: v3/plugins/gastown-bridge/src/bridges/bd-bridge.ts:474, v3/plugins/gastown-bridge/src/bridges/bd-bridge.ts:565, v3/plugins/gastown-bridge/src/bridges/gt-bridge.ts:455, v3/@claude-flow/testing/src/regression/security-regression.ts:77, v3/@claude-flow/testing/src/mocks/mock-services.ts:738 (+123 more). Remove the use, or supersede the record if the decision changed.
ADR not followed: ADR 403: Stable Semver for Internal `@claude-flow/*` Leaf Packages v3/docs/adr/ADR-403-stable-semver-internal-leaf-packages.md:30— v3/docs/adr/ADR-403-stable-semver-internal-leaf-packages.md:30 rules out `main` in registry, but production code uses it: v3/@claude-flow/cli/scripts/publish-registry.ts:263, v3/@claude-flow/cli/scripts/publish-registry.ts:344. Remove the use, or supersede the record if the decision changed.
ADR not followed: ADR 403: Stable Semver for Internal `@claude-flow/*` Leaf Packages v3/docs/adr/ADR-403-stable-semver-internal-leaf-packages.md:38— v3/docs/adr/ADR-403-stable-semver-internal-leaf-packages.md:38 rules out `main` in registry, but production code uses it: v3/@claude-flow/cli/scripts/publish-registry.ts:263, v3/@claude-flow/cli/scripts/publish-registry.ts:344. Remove the use, or supersede the record if the decision changed.
ADR not followed: ADR 444: Claude controls the console: model tools, an autonomy level and a live dashboard v3/docs/adr/ADR-444-claude-controls-the-console.md:38— v3/docs/adr/ADR-444-claude-controls-the-console.md:38 rules out `write` in costs, but production code uses it: plugins/ruflo-cost-tracker/scripts/test-cli-resolution-3558.mjs:44, plugins/ruflo-cost-tracker/scripts/test-cli-resolution-3558.mjs:62, plugins/ruflo-cost-tracker/scripts/test-cli-resolution-3558.mjs:63, plugins/ruflo-cost-tracker/scripts/test-cli-resolution-3558.mjs:64, plugins/ruflo-cost-tracker/scripts/test-cli-resolution-3558.mjs:69 (+16 more). Remove the use, or supersede the record if the decision changed.
ADR not followed: ADR 460: Mission links, run events, mission-as-workflow and guidance on the Workflows page v3/docs/adr/ADR-460-workflow-links-nesting-and-guidance.md:36— v3/docs/adr/ADR-460-workflow-links-nesting-and-guidance.md:36 rules out `state` in notice, slot, but production code uses it: plugins/ruflo-console/hooks/notices.ts:34, plugins/ruflo-console/hooks/notices.ts:35, plugins/ruflo-console/hooks/notices.ts:36, plugins/ruflo-console/hooks/notices.ts:38, plugins/ruflo-console/hooks/notices.ts:41 (+37 more). Remove the use, or supersede the record if the decision changed.
ADR not followed: ADR 475: Policy ledger anchor cannot be deleted and silently re-established v3/docs/adr/ADR-475-policy-ledger-anchor.md:18— v3/docs/adr/ADR-475-policy-ledger-anchor.md:18 rules out `verify` in receipts, but production code uses it: v3/@claude-flow/cli/src/services/flywheel-receipt.ts:13, plugins/ruflo-agntcy/src/receipts/casa-receipt.ts:238. Remove the use, or supersede the record if the decision changed.
ADR not followed: ADR 476: Hive-Mind Gating That Does Not Break Local Users v3/docs/adr/ADR-476-hive-mind-gating.md:36— v3/docs/adr/ADR-476-hive-mind-gating.md:36 rules out `hiveToken`, but production code uses it: v3/@claude-flow/cli/src/mcp-tools/hive-mind-tools.ts:45, v3/@claude-flow/cli/src/mcp-tools/hive-mind-tools.ts:278, v3/@claude-flow/cli/src/mcp-tools/hive-mind-tools.ts:279, v3/@claude-flow/cli/src/mcp-tools/hive-mind-tools.ts:297, v3/@claude-flow/cli/src/mcp-tools/hive-mind-tools.ts:390 (+12 more). Remove the use, or supersede the record if the decision changed.
ADR not followed: ADR 494: ruRE in the ruflo console: a TOOLS page for static reverse engineering v3/docs/adr/ADR-494-ruflo-console-rure-page.md:35— v3/docs/adr/ADR-494-ruflo-console-rure-page.md:35 rules out `query` in ruRE, field, runs, but production code uses it: v3/@claude-flow/cli/src/rure/find-feature.ts:41, v3/@claude-flow/cli/src/rure/find-feature.ts:42, plugins/ruflo-console/hooks/rure.ts:28. Remove the use, or supersede the record if the decision changed.
ADR not followed: ADR 499: ruRE in the console can read a folder outside the project that you allow v3/docs/adr/ADR-499-rure-outside-folders.md:15— v3/docs/adr/ADR-499-rure-outside-folders.md:15 rules out `$` in pair, but production code uses it: v3/@claude-flow/cli/src/commands/pair.ts:93. Remove the use, or supersede the record if the decision changed.
D20 · ADR Quality· ADR superseded but its status says otherwise · ×8
ADR superseded but its status says otherwise ruflo/docs/adr/ADR-033-RUVECTOR-RUFLO-MCP-INTEGRATION.md:1— ruflo/docs/adr/ADR-033-RUVECTOR-RUFLO-MCP-INTEGRATION.md:1 says "Accepted", but ruflo/docs/adr/ADR-035-MCP-TOOL-GROUPS.md supersedes it. Two records now claim the same ground; mark this one "Superseded by" its successor.
ADR superseded but its status says otherwise ruflo/docs/adr/ADR-034-OPTIONAL-MCP-BACKENDS.md:1— ruflo/docs/adr/ADR-034-OPTIONAL-MCP-BACKENDS.md:1 says "Accepted", but ruflo/docs/adr/ADR-035-MCP-TOOL-GROUPS.md supersedes it. Two records now claim the same ground; mark this one "Superseded by" its successor.
ADR superseded but its status says otherwise v3/docs/adr/ADR-074-self-learning-wiring-2245.md:3— v3/docs/adr/ADR-074-self-learning-wiring-2245.md:3 says "Accepted — Implemented in ruflo 3.10.14", but v3/docs/adr/ADR-075-unified-learning-stats.md supersedes it. Two records now claim the same ground; mark this one "Superseded by" its successor.
ADR superseded but its status says otherwise v3/docs/adr/ADR-115-managed-agents-rvagent-backend.md:3— v3/docs/adr/ADR-115-managed-agents-rvagent-backend.md:3 says "Accepted (2026-05-12) — implemented as the `managed_agent_*` MCP tools in the `ruflo-agent` plugin (see Implementation below)", but v3/docs/adr/ADR-129-rvagent-full-integration.md supersedes it. Two records now claim the same ground; mark this one "Superseded by" its successor.
ADR superseded but its status says otherwise v3/docs/adr/ADR-150-metaharness-integration-surfaces.md:3— v3/docs/adr/ADR-150-metaharness-integration-surfaces.md:3 says "Implemented (Phase 1 ✅ iters 1–3 · Phase 2 ✅ iters 4–32 · Phase 3 §3.1 ✅ iters 33–99 · KRR retrain pending production data · Phase 3 §3.2-§3.5 scoped in [ADR-151](ADR-151-harness-intelligence-layer.md))", but v3/docs/adr/ADR-321-metaharness-hard-dependency.md supersedes it. Two records now claim the same ground; mark this one "Superseded by" its successor.
ADR superseded but its status says otherwise v3/docs/adr/ADR-322-metaharness-flywheel-integration.md:3— v3/docs/adr/ADR-322-metaharness-flywheel-integration.md:3 says "Accepted — phases 0–2 implemented", but v3/docs/adr/ADR-323-typed-memory-provenance.md supersedes it. Two records now claim the same ground; mark this one "Superseded by" its successor.
ADR superseded but its status says otherwise v3/implementation/adrs/ADR-015-unified-plugin-system.md:4— v3/implementation/adrs/ADR-015-unified-plugin-system.md:4 says "Accepted**", but v3/implementation/adrs/ADR-015-v2-unified-plugin-system.md supersedes it. Two records now claim the same ground; mark this one "Superseded by" its successor.
ADR superseded but its status says otherwise v3/implementation/adrs/ADR-059-bug-triage-2026-03.md:1— v3/implementation/adrs/ADR-059-bug-triage-2026-03.md:1 says "Accepted — Fixes Verified", but v3/implementation/adrs/ADR-060-remaining-bugs-2026-03.md, v3/implementation/adrs/ADR-070-rvagent-wasm-completion.md supersedes it. Two records now claim the same ground; mark this one "Superseded by" its successor.
D20 · ADR Quality· ADR has no Context section · ×6
ADR has no Context section v3/docs/adr/ADR-330-adaptive-pheromone-swarm-consensus.md:1— v3/docs/adr/ADR-330-adaptive-pheromone-swarm-consensus.md has no Context section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
ADR has no Context section v3/docs/adr/ADR-331-project-local-flywheel-anchors.md:1— v3/docs/adr/ADR-331-project-local-flywheel-anchors.md has no Context section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
ADR has no Context section v3/docs/adr/ADR-406-ruflo-mod-command-compatibility.md:1— v3/docs/adr/ADR-406-ruflo-mod-command-compatibility.md has no Context section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
ADR has no Context section v3/docs/adr/ADR-407-ruflo-console-cockpit.md:1— v3/docs/adr/ADR-407-ruflo-console-cockpit.md has no Context section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
ADR has no Context section v3/docs/adr/ADR-408-ruflo-console-mission-control.md:1— v3/docs/adr/ADR-408-ruflo-console-mission-control.md has no Context section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
ADR has no Context section v3/docs/adr/ADR-446-plugins-as-mods.md:1— v3/docs/adr/ADR-446-plugins-as-mods.md has no Context section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
X23 · Unguarded diagnostic materialisation· Diagnostic log message is built whether or not it is wanted · ×6
Diagnostic log message is built whether or not it is wanted v3/plugins/gastown-bridge/src/formula/executor.ts:988— `debug` at line 988 is called with an argument built by `Object.keys(vars)` (line 988), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch.
Diagnostic log message is built whether or not it is wanted ruflo/src/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts:81— `debug` at line 81 is called with an argument built by `servers.map((s) => ({ name : s.name, url : s.url }))` (line 82), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch.
Diagnostic log message is built whether or not it is wanted ruflo/src/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts:104— `debug` at line 104 is called with an argument built by `servers.map((s) => ({ name : s.name, url : s.url, hasAuth : !!s.headers?.Authorization, }))` (line 107), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch.
Diagnostic log message is built whether or not it is wanted ruflo/src/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts:126— `debug` at line 126 is called with an argument built by `servers.map((s) => s.name)` (line 127), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch.
Diagnostic log message is built whether or not it is wanted ruflo/src/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts:227— `debug` at line 227 is called with an argument built by `servers.map((s) => s.name)` (line 228), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch.
Diagnostic log message is built whether or not it is wanted ruflo/src/ruvocal/src/lib/server/mcp/tools.ts:86— `debug` at line 86 is called with an argument built by `tools.map((t) => t?.name)` (line 91), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch.
D20 · ADR Quality· ADR links a record that does not exist · ×5
ADR links a record that does not exist v3/docs/adr/ADR-148-fastgrnn-router-artifact-lifecycle.md:6— v3/docs/adr/ADR-148-fastgrnn-router-artifact-lifecycle.md:6 names `ADR 26` as the record it supersedes, and no such record is in the decision log. Fix the link, or restore the record, so a reader can follow the decision's history.
ADR links a record that does not exist v3/docs/adr/ADR-330-adaptive-pheromone-swarm-consensus.md:6— v3/docs/adr/ADR-330-adaptive-pheromone-swarm-consensus.md:6 names `ADR 2833` as the record it supersedes, and no such record is in the decision log. Fix the link, or restore the record, so a reader can follow the decision's history.
ADR links a record that does not exist v3/docs/adr/ADR-333-efficiency-first-orchestration-prehoc-failure-inference.md:7— v3/docs/adr/ADR-333-efficiency-first-orchestration-prehoc-failure-inference.md:7 names `ADR 26` as the record it supersedes, and no such record is in the decision log. Fix the link, or restore the record, so a reader can follow the decision's history.
ADR links a record that does not exist v3/docs/adr/ADR-346-multi-layer-agent-security.md:6— v3/docs/adr/ADR-346-multi-layer-agent-security.md:6 names `ADR 12` as the record it supersedes, and no such record is in the decision log. Fix the link, or restore the record, so a reader can follow the decision's history.
ADR links a record that does not exist v3/docs/adr/ADR-378-npm-trusted-publishing-cicd.md:6— v3/docs/adr/ADR-378-npm-trusted-publishing-cicd.md:6 names `ADR 24` as the record it supersedes, and no such record is in the decision log. Fix the link, or restore the record, so a reader can follow the decision's history.
D20 · ADR Quality· ADR has no Consequences section · ×4
ADR has no Consequences section v3/docs/adr/ADR-095-architectural-gaps-from-april-audit.md:1— v3/docs/adr/ADR-095-architectural-gaps-from-april-audit.md has no Consequences section (a heading such as `## Consequences`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
ADR has no Consequences section v3/docs/adr/ADR-174-memory-distillation-self-optimization.md:1— v3/docs/adr/ADR-174-memory-distillation-self-optimization.md has no Consequences section (a heading such as `## Consequences`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
ADR has no Consequences section v3/docs/adr/ADR-175-page-agent-browser-intent-layer.md:1— v3/docs/adr/ADR-175-page-agent-browser-intent-layer.md has no Consequences section (a heading such as `## Consequences`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
ADR has no Consequences section v3/implementation/adrs/ADR-065-external-pr-review-v3523.md:1— v3/implementation/adrs/ADR-065-external-pr-review-v3523.md has no Consequences section (a heading such as `## Consequences`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
No app-layer HTTPS enforcement detected REDACTED:153— `server.listen(…)` serves plain HTTP on a network address, and nothing in its package enforces HTTPS: no TLS served (`https.createServer`, Fastify `https`, Nest `httpsOptions`), no redirect of plain requests to `https://`, no `Strict-Transport-Security` (helmet sends it by default), and no TLS-terminating proxy configuration committed beside it — so a browser may talk to it in clear text. (−2.0 on this card.)
No app-layer HTTPS enforcement detected REDACTED:229— `server.listen(…)` serves plain HTTP on a network address, and nothing in its package enforces HTTPS: no TLS served (`https.createServer`, Fastify `https`, Nest `httpsOptions`), no redirect of plain requests to `https://`, no `Strict-Transport-Security` (helmet sends it by default), and no TLS-terminating proxy configuration committed beside it — so a browser may talk to it in clear text. (−2.0 on this card.)
No app-layer HTTPS enforcement detected REDACTED:559— `server.listen(…)` serves plain HTTP on a network address, and nothing in its package enforces HTTPS: no TLS served (`https.createServer`, Fastify `https`, Nest `httpsOptions`), no redirect of plain requests to `https://`, no `Strict-Transport-Security` (helmet sends it by default), and no TLS-terminating proxy configuration committed beside it — so a browser may talk to it in clear text. (−2.0 on this card.)
No app-layer HTTPS enforcement detected REDACTED:1784— `app.listen(…)` serves plain HTTP on a network address, and nothing in its package enforces HTTPS: no TLS served (`https.createServer`, Fastify `https`, Nest `httpsOptions`), no redirect of plain requests to `https://`, no `Strict-Transport-Security` (helmet sends it by default), and no TLS-terminating proxy configuration committed beside it — so a browser may talk to it in clear text. (−2.0 on this card.)
GD1 · Unfinished & placeholder code· Placeholder literal left in code · ×3
Placeholder literal left in code plugins/ruflo-protector/scripts/bench.mjs:53— A placeholder string ("lorem ipsum dolor sit amet") is still in shipped code — typical of generated boilerplate that was never filled in.
Placeholder literal left in code scripts/bench-mod-hooks.mjs:91— A placeholder string ("lorem ipsum dolor sit amet") is still in shipped code — typical of generated boilerplate that was never filled in.
Placeholder literal left in code REDACTED:49— A placeholder string ("lorem ipsum dolor sit amet") is still in shipped code — typical of generated boilerplate that was never filled in.
Silent fallback default on Err v3/@claude-flow/guidance/wasm-kernel/src/lib.rs:139— `scan_secrets` turns every `Err` into `"[]".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err v3/@claude-flow/guidance/wasm-kernel/src/scoring.rs:97— `score_shards_json` turns every `Err` into `"[]".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
AC7 · A11y enforcement· Accessibility enforcement below the top rung · ×1
Accessibility enforcement below the top rung — An a11y linter is configured (Documented) but there's no automated a11y test or CI gate. Add vitest-axe to verify at runtime, then gate it in CI. What was searched, so you can tell an absence from a miss: the 162 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
C2 · Access Controls· No named authorization policies · ×1
No named authorization policies — Authorization IS enforced here (by route guards, auth middleware or checks that refuse a caller) — this is NOT a claim that endpoints are unprotected. What's missing is a NAMED rule set: who may do what is encoded inline where it is checked, so the rules can't be listed, reviewed or tested apart from the code that applies them. Recommendation, not a defect.
D20 · ADR Quality· ADR has no Context and Consequences section · ×1
ADR has no Context and Consequences section v3/implementation/adrs/ADR-003-CONSOLIDATION-COMPLETE.md:1— v3/implementation/adrs/ADR-003-CONSOLIDATION-COMPLETE.md has no Context and Consequences section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
D20 · ADR Quality· ADR has no Decision and Consequences section · ×1
ADR has no Decision and Consequences section v3/implementation/adrs/SECURITY-REVIEW-SUMMARY.md:1— v3/implementation/adrs/SECURITY-REVIEW-SUMMARY.md has no Decision and Consequences section (a heading such as `## Decision`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 18 of 59 project(s) overshoot their size bounds, lowering Project Cohesion to 4.5/10. The most over is `v3/@claude-flow/cli` (188355 LoC, 1386 module-visible types across 48 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history)· Rotate the exposed credentials · ×1
D34 · Knowledge Freshness· Further orphaned files (smaller) · ×1
Further orphaned files (smaller) — 20 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: v3/@claude-flow/plugin-iot-cognitum/src/domain/services/device-lifecycle-service.ts, v3/@claude-flow/plugin-agent-federation/src/domain/services/audit-service.ts, v3/@claude-flow/plugin-iot-cognitum/src/plugin.ts, plugins/ruflo-arena/src/domain/strategies.ts, v3/@claude-flow/plugin-agent-federation/src/domain/services/handshake-service.ts, v3/@claude-flow/plugin-iot-cognitum/src/domain/services/firmware-orchestration-service.ts, v3/@claude-flow/plugin-agent-federation/src/application/trust-evaluator.ts, v3/@claude-flow/plugin-iot-cognitum/src/domain/services/anomaly-detection-service.ts (and 12 more) (21 orphaned of 1755 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; 1755 of the 2478 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.
No seccomp profile REDACTED:2— The workload runs a container with no seccomp profile in force (neither RuntimeDefault nor a Localhost profile, on the container or the pod), so Kubernetes runs it Unconfined. Seccomp blocks the syscalls a container never needs, shrinking the kernel attack surface a container escape would use.
DM9 · Scattered domain decisions· Rule about [columns, rows] decided in 2 places · ×1
Rule about [columns, rows] decided in 2 places — plugins.ruflo-console.hooks.gfx.raster.Grid's [columns, rows] are judged in plugins.ruflo-console.hooks.controller, plugins.ruflo-console.hooks.gfx.orbital — 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 [pii, threats] decided in 2 places · ×1
Rule about [pii, threats] decided in 2 places — v3.@claude-flow.browser.src.infrastructure.security-integration.ThreatScanResult's [pii, threats] are judged in v3.@claude-flow.browser.src.application.cookie-vault-service, v3.@claude-flow.browser.src.application.session-capsule-service — 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 [key, namespace] decided in 3 places · ×1
Rule about [key, namespace] decided in 3 places — v3.@claude-flow.cli-core.src.memory.backend.MemoryEntry's [key, namespace] are judged in v3.@claude-flow.guidance.src.memory-gate.MemoryWriteGate, v3.@claude-flow.memory.src.database-provider.JsonBackend, v3.@claude-flow.memory.src.infrastructure.repositories.hybrid-memory-repository.HybridMemoryRepository — 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 [cache, maxSize] decided in 2 places · ×1
Rule about [cache, maxSize] decided in 2 places — v3.@claude-flow.embeddings.src.rvf-embedding-service.LRUCache's [cache, maxSize] are judged in v3.@claude-flow.embeddings.src.embedding-service.LRUCache, v3.@claude-flow.memory.benchmarks.cache-hit-rate_bench.LRUCache — 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 [history, maxHistorySize] decided in 2 places · ×1
Rule about [history, maxHistorySize] decided in 2 places — v3.@claude-flow.shared.src.core.event-bus.EventBus's [history, maxHistorySize] are judged in v3.@claude-flow.shared.src.events.EventBus, v3.@claude-flow.swarm.src.shared.events.EventBus — 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 [from, to] decided in 2 places · ×1
Rule about [from, to] decided in 2 places — v3.@claude-flow.swarm.src.types.TopologyEdge's [from, to] are judged in v3.@claude-flow.swarm.src.topology-manager.TopologyManager, v3.plugins.teammate-plugin.src.topology-optimizer.TopologyOptimizer — 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 [current, suggested] decided in 2 places · ×1
Rule about [current, suggested] decided in 2 places — v3.plugins.perf-optimizer.src.types.ConfigParameter's [current, suggested] are judged in v3.plugins.perf-optimizer.src.bridges.fpga-bridge.PerfFpgaBridge, v3.plugins.perf-optimizer.src.mcp-tools — 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.
P10 · Library API & versioning· Large public API surface · ×1
Large public API surface — 67/71 types (94%) declared in the published library are public. For a library, every public type is a stability contract — keep implementation types off the surface and expose only the intended API.
Logging is not universal — Only 18/30 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `plugins/ruflo-ai-team`, `plugins/ruflo-arena`, `plugins/ruflo-chatgpt-federation`, `plugins/ruflo-x-gateway` and 7 more.
X2 · Cancellation propagation· Not all async functions that make a request accept an AbortSignal · ×1
Not all async functions that make a request accept an AbortSignal — Only 70/118 async functions that make a cancellable request (fetch, axios, ky, ofetch) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
X5 · Nullable reference types· Strict null checking is not enabled everywhere the repository type-checks · ×1
Strict null checking is not enabled everywhere the repository type-checks — 83/84 of this repository's type-checking configuration(s) turn on strict null checking (`"strict": true`, or `"strictNullChecks": true`). A configuration that states neither is counted as OFF, because off is tsc's own default; a solution-style one whose `"files"` is empty and whose `"references"` point at other projects is in neither number, because it checks no source itself. Where it is off, `string` admits `null` and `undefined`: passing a value that is null compiles silently and throws on the first property access.
Null assertions (`!`) reduce the strict null checking score — ~1.6 `!` null assertions per 1k TypeScript source lines — 1007 assertion(s) across the 630604 source line(s) of the 2198 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: v3/plugins/hyperbolic-reasoning/src/bridges/gnn-bridge.ts (32), v3/plugins/neural-coordination/src/mcp-tools.ts (30), v3/@claude-flow/memory/src/sqlite-backend.ts (27). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce.
Skipped (documented): accepts an existing file under a symlinked prefix v3/@claude-flow/security/__tests__/path-validator.test.ts:398— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): accepts a not-yet-created file under a symlinked prefix v3/@claude-flow/security/__tests__/path-validator.test.ts:415— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): still rejects a symlink that escapes the prefix v3/@claude-flow/security/__tests__/path-validator.test.ts:429— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): rejects a not-yet-created file under an escaping symlink v3/@claude-flow/security/__tests__/path-validator.test.ts:446— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): keeps validateSync lexical, so a symlinked prefix still matches v3/@claude-flow/security/__tests__/path-validator.test.ts:462— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): does not canonicalize when non-existent paths are forbidden v3/@claude-flow/security/__tests__/path-validator.test.ts:478— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
Skipped (documented): pins an allowed prefix to the directory it named at construction v3/@claude-flow/security/__tests__/path-validator.test.ts:495— 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) v3/@claude-flow/security/__tests__/safe-git.test.ts:45— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): (unnamed test) v3/@claude-flow/providers/src/__tests__/provider-integration.test.ts:50— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) v3/@claude-flow/providers/src/__tests__/provider-integration.test.ts:76— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) v3/@claude-flow/providers/src/__tests__/provider-integration.test.ts:107— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) v3/@claude-flow/providers/src/__tests__/provider-integration.test.ts:136— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) v3/@claude-flow/providers/src/__tests__/provider-integration.test.ts:275— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) v3/@claude-flow/providers/src/__tests__/provider-integration.test.ts:338— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) v3/@claude-flow/providers/src/__tests__/provider-integration.test.ts:377— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) v3/@claude-flow/memory/src/agentdb-native-driver.test.ts:138— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) v3/@claude-flow/memory/src/agentdb-native-driver.test.ts:147— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) v3/@claude-flow/codex/tests/worktrees.test.ts:64— Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
Skipped (documented): (unnamed test) v3/@claude-flow/cli/__tests__/agentbbs-tools.test.ts:158— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) v3/@claude-flow/cli/__tests__/agentbbs-tools.test.ts:172— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) v3/@claude-flow/cli/__tests__/agentbbs-tools.test.ts:187— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) v3/@claude-flow/cli/__tests__/agentbbs-tools.test.ts:200— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) v3/@claude-flow/cli/__tests__/agenticow-speculate-tools.test.ts:77— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) v3/@claude-flow/cli/__tests__/agenticow-speculate-tools.test.ts:139— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Skipped (documented): (unnamed test) v3/@claude-flow/cli/__tests__/agenticow-speculate-tools.test.ts:172— Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
Off the main sequence: gastown-shared — gastown-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.
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 49 file(s) — `plugins/ruflo-arena/src/mcp-tools/index.ts`, `plugins/ruflo-console/hooks/events-ui.ts`, `plugins/ruflo-console/hooks/loops.ts`, `plugins/ruflo-console/hooks/mission-create.ts`, `plugins/ruflo-console/hooks/state.ts`, … (+44 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 — The repository ships application workloads but no cluster-governance resources (CRDs, admission webhooks, or a committed policy engine). Runtime threat-detection (Falco/Tetragon) and admission control (Kyverno/OPA-Gatekeeper/PodSecurity) are cluster-OPERATOR controls owned by the platform, not shipped by an application repo/chart — nothing for this repo to assess.
Run 01a1788b-3f9a-7d79-96da-2faa116bc383 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 742 · Warnings: 3348 · Recommendations: 1084 · Info: 93 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 26-10-2026 @ 14:09 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.