Public report of HKUDS/CLI-Anything, published 25 October 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.10.5). Watchdog signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 25 October 2026, 07:36 UTC · Survey ID cd_a3342879988444a4adff0a0949cb9f66
HKUDS/CLI-Anything
Measured 25 October 2026, 07:35 UTC, at code version 34f5195
A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.
Code coverage is not measured: .NET and JavaScript/TypeScript suite (CouldNotMeasureNoCollector, CouldNotMeasureRanButNoData).
CAI scoreWeak
CriticalWeakAdequateStrongExemplary
Down 2 since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A large codebase: 203,360 lines of product code in 13 projects, tests not counted · Estimated rebuild effort: about 2.1 person-years · Weakest lens: Code Health, 31
Findings by how serious they are
97 critical1312 serious285 minor
5 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
25 October 2026, 07:35 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds Watchdog. It is open to any tool that
implements it, and today Watchdog is the only one that does.
The score is deterministic, which means the same code always gets the same score. Watchdog works it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
76of 82 dimensions measured by tools. The other 6 are advisory notes from an AI model, which explain the code but don't count towards the score.
1655of 1694 findings point to an exact file and line, so you can open each one in the code. The other 39 concern the repository as a whole, such as missing documentation.
82dimensions across 6 lenses, read from 203,360 lines of product code in 13 projects.
HKUDS/CLI-Anything scores 44 out of 100 and is rated Weak, while four of its six lenses score higher still: Architecture at 100, rated Exemplary, Maturity at 81, rated Strong, and Security and Compliance at 65 and Performance at 60, both rated Adequate. The project hasn't declared a stable release yet, so its lenses are rated against a lower bar than a released product's, while the score itself is worked out as for any repository.
The score is lower than those four because the weakest lens counts most, and here that is Code Health, which scores 31 and is rated Weak. Its Type Safety dimension scores 0 out of 10, and until that reaches 4, Code Health can't be rated higher than Adequate. The first actions are to resolve the 8 EmptyCatchBlock finding(s) in Explicit Debt and to resolve the 4 Banned license finding(s) in License Compliance, and if Code Health rose to 70, the score would rise from 44 to about 54.
97 findings are critical: 55 in Knowledge Freshness, 21 in Static Analysis (SAST), eight in Explicit Debt, four in Dependency Vulnerabilities, four in License Compliance, four in Secrets (history) and one in Dependency Hygiene.
Watchdog couldn't measure 5 dimensions in this code, among them Test Reliability, Dependency Hygiene and Navigability, so they are left out of the score. The product code is 203,360 lines, which would take an estimated 2.1 person-years, around €300,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.
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: 6 findings
These 6 critical or serious findings were in the previous survey, on 11 October 2026, and are gone from this one.
Dependency Vulnerabilities · High CVE: [GHSA redacted] REDACTED
Dependency Vulnerabilities · Medium CVE: [GHSA redacted] REDACTED
Supply-chain Provenance & Signing REDACTED
Exception handling · Swallowed exception (caught, then discarded) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs
Exception handling · Swallowed exception (caught, then discarded) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Helpers.cs
Rebuild cost: about €300,000 · Estimate
Cost to rebuild
€100,000 to €500,000, for 1,670 to 5,315 hours of work, about 2.1 person-years for 1 to 4 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.7 at a score of 44. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Large: 203,360 lines of product code
Comment lines
The estimate prices 203,216 lines. Comment lines count towards the size of 203,360 lines but aren't priced as work.
How the estimate is made: Watchdog prices the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Resolve the 8 EmptyCatchBlock finding(s) in Explicit Debt — start with BridgeMod.MultiplayerState.cs (4), BridgeMod.Helpers.cs (2), BridgeMod.StateBuilder.cs.
Raises the score by about 9 points · Low effort · Explicit Debt
2
Resolve the 4 Banned license finding(s) in License Compliance.
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
Raises the score by about 5 points · Medium effort · Type Safety
Diagnosis: what the measurements show together
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €300,000 to build again, about 2.1 person-years of work. Its weakest lens is Code Health, at 31 (Weak). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first · First action
Resolve the 8 EmptyCatchBlock finding(s) in Explicit Debt. Of all the actions in this report, it raises the score most for the work it takes: about 9 points for low effort, because it clears the 8 Explicit Debt findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 7.0 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 3% to 6% on every change. The history of the code shows how much it changes: about 5,520 lines over the last 90 days, which is about 22,387 lines a year. At that pace, the extra work comes to an estimated 1.4 to 8.6 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of Watchdog's own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
394 modules, with 99 dependencies between them. Every module uses only modules listed above it, so there are no loops.
The table shows the 40 modules with the most connections; 354 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.
3MF.agent-harness.cli_anything.threemf.core uses 3MF.agent-harness.cli_anything.threemf.core.inspector, so a change to 3MF.agent-harness.cli_anything.threemf.core.inspector can break 3MF.agent-harness.cli_anything.threemf.core, while a change to 3MF.agent-harness.cli_anything.threemf.core can't break 3MF.agent-harness.cli_anything.threemf.core.inspector.
Position
Below the diagonal: 3MF.agent-harness.cli_anything.threemf.core uses a module listed above it, which is the healthy direction.
3MF.agent-harness.cli_anything.threemf.core uses 3MF.agent-harness.cli_anything.threemf.core.parser, so a change to 3MF.agent-harness.cli_anything.threemf.core.parser can break 3MF.agent-harness.cli_anything.threemf.core, while a change to 3MF.agent-harness.cli_anything.threemf.core can't break 3MF.agent-harness.cli_anything.threemf.core.parser.
Position
Below the diagonal: 3MF.agent-harness.cli_anything.threemf.core uses a module listed above it, which is the healthy direction.
3MF.agent-harness.cli_anything.threemf.utils uses 3MF.agent-harness.cli_anything.threemf.core.parser, so a change to 3MF.agent-harness.cli_anything.threemf.core.parser can break 3MF.agent-harness.cli_anything.threemf.utils, while a change to 3MF.agent-harness.cli_anything.threemf.utils can't break 3MF.agent-harness.cli_anything.threemf.core.parser.
Position
Below the diagonal: 3MF.agent-harness.cli_anything.threemf.utils uses a module listed above it, which is the healthy direction.
QGIS.agent-harness.cli_anything.qgis uses QGIS.agent-harness.cli_anything.qgis.core.session, so a change to QGIS.agent-harness.cli_anything.qgis.core.session can break QGIS.agent-harness.cli_anything.qgis, while a change to QGIS.agent-harness.cli_anything.qgis can't break QGIS.agent-harness.cli_anything.qgis.core.session.
Position
Below the diagonal: QGIS.agent-harness.cli_anything.qgis uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in adguardhome.agent-harness.cli_anything.adguardhome uses a type in adguardhome.agent-harness.cli_anything.adguardhome.utils.adguardhome_backend.
adguardhome.agent-harness.cli_anything.adguardhome uses adguardhome.agent-harness.cli_anything.adguardhome.utils.adguardhome_backend, so a change to adguardhome.agent-harness.cli_anything.adguardhome.utils.adguardhome_backend can break adguardhome.agent-harness.cli_anything.adguardhome, while a change to adguardhome.agent-harness.cli_anything.adguardhome can't break adguardhome.agent-harness.cli_anything.adguardhome.utils.adguardhome_backend.
Position
Below the diagonal: adguardhome.agent-harness.cli_anything.adguardhome uses a module listed above it, which is the healthy direction.
8 pairs of types, where a type in adguardhome.agent-harness.cli_anything.adguardhome.core uses a type in adguardhome.agent-harness.cli_anything.adguardhome.utils.adguardhome_backend.
adguardhome.agent-harness.cli_anything.adguardhome.core uses adguardhome.agent-harness.cli_anything.adguardhome.utils.adguardhome_backend, so a change to adguardhome.agent-harness.cli_anything.adguardhome.utils.adguardhome_backend can break adguardhome.agent-harness.cli_anything.adguardhome.core, while a change to adguardhome.agent-harness.cli_anything.adguardhome.core can't break adguardhome.agent-harness.cli_anything.adguardhome.utils.adguardhome_backend.
Position
Below the diagonal: adguardhome.agent-harness.cli_anything.adguardhome.core uses a module listed above it, which is the healthy direction.
anygen.agent-harness.cli_anything.anygen uses anygen.agent-harness.cli_anything.anygen.core.session, so a change to anygen.agent-harness.cli_anything.anygen.core.session can break anygen.agent-harness.cli_anything.anygen, while a change to anygen.agent-harness.cli_anything.anygen can't break anygen.agent-harness.cli_anything.anygen.core.session.
Position
Below the diagonal: anygen.agent-harness.cli_anything.anygen uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in audacity.agent-harness.cli_anything.audacity uses a type in audacity.agent-harness.cli_anything.audacity.core.session.
audacity.agent-harness.cli_anything.audacity uses audacity.agent-harness.cli_anything.audacity.core.session, so a change to audacity.agent-harness.cli_anything.audacity.core.session can break audacity.agent-harness.cli_anything.audacity, while a change to audacity.agent-harness.cli_anything.audacity can't break audacity.agent-harness.cli_anything.audacity.core.session.
Position
Below the diagonal: audacity.agent-harness.cli_anything.audacity uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in joplin.agent-harness.cli_anything.joplin uses a type in joplin.agent-harness.cli_anything.joplin.utils.joplin_backend.
joplin.agent-harness.cli_anything.joplin uses joplin.agent-harness.cli_anything.joplin.utils.joplin_backend, so a change to joplin.agent-harness.cli_anything.joplin.utils.joplin_backend can break joplin.agent-harness.cli_anything.joplin, while a change to joplin.agent-harness.cli_anything.joplin can't break joplin.agent-harness.cli_anything.joplin.utils.joplin_backend.
Position
Below the diagonal: joplin.agent-harness.cli_anything.joplin uses a module listed above it, which is the healthy direction.
3 pairs of types, where a type in macrocli.agent-harness.cli_anything.macrocli.backends.file_transform uses a type in macrocli.agent-harness.cli_anything.macrocli.backends.base.
macrocli.agent-harness.cli_anything.macrocli.backends.file_transform uses macrocli.agent-harness.cli_anything.macrocli.backends.base, so a change to macrocli.agent-harness.cli_anything.macrocli.backends.base can break macrocli.agent-harness.cli_anything.macrocli.backends.file_transform, while a change to macrocli.agent-harness.cli_anything.macrocli.backends.file_transform can't break macrocli.agent-harness.cli_anything.macrocli.backends.base.
Position
Below the diagonal: macrocli.agent-harness.cli_anything.macrocli.backends.file_transform uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in macrocli.agent-harness.cli_anything.macrocli.backends.file_transform uses a type in macrocli.agent-harness.cli_anything.macrocli.core.macro_model.
macrocli.agent-harness.cli_anything.macrocli.backends.file_transform uses macrocli.agent-harness.cli_anything.macrocli.core.macro_model, so a change to macrocli.agent-harness.cli_anything.macrocli.core.macro_model can break macrocli.agent-harness.cli_anything.macrocli.backends.file_transform, while a change to macrocli.agent-harness.cli_anything.macrocli.backends.file_transform can't break macrocli.agent-harness.cli_anything.macrocli.core.macro_model.
Position
Below the diagonal: macrocli.agent-harness.cli_anything.macrocli.backends.file_transform uses a module listed above it, which is the healthy direction.
3 pairs of types, where a type in macrocli.agent-harness.cli_anything.macrocli.backends.gui_agent uses a type in macrocli.agent-harness.cli_anything.macrocli.backends.base.
macrocli.agent-harness.cli_anything.macrocli.backends.gui_agent uses macrocli.agent-harness.cli_anything.macrocli.backends.base, so a change to macrocli.agent-harness.cli_anything.macrocli.backends.base can break macrocli.agent-harness.cli_anything.macrocli.backends.gui_agent, while a change to macrocli.agent-harness.cli_anything.macrocli.backends.gui_agent can't break macrocli.agent-harness.cli_anything.macrocli.backends.base.
Position
Below the diagonal: macrocli.agent-harness.cli_anything.macrocli.backends.gui_agent uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in macrocli.agent-harness.cli_anything.macrocli.backends.gui_agent uses a type in macrocli.agent-harness.cli_anything.macrocli.core.macro_model.
macrocli.agent-harness.cli_anything.macrocli.backends.gui_agent uses macrocli.agent-harness.cli_anything.macrocli.core.macro_model, so a change to macrocli.agent-harness.cli_anything.macrocli.core.macro_model can break macrocli.agent-harness.cli_anything.macrocli.backends.gui_agent, while a change to macrocli.agent-harness.cli_anything.macrocli.backends.gui_agent can't break macrocli.agent-harness.cli_anything.macrocli.core.macro_model.
Position
Below the diagonal: macrocli.agent-harness.cli_anything.macrocli.backends.gui_agent uses a module listed above it, which is the healthy direction.
3 pairs of types, where a type in macrocli.agent-harness.cli_anything.macrocli.backends.gui_macro uses a type in macrocli.agent-harness.cli_anything.macrocli.backends.base.
macrocli.agent-harness.cli_anything.macrocli.backends.gui_macro uses macrocli.agent-harness.cli_anything.macrocli.backends.base, so a change to macrocli.agent-harness.cli_anything.macrocli.backends.base can break macrocli.agent-harness.cli_anything.macrocli.backends.gui_macro, while a change to macrocli.agent-harness.cli_anything.macrocli.backends.gui_macro can't break macrocli.agent-harness.cli_anything.macrocli.backends.base.
Position
Below the diagonal: macrocli.agent-harness.cli_anything.macrocli.backends.gui_macro uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in macrocli.agent-harness.cli_anything.macrocli.backends.gui_macro uses a type in macrocli.agent-harness.cli_anything.macrocli.core.macro_model.
macrocli.agent-harness.cli_anything.macrocli.backends.gui_macro uses macrocli.agent-harness.cli_anything.macrocli.core.macro_model, so a change to macrocli.agent-harness.cli_anything.macrocli.core.macro_model can break macrocli.agent-harness.cli_anything.macrocli.backends.gui_macro, while a change to macrocli.agent-harness.cli_anything.macrocli.backends.gui_macro can't break macrocli.agent-harness.cli_anything.macrocli.core.macro_model.
Position
Below the diagonal: macrocli.agent-harness.cli_anything.macrocli.backends.gui_macro uses a module listed above it, which is the healthy direction.
3 pairs of types, where a type in macrocli.agent-harness.cli_anything.macrocli.backends.native_api uses a type in macrocli.agent-harness.cli_anything.macrocli.backends.base.
macrocli.agent-harness.cli_anything.macrocli.backends.native_api uses macrocli.agent-harness.cli_anything.macrocli.backends.base, so a change to macrocli.agent-harness.cli_anything.macrocli.backends.base can break macrocli.agent-harness.cli_anything.macrocli.backends.native_api, while a change to macrocli.agent-harness.cli_anything.macrocli.backends.native_api can't break macrocli.agent-harness.cli_anything.macrocli.backends.base.
Position
Below the diagonal: macrocli.agent-harness.cli_anything.macrocli.backends.native_api uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in macrocli.agent-harness.cli_anything.macrocli.backends.native_api uses a type in macrocli.agent-harness.cli_anything.macrocli.core.macro_model.
macrocli.agent-harness.cli_anything.macrocli.backends.native_api uses macrocli.agent-harness.cli_anything.macrocli.core.macro_model, so a change to macrocli.agent-harness.cli_anything.macrocli.core.macro_model can break macrocli.agent-harness.cli_anything.macrocli.backends.native_api, while a change to macrocli.agent-harness.cli_anything.macrocli.backends.native_api can't break macrocli.agent-harness.cli_anything.macrocli.core.macro_model.
Position
Below the diagonal: macrocli.agent-harness.cli_anything.macrocli.backends.native_api uses a module listed above it, which is the healthy direction.
3 pairs of types, where a type in macrocli.agent-harness.cli_anything.macrocli.backends.recovery uses a type in macrocli.agent-harness.cli_anything.macrocli.backends.base.
macrocli.agent-harness.cli_anything.macrocli.backends.recovery uses macrocli.agent-harness.cli_anything.macrocli.backends.base, so a change to macrocli.agent-harness.cli_anything.macrocli.backends.base can break macrocli.agent-harness.cli_anything.macrocli.backends.recovery, while a change to macrocli.agent-harness.cli_anything.macrocli.backends.recovery can't break macrocli.agent-harness.cli_anything.macrocli.backends.base.
Position
Below the diagonal: macrocli.agent-harness.cli_anything.macrocli.backends.recovery uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in macrocli.agent-harness.cli_anything.macrocli.backends.recovery uses a type in macrocli.agent-harness.cli_anything.macrocli.core.macro_model.
macrocli.agent-harness.cli_anything.macrocli.backends.recovery uses macrocli.agent-harness.cli_anything.macrocli.core.macro_model, so a change to macrocli.agent-harness.cli_anything.macrocli.core.macro_model can break macrocli.agent-harness.cli_anything.macrocli.backends.recovery, while a change to macrocli.agent-harness.cli_anything.macrocli.backends.recovery can't break macrocli.agent-harness.cli_anything.macrocli.core.macro_model.
Position
Below the diagonal: macrocli.agent-harness.cli_anything.macrocli.backends.recovery uses a module listed above it, which is the healthy direction.
3 pairs of types, where a type in macrocli.agent-harness.cli_anything.macrocli.backends.semantic_ui uses a type in macrocli.agent-harness.cli_anything.macrocli.backends.base.
macrocli.agent-harness.cli_anything.macrocli.backends.semantic_ui uses macrocli.agent-harness.cli_anything.macrocli.backends.base, so a change to macrocli.agent-harness.cli_anything.macrocli.backends.base can break macrocli.agent-harness.cli_anything.macrocli.backends.semantic_ui, while a change to macrocli.agent-harness.cli_anything.macrocli.backends.semantic_ui can't break macrocli.agent-harness.cli_anything.macrocli.backends.base.
Position
Below the diagonal: macrocli.agent-harness.cli_anything.macrocli.backends.semantic_ui uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in macrocli.agent-harness.cli_anything.macrocli.backends.semantic_ui uses a type in macrocli.agent-harness.cli_anything.macrocli.core.macro_model.
macrocli.agent-harness.cli_anything.macrocli.backends.semantic_ui uses macrocli.agent-harness.cli_anything.macrocli.core.macro_model, so a change to macrocli.agent-harness.cli_anything.macrocli.core.macro_model can break macrocli.agent-harness.cli_anything.macrocli.backends.semantic_ui, while a change to macrocli.agent-harness.cli_anything.macrocli.backends.semantic_ui can't break macrocli.agent-harness.cli_anything.macrocli.core.macro_model.
Position
Below the diagonal: macrocli.agent-harness.cli_anything.macrocli.backends.semantic_ui uses a module listed above it, which is the healthy direction.
3 pairs of types, where a type in macrocli.agent-harness.cli_anything.macrocli.backends.visual_anchor uses a type in macrocli.agent-harness.cli_anything.macrocli.backends.base.
macrocli.agent-harness.cli_anything.macrocli.backends.visual_anchor uses macrocli.agent-harness.cli_anything.macrocli.backends.base, so a change to macrocli.agent-harness.cli_anything.macrocli.backends.base can break macrocli.agent-harness.cli_anything.macrocli.backends.visual_anchor, while a change to macrocli.agent-harness.cli_anything.macrocli.backends.visual_anchor can't break macrocli.agent-harness.cli_anything.macrocli.backends.base.
Position
Below the diagonal: macrocli.agent-harness.cli_anything.macrocli.backends.visual_anchor uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in macrocli.agent-harness.cli_anything.macrocli.backends.visual_anchor uses a type in macrocli.agent-harness.cli_anything.macrocli.core.macro_model.
macrocli.agent-harness.cli_anything.macrocli.backends.visual_anchor uses macrocli.agent-harness.cli_anything.macrocli.core.macro_model, so a change to macrocli.agent-harness.cli_anything.macrocli.core.macro_model can break macrocli.agent-harness.cli_anything.macrocli.backends.visual_anchor, while a change to macrocli.agent-harness.cli_anything.macrocli.backends.visual_anchor can't break macrocli.agent-harness.cli_anything.macrocli.core.macro_model.
Position
Below the diagonal: macrocli.agent-harness.cli_anything.macrocli.backends.visual_anchor uses a module listed above it, which is the healthy direction.
3 pairs of types, where a type in macrocli.agent-harness.cli_anything.macrocli.core.routing uses a type in macrocli.agent-harness.cli_anything.macrocli.backends.base.
macrocli.agent-harness.cli_anything.macrocli.core.routing uses macrocli.agent-harness.cli_anything.macrocli.backends.base, so a change to macrocli.agent-harness.cli_anything.macrocli.backends.base can break macrocli.agent-harness.cli_anything.macrocli.core.routing, while a change to macrocli.agent-harness.cli_anything.macrocli.core.routing can't break macrocli.agent-harness.cli_anything.macrocli.backends.base.
Position
Below the diagonal: macrocli.agent-harness.cli_anything.macrocli.core.routing uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in macrocli.agent-harness.cli_anything.macrocli.core.routing uses a type in macrocli.agent-harness.cli_anything.macrocli.core.macro_model.
macrocli.agent-harness.cli_anything.macrocli.core.routing uses macrocli.agent-harness.cli_anything.macrocli.core.macro_model, so a change to macrocli.agent-harness.cli_anything.macrocli.core.macro_model can break macrocli.agent-harness.cli_anything.macrocli.core.routing, while a change to macrocli.agent-harness.cli_anything.macrocli.core.routing can't break macrocli.agent-harness.cli_anything.macrocli.core.macro_model.
Position
Below the diagonal: macrocli.agent-harness.cli_anything.macrocli.core.routing uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in macrocli.agent-harness.cli_anything.macrocli.core.runtime uses a type in macrocli.agent-harness.cli_anything.macrocli.core.macro_model.
macrocli.agent-harness.cli_anything.macrocli.core.runtime uses macrocli.agent-harness.cli_anything.macrocli.core.macro_model, so a change to macrocli.agent-harness.cli_anything.macrocli.core.macro_model can break macrocli.agent-harness.cli_anything.macrocli.core.runtime, while a change to macrocli.agent-harness.cli_anything.macrocli.core.runtime can't break macrocli.agent-harness.cli_anything.macrocli.core.macro_model.
Position
Below the diagonal: macrocli.agent-harness.cli_anything.macrocli.core.runtime uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in safari.agent-harness.cli_anything.safari uses a type in safari.agent-harness.cli_anything.safari.utils.tool_registry.
safari.agent-harness.cli_anything.safari uses safari.agent-harness.cli_anything.safari.utils.tool_registry, so a change to safari.agent-harness.cli_anything.safari.utils.tool_registry can break safari.agent-harness.cli_anything.safari, while a change to safari.agent-harness.cli_anything.safari can't break safari.agent-harness.cli_anything.safari.utils.tool_registry.
Position
Below the diagonal: safari.agent-harness.cli_anything.safari uses a module listed above it, which is the healthy direction.
siyuan.agent-harness.cli_anything.siyuan uses siyuan.agent-harness.cli_anything.siyuan.core.client, so a change to siyuan.agent-harness.cli_anything.siyuan.core.client can break siyuan.agent-harness.cli_anything.siyuan, while a change to siyuan.agent-harness.cli_anything.siyuan can't break siyuan.agent-harness.cli_anything.siyuan.core.client.
Position
Below the diagonal: siyuan.agent-harness.cli_anything.siyuan uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in zotero.agent-harness.cli_anything.zotero.core.discovery uses a type in zotero.agent-harness.cli_anything.zotero.utils.zotero_paths.
zotero.agent-harness.cli_anything.zotero.core.discovery uses zotero.agent-harness.cli_anything.zotero.utils.zotero_paths, so a change to zotero.agent-harness.cli_anything.zotero.utils.zotero_paths can break zotero.agent-harness.cli_anything.zotero.core.discovery, while a change to zotero.agent-harness.cli_anything.zotero.core.discovery can't break zotero.agent-harness.cli_anything.zotero.utils.zotero_paths.
Position
Below the diagonal: zotero.agent-harness.cli_anything.zotero.core.discovery uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in zotero.agent-harness.cli_anything.zotero.utils uses a type in zotero.agent-harness.cli_anything.zotero.utils.zotero_paths.
zotero.agent-harness.cli_anything.zotero.utils uses zotero.agent-harness.cli_anything.zotero.utils.zotero_paths, so a change to zotero.agent-harness.cli_anything.zotero.utils.zotero_paths can break zotero.agent-harness.cli_anything.zotero.utils, while a change to zotero.agent-harness.cli_anything.zotero.utils can't break zotero.agent-harness.cli_anything.zotero.utils.zotero_paths.
Position
Below the diagonal: zotero.agent-harness.cli_anything.zotero.utils uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in macrocli.agent-harness.cli_anything.macrocli uses a type in macrocli.agent-harness.cli_anything.macrocli.core.runtime.
macrocli.agent-harness.cli_anything.macrocli uses macrocli.agent-harness.cli_anything.macrocli.core.runtime, so a change to macrocli.agent-harness.cli_anything.macrocli.core.runtime can break macrocli.agent-harness.cli_anything.macrocli, while a change to macrocli.agent-harness.cli_anything.macrocli can't break macrocli.agent-harness.cli_anything.macrocli.core.runtime.
Position
Below the diagonal: macrocli.agent-harness.cli_anything.macrocli uses a module listed above it, which is the healthy direction.
zotero.agent-harness.cli_anything.zotero uses zotero.agent-harness.cli_anything.zotero.core.discovery, so a change to zotero.agent-harness.cli_anything.zotero.core.discovery can break zotero.agent-harness.cli_anything.zotero, while a change to zotero.agent-harness.cli_anything.zotero can't break zotero.agent-harness.cli_anything.zotero.core.discovery.
Position
Below the diagonal: zotero.agent-harness.cli_anything.zotero uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 31% · Weak · gated by D2, R1, R2, X1, X3 ·
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
57
High / Critical
A03:2025 — Software Supply Chain Failures
11
High / Critical
A07:2025 — Authentication Failures
5
High / Critical
Roadmap
Begin by resolving the eight empty catch blocks in the Explicit Debt dimension, prioritizing the identified files in BridgeMod, and simultaneously address the four banned license findings to ensure compliance. Shift the frontend to TypeScript by adding a typecheck step to the build process and progressively typing the existing JavaScript modules, starting with the highest-traffic ones. Refactor branch-heavy functions to reduce cyclomatic complexity to a manageable level, and improve test distribution by expanding integration and BDD coverage alongside the existing unit and end-to-end suites.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 8 EmptyCatchBlock finding(s) in Explicit Debt — start with BridgeMod.MultiplayerState.cs (4), BridgeMod.Helpers.cs (2), BridgeMod.StateBuilder.cs.
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
Add a SAST step to CI running what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — so a security regression fails the build instead of landing.
TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.
Every finding carries one of four grades. Three say how serious it is. The fourth says this
survey could not settle it — and it is a grade, not a gap.
Critical — 97
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 — 1312
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 — 285
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 5
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 76 of 82 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 6 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.
Every figure here is one of three kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact; ◐ Advisory — an LLM prose judgement. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.
What we checked — 82 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 1655 of 1694 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.
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 13 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 229 test source file(s) (.py) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability NOT SCORED: this repository's production source includes .py, and the python executor ran against the .py half and did not finish re-running within its tier budget — so reliability was not measured for the repository as a whole. The JavaScript/TypeScript (jest via `npm ci --ignore-scripts` in sketch/agent-harness/ (25 tests)): measured (0 flaky) suite(s) did re-run, and came back with 0 flaky across 1 measured tier(s) — but that is a figure for one half of the product, and we do not publish a partial one as if it were complete. This is OUR limitation, not a defect in the repo — test reliability is excluded from the score rather than counted. The half was driven by a runner we ship, so this is not a missing-runner gap.
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 — 21 shipped Python distribution(s) were read, but the outdated signal needs pypi.org, and no declaration here carries an exact pin to ask about — a floor or a range installs the newest release it admits and cannot be behind one, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
D17 Explicit Debt — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The C# workspace loaded this repository's projects but reported a load failure, and the dead-code reference search is unreliable over a graph that did not load cleanly, so it was skipped. The other debt markers on this row were read; dead symbols were not, and their absence from the score is not a finding that the code has none. First load diagnostic: Failure: Msbuild failed when processing the file 'slay_the_spire_ii/agent-harness/bridge/plugin/STS2_Bridge.csproj' with message: STS2GameDataDir is invalid. Expected sts2.dll at /path/to/sts2/data_dir/sts2.dll.
D17 Explicit Debt — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 8 deducted marker(s) and the 1.4/KLoC density on this row were taken over this repository's .NET projects ALONE: .py (194,709 lines, 98% of production source) went unread, because every marker collector on this path is reached through a C# workspace. A read-only sweep of that source finds at least 1 task marker(s) (TODO/FIXME/HACK/XXX) across 1 file(s) that this score does not count — a floor, since only line comments are read there and D17's other eight marker kinds (suppressions, NoWarn, editorconfig severities, empty catches, commented-out code, Obsolete, dead code, preprocessor branches) need a compiler we do not have for that language. The debt in that source is UNMEASURED — its absence from the score above is a gap in this analyzer's language coverage, not a finding that the code carries none.
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.
D39 IL Efficiency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. IL NOT MEASURED: the analyzer's own build of this repository failed for an ENVIRONMENT reason (exit 1) — MSBuild's engine or the CLR gave up, or our image does not carry the SDK band/targeting pack this repository needs. This is OUR limitation, not a defect in the repo, and it is not a statement that this repository fails to build. D18 owns the question of whether this repository builds; it was not answered here.
AXB1 Runtime evidence locked — no reproducible boot — 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. Subject: an API surface definition (docs/hub/openapi.json) — a service to probe even with no user interface. The Runtime Evidence tier boots an app only via docker-compose, an Aspire AppHost, a Dockerfile, an npm dev script, a web service's own toolchain entry point (cargo, go, dotnet, Python, Spring Boot), or an Android app's own Gradle wrapper (run on an emulator); an Apple or Flutter app needs a host it lacks. None applied, so no live runtime a11y/egress/header evidence was collected. You can widen what we reach: add a docker-compose.yml (or an Aspire AppHost) that brings the app up with its dependencies. Watchdog then boots it in an isolated sandbox and gathers real runtime evidence — you change nothing in your pipeline (no CI step, no SDK).
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D7 Architectural Integrity: Layering is checked against detected/declared rules — an architecture whose boundaries live in convention or in code review, not in a rule a scanner can read, is not enforced here.
D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
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.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
D22 Internal API Consistency: API-surface coherence is an LLM judgement over a sample of the public surface — consistency of intent across the whole API is approximated, not exhaustively verified.
D24 Comment Value: Comment value (WHY vs WHAT) is an LLM judgement over a bounded sample — it is advisory and cannot weigh a comment against the precise code change it was written to explain.
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.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
M4 Documentation accuracy: 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.
The LLM boundary
LLM-set scores this run (6): D19, D20, D21, D22, D24, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.
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.
165 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was shotcut_cli._run_repl at 130. A further 2 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 BridgeMod.ExecuteMultiplayerAction at 26 — they are counted neither in the figure above nor in this dimension's score. 1 file carries no cyclomatic complexity row at all for this reason — every one of its over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerActions.cs (BridgeMod.ExecuteMultiplayerAction at 26). 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.
+ 154 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 4 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with shotcut_cli._run_repl (cyclomatic 130), mubu_probe.main (cyclomatic 104), video_doctor.caption_doctor (cyclomatic 73). — 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 Cyclomatic Complexity from 5.7 to about 6.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 353 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 fixers.autofix (cognitive 226), shotcut_cli._run_repl (cognitive 210), mubu_probe.main (cognitive 187). — 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 3.6 to about 4.6/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 60 FileTooLong finding(s) in God Classes — start with preview.py (4), freecad_live_preview_demo.py, freecad_cli.py. — One of this dimension's main actionable groups (60 warning-level).
Resolve the 5 TooManyMethods finding(s) in God Classes — start with firefly_iii_backend.py, BridgeMod.Actions.cs, dap.py. — One of this dimension's main actionable groups (5 warning-level).
Resolve the 1 MethodTooLong finding(s) in God Classes — start with BridgeMod.MultiplayerState.cs. — One of this dimension's main actionable groups (1 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.
581 duplicated block group(s) detected. A further 66 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted.
+ 254 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 31 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with BridgeMod.Formatting.cs (4), blender_orbital_relay_drone_demo.py (2), mubu_cli.py (2). — One of this dimension's main actionable groups (31 warning-level).
Resolve the 31 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with melt_backend.py (3), minimax_cli.py (3), blender_preview_story_demo.py (2). — One of this dimension's main actionable groups (31 warning-level).
Resolve the 25 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with session.py (4), REDACTED (2), iterm2_ctl_cli.py (2). — One of this dimension's main actionable groups (25 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 · Coupling10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
13 production modules (npm+Python), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 0 module(s) off the main sequence, with abstractness counted on 12 of the 13 (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).
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
What it measures: Whether the code respects its intended layering / architecture rules.
Method: Enforcement rung (Prevented/Verified/Documented) per checkable ADR via Roslyn, plus dependency cycles via the engine shared with D5/AX3. Deterministic, exact.
All 1 mechanizable ADR(s) are enforced: 1 by analyzers, 0 by tests. Cycles found: 0.
✓ On the Gold path — maintain.
Detailed fixes: d7_recommendation.md.
Do you agree with this assessment?
D9 · Test Distribution7.0 / 10Adequate✓ 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.
5708 test methods: 4384 unit, 0 integration, 0 BDD, 1324 e2e. The JavaScript/TypeScript suite contributes 13 `it`/`test` case(s) across 2 test file(s) declaring at least one; its tier split is read from package names and paths only. The Python suite contributes 5695 test function(s) across 162 file(s) declaring at least one — every `def test…` in a file pytest or unittest would collect, which is those frameworks' own definition of a case; a parametrize table counts once, so this is a floor. Its tier split is read from file names and paths only.
What to do
Improve Test Distribution — currently 7.0/10. — 5708 test methods: 4384 unit, 0 integration, 0 BDD, 1324 e2e. The JavaScript/TypeScript suite contributes 13 `it`/`test` case(s) across 2 test file(s) declaring at least one; its tier split is read from package names and paths only. The Python suite contributes 5695 test function(s) across 162 file(s) declaring at least one — every `def test…` in a file pytest or unittest would collect, which is those frameworks' own definition of a case; a parametrize table counts once, so this is a floor. Its tier split is read from file names and paths only.
Detailed fixes: d9_recommendation.md.
Do you agree with this assessment?
D10 · Test Quality10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
0 skipped, 0 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 13 tests. Measured on the JavaScript/TypeScript suite only — at least 229 test source file(s) (.py) went unread, so its test quality is unmeasured and is not in these counts.
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.
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.
4 of 310 shipped Python distribution(s) use a banned license. Licences were resolved from PyPI over the distributions a consumer installs — this repository's 21 declared runtime requirement(s) closed transitively over each distribution's published `requires_dist` (289 reached that way). Requirements it states ONLY under an extra, a PEP 735 dependency group, a Poetry dev group or a dev-named requirements file are excluded: pip does not install any of them for a consumer. ★ This repository commits no dependency lockfile that this pass reads, so each licence is the one PyPI publishes for the distribution's CURRENT release rather than for a pinned version. 19 of them publish no licence on PyPI this pass can read; that is missing data, not a violation, and none of them is charged. This repository publishes itself under MIT, which is its own choice and is not judged here.
Banned license: iterm2 · ×4
What to do
Resolve the 4 Banned license finding(s) in License Compliance. — One of this dimension's main actionable groups (4 issue-level).
Enforce License Compliance in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d14_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
98 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is sbox/agent-harness/cli_anything/sbox/sbox_cli.py. Counted over 522 of the 1037 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Off-boarding risk: anonymized user #1 · ×13
Further sole-owners (lower concentration)
What to do
Resolve the 13 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (13 recommendation-level).
Resolve the 1 Further sole-owners (lower concentration) finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
8 deducted debt markers + unmeasured dead symbols across 3914 LoC in the .NET projects (1.4/KLoC) → score 7.3. Dead code not measured: the solution did not load cleanly, so the reference search was skipped. Measured on the .NET source only: .py (98% of production source) was not read, and carries at least 1 uncounted task marker(s) in 1 file(s).
Resolve the 8 EmptyCatchBlock finding(s) in Explicit Debt — start with BridgeMod.MultiplayerState.cs (4), BridgeMod.Helpers.cs (2), BridgeMod.StateBuilder.cs. — One of this dimension's main actionable groups (8 issue-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: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.
CLI-Anything is a comprehensive open-source framework for generating stateful CLI interfaces for GUI applications. The root README (with the trending badge) and its cli-hub sibling describe the project clearly: it is a repository whose top-level directories document their own purposes (the cli-anything-plugin/ directory as an auto-generated harness plugin, cli-hub as a package manager for community CLIs), with both having installation, usage, and contribution guidance. The architecture/design docs are present but not shown in this summary; the XML-doc coverage is 0/9 for STS2_Bridge (a single document). (17 of 25 sampled documents could not be assessed: 2 of 3 evaluation groups failed.)
Resolve the 1 Low XML-doc coverage finding(s) in Documentation Quality — start with STS2_Bridge.csproj. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d19_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D20 · ADR QualityExemplary◐ Sampled · advisory
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.
0 naming inconsistencies across 194 sampled symbols.
✓ On the Gold path — maintain.
Detailed fixes: d21_recommendation.md.
Do you agree with this assessment?
D22 · Internal API ConsistencyWeak◐ Sampled · advisory
What it measures: Whether the internal API surface is consistent and coherent.
Method: Judged by language model at low temperature over a sample of the public API surface (IsPackable or .Contracts types). Sampled, advisory; confidence discounted by model uncertainty.
Duplicate intent across modules: The `cli` module exposes high-level CLI commands (install, uninstall, update) that appear to delegate to or duplicate the logic in the `installer` module (install_cli, uninstall_cli, update_cli). This creates ambiguity about whether the `cli` methods are thin wrappers or if the `installer` module is redundant/exposed unnecessarily.
Inconsistent naming for registry operations: `cli.list_clis` implies a listing operation, while `registry.fetch_all_clis` also lists but uses 'fetch'. Similarly, `cli.info(name)` maps to `registry.get_cli(name)`. The mix of 'list' vs 'fetch' and 'info' vs 'get' for similar data retrieval operations is inconsistent.
Inconsistent naming for search operations: `cli.matrix_search` vs `matrix.search_matrices`. The pluralization of the object being searched ('matrix' vs 'matrices') is inconsistent. Additionally, `matrix.search_capabilities` is distinct but follows a different pattern than `matrix.search_matrices`.
Inconsistent naming for preflight checks: `cli.matrix_preflight` vs `matrix.preflight_matrix`. The CLI method uses the noun-verb order (matrix_preflight) while the core module uses verb-noun (preflight_matrix).
Inconsistent naming for rendering operations: `cli.preview_html` vs `preview.render_html` and `preview.render_live_html`. The CLI uses 'preview' as a verb, while the core module uses 'render'. This suggests a mismatch in intent or abstraction level.
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 Duplicate intent across modules finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Inconsistent naming for registry operations finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Inconsistent naming for search operations finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d22_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D24 · Comment ValueExemplary◐ Sampled · advisory
What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).
Method: Judged by language model at low temperature (0.0-0.1) on deterministically sampled inline comments with surrounding code; findings verified back to sampled comments by substring match. Advisory, sampled.
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.
4 finding(s): 0 critical, 4 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
What to do
Resolve the 4 REDACTED finding(s) in Secrets (history) — start with REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (4 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).
57 finding(s): 0 critical, 21 high, 24 medium, 12 low. 18 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. Separately, one or more rules could not re-parse an embedded snippet in 1 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
+ 8 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
No action in Static Analysis (SAST) — all 18 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 (18 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.
Resolve the 4 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (4). — One of this dimension's main actionable groups (4 issue-level).
Resolve the 1 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Low CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d30_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.
249 of 522 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is REDACTED. Counted over 522 of the 1037 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Resolve the 194 Orphaned file finding(s) in Knowledge Freshness — start with session.py (14), project.py (7), REDACTED (6). — One of this dimension's main actionable groups (194 recommendation-level).
Resolve the 55 Orphaned knowledge finding(s) in Knowledge Freshness — start with repl_skin.py (34), REDACTED, live2d_cli.py. — One of this dimension's main actionable groups (55 issue-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.
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.
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
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 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.
1 end-of-life runtime(s) and 0 end-of-life framework(s), read from 1 platform declaration(s) and 21 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.
Resolve the 1 End-of-life runtime finding(s) in Platform End-of-Life — start with STS2_Bridge.csproj. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d44_recommendation.md · top locations in Appendix A, every location in findings.md.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
What to do
The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Other · Architecture — Whether the codebase has a recognisable, scale-appropriate structure (a named architectural style, or modular enough for its size) rather than being an ad-hoc ball of mud.
Method: Roslyn plus csproj analysis: architecture style detection (DDD, clean, vertical-slice, CQRS) and structure fitness for repo size. Deterministic.
Other · Architecture — Whether 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.
Other · Code Health — Unreviewed-generation residue: shipped members still throwing NotImplementedException, and placeholder string literals left in non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.
Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.
Other · Code Health — Unfinished work detected by code SHAPE, not keywords: members that only throw a "not implemented" exception, methods that take inputs and return a constant, async methods that never await, dead `if (false)` / `#if false` branches, and skeleton types most of whose members are holes. A real, objective slice of technical debt.
Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, guards that return what the code already falls through to, tests an earlier guard already decided, comparisons against NaN, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.
Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
1 ADR-shaped document(s) detected by content — `safari/agent-harness/HARNESS.md`. They are not under a conventional ADR folder (docs/adr/) and are not named NNNN-title.md, and this check found them by their decision signature rather than by where they live — so a reader who does not already know these paths has no route to them. Detected by content signature only: records kept outside the repository, or written without a Status/Decision/Consequences shape, are not visible to this check and are not counted here.
What to do
Move ADRs under docs/adr/ (or docs/adrs/) and name them NNNN-title.md so they're easy to find.
Maturity · Maturity — Whether the repo is organised deliberately — src/test separation and consistent project naming.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Production code isn't grouped under a src/ folder — it's spread across several top-level directories, so there's no one place that says 'this is the product'.
What to do
Group production code under src/ (or split deliberately, e.g. backend/ + frontend/) so production and tooling code aren't mixed at the root.
Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).
Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.
docs/PREVIEW_PROGRESS.md documents the environment variable `WAYLAND_DISPLAY`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/PREVIEW_PROGRESS.md:660
eez-studio/agent-harness/cli_anything/eez_studio/README.md runs `npm run build`, but no package.json declares a `build` script. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — eez-studio/agent-harness/cli_anything/eez_studio/README.md:17
unimol_tools/agent-harness/docs/architecture/API.md documents the environment variable `INPUT_CSV`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — unimol_tools/agent-harness/docs/architecture/API.md:154
unimol_tools/agent-harness/docs/architecture/API.md documents the environment variable `CUDA_VISIBLE_DEVICES`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — unimol_tools/agent-harness/docs/architecture/API.md:741
unimol_tools/agent-harness/docs/architecture/API.md documents the environment variable `UNIMOL_ARCHIVE_DIR`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — unimol_tools/agent-harness/docs/architecture/API.md:742
unimol_tools/agent-harness/docs/architecture/API.md documents the environment variable `UNIMOL_DEBUG`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — unimol_tools/agent-harness/docs/architecture/API.md:743
unimol_tools/agent-harness/docs/guides/01-INSTALLATION.md documents the environment variable `CUDA_VISIBLE_DEVICES`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — unimol_tools/agent-harness/docs/guides/01-INSTALLATION.md:223
unimol_tools/agent-harness/docs/guides/02-QUICK-START.md documents the environment variable `CUDA_VISIBLE_DEVICES`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — unimol_tools/agent-harness/docs/guides/02-QUICK-START.md:466
unimol_tools/agent-harness/docs/guides/03-BASIC-USAGE.md documents the environment variable `INPUT_CSV`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — unimol_tools/agent-harness/docs/guides/03-BASIC-USAGE.md:260
unimol_tools/agent-harness/docs/guides/05-TROUBLESHOOTING.md documents the environment variable `CUDA_VISIBLE_DEVICES`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — unimol_tools/agent-harness/docs/guides/05-TROUBLESHOOTING.md:138
unimol_tools/agent-harness/docs/guides/05-TROUBLESHOOTING.md documents the environment variable `UNIMOL_DEBUG`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — unimol_tools/agent-harness/docs/guides/05-TROUBLESHOOTING.md:670
unimol_tools/agent-harness/docs/workflows/CLEANUP-SOP.md documents the environment variable `PROD_MODEL`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — unimol_tools/agent-harness/docs/workflows/CLEANUP-SOP.md:499
What to do
Reconcile the README with reality: docs/PREVIEW_PROGRESS.md documents the environment variable `WAYLAND_DISPLAY`, but no code, script or configuration file names it; eez-studio/agent-harness/cli_anything/eez_studio/README.md runs `npm run build`, but no package.json declares a `build` script; unimol_tools/agent-harness/docs/architecture/API.md documents the environment variable `INPUT_CSV`, but no code, script or configuration file names it; unimol_tools/agent-harness/docs/architecture/API.md documents the environment variable `CUDA_VISIBLE_DEVICES`, but no code, script or configuration file names it; unimol_tools/agent-harness/docs/architecture/API.md documents the environment variable `UNIMOL_ARCHIVE_DIR`, but no code, script or configuration file names it.
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
Do you agree with this assessment?
P2 · Observability5.1 / 10Adequate✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
Only 2/71 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `3MF/agent-harness`, `QGIS/agent-harness`, `adguardhome/agent-harness`, `anygen/agent-harness` and 64 more.
What to do
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
No static application security testing detected. For this repository's stack, add bandit, `semgrep --config=p/python`, or CodeQL's python pack as a CI step. What was searched, so you can tell an absence from a miss: the 8833 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
What to do
Add a SAST step to CI running what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — so a security regression fails the build instead of landing.
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
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.
What to do
Make sure a person approves each release. The release job names an environment, but its approval rules live in the code host's settings, where Watchdog can't see them. Check that a reviewer must approve each release, or publish releases as drafts first, so a bad build can be stopped before anyone downloads it.
Do you agree with this assessment?
P5 · DR & Backup4.0 / 10Weak✓ 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.
What to do
Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
Do you agree with this assessment?
P6 · Release Hygiene8.0 / 10Strong✓ Tool-verified
Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.
Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.
The changelog this check read carries 2 versioned entries, against a bar of 3. Counted as either the distinct `x.y.z` versions it names (a link's target is not counted) or its version-shaped section headings (`## [1.2.0]`, `## V14.x.x`, `## Updates in 8.0.x`), whichever is the larger — so a log sectioned by minor series counts its sections, not its individual patch numbers. Entries recorded somewhere this check does not read — release notes generated at tag time from a generator config it did not recognise, or a log kept outside the repository — are not counted here, and this row is about what is re-findable in the tree rather than about how often you release.
What to do
Keep the changelog current — add a versioned entry (Keep-a-Changelog ## [x.y.z]) for each release so the history isn't a stub.
Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.
Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from the language model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
`fs.writeFileSync` in `buildSketchFile` 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. — sketch/agent-harness/src/builder.js:55
`fs.readFileSync` in `build` 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. — sketch/agent-harness/src/builder.js:327
`fs.existsSync` in `build` 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. — sketch/agent-harness/src/builder.js:381
`fs.mkdirSync` in `build` 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. — sketch/agent-harness/src/builder.js:382
5 blocking call(s) on async work (.Wait()/.GetAwaiter().GetResult()) — these waste a thread and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
`.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one). (×5) — slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:278, slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:203, slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:249, …
What to do
TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.
Make the call chain async end-to-end and await it — never block on a Task with .Wait()/.GetAwaiter().GetResult().
Do you agree with this assessment?
R1 · Type Safety0.0 / 10Critical✓ Tool-verified
React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.
Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.
0 typed · 6 plain JS — the untyped files are sketch/agent-harness/src/builder.js, sketch/agent-harness/src/cli.js, sketch/agent-harness/src/layout.js, sketch/agent-harness/src/primitives.js, sketch/agent-harness/tests/build.test.js, sketch/agent-harness/tests/security.test.js.
What to do
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
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.
sketch/agent-harness/src/layout.js:78 · sketch/agent-harness/src/layout.js:133 — the two spans are one implementation copied and then locally edited — 94 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — sketch/agent-harness/src/layout.js:78
sketch/agent-harness/src/primitives.js:86 · sketch/agent-harness/src/primitives.js:103 — the two spans are one implementation copied and then locally edited — 53 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — sketch/agent-harness/src/primitives.js:86
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 · 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.
buildLayer has cyclomatic complexity 28 and cognitive complexity 24; 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. — sketch/agent-harness/src/builder.js:190
layoutVerticalStack has cyclomatic complexity 25 and cognitive complexity 28; 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. — sketch/agent-harness/src/layout.js:78
layoutHorizontalStack has cyclomatic complexity 23 and cognitive complexity 32; 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. — sketch/agent-harness/src/layout.js:133
intrinsicSize has cyclomatic complexity 22 and cognitive complexity 23; 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. — sketch/agent-harness/src/layout.js:40
build has cyclomatic complexity 14 and cognitive complexity 16; 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. — sketch/agent-harness/src/builder.js:326
createLabeledRectangle has cyclomatic complexity 12 and cognitive complexity 11; 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. — sketch/agent-harness/src/primitives.js:222
createText has cyclomatic complexity 12 and cognitive complexity 10; 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. — sketch/agent-harness/src/primitives.js:122
resolveTokenValue has cyclomatic complexity 11 and cognitive complexity 10; 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. — sketch/agent-harness/src/builder.js:126
What to do
Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
Do you agree with this assessment?
R3 · Large Files10.0 / 10Exemplary✓ Tool-verified
React / JS · Code Health — How many source files exceed the large-file threshold.
Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.
Do you agree with this assessment?
R4 · Test Coverage10.0 / 10Exemplary✓ 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.
React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).
Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.
What to do
Bump outdated dependencies to current versions to limit upgrade debt.
Do you agree with this assessment?
R6 · Tooling3.4 / 10Weak✓ Tool-verified
React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.
Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.
test ✓ · lint ✗ · typecheck ✗ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
What to do
Add eslint and type checking (adopt TypeScript, or type-check the existing JavaScript with `checkJs`) as package.json scripts and run them in CI.
Do you agree with this assessment?
R7 · Dead Code10.0 / 10Exemplary✓ Tool-verified
React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).
Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.
React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.
Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.
Imported but not declared in any reachable package.json — installs work only by hoisting accident. — sketch/agent-harness/src/builder.js:14
What to do
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.
Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.
Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.
Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.
Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process. (×5) — slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:278, slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:203, slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:249, …
Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.
Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.
Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.
Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.
Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.
Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.
Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X17 · Uncapped recursion over a caller-supplied document10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.
Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.
Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.
Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether an argument guard throws the exception its own condition describes — a guard that rejects a value for being EMPTY and reports it as `ArgumentNullException` tells the caller a parameter was null when it provably was not.
Method: Roslyn syntax: `throw new ArgumentNullException(nameof(p))` statements controlled by an `if`, whose condition is read for a test that is true of a NON-null `p` — an emptiness test that dereferences it (`p.Count == 0`, `!p.Any()`) or a BCL predicate documented true of the empty value (`string.IsNullOrEmpty(p)`). Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.
Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.
Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.
Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X24 · Document value interpolated into markup unescaped10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.
Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.
Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.
Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a `foreach` leaves the collection it is walking alone — a body that adds to or removes from the very collection the loop is enumerating invalidates the enumerator it is holding, so the next `MoveNext` throws `InvalidOperationException` and the remaining items are never seen.
Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.
Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
`catch (HttpListenerException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch. — slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:105
`catch (ObjectDisposedException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch. — slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:106
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. (×8) — slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:179, slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Helpers.cs:170, slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Helpers.cs:173, …
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.
Do you agree with this assessment?
X32 · Type resolved by simple name across every loaded assembly10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a plugin lookup names the type it means — searching every assembly loaded into the process for a candidate whose SIMPLE name equals a string supplied at runtime, and taking the first one found, is decided by assembly LOAD ORDER rather than by this source, so the same name can resolve to a different type on the next run.
Method: Roslyn syntax only, no semantic model: every invocation of `First`/`FirstOrDefault`/`Single`/`SingleOrDefault` whose OWN expression subtree contains both a `GetAssemblies()` call and a `GetTypes()`/`GetExportedTypes()` call — a single-element pick out of every type loaded into the process. A nested selector in the same chain sees no `GetAssemblies()` in its own subtree and is outside the population, so one lookup counts once however many links its chain has. A finding additionally needs both remaining halves: the selector must be `First`/`FirstOrDefault` (`Single`/`SingleOrDefault` reports the ambiguity rather than resolving it, and is counted and never reported), and the chain must carry an `==` comparison of `<lambda parameter>.Name` against something that is not a literal. The receiver must be a plain identifier bound by one of the chain’s own lambdas, which places `assembly.GetName().Name == "X"` outside the rule by construction. One exemption: a `.Name` test joined by `&&` to a `FullName`/`AssemblyQualifiedName` test on the same identifier is spared; joined by `||` it is not. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.
Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `package.json` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.
Other · Code Health — Whether nullable reference types are enabled and not undermined by heavy `!` suppression.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
Do you agree with this assessment?
Reference — by lens
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 2 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
X10 Duplicated predicate — 25 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 17 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not included — 48 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
AC7 A11y enforcement — No web markup found — accessibility is not applicable to this repository.
AX1 Captive dependencies — no DI registrations detected
AX2 Stateful singletons — no singleton implementations detected
AX6 Interface segregation — no public interfaces
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — no test/production split to check
AXB1 Runtime evidence locked — no reproducible boot — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
C1 Data Protection — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C2 Access Controls — No access-control surface detected in the analyzed source — no web/app surface to authorize (no HTTP API or web-UI project) and no authorization code at all (no [Authorize]/policies, no imperative guard methods). Access control is therefore N/A here — this is a library/CLI, which is authorized by its CALLER, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
C3 Audit Trail — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C4 Data Retention — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C5 Data-Subject Rights — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
D11 Test Reliability — Test reliability not scored — polyglot repository, one half's runner produced no measurement
D12 Dependency Hygiene — Not scored — 21 shipped Python distribution(s) were read, but the outdated signal needs pypi.org, and no declaration here carries an exact pin to ask about — a floor or a range installs the newest release it admits and cannot be behind one, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
D18 Solution Shape — D18 scores the shape of a .NET solution, but this repository's production source is mostly .py, .swift — the .NET project files present are an immaterial minority — so the dimension does not apply.
D23 Boundary Type-Coupling — single shared-core project — no cross-context coupling to assess
D25 ADR Conformance — none of 1 ADRs are conformance-checkable — unverifiable.
D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.py), 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.
D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
D32 Data Compliance (PII/GDPR) — 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.
D39 IL Efficiency — IL not measured — the analyzer's build of the target did not succeed
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D8 Code Coverage — Coverage NOT MEASURED: the .NET half could not be measured — the repository wires up no coverage collector for `--collect:"XPlat Code Coverage"` to use; the JavaScript/TypeScript half could not be measured — the jest suite in sketch/agent-harness/ ran and passed but wrote no lcov report. This repository's production source spans both ecosystems, and no partial figure is published as if it were the whole: coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan. Alternatively, commit the lcov/Cobertura report your CI produces and it is read without a re-run.
DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (73 value object(s))
ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and this analysis resolves a call's owner only where the receiver's type is written down in the source. Reported as guidance rather than measured
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P7 Outbound HTTP resilience — not applicable — this isn't a service/API/worker
P8 Schema migrations — no EF Core usage detected
P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (`coverage run -m pytest` then `coverage xml`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
PF1 Benchmark discipline — Performance is assessed only for perf-relevant repos — a packaged library, one that ships benchmarks, or one already using allocation-aware APIs. This repo isn't one, so the Performance lens is not applicable and is excluded from the score.
PF2 Allocation hygiene — Performance is assessed only for perf-relevant repos — a packaged library, one that ships benchmarks, or one already using allocation-aware APIs. This repo isn't one, so the Performance lens is not applicable and is excluded from the score.
R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
S1 Web-Security Posture — No web surface detected in the analyzed source — no HTTP API or web-UI project (no controllers/minimal-API endpoints, no Razor/Blazor views) and no web middleware (HTTPS redirection, HSTS, security headers, cookies). Transport security, security headers, secure cookies, CSRF/input-validation and middleware-order controls are therefore N/A here — this is a library/CLI/worker, not a web app. Crypto hygiene was still checked and found nothing to flag. If this codebase becomes web-facing, the dimension reactivates automatically.
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X2 Cancellation propagation — no async method does work a token could cancel
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
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.
Orphaned knowledge REDACTED:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge live2d/agent-harness/cli_anything/live2d/live2d_cli.py:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge freecad/agent-harness/cli_anything/freecad/core/sketch.py:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge freecad/agent-harness/cli_anything/freecad/core/parts.py:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge sbox/agent-harness/cli_anything/sbox/core/scene.py:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge rms/agent-harness/cli_anything/rms/rms_cli.py:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.py:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge freecad/agent-harness/cli_anything/freecad/core/draft.py:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge REDACTED:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge REDACTED:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge freecad/agent-harness/cli_anything/freecad/core/measure.py:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge krita/agent-harness/cli_anything/krita/krita_cli.py:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge browser/agent-harness/cli_anything/browser/utils/repl_skin.py:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
EmptyCatchBlock slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Helpers.cs:170— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Helpers.cs:173— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:299— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:320— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:341— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:386— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:594— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:179— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
Banned license: iterm2 — `iterm2` 2.30 is published on PyPI under `GPL-2.0-or-later`, which this policy bans, and it is in the SHIPPED closure of this repository — so it is installed by everything that depends on this repository, not just by its test environment. A distribution offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package, or record an accepted exception.
Banned license: videocaptioner — `videocaptioner` 1.4.2 is published on PyPI under `GPL-3.0`, which this policy bans, and it is in the SHIPPED closure of this repository — so it is installed by everything that depends on this repository, not just by its test environment. A distribution offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package, or record an accepted exception.
Banned license: pyqt-fluent-widgets — `pyqt-fluent-widgets` 1.11.3 is published on PyPI under `GPL-3.0`, which this policy bans, and it is in the SHIPPED closure of this repository — so it is installed by everything that depends on this repository, not just by its test environment. A distribution offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package, or record an accepted exception.
Banned license: pyqt5-frameless-window — `pyqt5-frameless-window` 0.8.2 is published on PyPI under `GPL-3.0`, which this policy bans, and it is in the SHIPPED closure of this repository — so it is installed by everything that depends on this repository, not just by its test environment. A distribution offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package, or record an accepted exception.
Unlisted import 'jszip' sketch/agent-harness/src/builder.js:14— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
FileTooLong: scripts/freecad_live_preview_demo.py docs/scripts/freecad_live_preview_demo.py— FileTooLong — 4218 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3718 over it, 8.44× 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: freecad/freecad_cli.py freecad/agent-harness/cli_anything/freecad/freecad_cli.py— FileTooLong — 3856 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3356 over it, 7.71× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: scripts/video_doctor.py cli-hub-matrix/video-creation/scripts/video_doctor.py— FileTooLong — 2093 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1593 over it, 4.19× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: sbox/sbox_cli.py sbox/agent-harness/cli_anything/sbox/sbox_cli.py— FileTooLong — 1850 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1350 over it, 3.70× 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 — 1819 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1319 over it, 3.64× 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: live2d/live2d_cli.py live2d/agent-harness/cli_anything/live2d/live2d_cli.py— FileTooLong — 1529 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1029 over it, 3.06× 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: cli_hub/preview.py cli-hub/cli_hub/preview.py— FileTooLong — 1497 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 997 over it, 2.99× 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: n8n/n8n_cli.py n8n/agent-harness/cli_anything/n8n/n8n_cli.py— FileTooLong — 1436 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 936 over it, 2.87× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: cloudcompare/cloudcompare_cli.py cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py— FileTooLong — 1325 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 825 over it, 2.65× 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: shotcut/shotcut_cli.py shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py— FileTooLong — 1233 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 733 over it, 2.47× 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 — 1178 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 678 over it, 2.36× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: core/body.py freecad/agent-harness/cli_anything/freecad/core/body.py— FileTooLong — 1082 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 582 over it, 2.16× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: core/pipeline.py renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py— FileTooLong — 1011 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 511 over it, 2.02× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: core/parts.py freecad/agent-harness/cli_anything/freecad/core/parts.py— FileTooLong — 985 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 485 over it, 1.97× 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: iterm2_ctl/iterm2_ctl_cli.py iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py— FileTooLong — 982 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 482 over it, 1.96× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: core/scene.py sbox/agent-harness/cli_anything/sbox/core/scene.py— FileTooLong — 949 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 449 over it, 1.90× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: plugin/BridgeMod.StateBuilder.cs slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs— FileTooLong — 880 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 380 over it, 1.76× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: unrealinsights/unrealinsights_cli.py unrealinsights/agent-harness/cli_anything/unrealinsights/unrealinsights_cli.py— FileTooLong — 861 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 361 over it, 1.72× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: rms/rms_cli.py rms/agent-harness/cli_anything/rms/rms_cli.py— FileTooLong — 856 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 356 over it, 1.71× 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: blender/blender_cli.py blender/agent-harness/cli_anything/blender/blender_cli.py— FileTooLong — 853 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 353 over it, 1.71× 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: lldb/dap.py lldb/agent-harness/cli_anything/lldb/dap.py— FileTooLong — 845 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 345 over it, 1.69× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: cli_hub/cli.py cli-hub/cli_hub/cli.py— FileTooLong — 834 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 334 over it, 1.67× 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: core/sketch.py freecad/agent-harness/cli_anything/freecad/core/sketch.py— FileTooLong — 819 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 319 over it, 1.64× 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: inkscape/inkscape_cli.py inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py— FileTooLong — 812 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 312 over it, 1.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: core/filters.py shotcut/agent-harness/cli_anything/shotcut/core/filters.py— FileTooLong — 798 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 298 over it, 1.60× 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.
Duplicated block (8 lines × 2) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:94— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:94-101 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:117-124 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:143— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:143-150 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:699-706 — 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) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:787— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:787-794 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:810-817 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:787` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:153— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:153-160 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:715-722 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:153` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:293— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:293-300 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:624-631 — 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) audacity/agent-harness/cli_anything/audacity/core/effects.py:288— audacity/agent-harness/cli_anything/audacity/core/effects.py:288-295 | kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:238-245 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) blender/agent-harness/cli_anything/blender/core/materials.py:41— blender/agent-harness/cli_anything/blender/core/materials.py:41-48 | freecad/agent-harness/cli_anything/freecad/core/materials.py:182-189 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) blender/agent-harness/cli_anything/blender/core/modifiers.py:274— blender/agent-harness/cli_anything/blender/core/modifiers.py:274-283 | gimp/agent-harness/cli_anything/gimp/core/filters.py:354-361 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/modifiers.py` and `gimp/agent-harness/cli_anything/gimp/core/filters.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) blender/agent-harness/cli_anything/blender/core/scene.py:79— blender/agent-harness/cli_anything/blender/core/scene.py:79-86 | obs-studio/agent-harness/cli_anything/obs_studio/core/project.py:67-74 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) browser/agent-harness/cli_anything/browser/utils/domshell_backend.py:958— browser/agent-harness/cli_anything/browser/utils/domshell_backend.py:958-965 | browser/agent-harness/cli_anything/browser/utils/domshell_backend.py:1147-1156 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) cli-hub/cli_hub/installer.py:133— cli-hub/cli_hub/installer.py:133-140 | cli-hub/cli_hub/installer.py:144-151 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1475— cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1475-1482 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1505-1512 — 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) docs/scripts/blender_orbital_relay_drone_demo.py:276— docs/scripts/blender_orbital_relay_drone_demo.py:276-283 | docs/scripts/blender_orbital_relay_drone_demo.py:294-305 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `docs/scripts/blender_orbital_relay_drone_demo.py:294` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 2) docs/scripts/blender_orbital_relay_drone_demo.py:285— docs/scripts/blender_orbital_relay_drone_demo.py:285-292 | docs/scripts/blender_orbital_relay_drone_demo.py:307-319 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `docs/scripts/blender_orbital_relay_drone_demo.py:307` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 2) docs/scripts/blender_preview_story_demo.py:532— docs/scripts/blender_preview_story_demo.py:532-539 | docs/scripts/freecad_live_preview_demo.py:4684-4692 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `docs/scripts/blender_preview_story_demo.py:532` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) drawio/agent-harness/cli_anything/drawio/drawio_cli.py:107— drawio/agent-harness/cli_anything/drawio/drawio_cli.py:107-114 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:86-93 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) freecad/agent-harness/cli_anything/freecad/core/body.py:50— freecad/agent-harness/cli_anything/freecad/core/body.py:50-57 | freecad/agent-harness/cli_anything/freecad/core/sketch.py:76-83 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `collection_key` to `str = "bodies"` in one and `str = "sketches"` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (8 lines × 2) freecad/agent-harness/cli_anything/freecad/core/motion.py:439— freecad/agent-harness/cli_anything/freecad/core/motion.py:439-446 | freecad/agent-harness/cli_anything/freecad/core/preview.py:245-252 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `freecad/agent-harness/cli_anything/freecad/core/motion.py:439` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) gimp/agent-harness/cli_anything/gimp/gimp_cli.py:684— gimp/agent-harness/cli_anything/gimp/gimp_cli.py:684-691 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:715-722 — 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) macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py:103— macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py:103-110 | openscreen/agent-harness/cli_anything/openscreen/openscreen_cli.py:96-103 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) mubu/agent-harness/cli_anything/mubu/mubu_cli.py:352— mubu/agent-harness/cli_anything/mubu/mubu_cli.py:352-359 | mubu/agent-harness/cli_anything/mubu/mubu_cli.py:362-369 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) obs-studio/agent-harness/cli_anything/obs_studio/utils/obs_utils.py:12— obs-studio/agent-harness/cli_anything/obs_studio/utils/obs_utils.py:12-19 | obs-studio/agent-harness/cli_anything/obs_studio/utils/obs_utils.py:49-56 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) openscreen/agent-harness/cli_anything/openscreen/core/preview.py:89— openscreen/agent-harness/cli_anything/openscreen/core/preview.py:89-96 | renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:101-108 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (8 lines × 2) renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:944— renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:944-951 | renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:1149-1156 — 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) shotcut/agent-harness/cli_anything/shotcut/core/compositing.py:175— shotcut/agent-harness/cli_anything/shotcut/core/compositing.py:175-182 | shotcut/agent-harness/cli_anything/shotcut/core/filters.py:784-791 — 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 (9 lines × 2) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:1091— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:1091-1099 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:1176-1184 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:1091` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) 3MF/agent-harness/cli_anything/threemf/core/inspector.py:252— 3MF/agent-harness/cli_anything/threemf/core/inspector.py:252-260 | 3MF/agent-harness/cli_anything/threemf/core/repair.py:216-224 — 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 (9 lines × 2) audacity/agent-harness/cli_anything/audacity/audacity_cli.py:790— audacity/agent-harness/cli_anything/audacity/audacity_cli.py:790-798 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:713-721 — before extracting anything, compare `audacity/agent-harness/cli_anything/audacity/audacity_cli.py` and `kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 144 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) blender/agent-harness/cli_anything/blender/core/modifiers.py:263— blender/agent-harness/cli_anything/blender/core/modifiers.py:263-271 | gimp/agent-harness/cli_anything/gimp/core/filters.py:343-351 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/modifiers.py` and `gimp/agent-harness/cli_anything/gimp/core/filters.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) calibre/agent-harness/cli_anything/calibre/calibre_cli.py:362— calibre/agent-harness/cli_anything/calibre/calibre_cli.py:362-370 | calibre/agent-harness/cli_anything/calibre/calibre_cli.py:554-562 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) cli-hub/cli_hub/installer.py:231— cli-hub/cli_hub/installer.py:231-239 | cli-hub/cli_hub/installer.py:243-251 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:337— cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:337-345 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1404-1412 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) docs/scripts/blender_preview_story_demo.py:280— docs/scripts/blender_preview_story_demo.py:280-288 | docs/scripts/freecad_live_preview_demo.py:4430-4439 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `docs/scripts/blender_preview_story_demo.py:280` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) docs/scripts/blender_preview_story_demo.py:411— docs/scripts/blender_preview_story_demo.py:411-419 | docs/scripts/freecad_live_preview_demo.py:4554-4562 — 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 (9 lines × 2) inkscape/agent-harness/cli_anything/inkscape/core/layers.py:135— inkscape/agent-harness/cli_anything/inkscape/core/layers.py:135-143 | obs-studio/agent-harness/cli_anything/obs_studio/core/sources.py:177-185 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9 lines × 2) inkscape/agent-harness/cli_anything/inkscape/core/shapes.py:355— inkscape/agent-harness/cli_anything/inkscape/core/shapes.py:355-363 | inkscape/agent-harness/cli_anything/inkscape/core/text.py:295-303 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) iterm2/agent-harness/cli_anything/iterm2_ctl/core/prompt.py:105— iterm2/agent-harness/cli_anything/iterm2_ctl/core/prompt.py:105-113 | iterm2/agent-harness/cli_anything/iterm2_ctl/core/prompt.py:154-162 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `iterm2/agent-harness/cli_anything/iterm2_ctl/core/prompt.py:105` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py:87— kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py:87-95 | shotcut/agent-harness/cli_anything/shotcut/utils/melt_backend.py:81-89 — before extracting anything, compare `kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py` and `shotcut/agent-harness/cli_anything/shotcut/utils/melt_backend.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 163 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (9 lines × 2) kdenlive/agent-harness/cli_anything/kdenlive/utils/mlt_xml.py:355— kdenlive/agent-harness/cli_anything/kdenlive/utils/mlt_xml.py:355-363 | kdenlive/agent-harness/cli_anything/kdenlive/utils/mlt_xml.py:369-377 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) lldb/agent-harness/cli_anything/lldb/utils/session_client.py:78— lldb/agent-harness/cli_anything/lldb/utils/session_client.py:78-86 | lldb/agent-harness/cli_anything/lldb/utils/session_server.py:146-154 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (9 lines × 2) minimax/agent-harness/cli_anything/minimax/minimax_cli.py:145— minimax/agent-harness/cli_anything/minimax/minimax_cli.py:145-153 | minimax/agent-harness/cli_anything/minimax/minimax_cli.py:196-204 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) n8n/agent-harness/cli_anything/n8n/n8n_cli.py:825— n8n/agent-harness/cli_anything/n8n/n8n_cli.py:825-833 | n8n/agent-harness/cli_anything/n8n/n8n_cli.py:857-865 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:301— obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:301-309 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:378-386 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:252— obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:252-260 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:276-284 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) sbox/agent-harness/cli_anything/sbox/sbox_cli.py:545— sbox/agent-harness/cli_anything/sbox/sbox_cli.py:545-553 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:691-699 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sbox/agent-harness/cli_anything/sbox/sbox_cli.py:545` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) tigris/agent-harness/cli_anything/tigris/core/access_key.py:68— tigris/agent-harness/cli_anything/tigris/core/access_key.py:68-76 | tigris/agent-harness/cli_anything/tigris/core/access_key.py:170-178 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `tigris/agent-harness/cli_anything/tigris/core/access_key.py:68` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) rms/agent-harness/cli_anything/rms/core/credits.py:7— rms/agent-harness/cli_anything/rms/core/credits.py:7-15 | rms/agent-harness/cli_anything/rms/core/reports.py:7-39 — 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 2) blender/agent-harness/cli_anything/blender/core/preview.py:66— blender/agent-harness/cli_anything/blender/core/preview.py:66-74 | freecad/agent-harness/cli_anything/freecad/core/preview.py:70-78 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 430 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `freecad/agent-harness/cli_anything/freecad/core/preview.py:81` calls `_safe_path`, `replace` and `blender/agent-harness/cli_anything/blender/core/preview.py:77` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 2) kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py:40— kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py:40-48 | shotcut/agent-harness/cli_anything/shotcut/utils/melt_backend.py:35-43 — before extracting anything, compare `kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py` and `shotcut/agent-harness/cli_anything/shotcut/utils/melt_backend.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 163 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py:56— kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py:56-64 | shotcut/agent-harness/cli_anything/shotcut/utils/melt_backend.py:50-58 — before extracting anything, compare `kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py` and `shotcut/agent-harness/cli_anything/shotcut/utils/melt_backend.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 163 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (6 lines × 2) cli-hub/cli_hub/cli.py:280— cli-hub/cli_hub/cli.py:280-285 | unrealinsights/agent-harness/cli_anything/unrealinsights/unrealinsights_cli.py:158-163 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) cloudcompare/agent-harness/cli_anything/cloudcompare/core/export.py:86— cloudcompare/agent-harness/cli_anything/cloudcompare/core/export.py:86-92 | cloudcompare/agent-harness/cli_anything/cloudcompare/core/export.py:153-158 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) docs/scripts/blender_preview_story_demo.py:392— docs/scripts/blender_preview_story_demo.py:392-397 | docs/scripts/freecad_live_preview_demo.py:4535-4540 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `docs/scripts/blender_preview_story_demo.py:392` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) drawio/agent-harness/cli_anything/drawio/core/session.py:54— drawio/agent-harness/cli_anything/drawio/core/session.py:54-59 | shotcut/agent-harness/cli_anything/shotcut/core/session.py:67-72 — before extracting anything, compare `drawio/agent-harness/cli_anything/drawio/core/session.py` and `shotcut/agent-harness/cli_anything/shotcut/core/session.py` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 107 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:185— iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:185-190 | iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:1138-1143 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:185` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:409— iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:409-414 | iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:540-545 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) kdenlive/agent-harness/cli_anything/kdenlive/utils/mlt_xml.py:134— kdenlive/agent-harness/cli_anything/kdenlive/utils/mlt_xml.py:134-139 | krita/agent-harness/cli_anything/krita/core/export.py:170-175 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `project` to `Dict[str, Any]` in one and `dict` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (6 lines × 2) live2d/agent-harness/cli_anything/live2d/core/differ.py:98— live2d/agent-harness/cli_anything/live2d/core/differ.py:98-103 | live2d/agent-harness/cli_anything/live2d/core/differ.py:104-109 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) REDACTED:1498— REDACTED:1498-1503 | REDACTED:1541-1546 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) sbox/agent-harness/cli_anything/sbox/core/prefab.py:228— sbox/agent-harness/cli_anything/sbox/core/prefab.py:228-233 | sbox/agent-harness/cli_anything/sbox/core/scene.py:1233-1239 — 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 × 2) sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1577— sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1577-1582 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:2091-2096 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) siyuan/agent-harness/cli_anything/siyuan/siyuan_cli.py:448— siyuan/agent-harness/cli_anything/siyuan/siyuan_cli.py:448-453 | siyuan/agent-harness/cli_anything/siyuan/siyuan_cli.py:540-545 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) QGIS/agent-harness/cli_anything/qgis/core/session.py:65— QGIS/agent-harness/cli_anything/qgis/core/session.py:65-70 | anygen/agent-harness/cli_anything/anygen/core/session.py:57-62 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) audacity/agent-harness/cli_anything/audacity/audacity_cli.py:203— audacity/agent-harness/cli_anything/audacity/audacity_cli.py:203-208 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:190-195 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:134— cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:134-147 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:178-183 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) gimp/agent-harness/cli_anything/gimp/gimp_cli.py:192— gimp/agent-harness/cli_anything/gimp/gimp_cli.py:192-197 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:198-203 — before extracting anything, compare `gimp/agent-harness/cli_anything/gimp/gimp_cli.py` and `kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 175 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) kdenlive/agent-harness/cli_anything/kdenlive/core/guides.py:10— kdenlive/agent-harness/cli_anything/kdenlive/core/guides.py:10-15 | kdenlive/agent-harness/cli_anything/kdenlive/core/transitions.py:46-51 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (6 lines × 2) libreoffice/agent-harness/cli_anything/libreoffice/core/export.py:423— libreoffice/agent-harness/cli_anything/libreoffice/core/export.py:423-428 | REDACTED:729-734 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (6 lines × 2) minimax/agent-harness/cli_anything/minimax/core/session.py:85— minimax/agent-harness/cli_anything/minimax/core/session.py:85-90 | novita/agent-harness/cli_anything/novita/core/session.py:85-90 — before extracting anything, compare `minimax/agent-harness/cli_anything/minimax/core/session.py` and `novita/agent-harness/cli_anything/novita/core/session.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 90 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) minimax/agent-harness/cli_anything/minimax/core/session.py:93— minimax/agent-harness/cli_anything/minimax/core/session.py:93-98 | novita/agent-harness/cli_anything/novita/core/session.py:93-98 — before extracting anything, compare `minimax/agent-harness/cli_anything/minimax/core/session.py` and `novita/agent-harness/cli_anything/novita/core/session.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 90 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) cli-hub/cli_hub/matrix.py:100— cli-hub/cli_hub/matrix.py:100-105 | cli-hub/cli_hub/registry.py:94-99 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) REDACTED:2103— REDACTED:2103-2108 | REDACTED:2201-2206 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2103` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) n8n/agent-harness/cli_anything/n8n/n8n_cli.py:844— n8n/agent-harness/cli_anything/n8n/n8n_cli.py:844-849 | n8n/agent-harness/cli_anything/n8n/n8n_cli.py:876-881 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) siyuan/agent-harness/cli_anything/siyuan/siyuan_cli.py:297— siyuan/agent-harness/cli_anything/siyuan/siyuan_cli.py:297-302 | siyuan/agent-harness/cli_anything/siyuan/siyuan_cli.py:385-390 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_listener.swift:23— nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_listener.swift:23-28 | nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_publisher.swift:75-80 — before extracting anything, compare `nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_listener.swift` and `nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_publisher.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:736— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:736-740 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:752-756 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:524— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:524-528 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:627-631 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:524` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:626` calls `AppendLine` and `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:523` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 2) docs/scripts/blender_preview_story_demo.py:261— docs/scripts/blender_preview_story_demo.py:261-265 | docs/scripts/freecad_live_preview_demo.py:4412-4416 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 2) drawio/agent-harness/cli_anything/drawio/drawio_cli.py:755— drawio/agent-harness/cli_anything/drawio/drawio_cli.py:755-759 | drawio/agent-harness/cli_anything/drawio/drawio_cli.py:761-765 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 2) inkscape/agent-harness/cli_anything/inkscape/core/layers.py:171— inkscape/agent-harness/cli_anything/inkscape/core/layers.py:171-175 | inkscape/agent-harness/cli_anything/inkscape/core/paths.py:153-157 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 2) iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:522— iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:522-526 | iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:625-629 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:522` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) kdenlive/agent-harness/cli_anything/kdenlive/utils/mlt_xml.py:230— kdenlive/agent-harness/cli_anything/kdenlive/utils/mlt_xml.py:230-234 | kdenlive/agent-harness/cli_anything/kdenlive/utils/mlt_xml.py:416-420 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) n8n/agent-harness/cli_anything/n8n/n8n_cli.py:1496— n8n/agent-harness/cli_anything/n8n/n8n_cli.py:1496-1500 | n8n/agent-harness/cli_anything/n8n/n8n_cli.py:1527-1531 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) shotcut/agent-harness/workflow_demo.py:116— shotcut/agent-harness/workflow_demo.py:116-120 | shotcut/agent-harness/workflow_demo.py:125-129 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `shotcut/agent-harness/workflow_demo.py:123` calls `add_filter` and `shotcut/agent-harness/workflow_demo.py:115` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 2) lldb/agent-harness/cli_anything/lldb/utils/session_client.py:90— lldb/agent-harness/cli_anything/lldb/utils/session_client.py:90-94 | lldb/agent-harness/cli_anything/lldb/utils/session_server.py:158-162 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 2) minimax/agent-harness/cli_anything/minimax/minimax_cli.py:44— minimax/agent-harness/cli_anything/minimax/minimax_cli.py:44-48 | novita/agent-harness/cli_anything/novita/novita_cli.py:39-43 — before extracting anything, compare `minimax/agent-harness/cli_anything/minimax/minimax_cli.py` and `novita/agent-harness/cli_anything/novita/novita_cli.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 180 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note first that the copies are not typed on the same thing: `ChatSession` names `cli_anything.minimax.core.session` in one and `cli_anything.novita.core.session` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (5 lines × 2) blender/agent-harness/cli_anything/blender/blender_cli.py:358— blender/agent-harness/cli_anything/blender/blender_cli.py:358-362 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:297-301 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) blender/agent-harness/cli_anything/blender/blender_cli.py:369— blender/agent-harness/cli_anything/blender/blender_cli.py:369-373 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:308-312 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) blender/agent-harness/cli_anything/blender/blender_cli.py:570— blender/agent-harness/cli_anything/blender/blender_cli.py:570-574 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:504-508 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:323— inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:323-327 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:309-314 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) iterm2/agent-harness/cli_anything/iterm2_ctl/core/session.py:133— iterm2/agent-harness/cli_anything/iterm2_ctl/core/session.py:133-137 | iterm2/agent-harness/cli_anything/iterm2_ctl/core/window.py:67-71 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (5 lines × 2) obs-studio/agent-harness/cli_anything/obs_studio/core/scenes.py:56— obs-studio/agent-harness/cli_anything/obs_studio/core/scenes.py:56-60 | obs-studio/agent-harness/cli_anything/obs_studio/core/transitions.py:76-80 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (5 lines × 2) cli-hub/cli_hub/cli.py:878— cli-hub/cli_hub/cli.py:878-882 | cli-hub/cli_hub/cli.py:906-910 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) kdenlive/agent-harness/cli_anything/kdenlive/core/transitions.py:102— kdenlive/agent-harness/cli_anything/kdenlive/core/transitions.py:102-106 | kdenlive/agent-harness/cli_anything/kdenlive/core/transitions.py:108-112 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) live2d/agent-harness/cli_anything/live2d/core/comparer.py:69— live2d/agent-harness/cli_anything/live2d/core/comparer.py:69-73 | live2d/agent-harness/cli_anything/live2d/core/comparer.py:109-113 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) macrocli/agent-harness/cli_anything/macrocli/backends/gui_agent.py:258— macrocli/agent-harness/cli_anything/macrocli/backends/gui_agent.py:258-262 | macrocli/agent-harness/cli_anything/macrocli/backends/gui_agent.py:456-460 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) sbox/agent-harness/cli_anything/sbox/core/prefab.py:22— sbox/agent-harness/cli_anything/sbox/core/prefab.py:22-26 | sbox/agent-harness/cli_anything/sbox/core/scene.py:365-369 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 2) sbox/agent-harness/cli_anything/sbox/sbox_cli.py:450— sbox/agent-harness/cli_anything/sbox/sbox_cli.py:450-454 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:496-500 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sbox/agent-harness/cli_anything/sbox/sbox_cli.py:450` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `sbox/agent-harness/cli_anything/sbox/sbox_cli.py:505` calls `argument` and `sbox/agent-harness/cli_anything/sbox/sbox_cli.py:459` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) cli-hub-matrix/video-creation/scripts/video_doctor.py:1370— cli-hub-matrix/video-creation/scripts/video_doctor.py:1370-1376 | cli-hub-matrix/video-creation/scripts/video_doctor.py:1574-1580 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) cli-hub/cli_hub/preview.py:71— cli-hub/cli_hub/preview.py:71-77 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/output.py:48-54 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) docs/scripts/blender_orbital_relay_drone_demo.py:254— docs/scripts/blender_orbital_relay_drone_demo.py:254-260 | docs/scripts/blender_orbital_relay_drone_demo.py:282-288 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `docs/scripts/blender_orbital_relay_drone_demo.py:254` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) gimp/agent-harness/cli_anything/gimp/core/layers.py:150— gimp/agent-harness/cli_anything/gimp/core/layers.py:150-156 | inkscape/agent-harness/cli_anything/inkscape/core/shapes.py:299-305 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7 lines × 2) gimp/agent-harness/cli_anything/gimp/gimp_cli.py:518— gimp/agent-harness/cli_anything/gimp/gimp_cli.py:518-524 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:469-476 — before extracting anything, compare `gimp/agent-harness/cli_anything/gimp/gimp_cli.py` and `obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 145 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:469` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7 lines × 2) inkscape/agent-harness/cli_anything/inkscape/core/paths.py:251— inkscape/agent-harness/cli_anything/inkscape/core/paths.py:251-257 | inkscape/agent-harness/cli_anything/inkscape/core/paths.py:262-268 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `inkscape/agent-harness/cli_anything/inkscape/core/paths.py:251` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) REDACTED:413— REDACTED:413-419 | REDACTED:277-283 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 2) musescore/agent-harness/cli_anything/musescore/utils/musescore_backend.py:170— musescore/agent-harness/cli_anything/musescore/utils/musescore_backend.py:170-176 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/core/gpu_trace.py:649-655 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7 lines × 2) renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:504— renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:504-510 | renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:517-523 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1790— sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1790-1796 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1817-1823 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) sbox/agent-harness/cli_anything/sbox/sbox_cli.py:2165— sbox/agent-harness/cli_anything/sbox/sbox_cli.py:2165-2171 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:2181-2187 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) shotcut/agent-harness/workflow_demo.py:94— shotcut/agent-harness/workflow_demo.py:94-100 | shotcut/agent-harness/workflow_demo.py:111-117 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) wiremock/agent-harness/cli_anything/wiremock/wiremock_cli.py:102— wiremock/agent-harness/cli_anything/wiremock/wiremock_cli.py:102-108 | wiremock/agent-harness/cli_anything/wiremock/wiremock_cli.py:308-314 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `wiremock/agent-harness/cli_anything/wiremock/wiremock_cli.py:102` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `wiremock/agent-harness/cli_anything/wiremock/wiremock_cli.py:100` calls `get` and `wiremock/agent-harness/cli_anything/wiremock/wiremock_cli.py:307` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) freecad/agent-harness/cli_anything/freecad/utils/freecad_backend.py:182— freecad/agent-harness/cli_anything/freecad/utils/freecad_backend.py:182-188 | krita/agent-harness/cli_anything/krita/utils/krita_backend.py:145-151 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 2) lldb/agent-harness/cli_anything/lldb/utils/session_client.py:68— lldb/agent-harness/cli_anything/lldb/utils/session_client.py:68-74 | lldb/agent-harness/cli_anything/lldb/utils/session_server.py:136-142 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 2) gimp/agent-harness/cli_anything/gimp/utils/gimp_backend.py:38— gimp/agent-harness/cli_anything/gimp/utils/gimp_backend.py:38-44 | inkscape/agent-harness/cli_anything/inkscape/utils/inkscape_backend.py:25-31 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 2) live2d/agent-harness/cli_anything/live2d/core/moc3_parser.py:24— live2d/agent-harness/cli_anything/live2d/core/moc3_parser.py:24-30 | live2d/agent-harness/cli_anything/live2d/core/packager.py:31-37 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) shotcut/agent-harness/cli_anything/shotcut/core/export.py:129— shotcut/agent-harness/cli_anything/shotcut/core/export.py:129-135 | shotcut/agent-harness/cli_anything/shotcut/core/filters.py:753-759 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (10 lines × 2) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:218— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:218-227 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:228-237 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) anygen/agent-harness/cli_anything/anygen/utils/anygen_backend.py:111— anygen/agent-harness/cli_anything/anygen/utils/anygen_backend.py:111-121 | anygen/agent-harness/cli_anything/anygen/utils/anygen_backend.py:259-268 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) browser/agent-harness/cli_anything/browser/browser_cli.py:120— browser/agent-harness/cli_anything/browser/browser_cli.py:120-129 | safari/agent-harness/cli_anything/safari/safari_cli.py:203-212 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `browser/agent-harness/cli_anything/browser/browser_cli.py:120` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:249— kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:249-258 | kdenlive/agent-harness/cli_anything/kdenlive/core/transitions.py:175-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 (10 lines × 2) macrocli/agent-harness/cli_anything/macrocli/backends/gui_macro.py:127— macrocli/agent-harness/cli_anything/macrocli/backends/gui_macro.py:127-136 | macrocli/agent-harness/cli_anything/macrocli/backends/native_api.py:237-246 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `macrocli/agent-harness/cli_anything/macrocli/backends/gui_macro.py:127` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py:105— macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py:105-114 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:88-97 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py:105` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) n8n/agent-harness/cli_anything/n8n/n8n_cli.py:808— n8n/agent-harness/cli_anything/n8n/n8n_cli.py:808-817 | n8n/agent-harness/cli_anything/n8n/n8n_cli.py:1737-1746 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/backend/commands.py:105— nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/backend/commands.py:105-114 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/backend/commands.py:135-144 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) sbox/agent-harness/cli_anything/sbox/core/localization.py:25— sbox/agent-harness/cli_anything/sbox/core/localization.py:25-35 | sbox/agent-harness/cli_anything/sbox/core/sound.py:56-65 — 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 (10 lines × 2) unimol_tools/agent-harness/cli_anything/unimol_tools/unimol_tools_cli.py:721— unimol_tools/agent-harness/cli_anything/unimol_tools/unimol_tools_cli.py:721-730 | unimol_tools/agent-harness/cli_anything/unimol_tools/unimol_tools_cli.py:762-771 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `unimol_tools/agent-harness/cli_anything/unimol_tools/unimol_tools_cli.py:732` calls `echo` and `unimol_tools/agent-harness/cli_anything/unimol_tools/unimol_tools_cli.py:773` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 2) freecad/agent-harness/cli_anything/freecad/core/draft.py:1241— freecad/agent-harness/cli_anything/freecad/core/draft.py:1241-1260 | freecad/agent-harness/cli_anything/freecad/core/parts.py:413-422 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (10 lines × 2) libreoffice/agent-harness/cli_anything/libreoffice/core/calc.py:174— libreoffice/agent-harness/cli_anything/libreoffice/core/calc.py:174-183 | libreoffice/agent-harness/cli_anything/libreoffice/core/impress.py:173-183 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (10 lines × 2) libreoffice/agent-harness/cli_anything/libreoffice/core/impress.py:45— libreoffice/agent-harness/cli_anything/libreoffice/core/impress.py:45-54 | libreoffice/agent-harness/cli_anything/libreoffice/core/writer.py:153-162 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (10 lines × 2) REDACTED:372— REDACTED:372-381 | REDACTED:384-393 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_listener.swift:51— nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_listener.swift:51-60 | nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_publisher.swift:57-66 — before extracting anything, compare `nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_listener.swift` and `nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_publisher.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_listener.swift:51` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) blender/agent-harness/cli_anything/blender/core/preview.py:509— blender/agent-harness/cli_anything/blender/core/preview.py:509-521 | freecad/agent-harness/cli_anything/freecad/core/preview.py:522-534 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 430 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `blender/agent-harness/cli_anything/blender/core/preview.py:509` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `blender/agent-harness/cli_anything/blender/core/preview.py:508` calls `get_project` and `freecad/agent-harness/cli_anything/freecad/core/preview.py:521` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13 lines × 2) docs/scripts/blender_orbital_relay_drone_demo.py:183— docs/scripts/blender_orbital_relay_drone_demo.py:183-195 | docs/scripts/blender_orbital_relay_drone_demo.py:230-242 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `docs/scripts/blender_orbital_relay_drone_demo.py:183` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) docs/scripts/blender_preview_story_demo.py:266— docs/scripts/blender_preview_story_demo.py:266-278 | docs/scripts/freecad_live_preview_demo.py:4417-4429 — 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 (13 lines × 2) drawio/agent-harness/cli_anything/drawio/drawio_cli.py:623— drawio/agent-harness/cli_anything/drawio/drawio_cli.py:623-635 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:1177-1189 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note first that the copies are not typed on the same thing: `ReplSkin` names `cli_anything.drawio.utils.repl_skin` in one and `cli_anything.shotcut.utils.repl_skin` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:1192` calls `_run_repl`, `create_prompt_session` and `drawio/agent-harness/cli_anything/drawio/drawio_cli.py:638` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13 lines × 2) jumpserver/agent-harness/cli_anything/jumpserver/core/commands_perm.py:92— jumpserver/agent-harness/cli_anything/jumpserver/core/commands_perm.py:92-104 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_user.py:243-255 — before extracting anything, compare `jumpserver/agent-harness/cli_anything/jumpserver/core/commands_perm.py` and `jumpserver/agent-harness/cli_anything/jumpserver/core/commands_user.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) jumpserver/agent-harness/cli_anything/jumpserver/core/commands_perm.py:134— jumpserver/agent-harness/cli_anything/jumpserver/core/commands_perm.py:134-146 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_user.py:122-134 — before extracting anything, compare `jumpserver/agent-harness/cli_anything/jumpserver/core/commands_perm.py` and `jumpserver/agent-harness/cli_anything/jumpserver/core/commands_user.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) live2d/agent-harness/cli_anything/live2d/live2d_cli.py:1718— live2d/agent-harness/cli_anything/live2d/live2d_cli.py:1718-1736 | live2d/agent-harness/cli_anything/live2d/live2d_cli.py:1750-1762 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `live2d/agent-harness/cli_anything/live2d/live2d_cli.py:1764` calls `echo` and `live2d/agent-harness/cli_anything/live2d/live2d_cli.py:1738` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13 lines × 2) lldb/agent-harness/cli_anything/lldb/lldb_cli.py:694— lldb/agent-harness/cli_anything/lldb/lldb_cli.py:694-706 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/nsight_graphics_cli.py:498-510 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:330— renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:330-342 | renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:344-356 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 2) sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1006— sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1006-1018 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1969-1981 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) zotero/agent-harness/cli_anything/zotero/core/experimental.py:91— zotero/agent-harness/cli_anything/zotero/core/experimental.py:91-103 | zotero/agent-harness/cli_anything/zotero/core/experimental.py:134-146 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `zotero/agent-harness/cli_anything/zotero/core/experimental.py:132` calls `RuntimeError` and `zotero/agent-harness/cli_anything/zotero/core/experimental.py:90` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13 lines × 2) adguardhome/agent-harness/cli_anything/adguardhome/core/blocking.py:7— adguardhome/agent-harness/cli_anything/adguardhome/core/blocking.py:7-47 | adguardhome/agent-harness/cli_anything/adguardhome/core/stats.py:7-19 — 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 (13 lines × 2) obs-studio/agent-harness/cli_anything/obs_studio/core/scenes.py:64— obs-studio/agent-harness/cli_anything/obs_studio/core/scenes.py:64-76 | obs-studio/agent-harness/cli_anything/obs_studio/core/transitions.py:84-96 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) shotcut/agent-harness/cli_anything/shotcut/core/filters.py:733— shotcut/agent-harness/cli_anything/shotcut/core/filters.py:733-749 | shotcut/agent-harness/cli_anything/shotcut/core/transitions.py:145-157 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:183— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:183-193 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:187-197 — before extracting anything, compare `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs` and `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:183` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) .github/scripts/generate_meta_skill.py:99— .github/scripts/generate_meta_skill.py:99-109 | .github/scripts/generate_meta_skill.py:121-131 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `.github/scripts/generate_meta_skill.py:133` calls `get`, `str`, `startswith` and `.github/scripts/generate_meta_skill.py:110` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 2) cli-hub/cli_hub/preview.py:22— cli-hub/cli_hub/preview.py:22-32 | cli-hub/cli_hub/preview.py:36-46 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) cli-hub/cli_hub/preview.py:438— cli-hub/cli_hub/preview.py:438-448 | cli-hub/cli_hub/preview.py:457-467 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `cli-hub/cli_hub/preview.py:438` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `cli-hub/cli_hub/preview.py:469` calls `_coalesce`, `get` and `cli-hub/cli_hub/preview.py:449` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 2) docs/scripts/blender_orbital_relay_drone_demo.py:254— docs/scripts/blender_orbital_relay_drone_demo.py:254-264 | docs/scripts/blender_orbital_relay_drone_demo.py:291-301 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `docs/scripts/blender_orbital_relay_drone_demo.py:254` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) drawio/agent-harness/cli_anything/drawio/drawio_cli.py:109— drawio/agent-harness/cli_anything/drawio/drawio_cli.py:109-119 | openscreen/agent-harness/cli_anything/openscreen/openscreen_cli.py:98-108 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `drawio/agent-harness/cli_anything/drawio/drawio_cli.py:109` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) freecad/agent-harness/cli_anything/freecad/utils/freecad_macro_gen.py:289— freecad/agent-harness/cli_anything/freecad/utils/freecad_macro_gen.py:289-299 | freecad/agent-harness/cli_anything/freecad/utils/freecad_macro_gen.py:309-319 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) jumpserver/agent-harness/cli_anything/jumpserver/core/commands_asset.py:153— jumpserver/agent-harness/cli_anything/jumpserver/core/commands_asset.py:153-163 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_user.py:115-125 — 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 (11 lines × 2) macrocli/agent-harness/cli_anything/macrocli/backends/gui_agent.py:106— macrocli/agent-harness/cli_anything/macrocli/backends/gui_agent.py:106-116 | macrocli/agent-harness/cli_anything/macrocli/core/llm_assist.py:113-123 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (11 lines × 2) macrocli/agent-harness/cli_anything/macrocli/backends/visual_anchor.py:553— macrocli/agent-harness/cli_anything/macrocli/backends/visual_anchor.py:553-563 | macrocli/agent-harness/cli_anything/macrocli/backends/visual_anchor.py:565-575 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) macrocli/agent-harness/cli_anything/macrocli/core/recorder.py:398— macrocli/agent-harness/cli_anything/macrocli/core/recorder.py:398-409 | macrocli/agent-harness/cli_anything/macrocli/core/recorder.py:425-435 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `macrocli/agent-harness/cli_anything/macrocli/core/recorder.py:398` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11 lines × 2) seaclip/agent-harness/cli_anything/seaclip/core/issues.py:94— seaclip/agent-harness/cli_anything/seaclip/core/issues.py:94-104 | seaclip/agent-harness/cli_anything/seaclip/core/issues.py:119-129 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) zotero/agent-harness/cli_anything/zotero/utils/zotero_sqlite.py:673— zotero/agent-harness/cli_anything/zotero/utils/zotero_sqlite.py:673-683 | zotero/agent-harness/cli_anything/zotero/utils/zotero_sqlite.py:713-723 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×12
Members sharing a duplicated core (4 members, 50+ identical tokens) anygen/agent-harness/cli_anything/anygen/anygen_cli.py:358— anygen/agent-harness/cli_anything/anygen/anygen_cli.py:358-363 | minimax/agent-harness/cli_anything/minimax/minimax_cli.py:383-388 | novita/agent-harness/cli_anything/novita/novita_cli.py:272-277 | rms/agent-harness/cli_anything/rms/rms_cli.py:1088-1093 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) anygen/agent-harness/cli_anything/anygen/anygen_cli.py:369— anygen/agent-harness/cli_anything/anygen/anygen_cli.py:369-386 | minimax/agent-harness/cli_anything/minimax/minimax_cli.py:394-411 | novita/agent-harness/cli_anything/novita/novita_cli.py:283-300 | rms/agent-harness/cli_anything/rms/rms_cli.py:1099-1113 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) anygen/agent-harness/cli_anything/anygen/anygen_cli.py:462— anygen/agent-harness/cli_anything/anygen/anygen_cli.py:462-515 | minimax/agent-harness/cli_anything/minimax/minimax_cli.py:497-550 | novita/agent-harness/cli_anything/novita/novita_cli.py:370-419 | rms/agent-harness/cli_anything/rms/rms_cli.py:1177-1242 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) audacity/agent-harness/cli_anything/audacity/audacity_cli.py:186— audacity/agent-harness/cli_anything/audacity/audacity_cli.py:186-196 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:175-185 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:181-191 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:173-183 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/cloudanalyzer_cli.py:42— cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/cloudanalyzer_cli.py:42-58 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:87-104 | eez-studio/agent-harness/cli_anything/eez_studio/eez_studio_cli.py:67-83 | macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py:67-83 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) comfyui/agent-harness/cli_anything/comfyui/core/models.py:11— comfyui/agent-harness/cli_anything/comfyui/core/models.py:11-36 | comfyui/agent-harness/cli_anything/comfyui/core/models.py:40-65 | comfyui/agent-harness/cli_anything/comfyui/core/models.py:69-94 | comfyui/agent-harness/cli_anything/comfyui/core/models.py:98-123 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) docs/scripts/freecad_live_preview_demo.py:3653— docs/scripts/freecad_live_preview_demo.py:3653-3683 | docs/scripts/freecad_live_preview_demo.py:3756-3789 | docs/scripts/freecad_live_preview_demo.py:3828-3871 | docs/scripts/freecad_live_preview_demo.py:3875-3924 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) joplin/agent-harness/cli_anything/joplin/joplin_cli.py:401— joplin/agent-harness/cli_anything/joplin/joplin_cli.py:401-407 | joplin/agent-harness/cli_anything/joplin/joplin_cli.py:532-538 | joplin/agent-harness/cli_anything/joplin/joplin_cli.py:547-553 | joplin/agent-harness/cli_anything/joplin/joplin_cli.py:723-729 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) jumpserver/agent-harness/cli_anything/jumpserver/core/commands_account.py:84— jumpserver/agent-harness/cli_anything/jumpserver/core/commands_account.py:84-112 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_perm.py:75-105 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_user.py:78-102 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_user.py:241-256 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) jumpserver/agent-harness/cli_anything/jumpserver/core/commands_account.py:126— jumpserver/agent-harness/cli_anything/jumpserver/core/commands_account.py:126-158 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_asset.py:142-171 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_perm.py:120-147 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_user.py:114-135 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) jumpserver/agent-harness/cli_anything/jumpserver/core/commands_account.py:166— jumpserver/agent-harness/cli_anything/jumpserver/core/commands_account.py:166-177 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_asset.py:282-293 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_perm.py:155-166 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_user.py:143-154 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) tigris/agent-harness/cli_anything/tigris/core/access_key.py:24— tigris/agent-harness/cli_anything/tigris/core/access_key.py:24-53 | tigris/agent-harness/cli_anything/tigris/core/iam.py:34-63 | tigris/agent-harness/cli_anything/tigris/core/iam.py:100-129 | tigris/agent-harness/cli_anything/tigris/core/object.py:46-75 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Duplicated block (12 lines × 2) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:224— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:224-235 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:342-353 — before extracting anything, compare `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs` and `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 2) audacity/agent-harness/cli_anything/audacity/audacity_cli.py:786— audacity/agent-harness/cli_anything/audacity/audacity_cli.py:786-797 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:561-573 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12 lines × 2) calibre/agent-harness/cli_anything/calibre/calibre_cli.py:309— calibre/agent-harness/cli_anything/calibre/calibre_cli.py:309-320 | calibre/agent-harness/cli_anything/calibre/calibre_cli.py:499-510 — 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) cli-hub/cli_hub/installer.py:342— cli-hub/cli_hub/installer.py:342-353 | cli-hub/cli_hub/installer.py:375-386 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) firefly-iii/agent-harness/cli_anything/firefly_iii/core/recurrences.py:70— firefly-iii/agent-harness/cli_anything/firefly_iii/core/recurrences.py:70-81 | firefly-iii/agent-harness/cli_anything/firefly_iii/core/recurrences.py:124-135 — 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) minimax/agent-harness/cli_anything/minimax/minimax_cli.py:152— minimax/agent-harness/cli_anything/minimax/minimax_cli.py:152-163 | novita/agent-harness/cli_anything/novita/novita_cli.py:145-157 — before extracting anything, compare `minimax/agent-harness/cli_anything/minimax/minimax_cli.py` and `novita/agent-harness/cli_anything/novita/novita_cli.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 180 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 2) musescore/agent-harness/cli_anything/musescore/musescore_cli.py:201— musescore/agent-harness/cli_anything/musescore/musescore_cli.py:201-212 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:270-281 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `musescore/agent-harness/cli_anything/musescore/musescore_cli.py:201` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) openscreen/agent-harness/cli_anything/openscreen/core/preview.py:125— openscreen/agent-harness/cli_anything/openscreen/core/preview.py:125-136 | renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:137-148 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `openscreen/agent-harness/cli_anything/openscreen/core/preview.py:125` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:135— renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:135-146 | renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:313-324 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:135` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) shotcut/agent-harness/cli_anything/shotcut/core/compositing.py:112— shotcut/agent-harness/cli_anything/shotcut/core/compositing.py:112-123 | shotcut/agent-harness/cli_anything/shotcut/core/compositing.py:162-173 — 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) shotcut/agent-harness/cli_anything/shotcut/core/project.py:177— shotcut/agent-harness/cli_anything/shotcut/core/project.py:177-188 | shotcut/agent-harness/cli_anything/shotcut/core/timeline.py:408-419 — 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 (12 lines × 2) kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:308— kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:308-322 | obs-studio/agent-harness/cli_anything/obs_studio/core/filters.py:268-279 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication· Members sharing a duplicated core (6 members, 50+ identical tokens) · ×11
Members sharing a duplicated core (6 members, 50+ identical tokens) audacity/agent-harness/cli_anything/audacity/core/project.py:68— audacity/agent-harness/cli_anything/audacity/core/project.py:68-75 | blender/agent-harness/cli_anything/blender/core/scene.py:135-142 | gimp/agent-harness/cli_anything/gimp/core/project.py:77-84 | REDACTED:102-109 | kdenlive/agent-harness/cli_anything/kdenlive/core/project.py:134-141 | obs-studio/agent-harness/cli_anything/obs_studio/core/project.py:93-100 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) blender/agent-harness/cli_anything/blender/core/lighting.py:35— blender/agent-harness/cli_anything/blender/core/lighting.py:35-42 | blender/agent-harness/cli_anything/blender/core/lighting.py:46-53 | blender/agent-harness/cli_anything/blender/core/materials.py:41-49 | freecad/agent-harness/cli_anything/freecad/core/body.py:50-58 | freecad/agent-harness/cli_anything/freecad/core/materials.py:182-190 | freecad/agent-harness/cli_anything/freecad/core/sketch.py:76-84 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:61— blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:61-67 | cli-anything-plugin/preview_bundle.py:61-67 | freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py:61-67 | openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.py:61-67 | renderdoc/agent-harness/cli_anything/renderdoc/utils/preview_bundle.py:61-67 | shotcut/agent-harness/cli_anything/shotcut/utils/preview_bundle.py:61-67 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:111— blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:111-131 | cli-anything-plugin/preview_bundle.py:111-131 | freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py:111-131 | openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.py:111-131 | renderdoc/agent-harness/cli_anything/renderdoc/utils/preview_bundle.py:111-131 | shotcut/agent-harness/cli_anything/shotcut/utils/preview_bundle.py:111-131 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:141— blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:141-168 | cli-anything-plugin/preview_bundle.py:141-168 | freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py:141-168 | openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.py:141-168 | renderdoc/agent-harness/cli_anything/renderdoc/utils/preview_bundle.py:141-168 | shotcut/agent-harness/cli_anything/shotcut/utils/preview_bundle.py:141-168 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:182— blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:182-223 | cli-anything-plugin/preview_bundle.py:182-223 | freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py:182-223 | openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.py:182-223 | renderdoc/agent-harness/cli_anything/renderdoc/utils/preview_bundle.py:182-223 | shotcut/agent-harness/cli_anything/shotcut/utils/preview_bundle.py:182-223 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:236— blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:236-250 | cli-anything-plugin/preview_bundle.py:236-250 | freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py:236-250 | openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.py:236-250 | renderdoc/agent-harness/cli_anything/renderdoc/utils/preview_bundle.py:236-250 | shotcut/agent-harness/cli_anything/shotcut/utils/preview_bundle.py:236-250 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:254— blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:254-259 | cli-anything-plugin/preview_bundle.py:254-259 | freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py:254-259 | openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.py:254-259 | renderdoc/agent-harness/cli_anything/renderdoc/utils/preview_bundle.py:254-259 | shotcut/agent-harness/cli_anything/shotcut/utils/preview_bundle.py:254-259 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:280— blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:280-311 | cli-anything-plugin/preview_bundle.py:280-311 | freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py:280-311 | openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.py:280-311 | renderdoc/agent-harness/cli_anything/renderdoc/utils/preview_bundle.py:280-311 | shotcut/agent-harness/cli_anything/shotcut/utils/preview_bundle.py:280-311 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:375— blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:375-402 | cli-anything-plugin/preview_bundle.py:375-402 | freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py:375-402 | openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.py:375-402 | renderdoc/agent-harness/cli_anything/renderdoc/utils/preview_bundle.py:375-402 | shotcut/agent-harness/cli_anything/shotcut/utils/preview_bundle.py:375-402 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:422— blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:422-468 | cli-anything-plugin/preview_bundle.py:422-468 | freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py:422-468 | openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.py:422-468 | renderdoc/agent-harness/cli_anything/renderdoc/utils/preview_bundle.py:422-468 | shotcut/agent-harness/cli_anything/shotcut/utils/preview_bundle.py:422-468 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×11
Members sharing a duplicated core (5 members, 50+ identical tokens) audacity/agent-harness/cli_anything/audacity/core/effects.py:184— audacity/agent-harness/cli_anything/audacity/core/effects.py:184-228 | blender/agent-harness/cli_anything/blender/core/materials.py:153-196 | blender/agent-harness/cli_anything/blender/core/modifiers.py:151-187 | freecad/agent-harness/cli_anything/freecad/core/materials.py:474-523 | gimp/agent-harness/cli_anything/gimp/core/filters.py:247-283 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) audacity/agent-harness/cli_anything/audacity/core/project.py:79— audacity/agent-harness/cli_anything/audacity/core/project.py:79-84 | blender/agent-harness/cli_anything/blender/core/scene.py:146-151 | REDACTED:113-118 | libreoffice/agent-harness/cli_anything/libreoffice/core/document.py:142-147 | obs-studio/agent-harness/cli_anything/obs_studio/core/project.py:104-109 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) blender/agent-harness/cli_anything/blender/core/preview.py:292— blender/agent-harness/cli_anything/blender/core/preview.py:292-436 | freecad/agent-harness/cli_anything/freecad/core/preview.py:321-451 | openscreen/agent-harness/cli_anything/openscreen/core/preview.py:107-247 | renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:121-282 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:120-260 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:927— cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:927-943 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:952-968 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:992-1011 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1020-1036 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1098-1119 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) drawio/agent-harness/cli_anything/drawio/utils/drawio_backend.py:71— drawio/agent-harness/cli_anything/drawio/utils/drawio_backend.py:71-145 | kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py:107-168 | kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py:182-230 | shotcut/agent-harness/cli_anything/shotcut/utils/melt_backend.py:101-162 | shotcut/agent-harness/cli_anything/shotcut/utils/melt_backend.py:176-224 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) joplin/agent-harness/cli_anything/joplin/joplin_cli.py:255— joplin/agent-harness/cli_anything/joplin/joplin_cli.py:255-261 | joplin/agent-harness/cli_anything/joplin/joplin_cli.py:286-292 | joplin/agent-harness/cli_anything/joplin/joplin_cli.py:344-350 | joplin/agent-harness/cli_anything/joplin/joplin_cli.py:371-377 | joplin/agent-harness/cli_anything/joplin/joplin_cli.py:386-392 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) jumpserver/agent-harness/cli_anything/jumpserver/core/commands_account.py:126— jumpserver/agent-harness/cli_anything/jumpserver/core/commands_account.py:126-158 | sbox/agent-harness/cli_anything/sbox/core/sound.py:104-130 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:244-271 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:565-588 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:637-660 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) libreoffice/agent-harness/cli_anything/libreoffice/core/writer.py:22— libreoffice/agent-harness/cli_anything/libreoffice/core/writer.py:22-38 | libreoffice/agent-harness/cli_anything/libreoffice/core/writer.py:48-67 | libreoffice/agent-harness/cli_anything/libreoffice/core/writer.py:76-96 | libreoffice/agent-harness/cli_anything/libreoffice/core/writer.py:106-127 | libreoffice/agent-harness/cli_anything/libreoffice/core/writer.py:134-146 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:379— renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:379-429 | renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:442-538 | renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:891-1012 | renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:1331-1354 | renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:1368-1428 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1260— sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1260-1285 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1297-1313 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1849-1860 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1938-1949 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:2025-2032 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) tigris/agent-harness/cli_anything/tigris/core/access_key.py:60— tigris/agent-harness/cli_anything/tigris/core/access_key.py:60-77 | tigris/agent-harness/cli_anything/tigris/core/access_key.py:84-101 | tigris/agent-harness/cli_anything/tigris/core/access_key.py:159-179 | tigris/agent-harness/cli_anything/tigris/core/bucket.py:94-111 | tigris/agent-harness/cli_anything/tigris/core/object.py:162-179 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Duplicated block (13 lines × 3) QGIS/agent-harness/cli_anything/qgis/core/session.py:18— QGIS/agent-harness/cli_anything/qgis/core/session.py:18-32 | eez-studio/agent-harness/cli_anything/eez_studio/core/project.py:36-48 | zotero/agent-harness/cli_anything/zotero/core/session.py:49-61 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Note first that the copies are not typed on the same thing: the declarations holding them bind `path` to `str` in one and `str | os.PathLike[str]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `QGIS/agent-harness/cli_anything/qgis/core/session.py:17` calls `makedirs`, `dirname`, `abspath` and `zotero/agent-harness/cli_anything/zotero/core/session.py:48` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13 lines × 3) blender/agent-harness/cli_anything/blender/core/preview.py:294— blender/agent-harness/cli_anything/blender/core/preview.py:294-306 | openscreen/agent-harness/cli_anything/openscreen/core/preview.py:109-121 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:122-134 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `blender/agent-harness/cli_anything/blender/core/preview.py:294` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 3) blender/agent-harness/cli_anything/blender/core/preview.py:677— blender/agent-harness/cli_anything/blender/core/preview.py:677-689 | freecad/agent-harness/cli_anything/freecad/core/preview.py:687-699 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:641-653 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 430 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 3) calibre/agent-harness/cli_anything/calibre/utils/calibre_backend.py:107— calibre/agent-harness/cli_anything/calibre/utils/calibre_backend.py:107-119 | calibre/agent-harness/cli_anything/calibre/utils/calibre_backend.py:146-158 | calibre/agent-harness/cli_anything/calibre/utils/calibre_backend.py:185-197 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 3) jumpserver/agent-harness/cli_anything/jumpserver/core/commands_asset.py:331— jumpserver/agent-harness/cli_anything/jumpserver/core/commands_asset.py:331-343 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_system.py:27-39 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_system.py:146-158 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (13 lines × 3) jumpserver/agent-harness/cli_anything/jumpserver/core/commands_audit.py:60— jumpserver/agent-harness/cli_anything/jumpserver/core/commands_audit.py:60-72 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_session.py:34-46 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_session.py:123-135 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `jumpserver/agent-harness/cli_anything/jumpserver/core/commands_session.py:48` calls `str`, `lower` and `jumpserver/agent-harness/cli_anything/jumpserver/core/commands_audit.py:74` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13 lines × 3) kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:197— kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:197-209 | kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:226-238 | kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:281-293 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 3) REDACTED:84— REDACTED:84-96 | macrocli/agent-harness/cli_anything/macrocli/backends/semantic_ui.py:278-290 | macrocli/agent-harness/cli_anything/macrocli/backends/visual_anchor.py:341-353 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 3) renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:189— renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:189-201 | renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:401-413 | renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:416-428 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:189` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:188` calls `get` and `renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:400` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13 lines × 3) sbox/agent-harness/cli_anything/sbox/sbox_cli.py:252— sbox/agent-harness/cli_anything/sbox/sbox_cli.py:252-264 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:569-581 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:641-653 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (13 lines × 3) blender/agent-harness/cli_anything/blender/core/preview.py:159— blender/agent-harness/cli_anything/blender/core/preview.py:159-171 | freecad/agent-harness/cli_anything/freecad/core/preview.py:167-179 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:359-371 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 430 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15 lines × 2) anygen/agent-harness/cli_anything/anygen/utils/anygen_backend.py:174— anygen/agent-harness/cli_anything/anygen/utils/anygen_backend.py:174-188 | anygen/agent-harness/cli_anything/anygen/utils/anygen_backend.py:248-262 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 2) eez-studio/agent-harness/cli_anything/eez_studio/core/project.py:33— eez-studio/agent-harness/cli_anything/eez_studio/core/project.py:33-47 | zotero/agent-harness/cli_anything/zotero/core/session.py:46-60 — before extracting anything, compare `eez-studio/agent-harness/cli_anything/eez_studio/core/project.py` and `zotero/agent-harness/cli_anything/zotero/core/session.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `path` to `str | os.PathLike[str]` in one and `Path` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (15 lines × 2) firefly-iii/agent-harness/cli_anything/firefly_iii/core/bills.py:95— firefly-iii/agent-harness/cli_anything/firefly_iii/core/bills.py:95-109 | firefly-iii/agent-harness/cli_anything/firefly_iii/core/recurrences.py:58-80 — 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 (15 lines × 2) firefly-iii/agent-harness/cli_anything/firefly_iii/core/bills.py:99— firefly-iii/agent-harness/cli_anything/firefly_iii/core/bills.py:99-113 | firefly-iii/agent-harness/cli_anything/firefly_iii/core/recurrences.py:116-130 — 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 (15 lines × 2) jumpserver/agent-harness/cli_anything/jumpserver/core/commands_audit.py:62— jumpserver/agent-harness/cli_anything/jumpserver/core/commands_audit.py:62-76 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_session.py:125-139 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `jumpserver/agent-harness/cli_anything/jumpserver/core/commands_session.py:145` calls `group`, `terminal_group` and `jumpserver/agent-harness/cli_anything/jumpserver/core/commands_audit.py:82` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (15 lines × 2) jumpserver/agent-harness/cli_anything/jumpserver/core/commands_perm.py:33— jumpserver/agent-harness/cli_anything/jumpserver/core/commands_perm.py:33-47 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_user.py:39-53 — before extracting anything, compare `jumpserver/agent-harness/cli_anything/jumpserver/core/commands_perm.py` and `jumpserver/agent-harness/cli_anything/jumpserver/core/commands_user.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 2) minimax/agent-harness/cli_anything/minimax/core/session.py:41— minimax/agent-harness/cli_anything/minimax/core/session.py:41-55 | novita/agent-harness/cli_anything/novita/core/session.py:41-55 — before extracting anything, compare `minimax/agent-harness/cli_anything/minimax/core/session.py` and `novita/agent-harness/cli_anything/novita/core/session.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 90 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 2) sbox/agent-harness/cli_anything/sbox/sbox_cli.py:747— sbox/agent-harness/cli_anything/sbox/sbox_cli.py:747-761 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1029-1043 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 2) shotcut/agent-harness/cli_anything/shotcut/core/timeline.py:689— shotcut/agent-harness/cli_anything/shotcut/core/timeline.py:689-704 | shotcut/agent-harness/cli_anything/shotcut/core/timeline.py:734-748 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 2) firefly-iii/agent-harness/cli_anything/firefly_iii/core/budgets.py:56— firefly-iii/agent-harness/cli_anything/firefly_iii/core/budgets.py:56-70 | firefly-iii/agent-harness/cli_anything/firefly_iii/core/categories.py:55-69 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 3) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:253— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:253-259 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:520-526 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:593-599 — 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 (7 lines × 3) macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py:110— macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py:110-117 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:86-92 | rms/agent-harness/cli_anything/rms/rms_cli.py:85-92 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 3) renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:482— renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:482-488 | renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:990-996 | renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:1402-1408 — 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 (7 lines × 3) tigris/agent-harness/cli_anything/tigris/core/access_key.py:119— tigris/agent-harness/cli_anything/tigris/core/access_key.py:119-125 | tigris/agent-harness/cli_anything/tigris/core/bucket.py:57-63 | tigris/agent-harness/cli_anything/tigris/core/bucket.py:81-87 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (7 lines × 3) blender/agent-harness/cli_anything/blender/core/preview.py:205— blender/agent-harness/cli_anything/blender/core/preview.py:205-211 | freecad/agent-harness/cli_anything/freecad/core/preview.py:213-219 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:398-404 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 430 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 3) drawio/agent-harness/cli_anything/drawio/core/session.py:76— drawio/agent-harness/cli_anything/drawio/core/session.py:76-82 | openscreen/agent-harness/cli_anything/openscreen/core/session.py:83-89 | shotcut/agent-harness/cli_anything/shotcut/core/session.py:98-104 — before extracting anything, compare `drawio/agent-harness/cli_anything/drawio/core/session.py` and `openscreen/agent-harness/cli_anything/openscreen/core/session.py` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 3) freecad/agent-harness/cli_anything/freecad/core/body.py:69— freecad/agent-harness/cli_anything/freecad/core/body.py:69-75 | freecad/agent-harness/cli_anything/freecad/core/materials.py:194-200 | freecad/agent-harness/cli_anything/freecad/core/sketch.py:102-108 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Duplicated block (7 lines × 3) freecad/agent-harness/cli_anything/freecad/core/body.py:79— freecad/agent-harness/cli_anything/freecad/core/body.py:79-85 | freecad/agent-harness/cli_anything/freecad/core/materials.py:204-210 | freecad/agent-harness/cli_anything/freecad/core/sketch.py:112-118 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 3) libreoffice/agent-harness/cli_anything/libreoffice/core/calc.py:7— libreoffice/agent-harness/cli_anything/libreoffice/core/calc.py:7-13 | libreoffice/agent-harness/cli_anything/libreoffice/core/impress.py:7-13 | libreoffice/agent-harness/cli_anything/libreoffice/core/writer.py:7-13 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Duplicated block (7 lines × 3) minimax/agent-harness/cli_anything/minimax/utils/minimax_backend.py:213— minimax/agent-harness/cli_anything/minimax/utils/minimax_backend.py:213-219 | novita/agent-harness/cli_anything/novita/utils/novita_backend.py:28-34 | rms/agent-harness/cli_anything/rms/utils/rms_backend.py:28-34 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Sync-over-async blocking sketch/agent-harness/src/builder.js:55— `fs.writeFileSync` in `buildSketchFile` 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 sketch/agent-harness/src/builder.js:327— `fs.readFileSync` in `build` 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 sketch/agent-harness/src/builder.js:381— `fs.existsSync` in `build` 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 sketch/agent-harness/src/builder.js:382— `fs.mkdirSync` in `build` 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 — 5 blocking call(s) on async work (.Wait()/.GetAwaiter().GetResult()) — these waste a thread and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:278— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:203— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:249— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:265— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:311— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Duplicated block (6 lines × 3) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:320— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:320-325 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:368-374 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:461-466 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:320` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (6 lines × 3) audacity/agent-harness/cli_anything/audacity/core/clips.py:133— audacity/agent-harness/cli_anything/audacity/core/clips.py:133-138 | blender/agent-harness/cli_anything/blender/core/modifiers.py:245-250 | gimp/agent-harness/cli_anything/gimp/core/filters.py:325-330 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/modifiers.py` and `gimp/agent-harness/cli_anything/gimp/core/filters.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (6 lines × 3) drawio/agent-harness/cli_anything/drawio/utils/drawio_backend.py:108— drawio/agent-harness/cli_anything/drawio/utils/drawio_backend.py:108-113 | musescore/agent-harness/cli_anything/musescore/utils/musescore_backend.py:170-175 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/core/gpu_trace.py:649-654 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `drawio/agent-harness/cli_anything/drawio/utils/drawio_backend.py:115` calls `extend`, `str` and `nsight-graphics/agent-harness/cli_anything/nsight_graphics/core/gpu_trace.py:655` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 3) krita/agent-harness/cli_anything/krita/krita_cli.py:61— krita/agent-harness/cli_anything/krita/krita_cli.py:61-66 | krita/agent-harness/cli_anything/krita/krita_cli.py:68-73 | krita/agent-harness/cli_anything/krita/krita_cli.py:75-80 — 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 × 3) blender/agent-harness/cli_anything/blender/core/preview.py:97— blender/agent-harness/cli_anything/blender/core/preview.py:97-102 | freecad/agent-harness/cli_anything/freecad/core/preview.py:105-110 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:310-315 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 430 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 3) blender/agent-harness/cli_anything/blender/core/preview.py:150— blender/agent-harness/cli_anything/blender/core/preview.py:150-155 | freecad/agent-harness/cli_anything/freecad/core/preview.py:158-163 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:350-355 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 430 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (6 lines × 3) blender/agent-harness/cli_anything/blender/core/preview.py:189— blender/agent-harness/cli_anything/blender/core/preview.py:189-194 | freecad/agent-harness/cli_anything/freecad/core/preview.py:197-202 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:389-394 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 430 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (6 lines × 3) drawio/agent-harness/cli_anything/drawio/core/session.py:162— drawio/agent-harness/cli_anything/drawio/core/session.py:162-167 | openscreen/agent-harness/cli_anything/openscreen/core/session.py:203-208 | shotcut/agent-harness/cli_anything/shotcut/core/session.py:243-248 — before extracting anything, compare `drawio/agent-harness/cli_anything/drawio/core/session.py` and `openscreen/agent-harness/cli_anything/openscreen/core/session.py` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 3) kdenlive/agent-harness/cli_anything/kdenlive/core/bin.py:64— kdenlive/agent-harness/cli_anything/kdenlive/core/bin.py:64-69 | kdenlive/agent-harness/cli_anything/kdenlive/core/guides.py:48-53 | kdenlive/agent-harness/cli_anything/kdenlive/core/transitions.py:137-142 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 3) QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:165— QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:165-175 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:169-179 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:165-175 — before extracting anything, compare `QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py` and `minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 304 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 3) blender/agent-harness/cli_anything/blender/blender_cli.py:915— blender/agent-harness/cli_anything/blender/blender_cli.py:915-925 | freecad/agent-harness/cli_anything/freecad/freecad_cli.py:2248-2258 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:1041-1051 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Duplicated block (11 lines × 3) blender/agent-harness/cli_anything/blender/core/preview.py:784— blender/agent-harness/cli_anything/blender/core/preview.py:784-794 | freecad/agent-harness/cli_anything/freecad/core/preview.py:794-804 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:747-757 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 430 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `blender/agent-harness/cli_anything/blender/core/preview.py:795` calls `_now_iso` and `freecad/agent-harness/cli_anything/freecad/core/preview.py:805` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 3) drawio/agent-harness/cli_anything/drawio/core/session.py:171— drawio/agent-harness/cli_anything/drawio/core/session.py:171-181 | openscreen/agent-harness/cli_anything/openscreen/core/session.py:212-222 | shotcut/agent-harness/cli_anything/shotcut/core/session.py:252-262 — before extracting anything, compare `drawio/agent-harness/cli_anything/drawio/core/session.py` and `openscreen/agent-harness/cli_anything/openscreen/core/session.py` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 3) jumpserver/agent-harness/cli_anything/jumpserver/core/commands_audit.py:113— jumpserver/agent-harness/cli_anything/jumpserver/core/commands_audit.py:113-123 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_audit.py:159-169 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_audit.py:190-200 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (11 lines × 3) musescore/agent-harness/cli_anything/musescore/musescore_cli.py:202— musescore/agent-harness/cli_anything/musescore/musescore_cli.py:202-212 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:238-248 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:271-281 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `musescore/agent-harness/cli_anything/musescore/musescore_cli.py:202` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 3) blender/agent-harness/cli_anything/blender/core/preview.py:175— blender/agent-harness/cli_anything/blender/core/preview.py:175-185 | freecad/agent-harness/cli_anything/freecad/core/preview.py:183-193 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:375-385 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 430 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 3) blender/agent-harness/cli_anything/blender/core/preview.py:445— blender/agent-harness/cli_anything/blender/core/preview.py:445-455 | freecad/agent-harness/cli_anything/freecad/core/preview.py:460-470 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:269-279 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 430 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (8 lines × 3) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:218— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:218-225 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:228-235 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:238-245 — 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 (8 lines × 3) blender/agent-harness/cli_anything/blender/core/preview.py:215— blender/agent-harness/cli_anything/blender/core/preview.py:215-222 | freecad/agent-harness/cli_anything/freecad/core/preview.py:223-230 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:415-422 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 430 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (8 lines × 3) blender/agent-harness/cli_anything/blender/core/preview.py:514— blender/agent-harness/cli_anything/blender/core/preview.py:514-521 | freecad/agent-harness/cli_anything/freecad/core/preview.py:527-534 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:481-488 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 430 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `blender/agent-harness/cli_anything/blender/core/preview.py:514` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `blender/agent-harness/cli_anything/blender/core/preview.py:513` calls `get` and `shotcut/agent-harness/cli_anything/shotcut/core/preview.py:480` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 3) cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.py:657— cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.py:657-664 | cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.py:713-720 | cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.py:736-743 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.py:657` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 3) inkscape/agent-harness/cli_anything/inkscape/utils/inkscape_backend.py:43— inkscape/agent-harness/cli_anything/inkscape/utils/inkscape_backend.py:43-50 | inkscape/agent-harness/cli_anything/inkscape/utils/inkscape_backend.py:82-89 | inkscape/agent-harness/cli_anything/inkscape/utils/inkscape_backend.py:114-121 — 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 (8 lines × 3) jumpserver/agent-harness/cli_anything/jumpserver/core/commands_account.py:149— jumpserver/agent-harness/cli_anything/jumpserver/core/commands_account.py:149-157 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_perm.py:139-146 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_user.py:127-134 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `jumpserver/agent-harness/cli_anything/jumpserver/core/commands_account.py:149` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 3) openscreen/agent-harness/cli_anything/openscreen/core/timeline.py:130— openscreen/agent-harness/cli_anything/openscreen/core/timeline.py:130-137 | openscreen/agent-harness/cli_anything/openscreen/core/timeline.py:169-176 | openscreen/agent-harness/cli_anything/openscreen/core/timeline.py:258-265 — 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 (8 lines × 3) zotero/agent-harness/cli_anything/zotero/zotero_cli.py:928— zotero/agent-harness/cli_anything/zotero/zotero_cli.py:928-935 | zotero/agent-harness/cli_anything/zotero/zotero_cli.py:938-945 | zotero/agent-harness/cli_anything/zotero/zotero_cli.py:947-954 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `zotero/agent-harness/cli_anything/zotero/zotero_cli.py:928` calls `_repl_echo` and `zotero/agent-harness/cli_anything/zotero/zotero_cli.py:947` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 3) cli-hub/cli_hub/cli.py:281— cli-hub/cli_hub/cli.py:281-285 | cli-hub/cli_hub/cli.py:961-965 | unrealinsights/agent-harness/cli_anything/unrealinsights/unrealinsights_cli.py:159-163 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (5 lines × 3) lldb/agent-harness/cli_anything/lldb/utils/output.py:36— lldb/agent-harness/cli_anything/lldb/utils/output.py:36-40 | renderdoc/agent-harness/cli_anything/renderdoc/utils/output.py:38-43 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/output.py:35-39 — before extracting anything, compare `lldb/agent-harness/cli_anything/lldb/utils/output.py` and `renderdoc/agent-harness/cli_anything/renderdoc/utils/output.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `headers` to `list` in one and `list[str]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (5 lines × 3) audacity/agent-harness/cli_anything/audacity/core/labels.py:48— audacity/agent-harness/cli_anything/audacity/core/labels.py:48-54 | audacity/agent-harness/cli_anything/audacity/core/tracks.py:54-58 | inkscape/agent-harness/cli_anything/inkscape/core/gradients.py:162-166 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (5 lines × 3) blender/agent-harness/cli_anything/blender/core/preview.py:106— blender/agent-harness/cli_anything/blender/core/preview.py:106-110 | freecad/agent-harness/cli_anything/freecad/core/preview.py:114-118 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:290-294 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 430 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 3) blender/agent-harness/cli_anything/blender/core/preview.py:142— blender/agent-harness/cli_anything/blender/core/preview.py:142-146 | freecad/agent-harness/cli_anything/freecad/core/preview.py:150-154 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:342-346 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 430 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (5 lines × 3) iterm2/agent-harness/cli_anything/iterm2_ctl/core/session.py:125— iterm2/agent-harness/cli_anything/iterm2_ctl/core/session.py:125-129 | iterm2/agent-harness/cli_anything/iterm2_ctl/core/session.py:257-261 | iterm2/agent-harness/cli_anything/iterm2_ctl/core/window.py:59-63 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (5 lines × 3) iterm2/agent-harness/cli_anything/iterm2_ctl/core/session.py:247— iterm2/agent-harness/cli_anything/iterm2_ctl/core/session.py:247-251 | iterm2/agent-harness/cli_anything/iterm2_ctl/core/window.py:75-79 | iterm2/agent-harness/cli_anything/iterm2_ctl/core/window.py:122-126 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (5 lines × 3) REDACTED:1621— REDACTED:1621-1625 | REDACTED:1635-1639 | REDACTED:1647-1651 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:1620` calls `add_argument` and `REDACTED:1634` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Swallowed exception (empty catch) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:179— 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) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Helpers.cs:170— 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) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Helpers.cs:173— 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) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:299— 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) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:320— 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) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:341— 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) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:386— 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) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:594— 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.
D4 · Code Duplication· Members sharing a duplicated core (61 members, 50+ identical tokens) · ×7
Members sharing a duplicated core (61 members, 50+ identical tokens) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:203— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:203-234 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:181-212 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:249-280 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:249-280 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:249-280 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:249-280 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:249-280 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:204-235 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:249-280 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:249-280 | cli-anything-plugin/repl_skin.py:249-280 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:249-280 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:249-280 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:249-280 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:249-280 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:249-280 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:249-280 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:214-245 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:249-280 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:249-280 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:249-280 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:249-280 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:249-280 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:249-280 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:249-280 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:249-280 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:249-280 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:249-280 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:249-280 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:203-234 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:249-280 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:186-217 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:249-280 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:249-280 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:254-285 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:249-280 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:249-280 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:249-280 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:249-280 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:249-280 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:249-280 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:249-280 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:249-280 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:249-280 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:249-280 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:249-280 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:249-280 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:249-280 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:249-280 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:249-280 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:249-280 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:249-280 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:249-280 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:214-245 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:203-234 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:181-212 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:252-283 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:249-280 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:249-280 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:249-280 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:249-280 — These 61 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 61 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 61 times.
Members sharing a duplicated core (61 members, 50+ identical tokens) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:238— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:238-260 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:216-238 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:284-306 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:284-306 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:284-306 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:284-306 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:284-306 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:239-260 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:284-306 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:284-306 | cli-anything-plugin/repl_skin.py:284-306 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:284-306 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:284-306 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:284-306 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:284-306 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:284-306 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:284-306 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:249-271 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:284-306 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:284-306 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:284-306 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:284-306 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:284-306 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:284-306 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:284-306 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:284-306 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:284-306 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:284-306 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:284-306 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:238-260 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:284-306 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:222-244 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:284-306 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:284-306 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:289-310 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:284-306 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:284-306 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:284-306 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:284-306 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:284-306 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:284-306 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:284-306 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:284-306 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:284-306 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:284-306 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:284-306 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:284-306 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:284-306 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:284-306 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:284-306 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:284-306 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:284-306 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:284-306 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:249-271 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:238-260 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:216-238 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:287-308 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:284-306 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:284-306 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:284-306 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:284-306 — These 61 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 61 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 61 times.
Members sharing a duplicated core (61 members, 50+ identical tokens) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:334— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:334-347 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:312-325 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:380-393 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:380-393 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:380-393 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:380-393 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:380-393 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:334-347 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:380-393 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:380-393 | cli-anything-plugin/repl_skin.py:380-393 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:380-393 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:380-393 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:380-393 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:380-393 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:380-393 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:380-393 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:345-358 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:380-393 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:380-393 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:380-393 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:380-393 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:380-393 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:380-393 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:380-393 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:380-393 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:380-393 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:380-393 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:380-393 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:334-347 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:380-393 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:320-333 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:380-393 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:380-393 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:384-397 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:380-393 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:380-393 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:380-393 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:380-393 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:380-393 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:380-393 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:380-393 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:380-393 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:380-393 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:380-393 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:380-393 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:380-393 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:380-393 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:380-393 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:380-393 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:380-393 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:380-393 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:380-393 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:345-358 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:334-347 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:312-325 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:382-395 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:380-393 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:380-393 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:380-393 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:380-393 — These 61 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 61 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 61 times.
Members sharing a duplicated core (61 members, 50+ identical tokens) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:350— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:350-364 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:328-342 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:396-410 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:396-410 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:396-410 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:396-410 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:396-410 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:350-364 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:396-410 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:396-410 | cli-anything-plugin/repl_skin.py:396-410 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:396-410 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:396-410 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:396-410 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:396-410 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:396-410 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:396-410 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:361-375 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:396-410 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:396-410 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:396-410 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:396-410 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:396-410 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:396-410 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:396-410 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:396-410 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:396-410 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:396-410 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:396-410 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:350-364 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:396-410 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:336-350 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:396-410 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:396-410 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:400-414 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:396-410 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:396-410 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:396-410 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:396-410 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:396-410 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:396-410 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:396-410 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:396-410 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:396-410 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:396-410 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:396-410 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:396-410 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:396-410 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:396-410 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:396-410 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:396-410 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:396-410 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:396-410 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:361-375 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:350-364 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:328-342 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:398-412 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:396-410 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:396-410 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:396-410 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:396-410 — These 61 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 61 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 61 times.
Members sharing a duplicated core (61 members, 50+ identical tokens) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:419— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:419-430 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:397-408 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:465-476 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:465-476 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:465-476 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:465-476 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:465-476 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:419-430 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:465-476 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:465-476 | cli-anything-plugin/repl_skin.py:465-476 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:465-476 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:465-476 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:465-476 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:465-476 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:465-476 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:465-476 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:430-441 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:465-476 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:465-476 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:465-476 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:465-476 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:465-476 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:465-476 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:465-476 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:465-476 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:465-476 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:465-476 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:465-476 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:419-430 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:465-476 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:405-416 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:465-476 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:465-476 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:467-478 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:465-476 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:465-476 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:465-476 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:465-476 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:465-476 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:465-476 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:465-476 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:465-476 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:465-476 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:465-476 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:465-476 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:465-476 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:465-476 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:465-476 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:465-476 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:465-476 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:465-476 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:465-476 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:430-441 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:419-430 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:397-408 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:467-478 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:465-476 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:465-476 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:465-476 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:465-476 — These 61 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 61 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 61 times.
Members sharing a duplicated core (61 members, 50+ identical tokens) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:466— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:466-483 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:444-461 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:512-529 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:512-529 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:512-529 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:512-529 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:512-529 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:466-483 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:512-529 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:512-529 | cli-anything-plugin/repl_skin.py:512-529 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:512-529 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:512-529 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:512-529 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:512-529 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:512-529 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:512-529 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:477-494 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:512-529 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:512-529 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:512-529 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:512-529 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:512-529 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:512-529 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:512-529 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:512-529 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:512-529 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:512-529 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:512-529 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:466-483 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:512-529 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:457-475 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:512-529 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:512-529 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:513-530 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:512-529 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:512-529 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:512-529 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:512-529 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:512-529 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:512-529 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:512-529 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:512-529 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:512-529 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:512-529 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:512-529 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:512-529 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:512-529 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:512-529 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:512-529 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:512-529 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:512-529 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:512-529 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:477-494 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:466-483 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:444-461 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:513-530 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:512-529 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:512-529 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:512-529 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:512-529 — These 61 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 61 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 61 times.
Members sharing a duplicated core (61 members, 50+ identical tokens) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:488— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:488-505 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:466-483 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:534-551 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:534-551 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:534-551 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:534-551 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:534-551 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:488-505 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:534-551 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:534-551 | cli-anything-plugin/repl_skin.py:534-551 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:534-551 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:534-551 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:534-551 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:534-551 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:534-551 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:534-551 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:499-516 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:534-551 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:534-551 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:534-551 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:534-551 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:534-551 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:534-551 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:534-551 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:534-551 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:534-551 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:534-551 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:534-551 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:488-505 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:534-551 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:480-500 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:534-551 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:534-551 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:535-552 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:534-551 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:534-551 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:534-551 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:534-551 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:534-551 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:534-551 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:534-551 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:534-551 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:534-551 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:534-551 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:534-551 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:534-551 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:534-551 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:534-551 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:534-551 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:534-551 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:534-551 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:534-551 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:499-516 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:488-505 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:466-483 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:535-552 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:534-551 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:534-551 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:534-551 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:534-551 — These 61 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 61 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 61 times.
Duplicated block (17 lines × 2) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:58— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:58-74 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerActions.cs:34-50 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:57` calls `ExecuteEndTurn` and `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerActions.cs:33` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (17 lines × 2) freecad/agent-harness/cli_anything/freecad/core/preview.py:640— freecad/agent-harness/cli_anything/freecad/core/preview.py:640-656 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:594-610 — before extracting anything, compare `freecad/agent-harness/cli_anything/freecad/core/preview.py` and `shotcut/agent-harness/cli_anything/shotcut/core/preview.py` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 375 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (17 lines × 2) macrocli/agent-harness/cli_anything/macrocli/backends/native_api.py:91— macrocli/agent-harness/cli_anything/macrocli/backends/native_api.py:91-107 | macrocli/agent-harness/cli_anything/macrocli/backends/native_api.py:186-202 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (17 lines × 2) mubu/agent-harness/cli_anything/mubu/mubu_cli.py:141— mubu/agent-harness/cli_anything/mubu/mubu_cli.py:141-157 | zotero/agent-harness/cli_anything/zotero/core/session.py:50-66 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note first that the copies are not typed on the same thing: the declarations holding them bind `data` to `dict[str, object]` in one and `dict[str, Any]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (17 lines × 2) REDACTED:134— REDACTED:134-150 | REDACTED:163-179 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:134` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (17 lines × 2) safari/agent-harness/scripts/extract_tools.py:179— safari/agent-harness/scripts/extract_tools.py:179-195 | safari/agent-harness/scripts/extract_tools.py:209-225 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (17 lines × 2) sbox/agent-harness/cli_anything/sbox/sbox_cli.py:565— sbox/agent-harness/cli_anything/sbox/sbox_cli.py:565-581 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:637-653 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (16 lines × 2) blender/agent-harness/cli_anything/blender/core/preview.py:114— blender/agent-harness/cli_anything/blender/core/preview.py:114-129 | freecad/agent-harness/cli_anything/freecad/core/preview.py:122-137 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 430 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (16 lines × 2) docs/scripts/freecad_live_preview_demo.py:3856— docs/scripts/freecad_live_preview_demo.py:3856-3871 | docs/scripts/freecad_live_preview_demo.py:3909-3924 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (16 lines × 2) firefly-iii/agent-harness/cli_anything/firefly_iii/core/bills.py:109— firefly-iii/agent-harness/cli_anything/firefly_iii/core/bills.py:109-124 | firefly-iii/agent-harness/cli_anything/firefly_iii/core/piggy_banks.py:75-90 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (16 lines × 2) firefly-iii/agent-harness/cli_anything/firefly_iii/core/currencies.py:64— firefly-iii/agent-harness/cli_anything/firefly_iii/core/currencies.py:64-79 | firefly-iii/agent-harness/cli_anything/firefly_iii/core/rule_groups.py:61-76 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (16 lines × 2) jumpserver/agent-harness/cli_anything/jumpserver/core/commands_account.py:96— jumpserver/agent-harness/cli_anything/jumpserver/core/commands_account.py:96-111 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_user.py:86-101 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (16 lines × 2) minimax/agent-harness/cli_anything/minimax/utils/minimax_backend.py:330— minimax/agent-harness/cli_anything/minimax/utils/minimax_backend.py:330-345 | novita/agent-harness/cli_anything/novita/utils/novita_backend.py:145-160 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `minimax/agent-harness/cli_anything/minimax/utils/minimax_backend.py:330` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (16 lines × 2) sbox/agent-harness/cli_anything/sbox/core/export.py:405— sbox/agent-harness/cli_anything/sbox/core/export.py:405-420 | sbox/agent-harness/cli_anything/sbox/core/export.py:466-481 — 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.
preview_bundle.find_latest_manifest (cognitive 16) blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:134— preview_bundle.find_latest_manifest has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 2, 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.
preview_bundle.find_latest_manifest (cognitive 16) freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py:134— preview_bundle.find_latest_manifest has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 2, 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.
preview_bundle.find_latest_manifest (cognitive 16) openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.py:134— preview_bundle.find_latest_manifest has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 2, 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.
preview_bundle.find_latest_manifest (cognitive 16) renderdoc/agent-harness/cli_anything/renderdoc/utils/preview_bundle.py:134— preview_bundle.find_latest_manifest has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 2, 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.
preview_bundle.find_latest_manifest (cognitive 16) shotcut/agent-harness/cli_anything/shotcut/utils/preview_bundle.py:134— preview_bundle.find_latest_manifest has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 2, 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.
preview_bundle.find_latest_manifest (cognitive 16) cli-anything-plugin/preview_bundle.py:134— preview_bundle.find_latest_manifest has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 2, 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.
D4 · Code Duplication· Members sharing a duplicated core (7 members, 50+ identical tokens) · ×6
Members sharing a duplicated core (7 members, 50+ identical tokens) audacity/agent-harness/cli_anything/audacity/core/session.py:46— audacity/agent-harness/cli_anything/audacity/core/session.py:46-50 | blender/agent-harness/cli_anything/blender/core/session.py:42-46 | gimp/agent-harness/cli_anything/gimp/core/session.py:42-46 | inkscape/agent-harness/cli_anything/inkscape/core/session.py:42-46 | kdenlive/agent-harness/cli_anything/kdenlive/core/session.py:42-46 | libreoffice/agent-harness/cli_anything/libreoffice/core/session.py:42-46 | obs-studio/agent-harness/cli_anything/obs_studio/core/session.py:42-46 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
Members sharing a duplicated core (7 members, 50+ identical tokens) audacity/agent-harness/cli_anything/audacity/core/session.py:85— audacity/agent-harness/cli_anything/audacity/core/session.py:85-102 | blender/agent-harness/cli_anything/blender/core/session.py:79-96 | gimp/agent-harness/cli_anything/gimp/core/session.py:79-96 | inkscape/agent-harness/cli_anything/inkscape/core/session.py:79-96 | kdenlive/agent-harness/cli_anything/kdenlive/core/session.py:79-94 | libreoffice/agent-harness/cli_anything/libreoffice/core/session.py:81-98 | obs-studio/agent-harness/cli_anything/obs_studio/core/session.py:79-94 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
Members sharing a duplicated core (7 members, 50+ identical tokens) audacity/agent-harness/cli_anything/audacity/core/session.py:105— audacity/agent-harness/cli_anything/audacity/core/session.py:105-122 | blender/agent-harness/cli_anything/blender/core/session.py:99-116 | gimp/agent-harness/cli_anything/gimp/core/session.py:99-116 | inkscape/agent-harness/cli_anything/inkscape/core/session.py:99-116 | kdenlive/agent-harness/cli_anything/kdenlive/core/session.py:97-112 | libreoffice/agent-harness/cli_anything/libreoffice/core/session.py:101-118 | obs-studio/agent-harness/cli_anything/obs_studio/core/session.py:97-112 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
Members sharing a duplicated core (7 members, 50+ identical tokens) audacity/agent-harness/cli_anything/audacity/core/session.py:138— audacity/agent-harness/cli_anything/audacity/core/session.py:138-152 | blender/agent-harness/cli_anything/blender/core/session.py:130-144 | gimp/agent-harness/cli_anything/gimp/core/session.py:130-144 | inkscape/agent-harness/cli_anything/inkscape/core/session.py:130-143 | kdenlive/agent-harness/cli_anything/kdenlive/core/session.py:126-139 | libreoffice/agent-harness/cli_anything/libreoffice/core/session.py:137-150 | obs-studio/agent-harness/cli_anything/obs_studio/core/session.py:126-139 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
Members sharing a duplicated core (7 members, 50+ identical tokens) freecad/agent-harness/cli_anything/freecad/core/assembly.py:52— freecad/agent-harness/cli_anything/freecad/core/assembly.py:52-60 | freecad/agent-harness/cli_anything/freecad/core/draft.py:39-47 | freecad/agent-harness/cli_anything/freecad/core/draft.py:51-59 | freecad/agent-harness/cli_anything/freecad/core/fem.py:52-60 | freecad/agent-harness/cli_anything/freecad/core/parts.py:123-136 | freecad/agent-harness/cli_anything/freecad/core/techdraw.py:47-55 | freecad/agent-harness/cli_anything/freecad/core/techdraw.py:59-67 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
Members sharing a duplicated core (7 members, 50+ identical tokens) joplin/agent-harness/cli_anything/joplin/joplin_cli.py:328— joplin/agent-harness/cli_anything/joplin/joplin_cli.py:328-334 | joplin/agent-harness/cli_anything/joplin/joplin_cli.py:448-454 | joplin/agent-harness/cli_anything/joplin/joplin_cli.py:462-468 | joplin/agent-harness/cli_anything/joplin/joplin_cli.py:476-482 | joplin/agent-harness/cli_anything/joplin/joplin_cli.py:490-496 | joplin/agent-harness/cli_anything/joplin/joplin_cli.py:504-510 | joplin/agent-harness/cli_anything/joplin/joplin_cli.py:750-756 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
Duplicated block (14 lines × 2) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:203— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:203-216 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:265-278 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:203` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (14 lines × 2) eez-studio/agent-harness/cli_anything/eez_studio/core/project.py:38— eez-studio/agent-harness/cli_anything/eez_studio/core/project.py:38-51 | openrefine/agent-harness/cli_anything/openrefine/core/session.py:94-107 — before extracting anything, compare `eez-studio/agent-harness/cli_anything/eez_studio/core/project.py` and `openrefine/agent-harness/cli_anything/openrefine/core/session.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `data` to `Any` in one and `dict[str, Any]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `openrefine/agent-harness/cli_anything/openrefine/core/session.py:108` calls `fsync`, `fileno` and `eez-studio/agent-harness/cli_anything/eez_studio/core/project.py:52` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 2) freecad/agent-harness/cli_anything/freecad/core/body.py:627— freecad/agent-harness/cli_anything/freecad/core/body.py:627-640 | freecad/agent-harness/cli_anything/freecad/core/body.py:1149-1162 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) freecad/agent-harness/cli_anything/freecad/freecad_cli.py:2322— freecad/agent-harness/cli_anything/freecad/freecad_cli.py:2322-2335 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:1111-1124 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (14 lines × 2) renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:400— renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:400-413 | renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:415-428 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:400` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) sbox/agent-harness/cli_anything/sbox/sbox_cli.py:408— sbox/agent-harness/cli_anything/sbox/sbox_cli.py:408-421 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1399-1412 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 3) audacity/agent-harness/cli_anything/audacity/core/export.py:473— audacity/agent-harness/cli_anything/audacity/core/export.py:473-481 | audacity/agent-harness/cli_anything/audacity/core/media.py:115-123 | audacity/agent-harness/cli_anything/audacity/core/project.py:165-173 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `audacity/agent-harness/cli_anything/audacity/core/export.py:473` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 3) blender/agent-harness/cli_anything/blender/core/preview.py:844— blender/agent-harness/cli_anything/blender/core/preview.py:844-852 | freecad/agent-harness/cli_anything/freecad/core/preview.py:852-860 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:805-813 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 430 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 3) minimax/agent-harness/cli_anything/minimax/minimax_cli.py:87— minimax/agent-harness/cli_anything/minimax/minimax_cli.py:87-95 | novita/agent-harness/cli_anything/novita/novita_cli.py:82-90 | rms/agent-harness/cli_anything/rms/rms_cli.py:81-89 — before extracting anything, compare `minimax/agent-harness/cli_anything/minimax/minimax_cli.py` and `novita/agent-harness/cli_anything/novita/novita_cli.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 180 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 3) renderdoc/agent-harness/cli_anything/renderdoc/core/diff.py:126— renderdoc/agent-harness/cli_anything/renderdoc/core/diff.py:126-134 | renderdoc/agent-harness/cli_anything/renderdoc/core/diff.py:154-162 | renderdoc/agent-harness/cli_anything/renderdoc/core/diff.py:207-215 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `renderdoc/agent-harness/cli_anything/renderdoc/core/diff.py:217` calls `items` and `renderdoc/agent-harness/cli_anything/renderdoc/core/diff.py:135` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 3) tigris/agent-harness/cli_anything/tigris/core/object.py:100— tigris/agent-harness/cli_anything/tigris/core/object.py:100-108 | tigris/agent-harness/cli_anything/tigris/core/object.py:146-154 | tigris/agent-harness/cli_anything/tigris/core/object.py:203-211 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (9 lines × 3) joplin/agent-harness/setup.py:12— joplin/agent-harness/setup.py:12-20 | mubu/agent-harness/setup.py:11-19 | zotero/agent-harness/setup.py:12-20 — before extracting anything, compare `joplin/agent-harness/setup.py` and `zotero/agent-harness/setup.py` as WHOLE FILES: 85% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 4) anygen/agent-harness/cli_anything/anygen/anygen_cli.py:358— anygen/agent-harness/cli_anything/anygen/anygen_cli.py:358-363 | minimax/agent-harness/cli_anything/minimax/minimax_cli.py:383-388 | novita/agent-harness/cli_anything/novita/novita_cli.py:272-277 | rms/agent-harness/cli_anything/rms/rms_cli.py:1088-1093 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times.
Duplicated block (6 lines × 4) anygen/agent-harness/cli_anything/anygen/anygen_cli.py:468— anygen/agent-harness/cli_anything/anygen/anygen_cli.py:468-494 | minimax/agent-harness/cli_anything/minimax/minimax_cli.py:503-527 | novita/agent-harness/cli_anything/novita/novita_cli.py:376-398 | rms/agent-harness/cli_anything/rms/rms_cli.py:1183-1188 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `rms/agent-harness/cli_anything/rms/rms_cli.py:1183` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: `ReplSkin` names `cli_anything.anygen.utils.repl_skin` in one and `cli_anything.minimax.utils.repl_skin` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (6 lines × 4) audacity/agent-harness/cli_anything/audacity/core/clips.py:151— audacity/agent-harness/cli_anything/audacity/core/clips.py:151-156 | audacity/agent-harness/cli_anything/audacity/core/clips.py:186-191 | audacity/agent-harness/cli_anything/audacity/core/effects.py:288-294 | kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:238-244 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Note first that the copies are not typed on the same thing: the declarations holding them bind `track_index` to `int` in one and `int = 0` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (6 lines × 4) cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/cloudanalyzer_cli.py:48— cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/cloudanalyzer_cli.py:48-53 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:94-99 | eez-studio/agent-harness/cli_anything/eez_studio/eez_studio_cli.py:73-78 | macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py:73-78 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/cloudanalyzer_cli.py:48` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 4) docs/scripts/freecad_live_preview_demo.py:3662— docs/scripts/freecad_live_preview_demo.py:3662-3667 | docs/scripts/freecad_live_preview_demo.py:3765-3770 | docs/scripts/freecad_live_preview_demo.py:3839-3844 | docs/scripts/freecad_live_preview_demo.py:3892-3897 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `docs/scripts/freecad_live_preview_demo.py:3845` calls `setdefault` and `docs/scripts/freecad_live_preview_demo.py:3668` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 4) audacity/agent-harness/cli_anything/audacity/core/export.py:485— audacity/agent-harness/cli_anything/audacity/core/export.py:485-490 | audacity/agent-harness/cli_anything/audacity/core/media.py:106-111 | gimp/agent-harness/cli_anything/gimp/core/export.py:557-562 | gimp/agent-harness/cli_anything/gimp/core/media.py:184-189 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
TooManyMethods: FireflyIIIBackend firefly-iii/agent-harness/cli_anything/firefly_iii/utils/firefly_iii_backend.py:12— TooManyMethods — 133 methods. The bar is 30 methods; this is 103 over it, 4.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: BridgeMod slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs— TooManyMethods — 2555 significant lines (blank, comment-only and punctuation-only lines excluded), 104 methods, declared across 7 files: plugin/BridgeMod.Actions.cs (29), plugin/BridgeMod.StateBuilder.cs (22), plugin/BridgeMod.Formatting.cs (20), plugin/BridgeMod.Helpers.cs (12), +3 more file(s). The bar is 30 methods; this is 74 over it, 3.47× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
TooManyMethods: LLDBDebugAdapter lldb/agent-harness/cli_anything/lldb/dap.py:186— TooManyMethods — 63 methods. The bar is 30 methods; this is 33 over it, 2.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: LLDBSession lldb/agent-harness/cli_anything/lldb/core/session.py:16— TooManyMethods — 53 methods. The bar is 30 methods; this is 23 over it, 1.77× 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: SiYuanClient siyuan/agent-harness/cli_anything/siyuan/core/client.py:62— TooManyMethods — 48 methods. The bar is 30 methods; this is 18 over it, 1.60× 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.
Duplicated block (20 lines × 2) calibre/agent-harness/cli_anything/calibre/utils/calibre_backend.py:133— calibre/agent-harness/cli_anything/calibre/utils/calibre_backend.py:133-152 | calibre/agent-harness/cli_anything/calibre/utils/calibre_backend.py:172-191 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind `timeout` to `int = 300` in one and `int = 30` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (20 lines × 2) openscreen/agent-harness/cli_anything/openscreen/core/preview.py:145— openscreen/agent-harness/cli_anything/openscreen/core/preview.py:145-164 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:165-184 — before extracting anything, compare `openscreen/agent-harness/cli_anything/openscreen/core/preview.py` and `shotcut/agent-harness/cli_anything/shotcut/core/preview.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (20 lines × 2) seaclip/agent-harness/cli_anything/seaclip/core/activity.py:30— seaclip/agent-harness/cli_anything/seaclip/core/activity.py:30-49 | seaclip/agent-harness/cli_anything/seaclip/core/agents.py:29-48 — before extracting anything, compare `seaclip/agent-harness/cli_anything/seaclip/core/activity.py` and `seaclip/agent-harness/cli_anything/seaclip/core/agents.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (20 lines × 2) rms/agent-harness/cli_anything/rms/core/alerts.py:7— rms/agent-harness/cli_anything/rms/core/alerts.py:7-38 | rms/agent-harness/cli_anything/rms/core/hotspots.py:7-26 — before extracting anything, compare `rms/agent-harness/cli_anything/rms/core/alerts.py` and `rms/agent-harness/cli_anything/rms/core/hotspots.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (20 lines × 2) joplin/agent-harness/cli_anything/joplin/core/notebooks.py:36— joplin/agent-harness/cli_anything/joplin/core/notebooks.py:36-55 | joplin/agent-harness/cli_anything/joplin/core/notes.py:71-92 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (10–11 lines × 2) cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.py:288— cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.py:288-297 | cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.py:325-335 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10–11 lines × 2) chromadb/agent-harness/cli_anything/chromadb/core/documents.py:43— chromadb/agent-harness/cli_anything/chromadb/core/documents.py:43-53 | chromadb/agent-harness/cli_anything/chromadb/core/documents.py:113-122 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `chromadb/agent-harness/cli_anything/chromadb/core/documents.py:43` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–11 lines × 2) docs/scripts/blender_preview_story_demo.py:437— docs/scripts/blender_preview_story_demo.py:437-446 | docs/scripts/freecad_live_preview_demo.py:4579-4589 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `docs/scripts/blender_preview_story_demo.py:437` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–11 lines × 2) gimp/agent-harness/cli_anything/gimp/gimp_cli.py:779— gimp/agent-harness/cli_anything/gimp/gimp_cli.py:779-789 | lldb/agent-harness/cli_anything/lldb/lldb_cli.py:673-682 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10–11 lines × 2) sbox/agent-harness/cli_anything/sbox/sbox_cli.py:790— sbox/agent-harness/cli_anything/sbox/sbox_cli.py:790-799 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1059-1069 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sbox/agent-harness/cli_anything/sbox/sbox_cli.py:790` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 4) blender/agent-harness/cli_anything/blender/core/modifiers.py:240— blender/agent-harness/cli_anything/blender/core/modifiers.py:240-247 | blender/agent-harness/cli_anything/blender/core/modifiers.py:260-267 | gimp/agent-harness/cli_anything/gimp/core/filters.py:320-327 | gimp/agent-harness/cli_anything/gimp/core/filters.py:340-347 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/modifiers.py` and `gimp/agent-harness/cli_anything/gimp/core/filters.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 4) browser/agent-harness/cli_anything/browser/browser_cli.py:85— browser/agent-harness/cli_anything/browser/browser_cli.py:85-92 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:79-86 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:80-87 | openscreen/agent-harness/cli_anything/openscreen/openscreen_cli.py:82-89 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times.
Duplicated block (8 lines × 4) anygen/agent-harness/cli_anything/anygen/anygen_cli.py:392— anygen/agent-harness/cli_anything/anygen/anygen_cli.py:392-399 | minimax/agent-harness/cli_anything/minimax/minimax_cli.py:417-424 | novita/agent-harness/cli_anything/novita/novita_cli.py:306-313 | rms/agent-harness/cli_anything/rms/rms_cli.py:1119-1126 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times.
Duplicated block (8 lines × 4) freecad/agent-harness/cli_anything/freecad/core/assembly.py:41— freecad/agent-harness/cli_anything/freecad/core/assembly.py:41-48 | freecad/agent-harness/cli_anything/freecad/core/cam.py:37-44 | freecad/agent-harness/cli_anything/freecad/core/fem.py:41-48 | freecad/agent-harness/cli_anything/freecad/core/techdraw.py:36-43 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 4) freecad/agent-harness/cli_anything/freecad/core/draft.py:28— freecad/agent-harness/cli_anything/freecad/core/draft.py:28-35 | freecad/agent-harness/cli_anything/freecad/core/mesh.py:36-43 | freecad/agent-harness/cli_anything/freecad/core/spreadsheet.py:38-45 | freecad/agent-harness/cli_anything/freecad/core/surface.py:27-34 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Sync-over-async (deadlock risk) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:278— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:203— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:249— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:265— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:311— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Duplicated block (26 lines × 2) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:185— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:185-210 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:749-774 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:185` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (26 lines × 2) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:120— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:120-145 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:122-147 — before extracting anything, compare `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs` and `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:120` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (26 lines × 2) freecad/agent-harness/cli_anything/freecad/core/parts.py:784— freecad/agent-harness/cli_anything/freecad/core/parts.py:784-809 | freecad/agent-harness/cli_anything/freecad/core/parts.py:963-990 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (26 lines × 2) renderdoc/agent-harness/cli_anything/renderdoc/renderdoc_cli.py:73— renderdoc/agent-harness/cli_anything/renderdoc/renderdoc_cli.py:73-98 | renderdoc/agent-harness/cli_anything/renderdoc/renderdoc_cli.py:712-737 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (23 lines × 2) blender/agent-harness/cli_anything/blender/core/preview.py:470— blender/agent-harness/cli_anything/blender/core/preview.py:470-492 | freecad/agent-harness/cli_anything/freecad/core/preview.py:485-507 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 430 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (23 lines × 2) drawio/agent-harness/cli_anything/drawio/utils/drawio_xml.py:307— drawio/agent-harness/cli_anything/drawio/utils/drawio_xml.py:307-329 | drawio/agent-harness/cli_anything/drawio/utils/drawio_xml.py:354-376 — 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 (23 lines × 2) freecad/agent-harness/cli_anything/freecad/core/body.py:693— freecad/agent-harness/cli_anything/freecad/core/body.py:693-715 | freecad/agent-harness/cli_anything/freecad/core/body.py:1217-1239 — 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 (23 lines × 2) nsight-graphics/agent-harness/cli_anything/nsight_graphics/core/cpp_capture.py:43— nsight-graphics/agent-harness/cli_anything/nsight_graphics/core/cpp_capture.py:43-65 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/core/gpu_trace.py:664-686 — 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 (21 lines × 2) REDACTED:1808— REDACTED:1808-1828 | REDACTED:1850-1870 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:1846` calls `get_active_user`, `error` and `REDACTED:1807` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (21 lines × 2) n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:489— n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:489-509 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:489-509 — before extracting anything, compare `n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py` and `wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 355 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (21 lines × 2) seaclip/agent-harness/cli_anything/seaclip/core/issues.py:33— seaclip/agent-harness/cli_anything/seaclip/core/issues.py:33-53 | seaclip/agent-harness/cli_anything/seaclip/core/scheduler.py:29-49 — before extracting anything, compare `seaclip/agent-harness/cli_anything/seaclip/core/issues.py` and `seaclip/agent-harness/cli_anything/seaclip/core/scheduler.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (21 lines × 2) zotero/agent-harness/cli_anything/zotero/core/rendering.py:46— zotero/agent-harness/cli_anything/zotero/core/rendering.py:46-66 | zotero/agent-harness/cli_anything/zotero/core/rendering.py:78-98 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 3) anygen/agent-harness/cli_anything/anygen/anygen_cli.py:375— anygen/agent-harness/cli_anything/anygen/anygen_cli.py:375-386 | minimax/agent-harness/cli_anything/minimax/minimax_cli.py:400-411 | novita/agent-harness/cli_anything/novita/novita_cli.py:289-300 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Duplicated block (12 lines × 3) shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:1405— shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:1405-1416 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:1425-1436 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:1447-1458 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (12 lines × 3) rms/agent-harness/cli_anything/rms/core/alerts.py:7— rms/agent-harness/cli_anything/rms/core/alerts.py:7-38 | rms/agent-harness/cli_anything/rms/core/configs.py:7-18 | rms/agent-harness/cli_anything/rms/core/hotspots.py:7-26 — before extracting anything, compare `rms/agent-harness/cli_anything/rms/core/alerts.py` and `rms/agent-harness/cli_anything/rms/core/hotspots.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12 lines × 3) audacity/agent-harness/cli_anything/audacity/core/effects.py:154— audacity/agent-harness/cli_anything/audacity/core/effects.py:154-165 | blender/agent-harness/cli_anything/blender/core/modifiers.py:119-131 | gimp/agent-harness/cli_anything/gimp/core/filters.py:218-229 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 5) 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:81— 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:81-86 | browser/agent-harness/cli_anything/browser/browser_cli.py:87-92 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:81-86 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:82-87 | openscreen/agent-harness/cli_anything/openscreen/openscreen_cli.py:84-89 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 5 times. Read the line range as the matched WINDOW rather than a finished unit: at `3MF/agent-harness/cli_anything/threemf/threemf_cli.py:81` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 5) 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:84— 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:84-89 | browser/agent-harness/cli_anything/browser/browser_cli.py:90-95 | live2d/agent-harness/cli_anything/live2d/live2d_cli.py:104-109 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:84-89 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:85-90 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 5 times.
Duplicated block (6 lines × 5) tigris/agent-harness/cli_anything/tigris/core/access_key.py:183— tigris/agent-harness/cli_anything/tigris/core/access_key.py:183-188 | tigris/agent-harness/cli_anything/tigris/core/bucket.py:115-120 | tigris/agent-harness/cli_anything/tigris/core/iam.py:157-162 | tigris/agent-harness/cli_anything/tigris/core/object.py:215-220 | tigris/agent-harness/cli_anything/tigris/core/snapshot.py:77-82 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 5 call sites, so a change lands once.
Duplicated block (6 lines × 5) audacity/agent-harness/cli_anything/audacity/core/project.py:79— audacity/agent-harness/cli_anything/audacity/core/project.py:79-84 | blender/agent-harness/cli_anything/blender/core/scene.py:146-151 | REDACTED:113-118 | libreoffice/agent-harness/cli_anything/libreoffice/core/document.py:142-147 | obs-studio/agent-harness/cli_anything/obs_studio/core/project.py:104-109 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 5 times. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (5 lines × 4) REDACTED:1937— REDACTED:1937-1941 | REDACTED:1987-1991 | REDACTED:2092-2096 | REDACTED:2190-2194 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (5 lines × 4) freecad/agent-harness/cli_anything/freecad/core/assembly.py:33— freecad/agent-harness/cli_anything/freecad/core/assembly.py:33-37 | freecad/agent-harness/cli_anything/freecad/core/cam.py:29-33 | freecad/agent-harness/cli_anything/freecad/core/fem.py:33-37 | freecad/agent-harness/cli_anything/freecad/core/techdraw.py:28-32 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 4) lldb/agent-harness/cli_anything/lldb/utils/output.py:13— lldb/agent-harness/cli_anything/lldb/utils/output.py:13-17 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/output.py:11-15 | renderdoc/agent-harness/cli_anything/renderdoc/utils/output.py:13-17 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/output.py:13-17 — before extracting anything, compare `lldb/agent-harness/cli_anything/lldb/utils/output.py` and `renderdoc/agent-harness/cli_anything/renderdoc/utils/output.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 4) joplin/agent-harness/cli_anything/joplin/joplin_cli.py:403— joplin/agent-harness/cli_anything/joplin/joplin_cli.py:403-407 | joplin/agent-harness/cli_anything/joplin/joplin_cli.py:534-538 | joplin/agent-harness/cli_anything/joplin/joplin_cli.py:549-553 | joplin/agent-harness/cli_anything/joplin/joplin_cli.py:725-729 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `joplin/agent-harness/cli_anything/joplin/joplin_cli.py:412` calls `argument` and `joplin/agent-harness/cli_anything/joplin/joplin_cli.py:558` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
preview.poll_live_session_once (cyclomatic 16) blender/agent-harness/cli_anything/blender/core/preview.py:717— preview.poll_live_session_once 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.
preview.poll_live_session_once (cyclomatic 16) freecad/agent-harness/cli_anything/freecad/core/preview.py:727— preview.poll_live_session_once 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.
preview.poll_live_session_once (cyclomatic 16) shotcut/agent-harness/cli_anything/shotcut/core/preview.py:681— preview.poll_live_session_once 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.
Duplicated block (17–18 lines × 2) audacity/agent-harness/cli_anything/audacity/eval/tasks/export_wav.py:23— audacity/agent-harness/cli_anything/audacity/eval/tasks/export_wav.py:23-39 | audacity/agent-harness/cli_anything/audacity/eval/tasks/track_clip_flow.py:18-35 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `audacity/agent-harness/cli_anything/audacity/eval/tasks/export_wav.py:21` calls `task_artifacts_dir` and `audacity/agent-harness/cli_anything/audacity/eval/tasks/track_clip_flow.py:17` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (17–18 lines × 2) REDACTED:219— REDACTED:219-236 | REDACTED:76-92 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (17–18 lines × 2) docs/scripts/freecad_live_preview_demo.py:3837— docs/scripts/freecad_live_preview_demo.py:3837-3854 | docs/scripts/freecad_live_preview_demo.py:3890-3906 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (17 lines × 3) blender/agent-harness/cli_anything/blender/core/preview.py:485— blender/agent-harness/cli_anything/blender/core/preview.py:485-501 | freecad/agent-harness/cli_anything/freecad/core/preview.py:500-516 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:455-471 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 430 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `blender/agent-harness/cli_anything/blender/core/preview.py:485` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (17 lines × 3) cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/cloudanalyzer_cli.py:42— cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/cloudanalyzer_cli.py:42-58 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:88-104 | eez-studio/agent-harness/cli_anything/eez_studio/eez_studio_cli.py:67-83 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Duplicated block (17 lines × 3) REDACTED:34— REDACTED:34-50 | REDACTED:65-81 | REDACTED:103-119 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:34` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (16 lines × 3) calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:239— calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:239-254 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:289-304 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:287-302 — before extracting anything, compare `calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py` and `n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 221 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (16 lines × 3) cloudcompare/agent-harness/cli_anything/cloudcompare/utils/cc_backend.py:342— cloudcompare/agent-harness/cli_anything/cloudcompare/utils/cc_backend.py:342-357 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/cc_backend.py:386-401 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/cc_backend.py:431-446 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (16 lines × 3) rms/agent-harness/cli_anything/rms/core/alerts.py:7— rms/agent-harness/cli_anything/rms/core/alerts.py:7-38 | rms/agent-harness/cli_anything/rms/core/hotspots.py:7-26 | rms/agent-harness/cli_anything/rms/core/remote_access.py:7-22 — before extracting anything, compare `rms/agent-harness/cli_anything/rms/core/alerts.py` and `rms/agent-harness/cli_anything/rms/core/hotspots.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (15–16 lines × 2) REDACTED:173— REDACTED:173-188 | REDACTED:240-254 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:173` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (15–16 lines × 2) kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:126— kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:126-141 | kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:256-270 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15–16 lines × 2) sbox/agent-harness/cli_anything/sbox/core/export.py:433— sbox/agent-harness/cli_anything/sbox/core/export.py:433-448 | sbox/agent-harness/cli_anything/sbox/core/export.py:490-504 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `sbox/agent-harness/cli_anything/sbox/core/export.py:505` calls `makedirs`, `dirname` and `sbox/agent-harness/cli_anything/sbox/core/export.py:449` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 3) blender/agent-harness/cli_anything/blender/core/preview.py:655— blender/agent-harness/cli_anything/blender/core/preview.py:655-668 | freecad/agent-harness/cli_anything/freecad/core/preview.py:665-678 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:619-632 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 430 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (14 lines × 3) lldb/agent-harness/cli_anything/lldb/utils/errors.py:13— lldb/agent-harness/cli_anything/lldb/utils/errors.py:13-26 | renderdoc/agent-harness/cli_anything/renderdoc/utils/errors.py:13-29 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/errors.py:13-26 — before extracting anything, compare `lldb/agent-harness/cli_anything/lldb/utils/errors.py` and `renderdoc/agent-harness/cli_anything/renderdoc/utils/errors.py` as WHOLE FILES: 94% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (14 lines × 3) drawio/agent-harness/cli_anything/drawio/core/session.py:145— drawio/agent-harness/cli_anything/drawio/core/session.py:145-158 | openscreen/agent-harness/cli_anything/openscreen/core/session.py:186-199 | shotcut/agent-harness/cli_anything/shotcut/core/session.py:226-239 — before extracting anything, compare `drawio/agent-harness/cli_anything/drawio/core/session.py` and `openscreen/agent-harness/cli_anything/openscreen/core/session.py` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (12–13 lines × 2) cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.py:651— cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.py:651-662 | cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.py:706-718 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (12–13 lines × 2) docs/scripts/blender_preview_story_demo.py:307— docs/scripts/blender_preview_story_demo.py:307-318 | docs/scripts/freecad_live_preview_demo.py:4457-4469 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `docs/scripts/blender_preview_story_demo.py:307` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–13 lines × 2) docs/scripts/blender_preview_story_demo.py:468— docs/scripts/blender_preview_story_demo.py:468-479 | docs/scripts/freecad_live_preview_demo.py:4641-4653 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `docs/scripts/blender_preview_story_demo.py:468` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 4) QGIS/agent-harness/cli_anything/qgis/core/session.py:20— QGIS/agent-harness/cli_anything/qgis/core/session.py:20-32 | eez-studio/agent-harness/cli_anything/eez_studio/core/project.py:37-48 | openrefine/agent-harness/cli_anything/openrefine/core/session.py:93-104 | zotero/agent-harness/cli_anything/zotero/core/session.py:50-61 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `QGIS/agent-harness/cli_anything/qgis/core/session.py:17` calls `makedirs`, `dirname`, `abspath` and `zotero/agent-harness/cli_anything/zotero/core/session.py:48` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12 lines × 4) jumpserver/agent-harness/cli_anything/jumpserver/core/commands_account.py:166— jumpserver/agent-harness/cli_anything/jumpserver/core/commands_account.py:166-177 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_asset.py:282-293 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_perm.py:155-166 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_user.py:143-154 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `jumpserver/agent-harness/cli_anything/jumpserver/core/commands_account.py:183` calls `group`, `secret_group` and `jumpserver/agent-harness/cli_anything/jumpserver/core/commands_asset.py:296` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12 lines × 4) rms/agent-harness/cli_anything/rms/core/alerts.py:7— rms/agent-harness/cli_anything/rms/core/alerts.py:7-38 | rms/agent-harness/cli_anything/rms/core/hotspots.py:7-26 | rms/agent-harness/cli_anything/rms/core/logs.py:7-18 | rms/agent-harness/cli_anything/rms/core/remote_access.py:7-22 — before extracting anything, compare `rms/agent-harness/cli_anything/rms/core/alerts.py` and `rms/agent-harness/cli_anything/rms/core/hotspots.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 4) anygen/agent-harness/cli_anything/anygen/anygen_cli.py:369— anygen/agent-harness/cli_anything/anygen/anygen_cli.py:369-379 | minimax/agent-harness/cli_anything/minimax/minimax_cli.py:394-404 | novita/agent-harness/cli_anything/novita/novita_cli.py:283-293 | rms/agent-harness/cli_anything/rms/rms_cli.py:1099-1109 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times.
Duplicated block (11 lines × 4) kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:164— kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:164-174 | kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:198-208 | kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:227-237 | kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:282-292 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 4) REDACTED:1925— REDACTED:1925-1935 | REDACTED:1970-1980 | REDACTED:2075-2085 | REDACTED:2173-2183 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:1968` calls `error` and `REDACTED:1924` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 5) jumpserver/agent-harness/cli_anything/jumpserver/core/commands_account.py:128— jumpserver/agent-harness/cli_anything/jumpserver/core/commands_account.py:128-137 | sbox/agent-harness/cli_anything/sbox/core/sound.py:112-121 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:251-260 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:568-577 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:640-649 — there are 5 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (10 lines × 5) libreoffice/agent-harness/cli_anything/libreoffice/core/writer.py:29— libreoffice/agent-harness/cli_anything/libreoffice/core/writer.py:29-38 | libreoffice/agent-harness/cli_anything/libreoffice/core/writer.py:58-67 | libreoffice/agent-harness/cli_anything/libreoffice/core/writer.py:87-96 | libreoffice/agent-harness/cli_anything/libreoffice/core/writer.py:118-127 | libreoffice/agent-harness/cli_anything/libreoffice/core/writer.py:137-146 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (10 lines × 5) renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:379— renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:379-392 | renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:442-465 | renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:891-911 | renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:1331-1340 | renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:1368-1384 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:394` calls `_pso_for_stage` and `renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:467` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7–8 lines × 2) gimp/agent-harness/cli_anything/gimp/core/layers.py:139— gimp/agent-harness/cli_anything/gimp/core/layers.py:139-145 | inkscape/agent-harness/cli_anything/inkscape/core/shapes.py:280-287 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7–8 lines × 2) sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1906— sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1906-1913 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1999-2005 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1906` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7–8 lines × 2) unrealinsights/agent-harness/cli_anything/unrealinsights/core/capture.py:48— unrealinsights/agent-harness/cli_anything/unrealinsights/core/capture.py:48-55 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/unrealinsights_backend.py:122-128 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note first that the copies are not typed on the same thing: the declarations holding them bind `engine_root` to `str` in one and `str | Path` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (7 lines × 6) blender/agent-harness/cli_anything/blender/core/lighting.py:36— blender/agent-harness/cli_anything/blender/core/lighting.py:36-42 | blender/agent-harness/cli_anything/blender/core/lighting.py:47-53 | blender/agent-harness/cli_anything/blender/core/materials.py:43-49 | freecad/agent-harness/cli_anything/freecad/core/body.py:52-58 | freecad/agent-harness/cli_anything/freecad/core/materials.py:184-190 | freecad/agent-harness/cli_anything/freecad/core/sketch.py:78-84 — there are 6 copies across 5 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 6) blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:61— blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:61-67 | cli-anything-plugin/preview_bundle.py:61-67 | freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py:61-67 | openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.py:61-67 | renderdoc/agent-harness/cli_anything/renderdoc/utils/preview_bundle.py:61-67 | shotcut/agent-harness/cli_anything/shotcut/utils/preview_bundle.py:61-67 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/utils/preview_bundle.py` and `cli-anything-plugin/preview_bundle.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 255 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 6) docs/scripts/blender_orbital_relay_drone_demo.py:173— docs/scripts/blender_orbital_relay_drone_demo.py:173-179 | docs/scripts/blender_orbital_relay_drone_demo.py:181-187 | docs/scripts/blender_orbital_relay_drone_demo.py:210-216 | docs/scripts/blender_orbital_relay_drone_demo.py:219-225 | docs/scripts/blender_orbital_relay_drone_demo.py:228-234 | docs/scripts/blender_orbital_relay_drone_demo.py:382-388 — all 6 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. Read the line range as the matched WINDOW rather than a finished unit: at `docs/scripts/blender_orbital_relay_drone_demo.py:173` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 4) audacity/agent-harness/cli_anything/audacity/audacity_cli.py:189— audacity/agent-harness/cli_anything/audacity/audacity_cli.py:189-196 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:179-185 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:184-191 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:176-183 — before extracting anything, compare `audacity/agent-harness/cli_anything/audacity/audacity_cli.py` and `gimp/agent-harness/cli_anything/gimp/gimp_cli.py` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 122 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `audacity/agent-harness/cli_anything/audacity/audacity_cli.py:189` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 4) freecad/agent-harness/cli_anything/freecad/core/assembly.py:64— freecad/agent-harness/cli_anything/freecad/core/assembly.py:64-70 | freecad/agent-harness/cli_anything/freecad/core/cam.py:48-54 | freecad/agent-harness/cli_anything/freecad/core/fem.py:64-76 | freecad/agent-harness/cli_anything/freecad/core/techdraw.py:71-77 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 4) freecad/agent-harness/cli_anything/freecad/core/draft.py:63— freecad/agent-harness/cli_anything/freecad/core/draft.py:63-69 | freecad/agent-harness/cli_anything/freecad/core/mesh.py:47-53 | freecad/agent-harness/cli_anything/freecad/core/parts.py:431-440 | freecad/agent-harness/cli_anything/freecad/core/surface.py:38-44 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (5 lines × 7) audacity/agent-harness/cli_anything/audacity/core/clips.py:149— audacity/agent-harness/cli_anything/audacity/core/clips.py:149-153 | audacity/agent-harness/cli_anything/audacity/core/clips.py:184-188 | audacity/agent-harness/cli_anything/audacity/core/clips.py:237-241 | audacity/agent-harness/cli_anything/audacity/core/effects.py:265-270 | audacity/agent-harness/cli_anything/audacity/core/effects.py:286-291 | kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:207-212 | kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:236-241 — there are 7 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 7 sites; resolving a subset leaves the remainder to drift apart. Note first that the copies are not typed on the same thing: the declarations holding them bind `track_index` to `int` in one and `int = 0` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (5 lines × 7) joplin/agent-harness/cli_anything/joplin/joplin_cli.py:330— joplin/agent-harness/cli_anything/joplin/joplin_cli.py:330-334 | joplin/agent-harness/cli_anything/joplin/joplin_cli.py:450-454 | joplin/agent-harness/cli_anything/joplin/joplin_cli.py:464-468 | joplin/agent-harness/cli_anything/joplin/joplin_cli.py:478-482 | joplin/agent-harness/cli_anything/joplin/joplin_cli.py:492-496 | joplin/agent-harness/cli_anything/joplin/joplin_cli.py:506-510 | joplin/agent-harness/cli_anything/joplin/joplin_cli.py:752-756 — all 7 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 (5 lines × 7) audacity/agent-harness/cli_anything/audacity/core/session.py:46— audacity/agent-harness/cli_anything/audacity/core/session.py:46-50 | blender/agent-harness/cli_anything/blender/core/session.py:42-46 | gimp/agent-harness/cli_anything/gimp/core/session.py:42-46 | inkscape/agent-harness/cli_anything/inkscape/core/session.py:42-46 | kdenlive/agent-harness/cli_anything/kdenlive/core/session.py:42-46 | libreoffice/agent-harness/cli_anything/libreoffice/core/session.py:42-46 | obs-studio/agent-harness/cli_anything/obs_studio/core/session.py:42-46 — before extracting anything, compare `audacity/agent-harness/cli_anything/audacity/core/session.py` and `blender/agent-harness/cli_anything/blender/core/session.py` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
security.validate_url (cognitive 20) browser/agent-harness/cli_anything/browser/utils/security.py:92— security.validate_url has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 2 (4 pts), boolean chains 2, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
security.validate_url (cognitive 20) safari/agent-harness/cli_anything/safari/utils/security.py:80— security.validate_url has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 2 (4 pts), boolean chains 2, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication· Members sharing a duplicated core (24 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (24 members, 50+ identical tokens) 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:51— 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:51-60 | QGIS/agent-harness/cli_anything/qgis/qgis_cli.py:54-63 | anygen/agent-harness/cli_anything/anygen/anygen_cli.py:63-72 | audacity/agent-harness/cli_anything/audacity/audacity_cli.py:77-86 | blender/agent-harness/cli_anything/blender/blender_cli.py:138-147 | browser/agent-harness/cli_anything/browser/browser_cli.py:58-67 | comfyui/agent-harness/cli_anything/comfyui/comfyui_cli.py:73-82 | drawio/agent-harness/cli_anything/drawio/drawio_cli.py:63-73 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:64-73 | inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:86-95 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:66-75 | libreoffice/agent-harness/cli_anything/libreoffice/libreoffice_cli.py:64-73 | live2d/agent-harness/cli_anything/live2d/live2d_cli.py:70-79 | minimax/agent-harness/cli_anything/minimax/minimax_cli.py:64-73 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:50-59 | novita/agent-harness/cli_anything/novita/novita_cli.py:59-68 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:64-73 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:52-61 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:53-62 | rms/agent-harness/cli_anything/rms/rms_cli.py:57-66 | safari/agent-harness/cli_anything/safari/safari_cli.py:103-112 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:139-149 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/web_yu_pri_cli.py:55-64 | zoom/agent-harness/cli_anything/zoom/zoom_cli.py:62-71 — These 24 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 24 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 24 times.
Members sharing a duplicated core (24 members, 50+ identical tokens) 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:64— 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:64-70 | QGIS/agent-harness/cli_anything/qgis/qgis_cli.py:67-73 | anygen/agent-harness/cli_anything/anygen/anygen_cli.py:76-82 | audacity/agent-harness/cli_anything/audacity/audacity_cli.py:90-96 | blender/agent-harness/cli_anything/blender/blender_cli.py:151-157 | browser/agent-harness/cli_anything/browser/browser_cli.py:71-77 | comfyui/agent-harness/cli_anything/comfyui/comfyui_cli.py:86-92 | drawio/agent-harness/cli_anything/drawio/drawio_cli.py:77-84 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:77-83 | inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:99-105 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:79-85 | libreoffice/agent-harness/cli_anything/libreoffice/libreoffice_cli.py:77-83 | live2d/agent-harness/cli_anything/live2d/live2d_cli.py:83-89 | minimax/agent-harness/cli_anything/minimax/minimax_cli.py:77-83 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:63-69 | novita/agent-harness/cli_anything/novita/novita_cli.py:72-78 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:77-83 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:65-71 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:66-72 | rms/agent-harness/cli_anything/rms/rms_cli.py:70-76 | safari/agent-harness/cli_anything/safari/safari_cli.py:116-122 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:153-160 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/web_yu_pri_cli.py:68-74 | zoom/agent-harness/cli_anything/zoom/zoom_cli.py:75-81 — These 24 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 24 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 24 times.
Duplicated block (35 lines × 2) freecad/agent-harness/cli_anything/freecad/core/body.py:386— freecad/agent-harness/cli_anything/freecad/core/body.py:386-420 | freecad/agent-harness/cli_anything/freecad/core/body.py:959-993 — 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 (35 lines × 2) freecad/agent-harness/cli_anything/freecad/core/sketch.py:378— freecad/agent-harness/cli_anything/freecad/core/sketch.py:378-412 | freecad/agent-harness/cli_anything/freecad/core/sketch.py:669-703 — 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 (31 lines × 2) freecad/agent-harness/cli_anything/freecad/core/body.py:735— freecad/agent-harness/cli_anything/freecad/core/body.py:735-765 | freecad/agent-harness/cli_anything/freecad/core/body.py:858-888 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (31 lines × 2) freecad/agent-harness/cli_anything/freecad/core/body.py:1259— freecad/agent-harness/cli_anything/freecad/core/body.py:1259-1289 | freecad/agent-harness/cli_anything/freecad/core/body.py:1382-1412 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (30 lines × 6) blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:182— blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:182-211 | cli-anything-plugin/preview_bundle.py:182-211 | freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py:182-211 | openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.py:182-211 | renderdoc/agent-harness/cli_anything/renderdoc/utils/preview_bundle.py:182-211 | shotcut/agent-harness/cli_anything/shotcut/utils/preview_bundle.py:182-211 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/utils/preview_bundle.py` and `cli-anything-plugin/preview_bundle.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 255 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (30 lines × 6) blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:330— blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:330-359 | cli-anything-plugin/preview_bundle.py:330-359 | freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py:330-359 | openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.py:330-359 | renderdoc/agent-harness/cli_anything/renderdoc/utils/preview_bundle.py:330-359 | shotcut/agent-harness/cli_anything/shotcut/utils/preview_bundle.py:330-359 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/utils/preview_bundle.py` and `cli-anything-plugin/preview_bundle.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 255 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (28 lines × 6) blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:141— blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:141-168 | cli-anything-plugin/preview_bundle.py:141-168 | freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py:141-168 | openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.py:141-168 | renderdoc/agent-harness/cli_anything/renderdoc/utils/preview_bundle.py:141-168 | shotcut/agent-harness/cli_anything/shotcut/utils/preview_bundle.py:141-168 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/utils/preview_bundle.py` and `cli-anything-plugin/preview_bundle.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 255 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (28 lines × 6) blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:375— blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:375-402 | cli-anything-plugin/preview_bundle.py:375-402 | freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py:375-402 | openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.py:375-402 | renderdoc/agent-harness/cli_anything/renderdoc/utils/preview_bundle.py:375-402 | shotcut/agent-harness/cli_anything/shotcut/utils/preview_bundle.py:375-402 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/utils/preview_bundle.py` and `cli-anything-plugin/preview_bundle.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 255 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (25–28 lines × 2) musescore/agent-harness/cli_anything/musescore/core/instruments.py:18— musescore/agent-harness/cli_anything/musescore/core/instruments.py:18-42 | musescore/agent-harness/cli_anything/musescore/core/parts.py:14-41 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (25–28 lines × 2) videocaptioner/agent-harness/cli_anything/videocaptioner/core/pipeline.py:58— videocaptioner/agent-harness/cli_anything/videocaptioner/core/pipeline.py:58-85 | videocaptioner/agent-harness/cli_anything/videocaptioner/core/subtitle.py:44-68 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `videocaptioner/agent-harness/cli_anything/videocaptioner/core/pipeline.py:58` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (27 lines × 2) blender/agent-harness/cli_anything/blender/core/preview.py:408— blender/agent-harness/cli_anything/blender/core/preview.py:408-434 | openscreen/agent-harness/cli_anything/openscreen/core/preview.py:206-232 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `blender/agent-harness/cli_anything/blender/core/preview.py:408` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (27 lines × 2) freecad/agent-harness/cli_anything/freecad/core/body.py:813— freecad/agent-harness/cli_anything/freecad/core/body.py:813-839 | freecad/agent-harness/cli_anything/freecad/core/body.py:1337-1363 — 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 (23–27 lines × 2) openscreen/agent-harness/cli_anything/openscreen/core/timeline.py:281— openscreen/agent-harness/cli_anything/openscreen/core/timeline.py:281-307 | openscreen/agent-harness/cli_anything/openscreen/core/timeline.py:332-354 — 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 (23–27 lines × 2) sbox/agent-harness/cli_anything/sbox/core/session.py:244— sbox/agent-harness/cli_anything/sbox/core/session.py:244-270 | sbox/agent-harness/cli_anything/sbox/core/session.py:273-295 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (25 lines × 3) drawio/agent-harness/cli_anything/drawio/utils/drawio_backend.py:121— drawio/agent-harness/cli_anything/drawio/utils/drawio_backend.py:121-145 | kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py:144-168 | shotcut/agent-harness/cli_anything/shotcut/utils/melt_backend.py:138-162 — before extracting anything, compare `kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py` and `shotcut/agent-harness/cli_anything/shotcut/utils/melt_backend.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 163 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (25 lines × 3) freecad/agent-harness/cli_anything/freecad/core/body.py:441— freecad/agent-harness/cli_anything/freecad/core/body.py:441-465 | freecad/agent-harness/cli_anything/freecad/core/materials.py:420-446 | freecad/agent-harness/cli_anything/freecad/core/sketch.py:568-595 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (22 lines × 2) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:162— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:162-183 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:724-745 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:162` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (22 lines × 2) freecad/agent-harness/cli_anything/freecad/utils/freecad_backend.py:149— freecad/agent-harness/cli_anything/freecad/utils/freecad_backend.py:149-170 | krita/agent-harness/cli_anything/krita/utils/krita_backend.py:112-133 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `freecad/agent-harness/cli_anything/freecad/utils/freecad_backend.py:149` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (21–22 lines × 2) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:64— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:64-85 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:59-79 — before extracting anything, compare `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs` and `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:64` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (21–22 lines × 2) docs/scripts/blender_orbital_relay_drone_demo.py:212— docs/scripts/blender_orbital_relay_drone_demo.py:212-232 | docs/scripts/blender_orbital_relay_drone_demo.py:374-395 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `docs/scripts/blender_orbital_relay_drone_demo.py:212` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `docs/scripts/blender_orbital_relay_drone_demo.py:211` calls `add_modifier`, `_object_index`, `add_object` and `docs/scripts/blender_orbital_relay_drone_demo.py:374` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (21 lines × 6) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:177— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:177-197 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:178-198 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:188-208 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:177-197 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:188-208 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:177-197 — before extracting anything, compare `3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py` and `calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 308 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (21 lines × 6) blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:111— blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:111-131 | cli-anything-plugin/preview_bundle.py:111-131 | freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py:111-131 | openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.py:111-131 | renderdoc/agent-harness/cli_anything/renderdoc/utils/preview_bundle.py:111-131 | shotcut/agent-harness/cli_anything/shotcut/utils/preview_bundle.py:111-131 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/utils/preview_bundle.py` and `cli-anything-plugin/preview_bundle.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 255 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (18–19 lines × 2) docs/scripts/blender_preview_story_demo.py:321— docs/scripts/blender_preview_story_demo.py:321-338 | docs/scripts/freecad_live_preview_demo.py:4471-4489 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `docs/scripts/blender_preview_story_demo.py:321` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18–19 lines × 2) freecad/agent-harness/cli_anything/freecad/core/body.py:1989— freecad/agent-harness/cli_anything/freecad/core/body.py:1989-2007 | freecad/agent-harness/cli_anything/freecad/core/body.py:2039-2056 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (19 lines × 2) nsight-graphics/agent-harness/cli_anything/nsight_graphics/nsight_graphics_cli.py:485— nsight-graphics/agent-harness/cli_anything/nsight_graphics/nsight_graphics_cli.py:485-503 | unrealinsights/agent-harness/cli_anything/unrealinsights/unrealinsights_cli.py:1054-1072 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (19 lines × 2) nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_listener.swift:30— nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_listener.swift:30-48 | nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_publisher.swift:33-51 — before extracting anything, compare `nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_listener.swift` and `nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_publisher.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_listener.swift:30` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16–18 lines × 7) audacity/agent-harness/cli_anything/audacity/core/session.py:85— audacity/agent-harness/cli_anything/audacity/core/session.py:85-102 | blender/agent-harness/cli_anything/blender/core/session.py:79-96 | gimp/agent-harness/cli_anything/gimp/core/session.py:79-96 | inkscape/agent-harness/cli_anything/inkscape/core/session.py:79-96 | kdenlive/agent-harness/cli_anything/kdenlive/core/session.py:79-94 | libreoffice/agent-harness/cli_anything/libreoffice/core/session.py:81-98 | obs-studio/agent-harness/cli_anything/obs_studio/core/session.py:79-94 — before extracting anything, compare `audacity/agent-harness/cli_anything/audacity/core/session.py` and `blender/agent-harness/cli_anything/blender/core/session.py` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (16–18 lines × 7) audacity/agent-harness/cli_anything/audacity/core/session.py:105— audacity/agent-harness/cli_anything/audacity/core/session.py:105-122 | blender/agent-harness/cli_anything/blender/core/session.py:99-116 | gimp/agent-harness/cli_anything/gimp/core/session.py:99-116 | inkscape/agent-harness/cli_anything/inkscape/core/session.py:99-116 | kdenlive/agent-harness/cli_anything/kdenlive/core/session.py:97-112 | libreoffice/agent-harness/cli_anything/libreoffice/core/session.py:101-118 | obs-studio/agent-harness/cli_anything/obs_studio/core/session.py:97-112 — before extracting anything, compare `audacity/agent-harness/cli_anything/audacity/core/session.py` and `blender/agent-harness/cli_anything/blender/core/session.py` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (18 lines × 2) freecad/agent-harness/cli_anything/freecad/utils/freecad_backend.py:85— freecad/agent-harness/cli_anything/freecad/utils/freecad_backend.py:85-102 | krita/agent-harness/cli_anything/krita/utils/krita_backend.py:71-88 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (18 lines × 2) shotcut/agent-harness/cli_anything/shotcut/core/transitions.py:616— shotcut/agent-harness/cli_anything/shotcut/core/transitions.py:616-633 | shotcut/agent-harness/cli_anything/shotcut/core/transitions.py:639-656 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15–17 lines × 3) audacity/agent-harness/cli_anything/audacity/core/effects.py:212— audacity/agent-harness/cli_anything/audacity/core/effects.py:212-228 | blender/agent-harness/cli_anything/blender/core/modifiers.py:173-187 | gimp/agent-harness/cli_anything/gimp/core/filters.py:269-283 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (15–17 lines × 3) REDACTED:197— REDACTED:197-211 | REDACTED:56-72 | REDACTED:54-68 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (14–16 lines × 3) audacity/agent-harness/cli_anything/audacity/utils/sox_backend.py:61— audacity/agent-harness/cli_anything/audacity/utils/sox_backend.py:61-76 | audacity/agent-harness/cli_anything/audacity/utils/sox_backend.py:100-114 | audacity/agent-harness/cli_anything/audacity/utils/sox_backend.py:138-151 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14–16 lines × 3) inkscape/agent-harness/cli_anything/inkscape/utils/inkscape_backend.py:58— inkscape/agent-harness/cli_anything/inkscape/utils/inkscape_backend.py:58-73 | inkscape/agent-harness/cli_anything/inkscape/utils/inkscape_backend.py:92-105 | inkscape/agent-harness/cli_anything/inkscape/utils/inkscape_backend.py:124-137 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13–14 lines × 9) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:125— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:125-137 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:113-125 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:126-138 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:136-148 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:125-137 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:116-129 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:136-148 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:125-137 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:113-125 — before extracting anything, compare `3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py` and `QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 274 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (13–14 lines × 9) blender/agent-harness/cli_anything/blender/blender_cli.py:1121— blender/agent-harness/cli_anything/blender/blender_cli.py:1121-1134 | browser/agent-harness/cli_anything/browser/browser_cli.py:409-422 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:782-795 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:724-736 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:431-443 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:462-475 | safari/agent-harness/cli_anything/safari/safari_cli.py:590-602 | videocaptioner/agent-harness/cli_anything/videocaptioner/videocaptioner_cli.py:347-359 | zoom/agent-harness/cli_anything/zoom/zoom_cli.py:481-494 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 9 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 9 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `browser/agent-harness/cli_anything/browser/browser_cli.py:424` calls `any`, `startswith` and `blender/agent-harness/cli_anything/blender/blender_cli.py:1135` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 4) kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:737— kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:737-750 | libreoffice/agent-harness/cli_anything/libreoffice/libreoffice_cli.py:772-785 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:591-604 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:825-838 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 4) seaclip/agent-harness/cli_anything/seaclip/core/activity.py:27— seaclip/agent-harness/cli_anything/seaclip/core/activity.py:27-40 | seaclip/agent-harness/cli_anything/seaclip/core/agents.py:26-39 | seaclip/agent-harness/cli_anything/seaclip/core/issues.py:30-43 | seaclip/agent-harness/cli_anything/seaclip/core/scheduler.py:26-39 — before extracting anything, compare `seaclip/agent-harness/cli_anything/seaclip/core/activity.py` and `seaclip/agent-harness/cli_anything/seaclip/core/agents.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 7) audacity/agent-harness/cli_anything/audacity/audacity_cli.py:111— audacity/agent-harness/cli_anything/audacity/audacity_cli.py:111-123 | blender/agent-harness/cli_anything/blender/blender_cli.py:172-184 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:98-110 | inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:120-132 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:100-112 | libreoffice/agent-harness/cli_anything/libreoffice/libreoffice_cli.py:98-110 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:98-110 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 7 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 7 times.
Duplicated block (13 lines × 7) audacity/agent-harness/cli_anything/audacity/core/session.py:70— audacity/agent-harness/cli_anything/audacity/core/session.py:70-82 | blender/agent-harness/cli_anything/blender/core/session.py:64-76 | gimp/agent-harness/cli_anything/gimp/core/session.py:64-76 | inkscape/agent-harness/cli_anything/inkscape/core/session.py:64-76 | kdenlive/agent-harness/cli_anything/kdenlive/core/session.py:64-76 | libreoffice/agent-harness/cli_anything/libreoffice/core/session.py:66-78 | obs-studio/agent-harness/cli_anything/obs_studio/core/session.py:64-76 — before extracting anything, compare `audacity/agent-harness/cli_anything/audacity/core/session.py` and `blender/agent-harness/cli_anything/blender/core/session.py` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9–11 lines × 2) cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.py:449— cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.py:449-457 | cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.py:512-522 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9–11 lines × 2) gimp/agent-harness/cli_anything/gimp/utils/gimp_backend.py:136— gimp/agent-harness/cli_anything/gimp/utils/gimp_backend.py:136-146 | gimp/agent-harness/cli_anything/gimp/utils/gimp_backend.py:431-439 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gimp/agent-harness/cli_anything/gimp/utils/gimp_backend.py:136` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `gimp/agent-harness/cli_anything/gimp/utils/gimp_backend.py:441` calls `getsize` and `gimp/agent-harness/cli_anything/gimp/utils/gimp_backend.py:148` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 4) 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:81— 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:81-90 | browser/agent-harness/cli_anything/browser/browser_cli.py:87-96 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:81-90 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:82-91 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `3MF/agent-harness/cli_anything/threemf/threemf_cli.py:81` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 4) browser/agent-harness/cli_anything/browser/browser_cli.py:81— browser/agent-harness/cli_anything/browser/browser_cli.py:81-90 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:75-84 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:76-85 | videocaptioner/agent-harness/cli_anything/videocaptioner/videocaptioner_cli.py:46-55 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times.
Duplicated block (10 lines × 3) docs/scripts/blender_orbital_relay_drone_demo.py:181— docs/scripts/blender_orbital_relay_drone_demo.py:181-190 | docs/scripts/blender_orbital_relay_drone_demo.py:210-219 | docs/scripts/blender_orbital_relay_drone_demo.py:228-237 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `docs/scripts/blender_orbital_relay_drone_demo.py:181` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `docs/scripts/blender_orbital_relay_drone_demo.py:220` calls `add_modifier`, `_object_index` and `docs/scripts/blender_orbital_relay_drone_demo.py:191` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 3) REDACTED:272— REDACTED:272-281 | REDACTED:300-309 | REDACTED:472-481 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:282` calls `set`, `_nsattr` and `REDACTED:482` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8–10 lines × 2) audacity/agent-harness/cli_anything/audacity/core/effects.py:266— audacity/agent-harness/cli_anything/audacity/core/effects.py:266-275 | kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:208-215 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (8–10 lines × 2) renderdoc/agent-harness/cli_anything/renderdoc/renderdoc_cli.py:541— renderdoc/agent-harness/cli_anything/renderdoc/renderdoc_cli.py:541-548 | renderdoc/agent-harness/cli_anything/renderdoc/renderdoc_cli.py:826-835 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `renderdoc/agent-harness/cli_anything/renderdoc/renderdoc_cli.py:826` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9–10 lines × 2) freecad/agent-harness/cli_anything/freecad/utils/freecad_macro_gen.py:477— freecad/agent-harness/cli_anything/freecad/utils/freecad_macro_gen.py:477-485 | freecad/agent-harness/cli_anything/freecad/utils/freecad_macro_gen.py:501-510 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9–10 lines × 2) sbox/agent-harness/cli_anything/sbox/core/scene.py:534— sbox/agent-harness/cli_anything/sbox/core/scene.py:534-543 | sbox/agent-harness/cli_anything/sbox/core/scene.py:1325-1333 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 4) lldb/agent-harness/cli_anything/lldb/lldb_cli.py:674— lldb/agent-harness/cli_anything/lldb/lldb_cli.py:674-682 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/nsight_graphics_cli.py:481-489 | renderdoc/agent-harness/cli_anything/renderdoc/renderdoc_cli.py:993-1001 | unrealinsights/agent-harness/cli_anything/unrealinsights/unrealinsights_cli.py:1050-1058 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `nsight-graphics/agent-harness/cli_anything/nsight_graphics/nsight_graphics_cli.py:480` calls `basename`, `get` and `renderdoc/agent-harness/cli_anything/renderdoc/renderdoc_cli.py:992` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 4) nsight-graphics/agent-harness/cli_anything/nsight_graphics/nsight_graphics_cli.py:481— nsight-graphics/agent-harness/cli_anything/nsight_graphics/nsight_graphics_cli.py:481-489 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:430-438 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:461-469 | unrealinsights/agent-harness/cli_anything/unrealinsights/unrealinsights_cli.py:1050-1058 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 6) audacity/agent-harness/cli_anything/audacity/core/project.py:68— audacity/agent-harness/cli_anything/audacity/core/project.py:68-75 | blender/agent-harness/cli_anything/blender/core/scene.py:135-142 | gimp/agent-harness/cli_anything/gimp/core/project.py:77-84 | REDACTED:102-109 | kdenlive/agent-harness/cli_anything/kdenlive/core/project.py:134-141 | obs-studio/agent-harness/cli_anything/obs_studio/core/project.py:93-100 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 6 times. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `audacity/agent-harness/cli_anything/audacity/core/project.py:81` calls `makedirs`, `dirname`, `abspath` and `gimp/agent-harness/cli_anything/gimp/core/project.py:90` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 6) shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:1386— shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:1386-1393 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:1407-1414 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:1427-1434 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:1449-1456 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:1467-1474 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:1498-1505 — all 6 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–7 lines × 2) cli-hub/cli_hub/preview.py:490— cli-hub/cli_hub/preview.py:490-496 | cli-hub/cli_hub/preview.py:504-509 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (6–7 lines × 2) lldb/agent-harness/cli_anything/lldb/utils/output.py:35— lldb/agent-harness/cli_anything/lldb/utils/output.py:35-40 | renderdoc/agent-harness/cli_anything/renderdoc/utils/output.py:37-43 — before extracting anything, compare `lldb/agent-harness/cli_anything/lldb/utils/output.py` and `renderdoc/agent-harness/cli_anything/renderdoc/utils/output.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 61) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:175— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:175-179 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:163-167 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:226-230 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:226-230 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:226-230 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:226-230 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:226-230 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:176-180 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:226-230 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:226-230 | cli-anything-plugin/repl_skin.py:226-230 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:226-230 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:226-230 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:226-230 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:226-230 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:226-230 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:226-230 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:186-190 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:226-230 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:226-230 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:226-230 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:226-230 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:226-230 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:226-230 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:226-230 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:226-230 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:226-230 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:226-230 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:226-230 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:175-179 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:226-230 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:167-171 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:226-230 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:226-230 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:231-235 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:226-230 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:226-230 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:226-230 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:226-230 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:226-230 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:226-230 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:226-230 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:226-230 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:226-230 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:226-230 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:226-230 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:226-230 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:226-230 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:226-230 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:226-230 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:226-230 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:226-230 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:226-230 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:186-190 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:175-179 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:163-167 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:227-231 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:226-230 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:226-230 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:226-230 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:226-230 — before extracting anything, compare `3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py` and `QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 274 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:233` calls `extend`, `_meta_lines`, `_display_home_path` and `QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:169` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 61) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:408— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:408-412 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:386-390 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:454-458 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:454-458 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:454-458 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:454-458 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:454-458 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:408-412 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:454-458 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:454-458 | cli-anything-plugin/repl_skin.py:454-458 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:454-458 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:454-458 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:454-458 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:454-458 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:454-458 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:454-458 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:419-423 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:454-458 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:454-458 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:454-458 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:454-458 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:454-458 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:454-458 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:454-458 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:454-458 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:454-458 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:454-458 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:454-458 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:408-412 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:454-458 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:394-398 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:454-458 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:454-458 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:456-460 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:454-458 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:454-458 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:454-458 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:454-458 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:454-458 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:454-458 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:454-458 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:454-458 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:454-458 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:454-458 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:454-458 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:454-458 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:454-458 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:454-458 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:454-458 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:454-458 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:454-458 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:454-458 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:419-423 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:408-412 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:386-390 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:456-460 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:454-458 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:454-458 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:454-458 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:454-458 — before extracting anything, compare `3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py` and `QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 274 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:453` calls `_c` and `wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:453` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 5) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:292— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:292-296 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:317-321 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:364-369 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:458-462 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:623-627 — all 5 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. Read the line range as the matched WINDOW rather than a finished unit: at `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:292` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 5) joplin/agent-harness/cli_anything/joplin/joplin_cli.py:257— joplin/agent-harness/cli_anything/joplin/joplin_cli.py:257-261 | joplin/agent-harness/cli_anything/joplin/joplin_cli.py:288-292 | joplin/agent-harness/cli_anything/joplin/joplin_cli.py:346-350 | joplin/agent-harness/cli_anything/joplin/joplin_cli.py:373-377 | joplin/agent-harness/cli_anything/joplin/joplin_cli.py:388-392 — all 5 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `joplin/agent-harness/cli_anything/joplin/joplin_cli.py:355` calls `option` and `joplin/agent-harness/cli_anything/joplin/joplin_cli.py:266` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 7) audacity/agent-harness/cli_anything/audacity/audacity_cli.py:158— audacity/agent-harness/cli_anything/audacity/audacity_cli.py:158-168 | blender/agent-harness/cli_anything/blender/blender_cli.py:218-228 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:144-154 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:151-161 | libreoffice/agent-harness/cli_anything/libreoffice/libreoffice_cli.py:144-154 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:124-134 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:144-154 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 7 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 7 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 7) blender/agent-harness/cli_anything/blender/core/lighting.py:227— blender/agent-harness/cli_anything/blender/core/lighting.py:227-240 | blender/agent-harness/cli_anything/blender/core/lighting.py:392-404 | blender/agent-harness/cli_anything/blender/core/materials.py:208-221 | gimp/agent-harness/cli_anything/gimp/core/layers.py:214-229 | inkscape/agent-harness/cli_anything/inkscape/core/gradients.py:140-150 | inkscape/agent-harness/cli_anything/inkscape/core/layers.py:155-167 | inkscape/agent-harness/cli_anything/inkscape/core/shapes.py:323-333 — there are 7 copies across 6 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 7 sites; resolving a subset leaves the remainder to drift apart. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (5 lines × 8) audacity/agent-harness/cli_anything/audacity/core/tracks.py:62— audacity/agent-harness/cli_anything/audacity/core/tracks.py:62-66 | blender/agent-harness/cli_anything/blender/core/lighting.py:219-223 | blender/agent-harness/cli_anything/blender/core/lighting.py:384-388 | blender/agent-harness/cli_anything/blender/core/materials.py:200-204 | gimp/agent-harness/cli_anything/gimp/core/layers.py:206-210 | inkscape/agent-harness/cli_anything/inkscape/core/gradients.py:154-158 | inkscape/agent-harness/cli_anything/inkscape/core/transforms.py:150-154 | libreoffice/agent-harness/cli_anything/libreoffice/core/calc.py:17-23 — there are 8 copies across 7 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 8 sites; resolving a subset leaves the remainder to drift apart. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (5 lines × 8) freecad/agent-harness/cli_anything/freecad/core/draft.py:20— freecad/agent-harness/cli_anything/freecad/core/draft.py:20-24 | freecad/agent-harness/cli_anything/freecad/core/import_mod.py:83-87 | freecad/agent-harness/cli_anything/freecad/core/import_mod.py:91-95 | freecad/agent-harness/cli_anything/freecad/core/import_mod.py:99-103 | freecad/agent-harness/cli_anything/freecad/core/measure.py:21-25 | freecad/agent-harness/cli_anything/freecad/core/mesh.py:28-32 | freecad/agent-harness/cli_anything/freecad/core/spreadsheet.py:30-34 | freecad/agent-harness/cli_anything/freecad/core/surface.py:19-23 — there are 8 copies across 6 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 8 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Swallowed exception (caught, then discarded) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:105— `catch (HttpListenerException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:106— `catch (ObjectDisposedException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
shotcut_cli._run_repl (cyclomatic 130) shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:1192— shotcut_cli._run_repl has cyclomatic complexity 130 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
mubu_probe.main (cyclomatic 104) REDACTED:1656— mubu_probe.main has cyclomatic complexity 104 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
video_doctor.caption_doctor (cyclomatic 73) cli-hub-matrix/video-creation/scripts/video_doctor.py:523— video_doctor.caption_doctor has cyclomatic complexity 73 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
fixers.autofix (cyclomatic 62) n8n/agent-harness/cli_anything/n8n/core/fixers.py:24— fixers.autofix has cyclomatic complexity 62 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BridgeMod.FormatMultiplayerBattleMarkdown (cyclomatic 55) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:672— BridgeMod.FormatMultiplayerBattleMarkdown has cyclomatic complexity 55 (threshold 15). Of this number, 43 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.
drawio_cli._run_repl (cyclomatic 51) drawio/agent-harness/cli_anything/drawio/drawio_cli.py:664— drawio_cli._run_repl 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.
openscreen_cli.repl (cyclomatic 48) openscreen/agent-harness/cli_anything/openscreen/openscreen_cli.py:584— openscreen_cli.repl 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.
BridgeMod.FormatAsMarkdown (cyclomatic 44) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:10— BridgeMod.FormatAsMarkdown has cyclomatic complexity 44 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
mlt_xml.build_mlt_xml (cyclomatic 44) kdenlive/agent-harness/cli_anything/kdenlive/utils/mlt_xml.py:133— mlt_xml.build_mlt_xml 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.
video_doctor.audio_doctor (cyclomatic 44) cli-hub-matrix/video-creation/scripts/video_doctor.py:2139— video_doctor.audio_doctor has cyclomatic complexity 44 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
BridgeMod.FormatBattleMarkdown (cyclomatic 43) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:133— BridgeMod.FormatBattleMarkdown has cyclomatic complexity 43 (threshold 15). Of this number, 33 points are the body's own statements and 10 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.
parser._parse_message_payload (cyclomatic 43) nslogger/agent-harness/cli_anything/nslogger/core/parser.py:84— parser._parse_message_payload has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
video_doctor.sources_doctor (cyclomatic 42) cli-hub-matrix/video-creation/scripts/video_doctor.py:1041— video_doctor.sources_doctor 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.
n8n_cli.workflow_patch (cyclomatic 41) n8n/agent-harness/cli_anything/n8n/n8n_cli.py:1446— n8n_cli.workflow_patch has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
discovery.list_installations (cyclomatic 36) nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/backend/discovery.py:276— discovery.list_installations 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.
document._object_to_svg_element (cyclomatic 35) REDACTED:322— document._object_to_svg_element 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.
macrocli_cli.macro_record (cyclomatic 34) macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py:448— macrocli_cli.macro_record 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.
n8n_cli.workflow_validate (cyclomatic 34) n8n/agent-harness/cli_anything/n8n/n8n_cli.py:1290— n8n_cli.workflow_validate 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.
cloudcompare_cli.repl (cyclomatic 33) cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:155— cloudcompare_cli.repl 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.
BridgeMod.FormatMapMarkdown (cyclomatic 32) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:363— BridgeMod.FormatMapMarkdown 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.
cli.matrix_preflight (cyclomatic 32) cli-hub/cli_hub/cli.py:663— cli.matrix_preflight 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.
preview._normalize_trajectory (cyclomatic 32) cli-hub/cli_hub/preview.py:330— preview._normalize_trajectory 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.
linter.lint_model (cyclomatic 32) live2d/agent-harness/cli_anything/live2d/core/linter.py:61— linter.lint_model 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.
REDACTED.matrixFlipCard (cyclomatic 32) REDACTED:2296— REDACTED.matrixFlipCard has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 12 of the 32 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 2330, 2325, 2353, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
BridgeMod.BuildMultiplayerGameState (cyclomatic 31) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:24— BridgeMod.BuildMultiplayerGameState 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.
export._apply_single_filter (cyclomatic 31) gimp/agent-harness/cli_anything/gimp/core/export.py:325— export._apply_single_filter has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
live2d_cli.flatten (cyclomatic 31) live2d/agent-harness/cli_anything/live2d/live2d_cli.py:1865— live2d_cli.flatten 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.
live2d_cli.runtime_check (cyclomatic 31) live2d/agent-harness/cli_anything/live2d/live2d_cli.py:1964— live2d_cli.runtime_check 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.
filter.filter_messages (cyclomatic 31) nslogger/agent-harness/cli_anything/nslogger/core/filter.py:9— filter.filter_messages 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.
live2d_cli.batch (cyclomatic 30) live2d/agent-harness/cli_anything/live2d/live2d_cli.py:954— live2d_cli.batch 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.
video_doctor.manifest_audio_overlap_review (cyclomatic 30) cli-hub-matrix/video-creation/scripts/video_doctor.py:1966— video_doctor.manifest_audio_overlap_review 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.
BridgeMod.BuildGameState (cyclomatic 28) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:42— BridgeMod.BuildGameState 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.
cli.matrix_install (cyclomatic 28) cli-hub/cli_hub/cli.py:854— cli.matrix_install 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.
gimp_backend._filter_to_script_fu (cyclomatic 28) gimp/agent-harness/cli_anything/gimp/utils/gimp_backend.py:269— gimp_backend._filter_to_script_fu 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.
generate._generate_module (cyclomatic 28) mailchimp/agent-harness/cli_anything/mailchimp/_codegen/generate.py:269— generate._generate_module 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.
zotero_cli._handle_repl_builtin (cyclomatic 28) zotero/agent-harness/cli_anything/zotero/zotero_cli.py:872— zotero_cli._handle_repl_builtin 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.
REDACTED.iconFor (cyclomatic 28) REDACTED:1674— REDACTED.iconFor 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.
builder.buildLayer (cyclomatic 28) sketch/agent-harness/src/builder.js:190— builder.buildLayer 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.
siyuan_cli._handle_doc_repl (cyclomatic 27) siyuan/agent-harness/cli_anything/siyuan/siyuan_cli.py:270— siyuan_cli._handle_doc_repl 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.
validate.validate_project (cyclomatic 26) sbox/agent-harness/cli_anything/sbox/core/validate.py:97— validate.validate_project 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.
export.render (cyclomatic 25) openscreen/agent-harness/cli_anything/openscreen/core/export.py:52— export.render 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.
preview.capture (cyclomatic 25) openscreen/agent-harness/cli_anything/openscreen/core/preview.py:99— preview.capture 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.
analysis._prompt_context (cyclomatic 25) zotero/agent-harness/cli_anything/zotero/core/analysis.py:39— analysis._prompt_context 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.
REDACTED.renderNpmCard (cyclomatic 25) REDACTED:2579— REDACTED.renderNpmCard 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.
layout.layoutVerticalStack (cyclomatic 25) sketch/agent-harness/src/layout.js:78— layout.layoutVerticalStack 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.
BridgeMod.ExecuteUsePotion (cyclomatic 24) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:365— BridgeMod.ExecuteUsePotion has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: BridgeMod.ExecuteAction (cyclomatic 25) 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.
BridgeMod.FormatShopMarkdown (cyclomatic 24) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:316— BridgeMod.FormatShopMarkdown 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.
cli.matrix_info (cyclomatic 24) cli-hub/cli_hub/cli.py:566— cli.matrix_info 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.
commands.validator_plan (cyclomatic 24) eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/core/commands.py:27— commands.validator_plan 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.
packager.package_model (cyclomatic 24) live2d/agent-harness/cli_anything/live2d/core/packager.py:40— packager.package_model 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.
replay.analyze_capture (cyclomatic 24) nsight-graphics/agent-harness/cli_anything/nsight_graphics/core/replay.py:376— replay.analyze_capture 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.
openrefine_cli.repl (cyclomatic 24) openrefine/agent-harness/cli_anything/openrefine/openrefine_cli.py:97— openrefine_cli.repl 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.
pipeline.dump_shader_reflection (cyclomatic 24) renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:746— pipeline.dump_shader_reflection 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.
codegen.generate_component (cyclomatic 24) sbox/agent-harness/cli_anything/sbox/core/codegen.py:11— codegen.generate_component 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.
transitions.add_transition (cyclomatic 24) shotcut/agent-harness/cli_anything/shotcut/core/transitions.py:170— transitions.add_transition 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.
storage.analyze_project_storage (cyclomatic 24) unimol_tools/agent-harness/cli_anything/unimol_tools/core/storage.py:49— storage.analyze_project_storage 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.
lighting.set_camera (cyclomatic 23) blender/agent-harness/cli_anything/blender/core/lighting.py:131— lighting.set_camera 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.
LLDBDebugAdapter._emit_execution_event (cyclomatic 23) lldb/agent-harness/cli_anything/lldb/dap.py:728— LLDBDebugAdapter._emit_execution_event 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.
nslogger_cli._run_repl (cyclomatic 23) nslogger/agent-harness/cli_anything/nslogger/nslogger_cli.py:545— nslogger_cli._run_repl 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.
siyuan_cli._handle_block_repl (cyclomatic 23) siyuan/agent-harness/cli_anything/siyuan/siyuan_cli.py:338— siyuan_cli._handle_block_repl 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.
REDACTED.initDeckGestures (cyclomatic 23) REDACTED:1988— REDACTED.initDeckGestures has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 3 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 2021, endDrag, a function literal at line 1994, …). 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.
layout.layoutHorizontalStack (cyclomatic 23) sketch/agent-harness/src/layout.js:133— layout.layoutHorizontalStack 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.
export._apply_single_effect (cyclomatic 22) audacity/agent-harness/cli_anything/audacity/core/export.py:355— export._apply_single_effect 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.
lighting.add_light (cyclomatic 22) blender/agent-harness/cli_anything/blender/core/lighting.py:245— lighting.add_light has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
text.set_text_property (cyclomatic 22) inkscape/agent-harness/cli_anything/inkscape/core/text.py:109— text.set_text_property has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
transitions.add_transition (cyclomatic 22) kdenlive/agent-harness/cli_anything/kdenlive/core/transitions.py:54— transitions.add_transition 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.
macrocli_cli.macro_parameterize (cyclomatic 22) macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py:591— macrocli_cli.macro_parameterize 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.
generate._generate_command_func (cyclomatic 22) mailchimp/agent-harness/cli_anything/mailchimp/_codegen/generate.py:138— generate._generate_command_func has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
mermaid_cli.repl (cyclomatic 22) mermaid/agent-harness/cli_anything/mermaid/mermaid_cli.py:191— mermaid_cli.repl 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.
video_doctor.lint_doctor (cyclomatic 22) cli-hub-matrix/video-creation/scripts/video_doctor.py:1727— video_doctor.lint_doctor 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.
layout.intrinsicSize (cyclomatic 22) sketch/agent-harness/src/layout.js:40— layout.intrinsicSize has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
BridgeMod.BuildCardSelectState (cyclomatic 21) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:1054— BridgeMod.BuildCardSelectState 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.
export.verify_file (cyclomatic 21) anygen/agent-harness/cli_anything/anygen/core/export.py:7— export.verify_file 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.
lighting.set_light (cyclomatic 21) blender/agent-harness/cli_anything/blender/core/lighting.py:319— lighting.set_light 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.
differ.diff_models (cyclomatic 21) live2d/agent-harness/cli_anything/live2d/core/differ.py:42— differ.diff_models 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.
live2d_cli.find_replace (cyclomatic 21) live2d/agent-harness/cli_anything/live2d/live2d_cli.py:1342— live2d_cli.find_replace 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.
gpu_trace._build_trace_analysis (cyclomatic 21) nsight-graphics/agent-harness/cli_anything/nsight_graphics/core/gpu_trace.py:368— gpu_trace._build_trace_analysis 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.
discovery.discover_binaries (cyclomatic 21) nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/backend/discovery.py:214— discovery.discover_binaries 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.
NSLoggerListener._handle_client (cyclomatic 21) REDACTED:430— NSLoggerListener._handle_client 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.
extract_tools._find_brace_end (cyclomatic 21) safari/agent-harness/scripts/extract_tools.py:206— extract_tools._find_brace_end 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.
timeline.remove_track (cyclomatic 21) shotcut/agent-harness/cli_anything/shotcut/core/timeline.py:320— timeline.remove_track 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.
mubu_cli.handle_repl_builtin (cyclomatic 21) mubu/agent-harness/cli_anything/mubu/mubu_cli.py:305— mubu_cli.handle_repl_builtin 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.
BridgeMod.ExecuteStartNewGame (cyclomatic 20) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:147— BridgeMod.ExecuteStartNewGame has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: BridgeMod.ExecuteAction (cyclomatic 25) 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.
BridgeMod.FormatCardSelectMarkdown (cyclomatic 20) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:576— BridgeMod.FormatCardSelectMarkdown has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
materials.create_material (cyclomatic 20) freecad/agent-harness/cli_anything/freecad/core/materials.py:240— materials.create_material 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.
freecad_macro_gen._gen_bodies (cyclomatic 20) freecad/agent-harness/cli_anything/freecad/utils/freecad_macro_gen.py:244— freecad_macro_gen._gen_bodies 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.
snapshot.generate_html (cyclomatic 20) live2d/agent-harness/cli_anything/live2d/core/snapshot.py:22— snapshot.generate_html 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.
gpu_trace.capture_trace (cyclomatic 20) nsight-graphics/agent-harness/cli_anything/nsight_graphics/core/gpu_trace.py:583— gpu_trace.capture_trace 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.
workflow_demo.main (cyclomatic 20) shotcut/agent-harness/workflow_demo.py:34— workflow_demo.main 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.
skill_generator.extract_commands_from_cli (cyclomatic 20) REDACTED:108— skill_generator.extract_commands_from_cli 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.
REDACTED.renderHarnessCard (cyclomatic 20) REDACTED:2500— REDACTED.renderHarnessCard 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.
render.set_render_settings (cyclomatic 19) blender/agent-harness/cli_anything/blender/core/render.py:64— render.set_render_settings 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.
library.library_info (cyclomatic 19) calibre/agent-harness/cli_anything/calibre/core/library.py:12— library.library_info 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.
ccswitch_cli._write_live_config (cyclomatic 19) cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.py:350— ccswitch_cli._write_live_config 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.
installer.install_matrix (cyclomatic 19) cli-hub/cli_hub/installer.py:463— installer.install_matrix 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.
comparer.compare_models (cyclomatic 19) live2d/agent-harness/cli_anything/live2d/core/comparer.py:54— comparer.compare_models 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.
GUIAgentBackend._instruct (cyclomatic 19) macrocli/agent-harness/cli_anything/macrocli/backends/gui_agent.py:239— GUIAgentBackend._instruct 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.
visual_anchor._get_window_bounds (cyclomatic 19) macrocli/agent-harness/cli_anything/macrocli/backends/visual_anchor.py:222— visual_anchor._get_window_bounds 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.
parsing.parse_unified_help (cyclomatic 19) nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/backend/parsing.py:22— parsing.parse_unified_help 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.
prefab.modify_component (cyclomatic 19) sbox/agent-harness/cli_anything/sbox/core/prefab.py:262— prefab.modify_component 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.
preview.capture (cyclomatic 19) shotcut/agent-harness/cli_anything/shotcut/core/preview.py:112— preview.capture 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.
BridgeMod.FormatEventMarkdown (cyclomatic 18) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:248— BridgeMod.FormatEventMarkdown 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.
cli.list_clis (cyclomatic 18) cli-hub/cli_hub/cli.py:181— cli.list_clis 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.
export._render_via_pillow (cyclomatic 18) gimp/agent-harness/cli_anything/gimp/core/export.py:87— export._render_via_pillow 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.
export._render_object (cyclomatic 18) inkscape/agent-harness/cli_anything/inkscape/core/export.py:219— export._render_object 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.
live2d_cli.param_list (cyclomatic 18) live2d/agent-harness/cli_anything/live2d/live2d_cli.py:1797— live2d_cli.param_list 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.
llm_assist.generate_macro (cyclomatic 18) macrocli/agent-harness/cli_anything/macrocli/core/llm_assist.py:294— llm_assist.generate_macro 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.
runtime._check_condition (cyclomatic 18) macrocli/agent-harness/cli_anything/macrocli/core/runtime.py:62— runtime._check_condition 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.
project.set_setting (cyclomatic 18) openscreen/agent-harness/cli_anything/openscreen/core/project.py:139— project.set_setting 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.
unimol_tools_cli.cleanup_models (cyclomatic 18) unimol_tools/agent-harness/cli_anything/unimol_tools/unimol_tools_cli.py:655— unimol_tools_cli.cleanup_models 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.
video_doctor.main (cyclomatic 18) cli-hub-matrix/video-creation/scripts/video_doctor.py:2534— video_doctor.main has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
native_bonjour_listener.swift.parseArguments (cyclomatic 18) nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_listener.swift:30— native_bonjour_listener.swift.parseArguments 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.
REDACTED.renderDeck (cyclomatic 18) REDACTED:2031— REDACTED.renderDeck has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 2051, 2042). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
effects.validate_params (cyclomatic 17) audacity/agent-harness/cli_anything/audacity/core/effects.py:183— effects.validate_params 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.
export.render_mix (cyclomatic 17) audacity/agent-harness/cli_anything/audacity/core/export.py:122— export.render_mix 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.
export._render_clip (cyclomatic 17) audacity/agent-harness/cli_anything/audacity/core/export.py:272— export._render_clip 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.
modifiers.validate_params (cyclomatic 17) blender/agent-harness/cli_anything/blender/core/modifiers.py:150— modifiers.validate_params 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.
domshell_backend._call_execute (cyclomatic 17) browser/agent-harness/cli_anything/browser/utils/domshell_backend.py:497— domshell_backend._call_execute 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.
matrix.resolve_install_scope (cyclomatic 17) cli-hub/cli_hub/matrix.py:352— matrix.resolve_install_scope 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.
freecad_macro_gen._gen_placements (cyclomatic 17) freecad/agent-harness/cli_anything/freecad/utils/freecad_macro_gen.py:441— freecad_macro_gen._gen_placements 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.
filters.validate_params (cyclomatic 17) gimp/agent-harness/cli_anything/gimp/core/filters.py:246— filters.validate_params 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.
document.project_to_svg (cyclomatic 17) REDACTED:218— document.project_to_svg 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.
lldb_cli.repl (cyclomatic 17) lldb/agent-harness/cli_anything/lldb/lldb_cli.py:640— lldb_cli.repl 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.
replay._build_analysis (cyclomatic 17) nsight-graphics/agent-harness/cli_anything/nsight_graphics/core/replay.py:300— replay._build_analysis 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.
filters._validate_filter_params (cyclomatic 17) obs-studio/agent-harness/cli_anything/obs_studio/core/filters.py:139— filters._validate_filter_params 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.
ollama_cli.generate_chat (cyclomatic 17) ollama/agent-harness/cli_anything/ollama/ollama_cli.py:280— ollama_cli.generate_chat 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.
scene.query_objects (cyclomatic 17) sbox/agent-harness/cli_anything/sbox/core/scene.py:968— scene.query_objects 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.
scene._category_for_ref (cyclomatic 17) sbox/agent-harness/cli_anything/sbox/core/scene.py:1096— scene._category_for_ref 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.
timeline._remove_adjacent_transitions (cyclomatic 17) shotcut/agent-harness/cli_anything/shotcut/core/timeline.py:35— timeline._remove_adjacent_transitions 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.
timeline.add_clip (cyclomatic 17) shotcut/agent-harness/cli_anything/shotcut/core/timeline.py:438— timeline.add_clip 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.
skill_generator.extract_commands_from_cli (cyclomatic 17) REDACTED:248— skill_generator.extract_commands_from_cli 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.
threemf_backend.cross_section_circles (cyclomatic 16) 3MF/agent-harness/cli_anything/threemf/utils/threemf_backend.py:243— threemf_backend.cross_section_circles 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.
clips.add_clip (cyclomatic 16) audacity/agent-harness/cli_anything/audacity/core/clips.py:60— clips.add_clip 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.
animation.add_keyframe (cyclomatic 16) blender/agent-harness/cli_anything/blender/core/animation.py:17— animation.add_keyframe 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.
lighting.add_camera (cyclomatic 16) blender/agent-harness/cli_anything/blender/core/lighting.py:58— lighting.add_camera 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.
materials.set_material_property (cyclomatic 16) blender/agent-harness/cli_anything/blender/core/materials.py:147— materials.set_material_property 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.
preview._publish_live_session (cyclomatic 16) blender/agent-harness/cli_anything/blender/core/preview.py:458— preview._publish_live_session 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.
export._parse_epub_chapters (cyclomatic 16) REDACTED:174— export._parse_epub_chapters 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.
matrix.preflight_matrix (cyclomatic 16) cli-hub/cli_hub/matrix.py:224— matrix.preflight_matrix 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.
measure.check_geometry (cyclomatic 16) freecad/agent-harness/cli_anything/freecad/core/measure.py:647— measure.check_geometry 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.
odf_utils.validate_odf (cyclomatic 16) REDACTED:626— odf_utils.validate_odf 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.
live2d_cli.manifest (cyclomatic 16) live2d/agent-harness/cli_anything/live2d/live2d_cli.py:1563— live2d_cli.manifest 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.
SemanticUIBackend._wait_for_window (cyclomatic 16) macrocli/agent-harness/cli_anything/macrocli/backends/semantic_ui.py:441— SemanticUIBackend._wait_for_window 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.
parameterize.llm_suggest_parameters (cyclomatic 16) macrocli/agent-harness/cli_anything/macrocli/core/parameterize.py:207— parameterize.llm_suggest_parameters 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.
macrocli_cli.macro_info (cyclomatic 16) macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py:267— macrocli_cli.macro_info 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.
n8n_cli.workflow_test (cyclomatic 16) n8n/agent-harness/cli_anything/n8n/n8n_cli.py:1783— n8n_cli.workflow_test 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.
pm2_cli._output (cyclomatic 16) pm2/agent-harness/cli_anything/pm2/pm2_cli.py:16— pm2_cli._output 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.
diff._diff_from_snapshots (cyclomatic 16) renderdoc/agent-harness/cli_anything/renderdoc/core/diff.py:331— diff._diff_from_snapshots 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.
pipeline.export_shader_reflection (cyclomatic 16) renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:885— pipeline.export_shader_reflection 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.
preview.capture (cyclomatic 16) renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:111— preview.capture 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.
codegen.generate_class (cyclomatic 16) sbox/agent-harness/cli_anything/sbox/core/codegen.py:521— codegen.generate_class 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.
transitions._remove_transition_and_restore (cyclomatic 16) shotcut/agent-harness/cli_anything/shotcut/core/transitions.py:485— transitions._remove_transition_and_restore 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.
state_adapter.normalize_state (cyclomatic 16) slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/core/state_adapter.py:8— state_adapter.normalize_state 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.
slay_the_spire_ii_cli.repl (cyclomatic 16) slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/slay_the_spire_ii_cli.py:293— slay_the_spire_ii_cli.repl 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.
update_registry_dates._extract_pypi_package (cyclomatic 16) .github/scripts/update_registry_dates.py:138— update_registry_dates._extract_pypi_package 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.
freecad_live_preview_demo.collect_demo (cyclomatic 16) docs/scripts/freecad_live_preview_demo.py:3411— freecad_live_preview_demo.collect_demo 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.
freecad_live_preview_demo.generate_curiosity_true_motion_showcase (cyclomatic 16) docs/scripts/freecad_live_preview_demo.py:3927— freecad_live_preview_demo.generate_curiosity_true_motion_showcase 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.
mubu_probe.recent_documents (cyclomatic 16) REDACTED:647— mubu_probe.recent_documents 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.
fixers.autofix (cognitive 226) n8n/agent-harness/cli_anything/n8n/core/fixers.py:24— fixers.autofix has cognitive complexity 226 (threshold 15). Drivers by points: if/else 41 (162 pts), loops 16 (58 pts), boolean chains 6 (nesting depth added 163). 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.
shotcut_cli._run_repl (cognitive 210) shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:1192— shotcut_cli._run_repl has cognitive complexity 210 (threshold 15). Drivers by points: if/else 45 (117 pts), ternaries 11 (32 pts), loops 11 (31 pts), boolean chains 24, error handling 3 (6 pts) (nesting depth added 116). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mubu_probe.main (cognitive 187) REDACTED:1656— mubu_probe.main has cognitive complexity 187 (threshold 15). Drivers by points: if/else 73 (143 pts), boolean chains 18, ternaries 6 (12 pts), error handling 4 (8 pts), loops 3 (6 pts) (nesting depth added 83). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BridgeMod.FormatMultiplayerBattleMarkdown (cognitive 122) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:672— BridgeMod.FormatMultiplayerBattleMarkdown has cognitive complexity 122 (threshold 15). Of this number, 99 points are the body's own statements and 23 belong to 3 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
video_doctor.caption_doctor (cognitive 110) cli-hub-matrix/video-creation/scripts/video_doctor.py:523— video_doctor.caption_doctor has cognitive complexity 110 (threshold 15). Drivers by points: if/else 35 (69 pts), boolean chains 24, ternaries 9 (12 pts), loops 3 (5 pts) (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
n8n_cli.workflow_patch (cognitive 101) n8n/agent-harness/cli_anything/n8n/n8n_cli.py:1446— n8n_cli.workflow_patch has cognitive complexity 101 (threshold 15). Drivers by points: if/else 26 (70 pts), loops 7 (24 pts), boolean chains 7 (nesting depth added 61). 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.
video_doctor.manifest_audio_overlap_review (cognitive 86) cli-hub-matrix/video-creation/scripts/video_doctor.py:1966— video_doctor.manifest_audio_overlap_review has cognitive complexity 86 (threshold 15). Drivers by points: if/else 9 (34 pts), ternaries 6 (30 pts), boolean chains 9, error handling 2 (7 pts), loops 3 (6 pts) (nesting depth added 57). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
drawio_cli._run_repl (cognitive 80) drawio/agent-harness/cli_anything/drawio/drawio_cli.py:664— drawio_cli._run_repl has cognitive complexity 80 (threshold 15). Drivers by points: if/else 18 (45 pts), ternaries 7 (21 pts), loops 4 (10 pts), error handling 2 (4 pts) (nesting depth added 49). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
n8n_cli.workflow_validate (cognitive 77) n8n/agent-harness/cli_anything/n8n/n8n_cli.py:1290— n8n_cli.workflow_validate has cognitive complexity 77 (threshold 15). Drivers by points: if/else 24 (52 pts), loops 8 (22 pts), boolean chains 3 (nesting depth added 42). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
openscreen_cli.repl (cognitive 75) openscreen/agent-harness/cli_anything/openscreen/openscreen_cli.py:584— openscreen_cli.repl has cognitive complexity 75 (threshold 15). Drivers by points: if/else 18 (41 pts), error handling 5 (15 pts), ternaries 4 (12 pts), boolean chains 6, loops 1 (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.
video_doctor.sources_doctor (cognitive 75) cli-hub-matrix/video-creation/scripts/video_doctor.py:1041— video_doctor.sources_doctor has cognitive complexity 75 (threshold 15). Drivers by points: if/else 22 (55 pts), boolean chains 15, loops 2 (3 pts), error handling 1 (2 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
validate.validate_project (cognitive 74) sbox/agent-harness/cli_anything/sbox/core/validate.py:97— validate.validate_project has cognitive complexity 74 (threshold 15). Drivers by points: if/else 14 (39 pts), loops 5 (14 pts), ternaries 4 (14 pts), error handling 2 (6 pts), boolean chains 1 (nesting depth added 48). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BridgeMod.FormatBattleMarkdown (cognitive 73) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:133— BridgeMod.FormatBattleMarkdown has cognitive complexity 73 (threshold 15). Of this number, 55 points are the body's own statements and 18 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.
mlt_xml.build_mlt_xml (cognitive 72) kdenlive/agent-harness/cli_anything/kdenlive/utils/mlt_xml.py:133— mlt_xml.build_mlt_xml has cognitive complexity 72 (threshold 15). Drivers by points: if/else 20 (41 pts), loops 15 (23 pts), ternaries 7, boolean chains 1 (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.
openrefine_cli.repl (cognitive 64) openrefine/agent-harness/cli_anything/openrefine/openrefine_cli.py:97— openrefine_cli.repl has cognitive complexity 64 (threshold 15). Drivers by points: if/else 23 (48 pts), error handling 5 (10 pts), loops 2 (5 pts), boolean chains 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.
linter.lint_model (cognitive 59) live2d/agent-harness/cli_anything/live2d/core/linter.py:61— linter.lint_model has cognitive complexity 59 (threshold 15). Drivers by points: if/else 20 (44 pts), loops 7 (9 pts), boolean chains 3, error handling 1 (3 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.
live2d_cli.runtime_check (cognitive 58) live2d/agent-harness/cli_anything/live2d/live2d_cli.py:1964— live2d_cli.runtime_check has cognitive complexity 58 (threshold 15). Drivers by points: if/else 26 (45 pts), loops 4 (9 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.
cloudcompare_cli.repl (cognitive 57) cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:155— cloudcompare_cli.repl has cognitive complexity 57 (threshold 15). Drivers by points: if/else 11 (26 pts), ternaries 6 (9 pts), error handling 4 (8 pts), boolean chains 7, loops 3 (7 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.
packager.package_model (cognitive 57) live2d/agent-harness/cli_anything/live2d/core/packager.py:40— packager.package_model has cognitive complexity 57 (threshold 15). Drivers by points: if/else 26 (44 pts), loops 5 (9 pts), ternaries 1 (4 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
transitions.retime_transitions_for_clip (cognitive 57) shotcut/agent-harness/cli_anything/shotcut/core/transitions.py:602— transitions.retime_transitions_for_clip has cognitive complexity 57 (threshold 15). Drivers by points: if/else 7 (33 pts), loops 4 (17 pts), ternaries 1 (7 pts) (nesting depth added 45). 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.
discovery.list_installations (cognitive 56) nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/backend/discovery.py:276— discovery.list_installations has cognitive complexity 56 (threshold 15). Drivers by points: if/else 15 (34 pts), boolean chains 9, loops 6 (9 pts), ternaries 4 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BridgeMod.BuildMultiplayerGameState (cognitive 55) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:24— BridgeMod.BuildMultiplayerGameState has cognitive complexity 55 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
BridgeMod.FormatAsMarkdown (cognitive 54) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:10— BridgeMod.FormatAsMarkdown has cognitive complexity 54 (threshold 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.
video_doctor.audio_doctor (cognitive 54) cli-hub-matrix/video-creation/scripts/video_doctor.py:2139— video_doctor.audio_doctor has cognitive complexity 54 (threshold 15). Drivers by points: if/else 22 (28 pts), boolean chains 16, loops 3 (7 pts), ternaries 2 (3 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.
cli.matrix_install (cognitive 53) cli-hub/cli_hub/cli.py:854— cli.matrix_install has cognitive complexity 53 (threshold 15). Drivers by points: if/else 21 (32 pts), ternaries 7 (17 pts), boolean chains 2, loops 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.
BridgeMod.FormatMapMarkdown (cognitive 52) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:363— BridgeMod.FormatMapMarkdown has cognitive complexity 52 (threshold 15). Of this number, 49 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
document._object_to_svg_element (cognitive 52) REDACTED:322— document._object_to_svg_element has cognitive complexity 52 (threshold 15). Drivers by points: if/else 19 (38 pts), loops 6 (12 pts), boolean chains 2 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
live2d_cli.batch (cognitive 52) live2d/agent-harness/cli_anything/live2d/live2d_cli.py:954— live2d_cli.batch has cognitive complexity 52 (threshold 15). Drivers by points: if/else 16 (27 pts), loops 6 (16 pts), boolean chains 5, ternaries 2 (4 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.matrix_preflight (cognitive 50) cli-hub/cli_hub/cli.py:663— cli.matrix_preflight has cognitive complexity 50 (threshold 15). Drivers by points: if/else 16 (30 pts), ternaries 6 (8 pts), boolean chains 7, loops 2 (5 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
macrocli_cli.macro_record (cognitive 50) macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py:448— macrocli_cli.macro_record has cognitive complexity 50 (threshold 15). Drivers by points: if/else 20 (31 pts), boolean chains 8, error handling 4 (5 pts), loops 1 (3 pts), ternaries 2 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BridgeMod.BuildGameState (cognitive 49) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:42— BridgeMod.BuildGameState has cognitive complexity 49 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
live2d_cli.flatten (cognitive 47) live2d/agent-harness/cli_anything/live2d/live2d_cli.py:1865— live2d_cli.flatten has cognitive complexity 47 (threshold 15). Drivers by points: if/else 13 (24 pts), loops 12 (16 pts), ternaries 5, boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
parser._parse_message_payload (cognitive 46) nslogger/agent-harness/cli_anything/nslogger/core/parser.py:84— parser._parse_message_payload has cognitive complexity 46 (threshold 15). Drivers by points: ternaries 8 (22 pts), boolean chains 12, if/else 7 (11 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.
macrocli_cli.macro_parameterize (cognitive 45) macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py:591— macrocli_cli.macro_parameterize has cognitive complexity 45 (threshold 15). Drivers by points: if/else 14 (27 pts), error handling 3 (9 pts), loops 2 (5 pts), boolean chains 4 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
nslogger_cli._run_repl (cognitive 45) nslogger/agent-harness/cli_anything/nslogger/nslogger_cli.py:545— nslogger_cli._run_repl has cognitive complexity 45 (threshold 15). Drivers by points: if/else 12 (25 pts), error handling 7 (15 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
live2d_cli.watch (cognitive 44) live2d/agent-harness/cli_anything/live2d/live2d_cli.py:1177— live2d_cli.watch has cognitive complexity 44 (threshold 15). Drivers by points: loops 8 (26 pts), if/else 4 (16 pts), boolean chains 1, error handling 1 (nesting depth added 30). 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.
NSLoggerListener._handle_client (cognitive 44) REDACTED:430— NSLoggerListener._handle_client has cognitive complexity 44 (threshold 15). Drivers by points: if/else 11 (25 pts), error handling 5 (11 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
filter.filter_messages (cognitive 42) nslogger/agent-harness/cli_anything/nslogger/core/filter.py:9— filter.filter_messages has cognitive complexity 42 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 14, ternaries 3, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
generate._generate_module (cognitive 41) mailchimp/agent-harness/cli_anything/mailchimp/_codegen/generate.py:269— generate._generate_module has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (26 pts), boolean chains 11, loops 2 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
live2d_cli.find_replace (cognitive 40) live2d/agent-harness/cli_anything/live2d/live2d_cli.py:1342— live2d_cli.find_replace has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (30 pts), loops 6 (7 pts), ternaries 1 (2 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.
library.library_info (cognitive 39) calibre/agent-harness/cli_anything/calibre/core/library.py:12— library.library_info has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (29 pts), loops 2 (5 pts), boolean chains 2, error handling 1 (2 pts), ternaries 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
odf_utils._add_paragraph_element (cognitive 39) REDACTED:132— odf_utils._add_paragraph_element has cognitive complexity 39 (threshold 15). Drivers by points: if/else 15 (35 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
differ.diff_models (cognitive 39) live2d/agent-harness/cli_anything/live2d/core/differ.py:42— differ.diff_models has cognitive complexity 39 (threshold 15). Drivers by points: if/else 8 (24 pts), loops 12 (15 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.
pipeline.dump_shader_reflection (cognitive 39) renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:746— pipeline.dump_shader_reflection has cognitive complexity 39 (threshold 15). Drivers by points: if/else 18 (30 pts), error handling 2 (4 pts), loops 2, ternaries 2, 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.
timeline.remove_track (cognitive 39) shotcut/agent-harness/cli_anything/shotcut/core/timeline.py:320— timeline.remove_track has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (25 pts), boolean chains 5, loops 3 (5 pts), ternaries 1 (4 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
transitions._remove_transition_and_restore (cognitive 39) shotcut/agent-harness/cli_anything/shotcut/core/transitions.py:485— transitions._remove_transition_and_restore has cognitive complexity 39 (threshold 15). Drivers by points: if/else 6 (23 pts), loops 4 (11 pts), boolean chains 5 (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.
visual_anchor._get_window_bounds (cognitive 38) macrocli/agent-harness/cli_anything/macrocli/backends/visual_anchor.py:222— visual_anchor._get_window_bounds has cognitive complexity 38 (threshold 15). Drivers by points: if/else 8 (21 pts), error handling 2 (9 pts), loops 2 (6 pts), boolean chains 2 (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.
macrocli_cli.macro_info (cognitive 38) macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py:267— macrocli_cli.macro_info has cognitive complexity 38 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 5 (15 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
siyuan_cli._handle_doc_repl (cognitive 38) siyuan/agent-harness/cli_anything/siyuan/siyuan_cli.py:270— siyuan_cli._handle_doc_repl has cognitive complexity 38 (threshold 15). Drivers by points: if/else 18 (28 pts), boolean chains 8, 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.
export._render_clip (cognitive 37) audacity/agent-harness/cli_anything/audacity/core/export.py:272— export._render_clip has cognitive complexity 37 (threshold 15). Drivers by points: loops 4 (13 pts), ternaries 2 (10 pts), if/else 5 (8 pts), boolean chains 4, error handling 1 (2 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cli.matrix_info (cognitive 37) cli-hub/cli_hub/cli.py:566— cli.matrix_info has cognitive complexity 37 (threshold 15). Drivers by points: if/else 16 (23 pts), loops 5 (9 pts), ternaries 2 (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.
extract_tools._find_brace_end (cognitive 37) safari/agent-harness/scripts/extract_tools.py:206— extract_tools._find_brace_end has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 4 (10 pts), boolean chains 6, ternaries 1 (4 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
preview._normalize_trajectory (cognitive 36) cli-hub/cli_hub/preview.py:330— preview._normalize_trajectory has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 13, if/else 9 (11 pts), boolean chains 6, loops 3 (6 pts) (nesting depth added 5). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
transitions.add_transition (cognitive 36) shotcut/agent-harness/cli_anything/shotcut/core/transitions.py:170— transitions.add_transition has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (26 pts), loops 5 (6 pts), boolean chains 4 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
freecad_macro_gen._gen_placements (cognitive 35) freecad/agent-harness/cli_anything/freecad/utils/freecad_macro_gen.py:441— freecad_macro_gen._gen_placements has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 6 (18 pts), if/else 8 (14 pts), boolean chains 2, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
live2d_cli.param_list (cognitive 35) live2d/agent-harness/cli_anything/live2d/live2d_cli.py:1797— live2d_cli.param_list has cognitive complexity 35 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 8 (14 pts), error handling 2 (5 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
imports._perform_attachment_upload (cognitive 35) REDACTED:368— imports._perform_attachment_upload has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (25 pts), error handling 1 (3 pts), loops 2 (3 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
unimol_tools_cli.models_compare (cognitive 34) unimol_tools/agent-harness/cli_anything/unimol_tools/unimol_tools_cli.py:579— unimol_tools_cli.models_compare has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (19 pts), ternaries 2 (10 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
zotero_cli._handle_repl_builtin (cognitive 34) zotero/agent-harness/cli_anything/zotero/zotero_cli.py:872— zotero_cli._handle_repl_builtin has cognitive complexity 34 (threshold 15). Drivers by points: if/else 19 (21 pts), error handling 3 (7 pts), boolean chains 6 (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.
freecad_cli.output (cognitive 33) freecad/agent-harness/cli_anything/freecad/freecad_cli.py:59— freecad_cli.output has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 3 (11 pts) (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
parsing.parse_unified_help (cognitive 33) nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/backend/parsing.py:22— parsing.parse_unified_help has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (27 pts), boolean chains 5, 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.
filters._validate_filter_params (cognitive 33) obs-studio/agent-harness/cli_anything/obs_studio/core/filters.py:139— filters._validate_filter_params has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (28 pts), boolean chains 4, loops 1 (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.
codegen.generate_component (cognitive 33) sbox/agent-harness/cli_anything/sbox/core/codegen.py:11— codegen.generate_component has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 6 (11 pts), boolean chains 6, ternaries 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
storage.analyze_project_storage (cognitive 33) unimol_tools/agent-harness/cli_anything/unimol_tools/core/storage.py:49— storage.analyze_project_storage has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 6, ternaries 6, error handling 1 (4 pts), loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
export.verify_file (cognitive 32) anygen/agent-harness/cli_anything/anygen/core/export.py:7— export.verify_file has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 5 (11 pts), if/else 9 (10 pts), error handling 4 (9 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.
macrocli_cli.macro_run (cognitive 32) macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py:182— macrocli_cli.macro_run has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (25 pts), loops 1 (4 pts), error handling 1 (2 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.
pm2_cli._output (cognitive 32) pm2/agent-harness/cli_anything/pm2/pm2_cli.py:16— pm2_cli._output has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 3 (9 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
timeline.remove_clip (cognitive 32) shotcut/agent-harness/cli_anything/shotcut/core/timeline.py:539— timeline.remove_clip has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (26 pts), loops 2 (4 pts), boolean chains 2 (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.
layout.layoutHorizontalStack (cognitive 32) sketch/agent-harness/src/layout.js:133— layout.layoutHorizontalStack has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 10, loops 3 (6 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
matrix_skill._render_capability_tooling (cognitive 31) cli-hub/cli_hub/matrix_skill.py:293— matrix_skill._render_capability_tooling has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 4 (7 pts), ternaries 2 (7 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.
snapshot.generate_html (cognitive 31) live2d/agent-harness/cli_anything/live2d/core/snapshot.py:22— snapshot.generate_html has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 7 (13 pts), if/else 5 (7 pts), loops 5 (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.
lldb_cli.repl (cognitive 31) lldb/agent-harness/cli_anything/lldb/lldb_cli.py:640— lldb_cli.repl has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (21 pts), error handling 4 (8 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.
instruments.remove_instrument (cognitive 31) musescore/agent-harness/cli_anything/musescore/core/instruments.py:111— instruments.remove_instrument has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (18 pts), ternaries 2 (7 pts), loops 2 (6 pts) (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
workflow_demo.main (cognitive 31) shotcut/agent-harness/workflow_demo.py:34— workflow_demo.main has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (20 pts), error handling 2 (5 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
slay_the_spire_ii_cli.repl (cognitive 31) slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/slay_the_spire_ii_cli.py:293— slay_the_spire_ii_cli.repl has cognitive complexity 31 (threshold 15). Drivers by points: if/else 6 (14 pts), error handling 6 (12 pts), ternaries 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
native_bonjour_listener.swift.parseArguments (cognitive 31) nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_listener.swift:30— native_bonjour_listener.swift.parseArguments has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (23 pts), ternaries 1 (4 pts), match/switch 1 (2 pts), boolean chains 1, loops 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.
audio_utils.mix_audio (cognitive 30) audacity/agent-harness/cli_anything/audacity/utils/audio_utils.py:46— audio_utils.mix_audio has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 5 (16 pts), if/else 8 (11 pts), loops 2 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
query.search (cognitive 30) chromadb/agent-harness/cli_anything/chromadb/core/query.py:27— query.search has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 4 (12 pts), boolean chains 2, loops 1 (2 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.
installer.install_matrix (cognitive 30) cli-hub/cli_hub/installer.py:463— installer.install_matrix has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (22 pts), ternaries 3 (6 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.
firefly_iii_cli.repl (cognitive 30) firefly-iii/agent-harness/cli_anything/firefly_iii/firefly_iii_cli.py:153— firefly_iii_cli.repl has cognitive complexity 30 (threshold 15). Drivers by points: error handling 6 (15 pts), if/else 7 (14 pts), 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.
freecad_macro_gen._gen_bodies (cognitive 30) freecad/agent-harness/cli_anything/freecad/utils/freecad_macro_gen.py:244— freecad_macro_gen._gen_bodies has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 4 (11 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.
replay.analyze_capture (cognitive 30) nsight-graphics/agent-harness/cli_anything/nsight_graphics/core/replay.py:376— replay.analyze_capture has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 7 (13 pts), if/else 9, boolean chains 6, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
discovery.discover_binaries (cognitive 30) nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/backend/discovery.py:214— discovery.discover_binaries has cognitive complexity 30 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 5 (9 pts), boolean chains 5, ternaries 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.
export.render (cognitive 30) openscreen/agent-harness/cli_anything/openscreen/core/export.py:52— export.render has cognitive complexity 30 (threshold 15). Drivers by points: if/else 18 (23 pts), error handling 2 (3 pts), loops 3, boolean chains 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
timeline._remove_adjacent_transitions (cognitive 30) shotcut/agent-harness/cli_anything/shotcut/core/timeline.py:35— timeline._remove_adjacent_transitions has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (26 pts), boolean chains 2, loops 2 (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.
skill_generator._click_decorator_info (cognitive 30) REDACTED:34— skill_generator._click_decorator_info has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 2 (5 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
video_doctor.lint_doctor (cognitive 30) cli-hub-matrix/video-creation/scripts/video_doctor.py:1727— video_doctor.lint_doctor has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 9, 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.
analysis._prompt_context (cognitive 30) zotero/agent-harness/cli_anything/zotero/core/analysis.py:39— analysis._prompt_context has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 12, if/else 7 (9 pts), loops 5 (9 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.
BridgeMod.FormatEventMarkdown (cognitive 29) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:248— BridgeMod.FormatEventMarkdown has cognitive complexity 29 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
effects.validate_params (cognitive 29) audacity/agent-harness/cli_anything/audacity/core/effects.py:183— effects.validate_params has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (24 pts), boolean chains 4, 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.
modifiers.validate_params (cognitive 29) blender/agent-harness/cli_anything/blender/core/modifiers.py:150— modifiers.validate_params has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (24 pts), boolean chains 4, 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.
filters.validate_params (cognitive 29) gimp/agent-harness/cli_anything/gimp/core/filters.py:246— filters.validate_params has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (24 pts), boolean chains 4, 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.
SemanticUIBackend._wait_for_window (cognitive 29) macrocli/agent-harness/cli_anything/macrocli/backends/semantic_ui.py:441— SemanticUIBackend._wait_for_window has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 3 (6 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
diff._diff_from_snapshots (cognitive 29) renderdoc/agent-harness/cli_anything/renderdoc/core/diff.py:331— diff._diff_from_snapshots has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (23 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
skill_generator.extract_commands_from_cli (cognitive 29) REDACTED:108— skill_generator.extract_commands_from_cli has cognitive complexity 29 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 8, loops 4 (6 pts), ternaries 2 (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.
gimp_backend._filter_to_script_fu (cognitive 28) gimp/agent-harness/cli_anything/gimp/utils/gimp_backend.py:269— gimp_backend._filter_to_script_fu has cognitive complexity 28 (threshold 15). Drivers by points: if/else 25 (26 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.
transitions.add_transition (cognitive 28) kdenlive/agent-harness/cli_anything/kdenlive/core/transitions.py:54— transitions.add_transition has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 5, 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.
SemanticUIBackend._get_controls (cognitive 28) macrocli/agent-harness/cli_anything/macrocli/backends/semantic_ui.py:532— SemanticUIBackend._get_controls has cognitive complexity 28 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (7 pts), error handling 2 (6 pts), boolean chains 2, ternaries 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.
preview.capture (cognitive 28) openscreen/agent-harness/cli_anything/openscreen/core/preview.py:99— preview.capture has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 11, ternaries 8 (11 pts), if/else 3, error handling 1 (2 pts), 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.
timeline._update_tractor_out (cognitive 28) shotcut/agent-harness/cli_anything/shotcut/core/timeline.py:232— timeline._update_tractor_out has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 3 (5 pts), ternaries 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.
siyuan_cli._handle_block_repl (cognitive 28) siyuan/agent-harness/cli_anything/siyuan/siyuan_cli.py:338— siyuan_cli._handle_block_repl has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (22 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.
REDACTED.matrixFlipCard (cognitive 28) REDACTED:2296— REDACTED.matrixFlipCard has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 17, ternaries 5 (6 pts), if/else 5 (nesting depth added 1). Most of this is not in the body itself: 12 of the 28 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 2330, 2325, 2353, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
layout.layoutVerticalStack (cognitive 28) sketch/agent-harness/src/layout.js:78— layout.layoutVerticalStack has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 11, loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
threemf_backend.cross_section_circles (cognitive 27) 3MF/agent-harness/cli_anything/threemf/utils/threemf_backend.py:243— threemf_backend.cross_section_circles has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (15 pts), error handling 3 (7 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
browser_cli.repl (cognitive 27) browser/agent-harness/cli_anything/browser/browser_cli.py:377— browser_cli.repl has cognitive complexity 27 (threshold 15). Drivers by points: error handling 5 (10 pts), if/else 5 (10 pts), ternaries 2 (5 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.
ccswitch_cli._write_live_config (cognitive 27) cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.py:350— ccswitch_cli._write_live_config has cognitive complexity 27 (threshold 15). Drivers by points: if/else 17 (27 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.
materials.create_material (cognitive 27) freecad/agent-harness/cli_anything/freecad/core/materials.py:240— materials.create_material has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 5, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
godot_cli._out (cognitive 27) godot/agent-harness/cli_anything/godot/godot_cli.py:28— godot_cli._out has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 3 (10 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.
runtime._check_condition (cognitive 27) macrocli/agent-harness/cli_anything/macrocli/core/runtime.py:62— runtime._check_condition has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (22 pts), error handling 1 (2 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mermaid_cli.repl (cognitive 27) mermaid/agent-harness/cli_anything/mermaid/mermaid_cli.py:191— mermaid_cli.repl has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 5 (14 pts), if/else 5 (9 pts), error handling 1 (2 pts), boolean chains 1, 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.
timeline._absolute_insertion_point (cognitive 27) shotcut/agent-harness/cli_anything/shotcut/core/timeline.py:162— timeline._absolute_insertion_point has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (22 pts), ternaries 1 (4 pts), 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.
transitions._return_frames_to_other_clip (cognitive 27) shotcut/agent-harness/cli_anything/shotcut/core/transitions.py:535— transitions._return_frames_to_other_clip has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 3 (8 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mubu_cli.handle_repl_builtin (cognitive 27) mubu/agent-harness/cli_anything/mubu/mubu_cli.py:305— mubu_cli.handle_repl_builtin has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (17 pts), ternaries 3 (6 pts), error handling 2 (4 pts) (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
render.set_render_settings (cognitive 26) blender/agent-harness/cli_anything/blender/core/render.py:64— render.set_render_settings has cognitive complexity 26 (threshold 15). Drivers by points: if/else 17 (24 pts), loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
domshell_backend._call_execute (cognitive 26) browser/agent-harness/cli_anything/browser/utils/domshell_backend.py:497— domshell_backend._call_execute has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 5, 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.
GUIMacroBackend._execute_steps (cognitive 26) macrocli/agent-harness/cli_anything/macrocli/backends/gui_macro.py:153— GUIMacroBackend._execute_steps has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 2 (4 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.
n8n_cli.repl (cognitive 26) n8n/agent-harness/cli_anything/n8n/n8n_cli.py:340— n8n_cli.repl has cognitive complexity 26 (threshold 15). Drivers by points: error handling 6 (11 pts), if/else 5 (10 pts), loops 3 (5 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.
ollama_cli.generate_chat (cognitive 26) ollama/agent-harness/cli_anything/ollama/ollama_cli.py:280— ollama_cli.generate_chat has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 5, loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
pm2_cli._run_repl (cognitive 26) pm2/agent-harness/cli_anything/pm2/pm2_cli.py:245— pm2_cli._run_repl has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (13 pts), error handling 2 (6 pts), ternaries 1 (4 pts), loops 2 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
prefab.modify_component (cognitive 26) sbox/agent-harness/cli_anything/sbox/core/prefab.py:262— prefab.modify_component has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
shotcut_cli._print_timeline_visual (cognitive 26) shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:344— shotcut_cli._print_timeline_visual has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (4 pts), ternaries 2 (4 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mubu_probe.rich_text_to_html (cognitive 26) REDACTED:891— mubu_probe.rich_text_to_html has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (23 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
export.render_mix (cognitive 25) audacity/agent-harness/cli_anything/audacity/core/export.py:122— export.render_mix has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 5, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
lighting.set_light (cognitive 25) blender/agent-harness/cli_anything/blender/core/lighting.py:319— lighting.set_light has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
eez_studio_cli.repl (cognitive 25) eez-studio/agent-harness/cli_anything/eez_studio/eez_studio_cli.py:155— eez_studio_cli.repl has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (14 pts), error handling 4 (8 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.
gimp_cli.repl (cognitive 25) gimp/agent-harness/cli_anything/gimp/gimp_cli.py:738— gimp_cli.repl has cognitive complexity 25 (threshold 15). Drivers by points: error handling 6 (12 pts), if/else 5 (9 pts), ternaries 1 (3 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
document.project_to_svg (cognitive 25) REDACTED:218— document.project_to_svg has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 5 (6 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
text.set_text_property (cognitive 25) inkscape/agent-harness/cli_anything/inkscape/core/text.py:109— text.set_text_property has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 6 (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.
live2d_cli.atlas (cognitive 25) live2d/agent-harness/cli_anything/live2d/live2d_cli.py:1236— live2d_cli.atlas has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 3 (7 pts), ternaries 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.
generate._generate_command_func (cognitive 25) mailchimp/agent-harness/cli_anything/mailchimp/_codegen/generate.py:138— generate._generate_command_func has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (12 pts), loops 6 (7 pts), ternaries 3 (6 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.
replay._build_analysis (cognitive 25) nsight-graphics/agent-harness/cli_anything/nsight_graphics/core/replay.py:300— replay._build_analysis has cognitive complexity 25 (threshold 15). Drivers by points: if/else 17 (25 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.
nsight_graphics_cli.repl (cognitive 25) nsight-graphics/agent-harness/cli_anything/nsight_graphics/nsight_graphics_cli.py:455— nsight_graphics_cli.repl has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (14 pts), error handling 4 (8 pts), ternaries 1 (2 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.
diff._diff_bindings (cognitive 25) renderdoc/agent-harness/cli_anything/renderdoc/core/diff.py:188— diff._diff_bindings has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (22 pts), 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.
pipeline.export_shader_reflection (cognitive 25) renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:885— pipeline.export_shader_reflection has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 3 (5 pts), loops 2 (3 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
safari_cli.repl (cognitive 25) safari/agent-harness/cli_anything/safari/safari_cli.py:553— safari_cli.repl has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 5 (10 pts), ternaries 1 (3 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
extract_tools._split_top_level (cognitive 25) safari/agent-harness/scripts/extract_tools.py:263— extract_tools._split_top_level has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (4 pts), ternaries 1 (4 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
models_manager.compare_models (cognitive 25) unimol_tools/agent-harness/cli_anything/unimol_tools/core/models_manager.py:144— models_manager.compare_models has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 5 (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.
unrealinsights_cli.repl (cognitive 25) unrealinsights/agent-harness/cli_anything/unrealinsights/unrealinsights_cli.py:1020— unrealinsights_cli.repl has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (14 pts), error handling 4 (8 pts), ternaries 1 (2 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.
native_bonjour_publisher.swift.parseArguments (cognitive 25) nslogger/agent-harness/cli_anything/nslogger/helpers/native_bonjour_publisher.swift:33— native_bonjour_publisher.swift.parseArguments has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (17 pts), ternaries 1 (4 pts), match/switch 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.
REDACTED.renderNpmCard (cognitive 25) REDACTED:2579— REDACTED.renderNpmCard has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 13, boolean chains 8, if/else 4. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
blender_cli.repl (cognitive 24) blender/agent-harness/cli_anything/blender/blender_cli.py:1074— blender_cli.repl has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (13 pts), error handling 5 (10 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.
firefly_iii_cli.output (cognitive 24) firefly-iii/agent-harness/cli_anything/firefly_iii/firefly_iii_cli.py:32— firefly_iii_cli.output has cognitive complexity 24 (threshold 15). Drivers by points: loops 4 (13 pts), if/else 6 (9 pts), error handling 1 (2 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.
freecad_backend.find_freecad (cognitive 24) freecad/agent-harness/cli_anything/freecad/utils/freecad_backend.py:54— freecad_backend.find_freecad has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 4 (7 pts), boolean chains 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.
godot_cli.session (cognitive 24) godot/agent-harness/cli_anything/godot/godot_cli.py:313— godot_cli.session has cognitive complexity 24 (threshold 15). Drivers by points: error handling 6 (11 pts), if/else 7 (11 pts), loops 1, ternaries 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
krita_cli.repl (cognitive 24) krita/agent-harness/cli_anything/krita/krita_cli.py:541— krita_cli.repl has cognitive complexity 24 (threshold 15). Drivers by points: error handling 7 (12 pts), if/else 5 (9 pts), ternaries 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.
comparer.compare_models (cognitive 24) live2d/agent-harness/cli_anything/live2d/core/comparer.py:54— comparer.compare_models has cognitive complexity 24 (threshold 15). Drivers by points: loops 13 (15 pts), if/else 6 (9 pts) (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.
live2d_cli.manifest (cognitive 24) live2d/agent-harness/cli_anything/live2d/live2d_cli.py:1563— live2d_cli.manifest has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 6 (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.
sbox_cli.repl (cognitive 24) sbox/agent-harness/cli_anything/sbox/sbox_cli.py:2338— sbox_cli.repl has cognitive complexity 24 (threshold 15). Drivers by points: error handling 7 (13 pts), if/else 5 (10 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.
unimol_tools_cli.cleanup_models (cognitive 24) unimol_tools/agent-harness/cli_anything/unimol_tools/unimol_tools_cli.py:655— unimol_tools_cli.cleanup_models has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (17 pts), loops 3 (6 pts), boolean chains 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.
zoom_cli.repl (cognitive 24) zoom/agent-harness/cli_anything/zoom/zoom_cli.py:438— zoom_cli.repl has cognitive complexity 24 (threshold 15). Drivers by points: error handling 7 (13 pts), if/else 5 (8 pts), ternaries 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.
skill_generator.extract_commands_from_cli (cognitive 24) REDACTED:248— skill_generator.extract_commands_from_cli has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 4, 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.
freecad_live_preview_demo.collect_demo (cognitive 24) docs/scripts/freecad_live_preview_demo.py:3411— freecad_live_preview_demo.collect_demo has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 4, error handling 2 (3 pts), ternaries 1 (3 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
REDACTED.iconFor (cognitive 24) REDACTED:1674— REDACTED.iconFor has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 12, if/else 6 (7 pts), ternaries 5 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
builder.buildLayer (cognitive 24) sketch/agent-harness/src/builder.js:190— builder.buildLayer has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 19, if/else 2 (4 pts), match/switch 1 (nesting depth added 2). 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.
BridgeMod.ExecuteStartNewGame (cognitive 23) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:147— BridgeMod.ExecuteStartNewGame has cognitive complexity 23 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
audacity_cli.repl (cognitive 23) audacity/agent-harness/cli_anything/audacity/audacity_cli.py:773— audacity_cli.repl has cognitive complexity 23 (threshold 15). Drivers by points: error handling 5 (10 pts), if/else 5 (9 pts), ternaries 1 (3 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cli.list_clis (cognitive 23) cli-hub/cli_hub/cli.py:181— cli.list_clis has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (12 pts), ternaries 2 (5 pts), loops 3 (4 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.
commands.validator_plan (cognitive 23) eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/core/commands.py:27— commands.validator_plan has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 19, 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.
measure.check_geometry (cognitive 23) freecad/agent-harness/cli_anything/freecad/core/measure.py:647— measure.check_geometry has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (19 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.
export._apply_single_filter (cognitive 23) gimp/agent-harness/cli_anything/gimp/core/export.py:325— export._apply_single_filter has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (23 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.
scene.read_scene (cognitive 23) godot/agent-harness/cli_anything/godot/core/scene.py:51— scene.read_scene has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 5, ternaries 1 (3 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
kdenlive_cli.repl (cognitive 23) kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:685— kdenlive_cli.repl has cognitive complexity 23 (threshold 15). Drivers by points: error handling 5 (10 pts), if/else 5 (9 pts), ternaries 1 (3 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
odf_utils.validate_odf (cognitive 23) REDACTED:626— odf_utils.validate_odf has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (14 pts), error handling 4 (7 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.
RecordedStep.to_step_dict (cognitive 23) macrocli/agent-harness/cli_anything/macrocli/core/recorder.py:72— RecordedStep.to_step_dict has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (22 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.
mscx_xml.get_instruments (cognitive 23) musescore/agent-harness/cli_anything/musescore/utils/mscx_xml.py:211— mscx_xml.get_instruments has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 4, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NSLoggerListener._listen_native_bonjour (cognitive 23) REDACTED:575— NSLoggerListener._listen_native_bonjour has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 1, error handling 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rekordbox_cli.cli (cognitive 23) rekordbox/agent-harness/cli_anything/rekordbox/rekordbox_cli.py:158— rekordbox_cli.cli has cognitive complexity 23 (threshold 15). Drivers by points: error handling 4 (11 pts), if/else 4 (10 pts), loops 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
extract_tools._find_matching_paren (cognitive 23) safari/agent-harness/scripts/extract_tools.py:176— extract_tools._find_matching_paren has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (4 pts), ternaries 1 (4 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.
codegen.generate_class (cognitive 23) sbox/agent-harness/cli_anything/sbox/core/codegen.py:521— codegen.generate_class has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (12 pts), loops 3 (5 pts), ternaries 3 (5 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
scene.query_objects (cognitive 23) sbox/agent-harness/cli_anything/sbox/core/scene.py:968— scene.query_objects has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 6, ternaries 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
timeline.split_clip (cognitive 23) shotcut/agent-harness/cli_anything/shotcut/core/timeline.py:732— timeline.split_clip has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (21 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.
video_doctor.scan_audio_artifacts (cognitive 23) cli-hub-matrix/video-creation/scripts/video_doctor.py:1893— video_doctor.scan_audio_artifacts has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 4 (7 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
freecad_live_preview_demo.build_terminal_lines (cognitive 23) docs/scripts/freecad_live_preview_demo.py:4301— freecad_live_preview_demo.build_terminal_lines has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (7 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
intrinsicSize (cognitive 23) sketch/agent-harness/src/layout.js:40— intrinsicSize has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 9, ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
BridgeMod.ExecuteUsePotion (cognitive 22) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:365— BridgeMod.ExecuteUsePotion has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BridgeMod.FormatShopMarkdown (cognitive 22) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:316— BridgeMod.FormatShopMarkdown has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
lighting.add_light (cognitive 22) blender/agent-harness/cli_anything/blender/core/lighting.py:245— lighting.add_light has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 4, ternaries 4, loops 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.
materials.set_material_property (cognitive 22) blender/agent-harness/cli_anything/blender/core/materials.py:147— materials.set_material_property has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (17 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.
matrix.resolve_install_scope (cognitive 22) cli-hub/cli_hub/matrix.py:352— matrix.resolve_install_scope has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (19 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.
layers._read_tiff_dimensions (cognitive 22) gimp/agent-harness/cli_anything/gimp/core/layers.py:355— layers._read_tiff_dimensions has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 5 (13 pts), if/else 3 (6 pts), boolean chains 1, error handling 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.
LLDBDebugAdapter._emit_execution_event (cognitive 22) lldb/agent-harness/cli_anything/lldb/dap.py:728— LLDBDebugAdapter._emit_execution_event has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11, boolean chains 8, ternaries 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
minimax_backend.chat_completion_stream (cognitive 22) minimax/agent-harness/cli_anything/minimax/utils/minimax_backend.py:305— minimax_backend.chat_completion_stream has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (16 pts), error handling 2 (4 pts), loops 1, ternaries 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
minimax_backend.tts_synthesize (cognitive 22) minimax/agent-harness/cli_anything/minimax/utils/minimax_backend.py:360— minimax_backend.tts_synthesize has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (13 pts), error handling 2 (4 pts), loops 2 (3 pts), boolean chains 1, ternaries 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
novita_backend.chat_completion_stream (cognitive 22) novita/agent-harness/cli_anything/novita/utils/novita_backend.py:124— novita_backend.chat_completion_stream has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (17 pts), error handling 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.
stats.compute_stats (cognitive 22) nslogger/agent-harness/cli_anything/nslogger/core/stats.py:8— stats.compute_stats has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 3, ternaries 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
preview.capture (cognitive 22) shotcut/agent-harness/cli_anything/shotcut/core/preview.py:112— preview.capture has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 6 (9 pts), boolean chains 6, if/else 4, error handling 1 (2 pts), 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.
validate_root_skills.main (cognitive 22) .github/scripts/validate_root_skills.py:37— validate_root_skills.main has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 4 (8 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.
video_doctor.parse_ass (cognitive 22) cli-hub-matrix/video-creation/scripts/video_doctor.py:426— video_doctor.parse_ass has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (16 pts), error handling 1 (3 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.
catalog.find_items (cognitive 22) REDACTED:97— catalog.find_items has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 5 (9 pts), 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.
zotero_cli.run_repl (cognitive 22) zotero/agent-harness/cli_anything/zotero/zotero_cli.py:1022— zotero_cli.run_repl has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (13 pts), error handling 4 (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.
REDACTED.initDeckGestures (cognitive 22) REDACTED:1988— REDACTED.initDeckGestures has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13, boolean chains 9. Most of this is not in the body itself: 2 of the 22 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 2021, endDrag, a function literal at line 1994, …). 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.
BridgeMod.BuildCardSelectState (cognitive 21) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:1054— BridgeMod.BuildCardSelectState has cognitive complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
comfyui_cli.repl (cognitive 21) comfyui/agent-harness/cli_anything/comfyui/comfyui_cli.py:366— comfyui_cli.repl has cognitive complexity 21 (threshold 15). Drivers by points: error handling 6 (11 pts), if/else 3 (6 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.
freecad_cli.repl (cognitive 21) freecad/agent-harness/cli_anything/freecad/freecad_cli.py:4826— freecad_cli.repl has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (13 pts), error handling 3 (6 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
export._render_via_pillow (cognitive 21) gimp/agent-harness/cli_anything/gimp/core/export.py:87— export._render_via_pillow has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 1, 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.
dependency.build_dependency_graph (cognitive 21) live2d/agent-harness/cli_anything/live2d/core/dependency.py:50— dependency.build_dependency_graph has cognitive complexity 21 (threshold 15). Drivers by points: loops 5 (9 pts), if/else 2 (7 pts), error handling 2 (5 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.
live2d_cli.stats (cognitive 21) live2d/agent-harness/cli_anything/live2d/live2d_cli.py:1652— live2d_cli.stats has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 5 (10 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.
MacroRecorder.interactive_agent_review (cognitive 21) macrocli/agent-harness/cli_anything/macrocli/core/recorder.py:622— MacroRecorder.interactive_agent_review has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (9 pts), error handling 3 (6 pts), ternaries 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
output.set_output_settings (cognitive 21) obs-studio/agent-harness/cli_anything/obs_studio/core/output.py:67— output.set_output_settings has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (21 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.
project.set_setting (cognitive 21) openscreen/agent-harness/cli_anything/openscreen/core/project.py:139— project.set_setting has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (18 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.
pipeline._extract_debug_source (cognitive 21) renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:541— pipeline._extract_debug_source has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (19 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.
extract_tools._parse_field (cognitive 21) safari/agent-harness/scripts/extract_tools.py:323— extract_tools._parse_field has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 1 (3 pts), boolean chains 2, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
export._rewrite_refs_in_project (cognitive 21) sbox/agent-harness/cli_anything/sbox/core/export.py:350— export._rewrite_refs_in_project has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (15 pts), error handling 1 (3 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.
prefab._build_root_object (cognitive 21) sbox/agent-harness/cli_anything/sbox/core/prefab.py:29— prefab._build_root_object has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Session._resolve_refs (cognitive 21) shotcut/agent-harness/cli_anything/shotcut/core/session.py:136— Session._resolve_refs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (4 pts), ternaries 1 (3 pts) (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
transitions.list_transitions (cognitive 21) shotcut/agent-harness/cli_anything/shotcut/core/transitions.py:402— transitions.list_transitions has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
video_doctor.parse_ass_metadata (cognitive 21) cli-hub-matrix/video-creation/scripts/video_doctor.py:466— video_doctor.parse_ass_metadata has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
blender_orbital_relay_drone_demo._assign_materials (cognitive 21) docs/scripts/blender_orbital_relay_drone_demo.py:446— blender_orbital_relay_drone_demo._assign_materials has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 7 (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.
mubu_probe.recent_documents (cognitive 21) REDACTED:647— mubu_probe.recent_documents has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 4, loops 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BridgeMod.HandleRequest (cognitive 20) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:110— BridgeMod.HandleRequest has cognitive complexity 20 (threshold 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.
BridgeMod.CollectKeywordsFromState (cognitive 20) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:842— BridgeMod.CollectKeywordsFromState has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
lighting.set_camera (cognitive 20) blender/agent-harness/cli_anything/blender/core/lighting.py:131— lighting.set_camera has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (19 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.
browser_cli.cli (cognitive 20) browser/agent-harness/cli_anything/browser/browser_cli.py:109— browser_cli.cli has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (17 pts), error handling 1 (2 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.
documents.get_documents (cognitive 20) chromadb/agent-harness/cli_anything/chromadb/core/documents.py:62— documents.get_documents has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 3 (7 pts), boolean chains 3, loops 1 (2 pts), error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
matrix.preflight_matrix (cognitive 20) cli-hub/cli_hub/matrix.py:224— matrix.preflight_matrix has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 5, 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.
layers._read_jpeg_dimensions (cognitive 20) gimp/agent-harness/cli_anything/gimp/core/layers.py:296— layers._read_jpeg_dimensions has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 1, error handling 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
validator.validate_model (cognitive 20) live2d/agent-harness/cli_anything/live2d/core/validator.py:35— validator.validate_model has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 4 (5 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.
GUIAgentBackend._instruct (cognitive 20) macrocli/agent-harness/cli_anything/macrocli/backends/gui_agent.py:239— GUIAgentBackend._instruct has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (13 pts), error handling 4 (5 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
llm_assist.generate_macro (cognitive 20) macrocli/agent-harness/cli_anything/macrocli/core/llm_assist.py:294— llm_assist.generate_macro has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 4, error handling 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
musescore_cli.repl (cognitive 20) musescore/agent-harness/cli_anything/musescore/musescore_cli.py:554— musescore_cli.repl has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 4 (8 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.
n8n_cli.workflow_test (cognitive 20) n8n/agent-harness/cli_anything/n8n/n8n_cli.py:1783— n8n_cli.workflow_test has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (11 pts), error handling 2 (4 pts), ternaries 3, boolean chains 1, loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
gpu_trace._build_trace_analysis (cognitive 20) nsight-graphics/agent-harness/cli_anything/nsight_graphics/core/gpu_trace.py:368— gpu_trace._build_trace_analysis has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 4, ternaries 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.
openrefine_cli._repl_to_args (cognitive 20) openrefine/agent-harness/cli_anything/openrefine/openrefine_cli.py:193— openrefine_cli._repl_to_args has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (16 pts), ternaries 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.
scene._diff_two_objects (cognitive 20) sbox/agent-harness/cli_anything/sbox/core/scene.py:1171— scene._diff_two_objects has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 3 (5 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.
cleanup.batch_cleanup (cognitive 20) unimol_tools/agent-harness/cli_anything/unimol_tools/core/cleanup.py:213— cleanup.batch_cleanup has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (16 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.
unimol_tools_cli.models_rank (cognitive 20) unimol_tools/agent-harness/cli_anything/unimol_tools/unimol_tools_cli.py:406— unimol_tools_cli.models_rank has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (18 pts), 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.
joplin_backend._strip_benign_node_warnings (cognitive 20) joplin/agent-harness/cli_anything/joplin/utils/joplin_backend.py:60— joplin_backend._strip_benign_node_warnings has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 2, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
imports._resolve_target (cognitive 20) REDACTED:82— imports._resolve_target has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 2 (6 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.
inspector.inspect_mesh (cognitive 19) 3MF/agent-harness/cli_anything/threemf/core/inspector.py:54— inspector.inspect_mesh has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 2, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
parser._rebuild_model_xml (cognitive 19) REDACTED:298— parser._rebuild_model_xml has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 1 (3 pts), error handling 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.
clips.add_clip (cognitive 19) audacity/agent-harness/cli_anything/audacity/core/clips.py:60— clips.add_clip has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7, ternaries 4 (7 pts), boolean chains 2, error handling 1 (2 pts), 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.
export._parse_epub_chapters (cognitive 19) REDACTED:174— export._parse_epub_chapters has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 2, error handling 1 (2 pts), loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
matrix.unmanaged_providers (cognitive 19) cli-hub/cli_hub/matrix.py:411— matrix.unmanaged_providers has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (3 pts), boolean chains 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.
preview._render_trajectory_text_lines (cognitive 19) cli-hub/cli_hub/preview.py:480— preview._render_trajectory_text_lines has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
project.validate_project (cognitive 19) eez-studio/agent-harness/cli_anything/eez_studio/core/project.py:309— project.validate_project has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (15 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.
sketch.edit_element (cognitive 19) freecad/agent-harness/cli_anything/freecad/core/sketch.py:980— sketch.edit_element has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 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.
styles.set_style (cognitive 19) inkscape/agent-harness/cli_anything/inkscape/core/styles.py:66— styles.set_style has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 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.
live2d_cli.deps (cognitive 19) live2d/agent-harness/cli_anything/live2d/live2d_cli.py:435— live2d_cli.deps has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 4 (9 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.
dap.read_message (cognitive 19) lldb/agent-harness/cli_anything/lldb/dap.py:30— dap.read_message has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), error handling 2 (4 pts), ternaries 1 (3 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
parameterize.llm_suggest_parameters (cognitive 19) macrocli/agent-harness/cli_anything/macrocli/core/parameterize.py:207— parameterize.llm_suggest_parameters has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 4, error handling 3 (4 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.
expressions.validate_expression (cognitive 19) n8n/agent-harness/cli_anything/n8n/core/expressions.py:23— expressions.validate_expression 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.
repl_skin._print_table (cognitive 19) n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:652— repl_skin._print_table has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 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.
gpu_trace.capture_trace (cognitive 19) nsight-graphics/agent-harness/cli_anything/nsight_graphics/core/gpu_trace.py:583— gpu_trace.capture_trace has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 4 (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.
obsidian_cli.repl (cognitive 19) obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:404— obsidian_cli.repl has cognitive complexity 19 (threshold 15). Drivers by points: error handling 5 (10 pts), if/else 3 (6 pts), ternaries 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.
ollama_cli.repl (cognitive 19) ollama/agent-harness/cli_anything/ollama/ollama_cli.py:436— ollama_cli.repl has cognitive complexity 19 (threshold 15). Drivers by points: error handling 5 (10 pts), if/else 3 (6 pts), ternaries 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.
pm2_backend.run_pm2 (cognitive 19) pm2/agent-harness/cli_anything/pm2/utils/pm2_backend.py:65— pm2_backend.run_pm2 has cognitive complexity 19 (threshold 15). Drivers by points: error handling 4 (9 pts), if/else 2 (5 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rekordbox_cli.install_mapping (cognitive 19) rekordbox/agent-harness/cli_anything/rekordbox/rekordbox_cli.py:503— rekordbox_cli.install_mapping has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (6 pts), error handling 1 (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.
rms_cli.config_get (cognitive 19) rms/agent-harness/cli_anything/rms/rms_cli.py:1098— rms_cli.config_get has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 3 (7 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.
seaclip_cli._run_repl (cognitive 19) seaclip/agent-harness/cli_anything/seaclip/seaclip_cli.py:111— seaclip_cli._run_repl has cognitive complexity 19 (threshold 15). Drivers by points: error handling 6 (12 pts), if/else 3 (6 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.
siyuan_cli.repl (cognitive 19) siyuan/agent-harness/cli_anything/siyuan/siyuan_cli.py:149— siyuan_cli.repl has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 3 (5 pts), boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
unimol_tools_cli.models_history (cognitive 19) unimol_tools/agent-harness/cli_anything/unimol_tools/unimol_tools_cli.py:480— unimol_tools_cli.models_history has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (6 pts), ternaries 1 (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.
update_registry_dates._extract_pypi_package (cognitive 19) .github/scripts/update_registry_dates.py:138— update_registry_dates._extract_pypi_package has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, ternaries 1 (2 pts), error handling 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
freecad_live_preview_demo.generate_curiosity_true_motion_showcase (cognitive 19) docs/scripts/freecad_live_preview_demo.py:3927— freecad_live_preview_demo.generate_curiosity_true_motion_showcase has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (9 pts), loops 3 (6 pts), boolean chains 3, ternaries 1 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
catalog.list_styles (cognitive 19) REDACTED:233— catalog.list_styles has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 7, if/else 3 (7 pts), loops 2 (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.
skill_generator.extract_commands_from_cli (cognitive 19) REDACTED:113— skill_generator.extract_commands_from_cli has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (7 pts), boolean chains 6, loops 4 (6 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
REDACTED.renderHarnessCard (cognitive 19) REDACTED:2500— REDACTED.renderHarnessCard has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 12 (13 pts), boolean chains 5, 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.
BridgeMod.FormatCardSelectMarkdown (cognitive 18) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:576— BridgeMod.FormatCardSelectMarkdown has cognitive complexity 18 (threshold 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.
BridgeMod.StripRichTextTags (cognitive 18) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Helpers.cs:35— BridgeMod.StripRichTextTags has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
BridgeMod.BuildPlayerState (cognitive 18) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:377— BridgeMod.BuildPlayerState has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BridgeMod.BuildEnemyState (cognitive 18) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:547— BridgeMod.BuildEnemyState has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
anygen_backend.create_task (cognitive 18) anygen/agent-harness/cli_anything/anygen/utils/anygen_backend.py:195— anygen_backend.create_task has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (16 pts), loops 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.
metadata._parse_opf_to_dict (cognitive 18) REDACTED:89— metadata._parse_opf_to_dict has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (8 pts), error handling 3 (7 pts), loops 2, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
installer.plan_matrix_install (cognitive 18) cli-hub/cli_hub/installer.py:406— installer.plan_matrix_install has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 2 (5 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.
preview._trajectory_candidate_refs (cognitive 18) cli-hub/cli_hub/preview.py:168— preview._trajectory_candidate_refs has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
preview._load_trajectory (cognitive 18) cli-hub/cli_hub/preview.py:400— preview._load_trajectory has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cloudanalyzer_cli._start_repl (cognitive 18) cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/cloudanalyzer_cli.py:710— cloudanalyzer_cli._start_repl has cognitive complexity 18 (threshold 15). Drivers by points: error handling 5 (9 pts), if/else 5 (8 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.
sketch.add_constraint (cognitive 18) freecad/agent-harness/cli_anything/freecad/core/sketch.py:443— sketch.add_constraint has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 3, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
inkscape_cli.repl (cognitive 18) inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:1022— inkscape_cli.repl has cognitive complexity 18 (threshold 15). Drivers by points: error handling 5 (10 pts), if/else 4 (7 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
libreoffice_cli.repl (cognitive 18) libreoffice/agent-harness/cli_anything/libreoffice/libreoffice_cli.py:717— libreoffice_cli.repl has cognitive complexity 18 (threshold 15). Drivers by points: error handling 5 (10 pts), if/else 4 (7 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
odf_utils._build_calc_content (cognitive 18) REDACTED:315— odf_utils._build_calc_content has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 3 (6 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
replay._summarize_functions (cognitive 18) nsight-graphics/agent-harness/cli_anything/nsight_graphics/core/replay.py:168— replay._summarize_functions has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
nsight_graphics_cli._print_gpu_trace_summary (cognitive 18) nsight-graphics/agent-harness/cli_anything/nsight_graphics/nsight_graphics_cli.py:52— nsight_graphics_cli._print_gpu_trace_summary has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 3 (6 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
discovery._read_registry_installations (cognitive 18) nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/backend/discovery.py:123— discovery._read_registry_installations has cognitive complexity 18 (threshold 15). Drivers by points: error handling 4 (9 pts), if/else 2 (4 pts), loops 2 (3 pts), boolean chains 1, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
generate.encode_message (cognitive 18) nslogger/agent-harness/cli_anything/nslogger/utils/generate.py:30— generate.encode_message has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (17 pts), 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.
obs_studio_cli.repl (cognitive 18) obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:776— obs_studio_cli.repl has cognitive complexity 18 (threshold 15). Drivers by points: error handling 5 (10 pts), if/else 4 (7 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
diff._diff_stages (cognitive 18) renderdoc/agent-harness/cli_anything/renderdoc/core/diff.py:258— diff._diff_stages has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
pipeline.export_shader (cognitive 18) renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:436— pipeline.export_shader has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (14 pts), ternaries 3, 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.
preview.capture (cognitive 18) renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:111— preview.capture has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 5, ternaries 3, 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.
export._scan_project_refs (cognitive 18) sbox/agent-harness/cli_anything/sbox/core/export.py:211— export._scan_project_refs has cognitive complexity 18 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 3 (5 pts), error handling 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.
scene._walk_for_refs (cognitive 18) sbox/agent-harness/cli_anything/sbox/core/scene.py:1070— scene._walk_for_refs has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
project.project_info (cognitive 18) shotcut/agent-harness/cli_anything/shotcut/core/project.py:144— project.project_info has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3, boolean chains 2, error handling 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
timeline._resolve_insert_index (cognitive 18) shotcut/agent-harness/cli_anything/shotcut/core/timeline.py:110— timeline._resolve_insert_index 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.
timeline.add_clip (cognitive 18) shotcut/agent-harness/cli_anything/shotcut/core/timeline.py:438— timeline.add_clip has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 7 (9 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.
access_key.list_keys (cognitive 18) tigris/agent-harness/cli_anything/tigris/core/access_key.py:23— access_key.list_keys has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, loops 1 (3 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.
iam.list_policies (cognitive 18) tigris/agent-harness/cli_anything/tigris/core/iam.py:33— iam.list_policies has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, loops 1 (3 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. This shape REPEATS in the file: one other method here (iam.list_users) 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.
iam.list_users (cognitive 18) tigris/agent-harness/cli_anything/tigris/core/iam.py:99— iam.list_users has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, loops 1 (3 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. This shape REPEATS in the file: one other method here (iam.list_policies) 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.
object.list_objects (cognitive 18) tigris/agent-harness/cli_anything/tigris/core/object.py:45— object.list_objects has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, loops 1 (3 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.
tigris_cli._run_repl (cognitive 18) tigris/agent-harness/cli_anything/tigris/tigris_cli.py:104— tigris_cli._run_repl has cognitive complexity 18 (threshold 15). Drivers by points: error handling 5 (10 pts), if/else 4 (7 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
wavetone_cli.repl (cognitive 18) wavetone/agent-harness/cli_anything/wavetone/wavetone_cli.py:89— wavetone_cli.repl has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), error handling 4 (8 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.
generate_meta_skill.main (cognitive 18) .github/scripts/generate_meta_skill.py:7— generate_meta_skill.main has cognitive complexity 18 (threshold 15). Drivers by points: loops 7 (10 pts), if/else 3, ternaries 1 (3 pts), boolean chains 2 (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.
video_doctor.sound_design_overlap_review (cognitive 18) cli-hub-matrix/video-creation/scripts/video_doctor.py:2093— video_doctor.sound_design_overlap_review has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 6, 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.
mubu_cli.run_repl (cognitive 18) mubu/agent-harness/cli_anything/mubu/mubu_cli.py:390— mubu_cli.run_repl has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), error handling 3 (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.
threemf_cli.repl (cognitive 17) 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:366— threemf_cli.repl has cognitive complexity 17 (threshold 15). Drivers by points: error handling 5 (10 pts), if/else 3 (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.
adguardhome_cli.repl (cognitive 17) adguardhome/agent-harness/cli_anything/adguardhome/adguardhome_cli.py:107— adguardhome_cli.repl has cognitive complexity 17 (threshold 15). Drivers by points: error handling 5 (10 pts), if/else 3 (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.
export._apply_single_effect (cognitive 17) audacity/agent-harness/cli_anything/audacity/core/export.py:355— export._apply_single_effect has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 2 (4 pts), ternaries 1 (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.
calibre_cli.books_export_chapters (cognitive 17) calibre/agent-harness/cli_anything/calibre/calibre_cli.py:391— calibre_cli.books_export_chapters has cognitive complexity 17 (threshold 15). Drivers by points: error handling 3 (7 pts), if/else 5 (6 pts), loops 1 (2 pts), ternaries 2 (nesting depth added 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.
ccswitch_cli._merge_codex_provider_toml (cognitive 17) cc-switch/agent-harness/cli_anything/ccswitch/ccswitch_cli.py:141— ccswitch_cli._merge_codex_provider_toml has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 2 (4 pts), ternaries 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.
chromadb_cli._run_repl (cognitive 17) chromadb/agent-harness/cli_anything/chromadb/chromadb_cli.py:59— chromadb_cli._run_repl has cognitive complexity 17 (threshold 15). Drivers by points: error handling 5 (10 pts), if/else 3 (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.
cli.can (cognitive 17) cli-hub/cli_hub/cli.py:431— cli.can has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 2 (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.
exa_cli._print_results (cognitive 17) exa/agent-harness/cli_anything/exa/exa_cli.py:66— exa_cli._print_results has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 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.
export.render_to_png (cognitive 17) inkscape/agent-harness/cli_anything/inkscape/core/export.py:53— export.render_to_png has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (6 pts), boolean chains 5, loops 2 (3 pts), ternaries 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.
importer._parse_writer_content (cognitive 17) REDACTED:179— importer._parse_writer_content has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 1, ternaries 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
live2d_cli.orphan (cognitive 17) live2d/agent-harness/cli_anything/live2d/live2d_cli.py:1409— live2d_cli.orphan has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 5 (7 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.
session_client.ensure_server (cognitive 17) lldb/agent-harness/cli_anything/lldb/utils/session_client.py:134— session_client.ensure_server has cognitive complexity 17 (threshold 15). Drivers by points: error handling 3 (8 pts), if/else 4 (8 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.
SemanticUIBackend._menu_click (cognitive 17) macrocli/agent-harness/cli_anything/macrocli/backends/semantic_ui.py:351— SemanticUIBackend._menu_click has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
semantic_ui._atspi_find_control (cognitive 17) macrocli/agent-harness/cli_anything/macrocli/backends/semantic_ui.py:97— semantic_ui._atspi_find_control has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (3 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.
MacroParameter.validate_value (cognitive 17) macrocli/agent-harness/cli_anything/macrocli/core/macro_model.py:55— MacroParameter.validate_value has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, error handling 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.
parameterize.parameterize_yaml_file (cognitive 17) macrocli/agent-harness/cli_anything/macrocli/core/parameterize.py:129— parameterize.parameterize_yaml_file has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (7 pts), error handling 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.
MacroRegistry._load_from_manifest (cognitive 17) macrocli/agent-harness/cli_anything/macrocli/core/registry.py:66— MacroRegistry._load_from_manifest has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 2, error handling 1 (2 pts), loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
macrocli_cli.macro_validate (cognitive 17) macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py:314— macrocli_cli.macro_validate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 3 (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.
macrocli_cli.repl (cognitive 17) macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py:900— macrocli_cli.repl has cognitive complexity 17 (threshold 15). Drivers by points: error handling 5 (10 pts), if/else 3 (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.
mailchimp_cli._start_repl (cognitive 17) mailchimp/agent-harness/cli_anything/mailchimp/mailchimp_cli.py:40— mailchimp_cli._start_repl has cognitive complexity 17 (threshold 15). Drivers by points: error handling 5 (10 pts), if/else 3 (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.
minimax_cli.repl (cognitive 17) minimax/agent-harness/cli_anything/minimax/minimax_cli.py:496— minimax_cli.repl has cognitive complexity 17 (threshold 15). Drivers by points: error handling 5 (10 pts), if/else 3 (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.
fixers._set_nested (cognitive 17) n8n/agent-harness/cli_anything/n8n/core/fixers.py:185— fixers._set_nested has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rekordbox_cli.playlist_add (cognitive 17) rekordbox/agent-harness/cli_anything/rekordbox/rekordbox_cli.py:307— rekordbox_cli.playlist_add has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 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.
preview.diff (cognitive 17) renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:285— preview.diff has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 6, loops 2 (3 pts), 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.
rms_cli.repl (cognitive 17) rms/agent-harness/cli_anything/rms/rms_cli.py:1176— rms_cli.repl has cognitive complexity 17 (threshold 15). Drivers by points: error handling 5 (10 pts), if/else 3 (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.
export.list_assets (cognitive 17) sbox/agent-harness/cli_anything/sbox/core/export.py:53— export.list_assets has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (7 pts), boolean chains 4, error handling 1 (3 pts), 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.
snapshot.list_snapshots (cognitive 17) tigris/agent-harness/cli_anything/tigris/core/snapshot.py:24— snapshot.list_snapshots has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 1 (3 pts), boolean chains 2, 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.
unimol_tools_cli.output (cognitive 17) unimol_tools/agent-harness/cli_anything/unimol_tools/unimol_tools_cli.py:28— unimol_tools_cli.output has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UniMolBackend._convert_metrics_to_json (cognitive 17) REDACTED:141— UniMolBackend._convert_metrics_to_json has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 3 (8 pts), if/else 5 (7 pts), loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UniMolBackend.predict (cognitive 17) REDACTED:165— UniMolBackend.predict has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 1, 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.
videocaptioner_cli.repl (cognitive 17) videocaptioner/agent-harness/cli_anything/videocaptioner/videocaptioner_cli.py:318— videocaptioner_cli.repl has cognitive complexity 17 (threshold 15). Drivers by points: error handling 5 (10 pts), if/else 3 (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.
zotero_http._build_url (cognitive 17) REDACTED:25— zotero_http._build_url has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (6 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
REDACTED.renderDeck (cognitive 17) REDACTED:2031— REDACTED.renderDeck has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 7, ternaries 1 (nesting depth added 1). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 2051, 2042). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
loadTokens (cognitive 17) sketch/agent-harness/src/builder.js:62— loadTokens has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 5, error handling 1, ternaries 1 (nesting depth added 2). Of this number, 13 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body: 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.
BridgeMod.BuildHandSelectState (cognitive 16) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:1209— BridgeMod.BuildHandSelectState has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
qgis_backend._extract_payload_message (cognitive 16) QGIS/agent-harness/cli_anything/qgis/utils/qgis_backend.py:140— qgis_backend._extract_payload_message has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
animation.add_keyframe (cognitive 16) blender/agent-harness/cli_anything/blender/core/animation.py:17— animation.add_keyframe has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, 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.
lighting.add_camera (cognitive 16) blender/agent-harness/cli_anything/blender/core/lighting.py:58— lighting.add_camera has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, boolean chains 4, loops 1 (2 pts), ternaries 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
preview._publish_live_session (cognitive 16) blender/agent-harness/cli_anything/blender/core/preview.py:458— preview._publish_live_session has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, ternaries 5, if/else 3 (4 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.
calibre_cli.repl (cognitive 16) calibre/agent-harness/cli_anything/calibre/calibre_cli.py:88— calibre_cli.repl has cognitive complexity 16 (threshold 15). Drivers by points: error handling 3 (6 pts), if/else 3 (6 pts), ternaries 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.
preview.capture (cognitive 16) freecad/agent-harness/cli_anything/freecad/core/preview.py:313— preview.capture has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 3 (4 pts), boolean chains 3, loops 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
freecad_backend.get_version (cognitive 16) freecad/agent-harness/cli_anything/freecad/utils/freecad_backend.py:221— freecad_backend.get_version has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
text._wrap_paragraph (cognitive 16) inkscape/agent-harness/cli_anything/inkscape/core/text.py:306— text._wrap_paragraph has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 2 (4 pts), ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
iterm2_ctl_cli.repl (cognitive 16) iterm2/agent-harness/cli_anything/iterm2_ctl/iterm2_ctl_cli.py:1412— iterm2_ctl_cli.repl has cognitive complexity 16 (threshold 15). Drivers by points: error handling 4 (8 pts), if/else 4 (7 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
filters.set_filter_param (cognitive 16) kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:218— filters.set_filter_param has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
export._build_html (cognitive 16) libreoffice/agent-harness/cli_anything/libreoffice/core/export.py:214— export._build_html has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (6 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
texture_info._read_dimensions_fallback (cognitive 16) live2d/agent-harness/cli_anything/live2d/core/texture_info.py:66— texture_info._read_dimensions_fallback has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 1 (2 pts), boolean chains 1, 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.
live2d_cli.param_edit (cognitive 16) live2d/agent-harness/cli_anything/live2d/live2d_cli.py:1111— live2d_cli.param_edit has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (15 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.
MacroRuntime.execute (cognitive 16) macrocli/agent-harness/cli_anything/macrocli/core/runtime.py:140— MacroRuntime.execute has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), error handling 2 (3 pts), boolean chains 1, loops 1, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
n8n_cli.health_check (cognitive 16) n8n/agent-harness/cli_anything/n8n/n8n_cli.py:1552— n8n_cli.health_check has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7, ternaries 3 (5 pts), error handling 3, 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, 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.
obs_utils._finite_number (cognitive 16) obs-studio/agent-harness/cli_anything/obs_studio/utils/obs_utils.py:11— obs_utils._finite_number has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), error handling 4 (6 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.
quietshrink_cli.doctor (cognitive 16) quietshrink/agent-harness/cli_anything/quietshrink/quietshrink_cli.py:165— quietshrink_cli.doctor has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (6 pts), error handling 2 (3 pts), if/else 3, boolean chains 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.
preview._compact_diff (cognitive 16) renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:64— preview._compact_diff has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
renderdoc_cli.repl (cognitive 16) renderdoc/agent-harness/cli_anything/renderdoc/renderdoc_cli.py:962— renderdoc_cli.repl has cognitive complexity 16 (threshold 15). Drivers by points: error handling 4 (8 pts), if/else 3 (6 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.
extract_tools._coerce_default (cognitive 16) safari/agent-harness/scripts/extract_tools.py:444— extract_tools._coerce_default 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.
scene._category_for_ref (cognitive 16) sbox/agent-harness/cli_anything/sbox/core/scene.py:1096— scene._category_for_ref has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, 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.
sbox_cli.codegen_component (cognitive 16) sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1127— sbox_cli.codegen_component has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, ternaries 2 (5 pts), loops 1 (2 pts), 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.
unimol_tools_cli.archive_command (cognitive 16) unimol_tools/agent-harness/cli_anything/unimol_tools/unimol_tools_cli.py:782— unimol_tools_cli.archive_command has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 1 (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.
capture.resolve_capture_target (cognitive 16) unrealinsights/agent-harness/cli_anything/unrealinsights/core/capture.py:69— capture.resolve_capture_target has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 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.
blender_preview_story_demo.draw_trace_panel (cognitive 16) docs/scripts/blender_preview_story_demo.py:293— blender_preview_story_demo.draw_trace_panel has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (7 pts), if/else 3 (5 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.
freecad_live_preview_demo.draw_terminal_panel (cognitive 16) docs/scripts/freecad_live_preview_demo.py:4444— freecad_live_preview_demo.draw_terminal_panel has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (7 pts), if/else 3 (5 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.
experimental.move_item_to_collection (cognitive 16) zotero/agent-harness/cli_anything/zotero/core/experimental.py:121— experimental.move_item_to_collection has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
openai_api._extract_text (cognitive 16) REDACTED:13— openai_api._extract_text has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
builder.build (cognitive 16) sketch/agent-harness/src/builder.js:326— builder.build has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, loops 3 (6 pts), if/else 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D22 · Internal API Consistency· Duplicate intent across modules · ×1
Duplicate intent across modules: The `cli` module exposes high-level CLI commands (install, uninstall, update) that appear to delegate to or duplicate the logic in the `installer` module (install_cli, uninstall_cli, update_cli). This creates ambiguity about whether the `cli` methods are thin wrappers or if the `installer` module is redundant/exposed unnecessarily. — Ensure `cli` methods are strictly thin wrappers that call `installer` methods, or remove the `installer` module from the public API if it is only used internally by the CLI layer. If both are public, rename `installer` methods to `installer.execute_install` etc., to distinguish them from the CLI entry points, or document the delegation clearly. (signatures: cli.install(name) | cli.uninstall(name) | cli.update(name) | installer.install_cli(name) | installer.uninstall_cli(name) | installer.update_cli(name))
D22 · Internal API Consistency· Inconsistent naming for registry operations · ×1
Inconsistent naming for registry operations: `cli.list_clis` implies a listing operation, while `registry.fetch_all_clis` also lists but uses 'fetch'. Similarly, `cli.info(name)` maps to `registry.get_cli(name)`. The mix of 'list' vs 'fetch' and 'info' vs 'get' for similar data retrieval operations is inconsistent. — Standardize on 'list' for collections and 'get' or 'info' for single items across both modules. For example, `registry.list_all_clis` and `registry.get_cli`. (signatures: cli.list_clis(category, source, as_json) | registry.fetch_all_clis(force_refresh) | registry.get_cli(name, force_refresh))
D22 · Internal API Consistency· Inconsistent naming for search operations · ×1
Inconsistent naming for search operations: `cli.matrix_search` vs `matrix.search_matrices`. The pluralization of the object being searched ('matrix' vs 'matrices') is inconsistent. Additionally, `matrix.search_capabilities` is distinct but follows a different pattern than `matrix.search_matrices`. — Standardize verb-object agreement. Use `matrix.search_matrix` (singular) or `matrix.search_matrices` (plural) consistently. If `search_matrices` searches for matrix definitions, ensure `matrix_search` in CLI aligns with this intent. (signatures: cli.matrix_search(query, as_json) | matrix.search_matrices(query, force_refresh) | matrix.search_capabilities(query, force_refresh))
D22 · Internal API Consistency· Inconsistent naming for preflight checks · ×1
Inconsistent naming for preflight checks: `cli.matrix_preflight` vs `matrix.preflight_matrix`. The CLI method uses the noun-verb order (matrix_preflight) while the core module uses verb-noun (preflight_matrix). — Align on a single naming convention, preferably verb-noun (e.g., `matrix.preflight`) or noun-verb (e.g., `cli.matrix_preflight` -> `matrix.check_preflight`). Given the CLI is the entry point, consider renaming the core method to `matrix.check_preflight` to avoid confusion with the CLI command name. (signatures: cli.matrix_preflight(name, ...) | matrix.preflight_matrix(matrix_item, ...))
D22 · Internal API Consistency· Inconsistent naming for rendering operations · ×1
Inconsistent naming for rendering operations: `cli.preview_html` vs `preview.render_html` and `preview.render_live_html`. The CLI uses 'preview' as a verb, while the core module uses 'render'. This suggests a mismatch in intent or abstraction level. — Standardize on 'render' for the core module and ensure the CLI method name reflects the action (e.g., `cli.render_preview` or keep `preview_html` if it's a specific CLI subcommand, but document the relationship clearly). Ideally, `cli.preview_html` should call `preview.render_html`. (signatures: cli.preview_html(preview_ref, output_path, poll_ms) | preview.render_html(bundle_ref, output_path) | preview.render_live_html(session_ref, output_path, poll_ms))
D22 · Internal API Consistency· Inconsistent naming for listing all items · ×1
Inconsistent naming for listing all items: `cli.list_matrices` vs `matrix.fetch_all_matrices`. 'list' vs 'fetch_all' is inconsistent. — Use `matrix.list_all` or `matrix.fetch_all` consistently. If `fetch` implies a network call and `list` implies a local cache check, document this distinction. Otherwise, unify to `matrix.list_all`. (signatures: cli.list_matrices(as_json) | matrix.fetch_all_matrices(force_refresh))
MethodTooLong: BridgeMod.BuildMultiplayerGameState slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:24— MethodTooLong — BuildMultiplayerGameState 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.
D4 · Code Duplication· Near-duplicate member family (61 members, 34 shared lines) · ×1
Near-duplicate member family (61 members, 34 shared lines) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:370— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:370-414 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:348-392 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:416-460 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:416-460 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:416-460 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:416-460 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:416-460 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:370-414 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:416-460 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:416-460 | cli-anything-plugin/repl_skin.py:416-460 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:416-460 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:416-460 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:416-460 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:416-460 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:416-460 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:416-460 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:381-425 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:416-460 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:416-460 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:416-460 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:416-460 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:416-460 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:416-460 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:416-460 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:416-460 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:416-460 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:416-460 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:416-460 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:370-414 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:416-460 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:355-400 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:416-460 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:416-460 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:420-462 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:416-460 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:416-460 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:416-460 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:416-460 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:416-460 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:416-460 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:416-460 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:416-460 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:416-460 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:416-460 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:416-460 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:416-460 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:416-460 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:416-460 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:416-460 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:416-460 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:416-460 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:416-460 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:381-425 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:370-414 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:348-392 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:418-462 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:416-460 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:416-460 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:416-460 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:416-460 — These 61 members are variants of one another: a block of 34 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 61 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 61 times.
D4 · Code Duplication· Near-duplicate member family (61 members, 12 shared lines) · ×1
Near-duplicate member family (61 members, 12 shared lines) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:158— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:158-197 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:146-175 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:189-243 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:189-243 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:189-243 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:189-243 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:189-243 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:159-198 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:189-243 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:189-243 | cli-anything-plugin/repl_skin.py:189-243 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:189-243 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:189-243 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:189-243 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:189-243 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:189-243 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:189-243 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:169-208 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:189-243 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:189-243 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:189-243 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:189-243 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:189-243 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:189-243 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:189-243 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:189-243 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:189-243 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:189-243 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:189-243 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:158-197 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:189-243 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:150-179 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:189-243 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:189-243 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:194-248 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:189-243 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:189-243 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:189-243 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:189-243 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:189-243 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:189-243 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:189-243 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:189-243 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:189-243 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:189-243 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:189-243 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:189-243 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:189-243 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:189-243 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:189-243 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:189-243 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:189-243 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:189-243 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:169-208 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:158-197 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:146-175 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:190-246 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:189-243 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:189-243 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:189-243 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:189-243 — These 61 members are variants of one another: a block of 12 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 61 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 61 times.
D4 · Code Duplication· Near-duplicate member family (12 members, 12 shared lines) · ×1
Near-duplicate member family (12 members, 12 shared lines) audacity/agent-harness/cli_anything/audacity/audacity_cli.py:100— audacity/agent-harness/cli_anything/audacity/audacity_cli.py:100-126 | blender/agent-harness/cli_anything/blender/blender_cli.py:161-187 | browser/agent-harness/cli_anything/browser/browser_cli.py:81-100 | drawio/agent-harness/cli_anything/drawio/drawio_cli.py:88-122 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:87-113 | inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:109-135 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:89-115 | libreoffice/agent-harness/cli_anything/libreoffice/libreoffice_cli.py:87-113 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:73-92 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:87-113 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:75-101 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:76-95 — These 12 members are variants of one another: a block of 12 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 12 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 12 times.
Near-duplicate member pair (83 shared lines) docs/scripts/blender_preview_story_demo.py:300— docs/scripts/blender_preview_story_demo.py:300-419 | docs/scripts/freecad_live_preview_demo.py:4451-4562 — These two members are variants of one another: 83 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (79 shared lines) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:25— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:25-220 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:43-221 — These two members are variants of one another: 79 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (64 shared lines) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:134— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:134-210 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:673-774 — These two members are variants of one another: 64 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×1
Edited copy of a member (22 corresponding lines) lldb/agent-harness/cli_anything/lldb/utils/output.py:21— lldb/agent-harness/cli_anything/lldb/utils/output.py:21-42 | renderdoc/agent-harness/cli_anything/renderdoc/utils/output.py:21-45 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×1
Edited copy of a member (12 corresponding lines) REDACTED:294— REDACTED:294-312 | REDACTED:471-483 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (20 corresponding lines) · ×1
Edited copy of a member (20 corresponding lines) sbox/agent-harness/cli_anything/sbox/core/material.py:26— sbox/agent-harness/cli_anything/sbox/core/material.py:26-80 | sbox/agent-harness/cli_anything/sbox/core/material.py:128-167 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×1
Edited copy of a member (15 corresponding lines) blender/agent-harness/cli_anything/blender/core/preview.py:677— blender/agent-harness/cli_anything/blender/core/preview.py:677-691 | freecad/agent-harness/cli_anything/freecad/core/preview.py:687-701 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (26 corresponding lines) · ×1
Edited copy of a member (26 corresponding lines) videocaptioner/agent-harness/cli_anything/videocaptioner/core/pipeline.py:29— videocaptioner/agent-harness/cli_anything/videocaptioner/core/pipeline.py:29-85 | videocaptioner/agent-harness/cli_anything/videocaptioner/core/subtitle.py:22-68 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Members sharing a duplicated core (59 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (59 members, 50+ identical tokens) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:441— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:441-462 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:419-440 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:487-508 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:487-508 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:487-508 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:487-508 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:487-508 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:441-462 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:487-508 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:487-508 | cli-anything-plugin/repl_skin.py:487-508 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:487-508 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:487-508 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:487-508 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:487-508 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:487-508 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:487-508 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:452-473 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:487-508 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:487-508 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:487-508 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:487-508 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:487-508 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:487-508 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:487-508 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:487-508 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:487-508 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:487-508 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:487-508 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:441-462 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:487-508 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:427-448 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:487-508 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:487-508 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:487-508 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:487-508 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:487-508 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:487-508 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:487-508 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:487-508 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:487-508 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:487-508 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:487-508 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:487-508 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:487-508 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:487-508 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:487-508 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:487-508 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:487-508 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:487-508 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:487-508 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:487-508 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:452-473 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:441-462 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:419-440 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:487-508 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:487-508 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:487-508 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:487-508 — These 59 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 59 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 59 times.
D4 · Code Duplication· Members sharing a duplicated core (22 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (22 members, 50+ identical tokens) QGIS/agent-harness/cli_anything/qgis/core/session.py:13— QGIS/agent-harness/cli_anything/qgis/core/session.py:13-39 | anygen/agent-harness/cli_anything/anygen/core/session.py:11-33 | audacity/agent-harness/cli_anything/audacity/core/session.py:14-36 | blender/agent-harness/cli_anything/blender/core/session.py:11-33 | drawio/agent-harness/cli_anything/drawio/core/session.py:19-42 | eez-studio/agent-harness/cli_anything/eez_studio/core/project.py:31-56 | freecad/agent-harness/cli_anything/freecad/core/session.py:18-48 | gimp/agent-harness/cli_anything/gimp/core/session.py:11-33 | inkscape/agent-harness/cli_anything/inkscape/core/session.py:11-33 | kdenlive/agent-harness/cli_anything/kdenlive/core/session.py:11-33 | krita/agent-harness/cli_anything/krita/utils/io.py:9-36 | libreoffice/agent-harness/cli_anything/libreoffice/core/session.py:11-33 | macrocli/agent-harness/cli_anything/macrocli/core/session.py:20-42 | minimax/agent-harness/cli_anything/minimax/core/session.py:12-34 | mubu/agent-harness/cli_anything/mubu/mubu_cli.py:136-157 | novita/agent-harness/cli_anything/novita/core/session.py:12-34 | obs-studio/agent-harness/cli_anything/obs_studio/core/session.py:11-33 | openrefine/agent-harness/cli_anything/openrefine/core/session.py:88-111 | openscreen/agent-harness/cli_anything/openscreen/core/session.py:19-42 | rms/agent-harness/cli_anything/rms/core/session.py:11-33 | shotcut/agent-harness/cli_anything/shotcut/core/session.py:19-42 | zotero/agent-harness/cli_anything/zotero/core/session.py:45-66 — These 22 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 22 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 22 times.
D4 · Code Duplication· Members sharing a duplicated core (19 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (19 members, 50+ identical tokens) 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:36— 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:36-47 | anygen/agent-harness/cli_anything/anygen/anygen_cli.py:49-59 | audacity/agent-harness/cli_anything/audacity/audacity_cli.py:54-64 | blender/agent-harness/cli_anything/blender/blender_cli.py:53-63 | browser/agent-harness/cli_anything/browser/browser_cli.py:44-54 | comfyui/agent-harness/cli_anything/comfyui/comfyui_cli.py:47-58 | drawio/agent-harness/cli_anything/drawio/drawio_cli.py:48-59 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:50-60 | inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:72-82 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:52-62 | libreoffice/agent-harness/cli_anything/libreoffice/libreoffice_cli.py:50-60 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:35-46 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:50-60 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:38-48 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:39-49 | openscreen/agent-harness/cli_anything/openscreen/openscreen_cli.py:36-47 | rms/agent-harness/cli_anything/rms/rms_cli.py:43-53 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:53-64 | zoom/agent-harness/cli_anything/zoom/zoom_cli.py:47-58 — These 19 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 19 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 19 times.
D4 · Code Duplication· Members sharing a duplicated core (15 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (15 members, 50+ identical tokens) seaclip/agent-harness/cli_anything/seaclip/core/activity.py:19— seaclip/agent-harness/cli_anything/seaclip/core/activity.py:19-49 | seaclip/agent-harness/cli_anything/seaclip/core/agents.py:18-48 | seaclip/agent-harness/cli_anything/seaclip/core/issues.py:22-53 | seaclip/agent-harness/cli_anything/seaclip/core/issues.py:62-79 | seaclip/agent-harness/cli_anything/seaclip/core/issues.py:87-104 | seaclip/agent-harness/cli_anything/seaclip/core/issues.py:112-129 | seaclip/agent-harness/cli_anything/seaclip/core/issues.py:136-153 | seaclip/agent-harness/cli_anything/seaclip/core/pipeline.py:20-37 | seaclip/agent-harness/cli_anything/seaclip/core/pipeline.py:44-66 | seaclip/agent-harness/cli_anything/seaclip/core/pipeline.py:73-90 | seaclip/agent-harness/cli_anything/seaclip/core/pipeline.py:97-114 | seaclip/agent-harness/cli_anything/seaclip/core/scheduler.py:18-49 | seaclip/agent-harness/cli_anything/seaclip/core/scheduler.py:58-79 | seaclip/agent-harness/cli_anything/seaclip/core/scheduler.py:86-103 | seaclip/agent-harness/cli_anything/seaclip/seaclip_cli.py:34-54 — These 15 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 15 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 15 times.
D4 · Code Duplication· Members sharing a duplicated core (13 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (13 members, 50+ identical tokens) comfyui/agent-harness/cli_anything/comfyui/utils/comfyui_backend.py:18— comfyui/agent-harness/cli_anything/comfyui/utils/comfyui_backend.py:18-50 | comfyui/agent-harness/cli_anything/comfyui/utils/comfyui_backend.py:54-86 | comfyui/agent-harness/cli_anything/comfyui/utils/comfyui_backend.py:90-122 | comfyui/agent-harness/cli_anything/comfyui/utils/comfyui_backend.py:126-156 | REDACTED:30-54 | REDACTED:60-85 | REDACTED:91-123 | REDACTED:129-154 | REDACTED:159-183 | ollama/agent-harness/cli_anything/ollama/utils/ollama_backend.py:16-53 | ollama/agent-harness/cli_anything/ollama/utils/ollama_backend.py:58-91 | ollama/agent-harness/cli_anything/ollama/utils/ollama_backend.py:96-129 | ollama/agent-harness/cli_anything/ollama/utils/ollama_backend.py:134-171 — These 13 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 13 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 13 times.
D4 · Code Duplication· Members sharing a duplicated core (8 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (8 members, 50+ identical tokens) audacity/agent-harness/cli_anything/audacity/audacity_cli.py:462— audacity/agent-harness/cli_anything/audacity/audacity_cli.py:462-478 | blender/agent-harness/cli_anything/blender/blender_cli.py:327-351 | blender/agent-harness/cli_anything/blender/blender_cli.py:545-562 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:481-496 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:421-437 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:509-526 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:301-327 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:427-445 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
Duplicated block (63 lines × 3) blender/agent-harness/cli_anything/blender/core/preview.py:718— blender/agent-harness/cli_anything/blender/core/preview.py:718-780 | freecad/agent-harness/cli_anything/freecad/core/preview.py:728-790 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:682-744 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 430 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (51–54 lines × 2) renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:78— renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:78-131 | renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:1183-1233 — 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 (50 lines × 2) freecad/agent-harness/cli_anything/freecad/core/preview.py:799— freecad/agent-harness/cli_anything/freecad/core/preview.py:799-848 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:752-801 — before extracting anything, compare `freecad/agent-harness/cli_anything/freecad/core/preview.py` and `shotcut/agent-harness/cli_anything/shotcut/core/preview.py` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 375 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `freecad/agent-harness/cli_anything/freecad/core/preview.py:799` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (49 lines × 2) kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py:182— kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py:182-230 | shotcut/agent-harness/cli_anything/shotcut/utils/melt_backend.py:176-224 — before extracting anything, compare `kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py` and `shotcut/agent-harness/cli_anything/shotcut/utils/melt_backend.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 163 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (47–48 lines × 2) freecad/agent-harness/cli_anything/freecad/core/export.py:260— freecad/agent-harness/cli_anything/freecad/core/export.py:260-307 | krita/agent-harness/cli_anything/krita/core/export.py:338-384 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (48 lines × 2) kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py:107— kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py:107-154 | shotcut/agent-harness/cli_anything/shotcut/utils/melt_backend.py:101-148 — before extracting anything, compare `kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py` and `shotcut/agent-harness/cli_anything/shotcut/utils/melt_backend.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 163 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (47 lines × 6) blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:422— blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:422-468 | cli-anything-plugin/preview_bundle.py:422-468 | freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py:422-468 | openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.py:422-468 | renderdoc/agent-harness/cli_anything/renderdoc/utils/preview_bundle.py:422-468 | shotcut/agent-harness/cli_anything/shotcut/utils/preview_bundle.py:422-468 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/utils/preview_bundle.py` and `cli-anything-plugin/preview_bundle.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 255 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (39–46 lines × 2) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:418— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:418-456 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:449-494 — before extracting anything, compare `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs` and `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:418` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (39–45 lines × 2) browser/agent-harness/cli_anything/browser/utils/security.py:93— browser/agent-harness/cli_anything/browser/utils/security.py:93-137 | safari/agent-harness/cli_anything/safari/utils/security.py:81-119 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `browser/agent-harness/cli_anything/browser/utils/security.py:93` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (45 lines × 2) freecad/agent-harness/cli_anything/freecad/core/body.py:278— freecad/agent-harness/cli_anything/freecad/core/body.py:278-322 | freecad/agent-harness/cli_anything/freecad/core/body.py:331-375 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (43 lines × 2) blender/agent-harness/cli_anything/blender/core/preview.py:381— blender/agent-harness/cli_anything/blender/core/preview.py:381-423 | freecad/agent-harness/cli_anything/freecad/core/preview.py:401-443 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 430 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `blender/agent-harness/cli_anything/blender/core/preview.py:381` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (39–42 lines × 2) renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:221— renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:221-259 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:213-254 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:221` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `shotcut/agent-harness/cli_anything/shotcut/core/preview.py:212` calls `_metrics` and `renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:221` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (41 lines × 2) exa/agent-harness/cli_anything/exa/utils/repl_skin.py:101— exa/agent-harness/cli_anything/exa/utils/repl_skin.py:101-141 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:101-141 — before extracting anything, compare `exa/agent-harness/cli_anything/exa/utils/repl_skin.py` and `unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 348 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (17–38 lines × 4) anygen/agent-harness/cli_anything/anygen/anygen_cli.py:468— anygen/agent-harness/cli_anything/anygen/anygen_cli.py:468-505 | minimax/agent-harness/cli_anything/minimax/minimax_cli.py:503-538 | novita/agent-harness/cli_anything/novita/novita_cli.py:376-409 | rms/agent-harness/cli_anything/rms/rms_cli.py:1211-1227 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `rms/agent-harness/cli_anything/rms/rms_cli.py:1211` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: `ReplSkin` names `cli_anything.anygen.utils.repl_skin` in one and `cli_anything.minimax.utils.repl_skin` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (30–38 lines × 2) REDACTED:1869— REDACTED:1869-1906 | REDACTED:1937-1966 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1869` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (37 lines × 3) blender/agent-harness/cli_anything/blender/blender_cli.py:98— blender/agent-harness/cli_anything/blender/blender_cli.py:98-134 | freecad/agent-harness/cli_anything/freecad/freecad_cli.py:116-152 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:99-135 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (35–37 lines × 2) macrocli/agent-harness/cli_anything/macrocli/backends/semantic_ui.py:252— macrocli/agent-harness/cli_anything/macrocli/backends/semantic_ui.py:252-286 | macrocli/agent-harness/cli_anything/macrocli/backends/visual_anchor.py:313-349 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `macrocli/agent-harness/cli_anything/macrocli/backends/semantic_ui.py:252` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (33–36 lines × 2) QGIS/agent-harness/cli_anything/qgis/core/export.py:63— QGIS/agent-harness/cli_anything/qgis/core/export.py:63-98 | QGIS/agent-harness/cli_anything/qgis/core/export.py:108-140 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (35 lines × 52) adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:134— adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:134-168 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:134-168 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:134-168 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:134-168 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:134-168 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:134-168 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:134-168 | cli-anything-plugin/repl_skin.py:134-168 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:134-168 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:134-168 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:134-168 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:134-168 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:134-168 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:134-168 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:134-168 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:134-168 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:134-168 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:134-168 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:134-168 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:134-168 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:134-168 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:134-168 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:134-168 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:134-168 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:134-168 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:134-168 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:134-168 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:134-168 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:139-173 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:134-168 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:134-168 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:134-168 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:134-168 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:134-168 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:134-168 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:134-168 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:134-168 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:134-168 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:134-168 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:134-168 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:134-168 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:134-168 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:134-168 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:134-168 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:134-168 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:134-168 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:134-168 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:135-169 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:134-168 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:134-168 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:134-168 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:134-168 — before extracting anything, compare `adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py` and `anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 396 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:134` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (34 lines × 52) adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:189— adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:189-222 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:189-222 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:189-222 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:189-222 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:189-222 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:189-222 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:189-222 | cli-anything-plugin/repl_skin.py:189-222 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:189-222 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:189-222 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:189-222 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:189-222 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:189-222 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:189-222 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:189-222 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:189-222 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:189-222 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:189-222 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:189-222 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:189-222 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:189-222 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:189-222 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:189-222 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:189-222 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:189-222 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:189-222 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:189-222 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:189-222 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:194-227 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:189-222 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:189-222 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:189-222 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:189-222 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:189-222 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:189-222 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:189-222 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:189-222 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:189-222 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:189-222 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:189-222 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:189-222 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:189-222 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:189-222 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:189-222 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:189-222 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:189-222 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:189-222 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:190-223 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:189-222 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:189-222 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:189-222 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:189-222 — before extracting anything, compare `adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py` and `anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 396 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (34 lines × 4) blender/agent-harness/cli_anything/blender/core/preview.py:388— blender/agent-harness/cli_anything/blender/core/preview.py:388-423 | freecad/agent-harness/cli_anything/freecad/core/preview.py:410-443 | renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:223-257 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:213-252 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 430 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `blender/agent-harness/cli_anything/blender/core/preview.py:388` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `shotcut/agent-harness/cli_anything/shotcut/core/preview.py:212` calls `_metrics` and `renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:221` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (34 lines × 2) blender/agent-harness/cli_anything/blender/core/lighting.py:137— blender/agent-harness/cli_anything/blender/core/lighting.py:137-170 | blender/agent-harness/cli_anything/blender/core/lighting.py:325-358 — 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 (31–34 lines × 2) chromadb/agent-harness/cli_anything/chromadb/chromadb_cli.py:69— chromadb/agent-harness/cli_anything/chromadb/chromadb_cli.py:69-102 | tigris/agent-harness/cli_anything/tigris/tigris_cli.py:118-148 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (29–33 lines × 2) adguardhome/agent-harness/cli_anything/adguardhome/adguardhome_cli.py:121— adguardhome/agent-harness/cli_anything/adguardhome/adguardhome_cli.py:121-149 | joplin/agent-harness/cli_anything/joplin/joplin_cli.py:948-980 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (32–33 lines × 2) audacity/agent-harness/cli_anything/audacity/utils/audio_utils.py:320— audacity/agent-harness/cli_anything/audacity/utils/audio_utils.py:320-352 | audacity/agent-harness/cli_anything/audacity/utils/audio_utils.py:372-403 — 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 (26–33 lines × 2) REDACTED:582— REDACTED:582-607 | REDACTED:632-664 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (32 lines × 61) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:203— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:203-234 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:181-212 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:249-280 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:249-280 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:249-280 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:249-280 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:249-280 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:204-235 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:249-280 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:249-280 | cli-anything-plugin/repl_skin.py:249-280 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:249-280 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:249-280 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:249-280 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:249-280 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:249-280 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:249-280 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:214-245 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:249-280 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:249-280 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:249-280 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:249-280 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:249-280 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:249-280 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:249-280 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:249-280 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:249-280 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:249-280 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:249-280 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:203-234 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:249-280 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:186-217 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:249-280 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:249-280 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:254-285 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:249-280 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:249-280 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:249-280 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:249-280 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:249-280 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:249-280 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:249-280 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:249-280 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:249-280 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:249-280 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:249-280 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:249-280 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:249-280 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:249-280 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:249-280 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:249-280 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:249-280 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:249-280 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:214-245 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:203-234 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:181-212 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:252-283 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:249-280 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:249-280 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:249-280 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:249-280 — before extracting anything, compare `3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py` and `QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 274 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (32 lines × 6) blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:280— blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:280-311 | cli-anything-plugin/preview_bundle.py:280-311 | freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py:280-311 | openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.py:280-311 | renderdoc/agent-harness/cli_anything/renderdoc/utils/preview_bundle.py:280-311 | shotcut/agent-harness/cli_anything/shotcut/utils/preview_bundle.py:280-311 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/utils/preview_bundle.py` and `cli-anything-plugin/preview_bundle.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 255 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (30–32 lines × 2) REDACTED:388— REDACTED:388-419 | REDACTED:370-399 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:388` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (25–32 lines × 2) freecad/agent-harness/cli_anything/freecad/core/draft.py:1174— freecad/agent-harness/cli_anything/freecad/core/draft.py:1174-1198 | freecad/agent-harness/cli_anything/freecad/core/mesh.py:716-747 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (30–31 lines × 3) blender/agent-harness/cli_anything/blender/core/preview.py:583— blender/agent-harness/cli_anything/blender/core/preview.py:583-613 | freecad/agent-harness/cli_anything/freecad/core/preview.py:596-626 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:551-580 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 430 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (29–30 lines × 61) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:370— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:370-399 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:348-377 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:416-445 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:416-445 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:416-445 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:416-445 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:416-445 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:370-399 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:416-445 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:416-445 | cli-anything-plugin/repl_skin.py:416-445 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:416-445 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:416-445 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:416-445 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:416-445 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:416-445 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:416-445 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:381-410 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:416-445 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:416-445 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:416-445 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:416-445 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:416-445 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:416-445 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:416-445 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:416-445 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:416-445 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:416-445 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:416-445 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:370-399 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:416-445 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:355-383 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:416-445 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:416-445 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:420-449 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:416-445 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:416-445 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:416-445 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:416-445 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:416-445 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:416-445 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:416-445 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:416-445 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:416-445 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:416-445 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:416-445 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:416-445 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:416-445 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:416-445 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:416-445 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:416-445 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:416-445 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:416-445 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:381-410 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:370-399 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:348-377 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:418-447 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:416-445 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:416-445 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:416-445 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:416-445 — before extracting anything, compare `3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py` and `QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 274 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (30 lines × 4) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:101— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:101-130 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:102-131 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:101-130 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:101-130 — before extracting anything, compare `3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py` and `calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 308 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (30 lines × 2) docs/scripts/blender_preview_story_demo.py:354— docs/scripts/blender_preview_story_demo.py:354-383 | docs/scripts/freecad_live_preview_demo.py:4497-4526 — 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 (26–30 lines × 2) freecad/agent-harness/cli_anything/freecad/core/sketch.py:198— freecad/agent-harness/cli_anything/freecad/core/sketch.py:198-223 | freecad/agent-harness/cli_anything/freecad/core/sketch.py:868-897 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `freecad/agent-harness/cli_anything/freecad/core/sketch.py:901` calls `ValueError` and `freecad/agent-harness/cli_anything/freecad/core/sketch.py:225` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (26–29 lines × 3) REDACTED:51— REDACTED:51-76 | macrocli/agent-harness/cli_anything/macrocli/backends/semantic_ui.py:244-270 | macrocli/agent-harness/cli_anything/macrocli/backends/visual_anchor.py:305-333 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:51` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (27–28 lines × 7) freecad/agent-harness/cli_anything/freecad/core/parts.py:684— freecad/agent-harness/cli_anything/freecad/core/parts.py:684-710 | freecad/agent-harness/cli_anything/freecad/core/parts.py:732-759 | freecad/agent-harness/cli_anything/freecad/core/parts.py:860-887 | freecad/agent-harness/cli_anything/freecad/core/parts.py:909-936 | freecad/agent-harness/cli_anything/freecad/core/parts.py:1062-1089 | freecad/agent-harness/cli_anything/freecad/core/parts.py:1112-1139 | freecad/agent-harness/cli_anything/freecad/core/parts.py:1166-1193 — all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `freecad/agent-harness/cli_anything/freecad/core/parts.py:1110` calls `_validate_vec3` and `freecad/agent-harness/cli_anything/freecad/core/parts.py:858` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11–28 lines × 3) REDACTED:2049— REDACTED:2049-2059 | REDACTED:2148-2158 | REDACTED:2221-2248 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2049` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (28 lines × 2) shotcut/agent-harness/cli_anything/shotcut/core/timeline.py:885— shotcut/agent-harness/cli_anything/shotcut/core/timeline.py:885-912 | shotcut/agent-harness/cli_anything/shotcut/core/timeline.py:916-943 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (20–27 lines × 3) freecad/agent-harness/cli_anything/freecad/core/draft.py:118— freecad/agent-harness/cli_anything/freecad/core/draft.py:118-144 | freecad/agent-harness/cli_anything/freecad/core/draft.py:283-305 | freecad/agent-harness/cli_anything/freecad/core/draft.py:315-334 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (27 lines × 3) REDACTED:1968— REDACTED:1968-1994 | REDACTED:2073-2099 | REDACTED:2171-2197 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1968` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (25 lines × 2) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:223— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:223-247 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:285-309 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.cs:223` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (26 lines × 4) comfyui/agent-harness/cli_anything/comfyui/core/models.py:11— comfyui/agent-harness/cli_anything/comfyui/core/models.py:11-36 | comfyui/agent-harness/cli_anything/comfyui/core/models.py:40-65 | comfyui/agent-harness/cli_anything/comfyui/core/models.py:69-94 | comfyui/agent-harness/cli_anything/comfyui/core/models.py:98-123 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (24–26 lines × 2) freecad/agent-harness/cli_anything/freecad/core/body.py:1962— freecad/agent-harness/cli_anything/freecad/core/body.py:1962-1987 | freecad/agent-harness/cli_anything/freecad/core/body.py:2020-2043 — 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 (25–26 lines × 2) macrocli/agent-harness/cli_anything/macrocli/core/llm_assist.py:322— macrocli/agent-harness/cli_anything/macrocli/core/llm_assist.py:322-347 | macrocli/agent-harness/cli_anything/macrocli/core/parameterize.py:231-255 — 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 (20–26 lines × 2) macrocli/agent-harness/cli_anything/macrocli/core/parameterize.py:172— macrocli/agent-harness/cli_anything/macrocli/core/parameterize.py:172-197 | macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py:667-686 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (23–25 lines × 2) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:83— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:83-105 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:82-106 — before extracting anything, compare `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs` and `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:83` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (21–24 lines × 5) blender/agent-harness/cli_anything/blender/core/preview.py:405— blender/agent-harness/cli_anything/blender/core/preview.py:405-426 | freecad/agent-harness/cli_anything/freecad/core/preview.py:425-445 | openscreen/agent-harness/cli_anything/openscreen/core/preview.py:203-226 | renderdoc/agent-harness/cli_anything/renderdoc/core/preview.py:239-259 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:233-254 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 430 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `blender/agent-harness/cli_anything/blender/core/preview.py:405` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `openscreen/agent-harness/cli_anything/openscreen/core/preview.py:202` calls `get` and `blender/agent-harness/cli_anything/blender/core/preview.py:403` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (23–24 lines × 2) docs/scripts/freecad_live_preview_demo.py:3658— docs/scripts/freecad_live_preview_demo.py:3658-3680 | docs/scripts/freecad_live_preview_demo.py:3761-3784 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (23 lines × 3) REDACTED:1364— REDACTED:1364-1386 | REDACTED:1405-1427 | REDACTED:1442-1464 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1364` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (19–23 lines × 2) 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:242— 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:242-264 | 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:295-313 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15–23 lines × 2) REDACTED:133— REDACTED:133-155 | REDACTED:219-233 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:133` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (22–23 lines × 2) libreoffice/agent-harness/cli_anything/libreoffice/core/export.py:283— libreoffice/agent-harness/cli_anything/libreoffice/core/export.py:283-305 | libreoffice/agent-harness/cli_anything/libreoffice/core/export.py:372-393 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (20–23 lines × 2) macrocli/agent-harness/cli_anything/macrocli/backends/gui_agent.py:398— macrocli/agent-harness/cli_anything/macrocli/backends/gui_agent.py:398-417 | macrocli/agent-harness/cli_anything/macrocli/backends/gui_agent.py:539-561 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (22 lines × 59) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:441— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:441-462 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:419-440 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:487-508 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:487-508 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:487-508 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:487-508 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:487-508 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:441-462 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:487-508 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:487-508 | cli-anything-plugin/repl_skin.py:487-508 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:487-508 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:487-508 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:487-508 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:487-508 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:487-508 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:487-508 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:452-473 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:487-508 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:487-508 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:487-508 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:487-508 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:487-508 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:487-508 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:487-508 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:487-508 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:487-508 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:487-508 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:487-508 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:441-462 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:487-508 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:427-448 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:487-508 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:487-508 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:487-508 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:487-508 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:487-508 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:487-508 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:487-508 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:487-508 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:487-508 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:487-508 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:487-508 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:487-508 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:487-508 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:487-508 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:487-508 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:487-508 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:487-508 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:487-508 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:487-508 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:487-508 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:452-473 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:441-462 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:419-440 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:487-508 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:487-508 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:487-508 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:487-508 — before extracting anything, compare `3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py` and `QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 274 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (19–22 lines × 2) drawio/agent-harness/cli_anything/drawio/utils/drawio_xml.py:92— drawio/agent-harness/cli_anything/drawio/utils/drawio_xml.py:92-113 | drawio/agent-harness/cli_anything/drawio/utils/drawio_xml.py:482-500 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `drawio/agent-harness/cli_anything/drawio/utils/drawio_xml.py:90` calls `set`, `str` and `drawio/agent-harness/cli_anything/drawio/utils/drawio_xml.py:480` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (18–21 lines × 61) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:488— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:488-505 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:466-483 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:534-551 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:534-551 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:534-551 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:534-551 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:534-551 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:488-505 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:534-551 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:534-551 | cli-anything-plugin/repl_skin.py:534-551 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:534-551 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:534-551 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:534-551 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:534-551 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:534-551 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:534-551 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:499-516 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:534-551 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:534-551 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:534-551 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:534-551 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:534-551 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:534-551 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:534-551 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:534-551 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:534-551 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:534-551 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:534-551 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:488-505 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:534-551 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:480-500 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:534-551 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:534-551 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:535-552 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:534-551 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:534-551 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:534-551 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:534-551 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:534-551 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:534-551 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:534-551 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:534-551 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:534-551 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:534-551 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:534-551 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:534-551 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:534-551 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:534-551 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:534-551 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:534-551 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:534-551 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:534-551 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:499-516 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:488-505 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:466-483 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:535-552 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:534-551 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:534-551 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:534-551 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:534-551 — before extracting anything, compare `3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py` and `QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 274 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (21 lines × 3) freecad/agent-harness/cli_anything/freecad/core/parts.py:1045— freecad/agent-harness/cli_anything/freecad/core/parts.py:1045-1065 | freecad/agent-harness/cli_anything/freecad/core/parts.py:1149-1169 | freecad/agent-harness/cli_anything/freecad/core/parts.py:1202-1222 — 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 (16–21 lines × 2) browser/agent-harness/cli_anything/browser/utils/security.py:145— browser/agent-harness/cli_anything/browser/utils/security.py:145-165 | safari/agent-harness/cli_anything/safari/utils/security.py:131-146 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (20 lines × 3) sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1156— sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1156-1175 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1197-1216 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1230-1249 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1156` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1254` calls `option` and `sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1180` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (18–20 lines × 2) sbox/agent-harness/cli_anything/sbox/core/material.py:43— sbox/agent-harness/cli_anything/sbox/core/material.py:43-62 | sbox/agent-harness/cli_anything/sbox/core/material.py:145-162 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (18–19 lines × 61) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:466— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:466-483 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:444-461 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:512-529 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:512-529 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:512-529 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:512-529 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:512-529 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:466-483 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:512-529 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:512-529 | cli-anything-plugin/repl_skin.py:512-529 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:512-529 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:512-529 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:512-529 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:512-529 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:512-529 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:512-529 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:477-494 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:512-529 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:512-529 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:512-529 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:512-529 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:512-529 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:512-529 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:512-529 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:512-529 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:512-529 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:512-529 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:512-529 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:466-483 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:512-529 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:457-475 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:512-529 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:512-529 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:513-530 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:512-529 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:512-529 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:512-529 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:512-529 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:512-529 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:512-529 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:512-529 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:512-529 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:512-529 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:512-529 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:512-529 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:512-529 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:512-529 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:512-529 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:512-529 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:512-529 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:512-529 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:512-529 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:477-494 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:466-483 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:444-461 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:513-530 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:512-529 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:512-529 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:512-529 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:512-529 — before extracting anything, compare `3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py` and `QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 274 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (19 lines × 50) adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:115— adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:115-133 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:115-133 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:115-133 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:115-133 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:115-133 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:115-133 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:115-133 | cli-anything-plugin/repl_skin.py:115-133 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:115-133 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:115-133 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:115-133 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:115-133 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:115-133 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:115-133 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:115-133 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:115-133 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:115-133 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:115-133 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:115-133 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:115-133 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:115-133 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:115-133 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:115-133 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:115-133 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:115-133 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:115-133 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:115-133 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:115-133 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:115-133 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:115-133 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:115-133 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:115-133 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:115-133 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:115-133 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:115-133 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:115-133 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:115-133 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:115-133 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:115-133 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:115-133 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:115-133 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:115-133 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:115-133 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:115-133 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:115-133 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:115-133 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:115-133 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:115-133 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:115-133 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:115-133 — before extracting anything, compare `adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py` and `anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 396 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:115` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 4) tigris/agent-harness/cli_anything/tigris/core/access_key.py:35— tigris/agent-harness/cli_anything/tigris/core/access_key.py:35-53 | tigris/agent-harness/cli_anything/tigris/core/iam.py:45-63 | tigris/agent-harness/cli_anything/tigris/core/iam.py:111-129 | tigris/agent-harness/cli_anything/tigris/core/object.py:57-75 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (18–19 lines × 3) QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:102— QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:102-119 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:105-123 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:102-119 — before extracting anything, compare `QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py` and `minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 304 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (19 lines × 3) blender/agent-harness/cli_anything/blender/blender_cli.py:952— blender/agent-harness/cli_anything/blender/blender_cli.py:952-970 | freecad/agent-harness/cli_anything/freecad/freecad_cli.py:2293-2311 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:1082-1100 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Duplicated block (16–18 lines × 17) anygen/agent-harness/cli_anything/anygen/core/session.py:12— anygen/agent-harness/cli_anything/anygen/core/session.py:12-27 | audacity/agent-harness/cli_anything/audacity/core/session.py:15-30 | blender/agent-harness/cli_anything/blender/core/session.py:12-27 | drawio/agent-harness/cli_anything/drawio/core/session.py:21-36 | freecad/agent-harness/cli_anything/freecad/core/session.py:24-41 | gimp/agent-harness/cli_anything/gimp/core/session.py:12-27 | inkscape/agent-harness/cli_anything/inkscape/core/session.py:12-27 | kdenlive/agent-harness/cli_anything/kdenlive/core/session.py:12-27 | krita/agent-harness/cli_anything/krita/utils/io.py:15-30 | libreoffice/agent-harness/cli_anything/libreoffice/core/session.py:12-27 | macrocli/agent-harness/cli_anything/macrocli/core/session.py:21-36 | minimax/agent-harness/cli_anything/minimax/core/session.py:13-28 | novita/agent-harness/cli_anything/novita/core/session.py:13-28 | obs-studio/agent-harness/cli_anything/obs_studio/core/session.py:12-27 | openscreen/agent-harness/cli_anything/openscreen/core/session.py:21-36 | rms/agent-harness/cli_anything/rms/core/session.py:12-27 | shotcut/agent-harness/cli_anything/shotcut/core/session.py:21-36 — before extracting anything, compare `anygen/agent-harness/cli_anything/anygen/core/session.py` and `audacity/agent-harness/cli_anything/audacity/core/session.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `openscreen/agent-harness/cli_anything/openscreen/core/session.py:20` calls `str` and `anygen/agent-harness/cli_anything/anygen/core/session.py:10` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (17–18 lines × 8) blender/agent-harness/cli_anything/blender/blender_cli.py:1122— blender/agent-harness/cli_anything/blender/blender_cli.py:1122-1139 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:783-800 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:725-741 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:432-448 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:463-480 | safari/agent-harness/cli_anything/safari/safari_cli.py:591-608 | videocaptioner/agent-harness/cli_anything/videocaptioner/videocaptioner_cli.py:348-364 | zoom/agent-harness/cli_anything/zoom/zoom_cli.py:482-499 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 8 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 8 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (18 lines × 4) audacity/agent-harness/cli_anything/audacity/audacity_cli.py:801— audacity/agent-harness/cli_anything/audacity/audacity_cli.py:801-818 | inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:1052-1069 | libreoffice/agent-harness/cli_anything/libreoffice/libreoffice_cli.py:759-776 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:812-829 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (16–18 lines × 3) blender/agent-harness/cli_anything/blender/core/preview.py:298— blender/agent-harness/cli_anything/blender/core/preview.py:298-315 | freecad/agent-harness/cli_anything/freecad/core/preview.py:330-345 | openscreen/agent-harness/cli_anything/openscreen/core/preview.py:113-130 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/preview.py` and `freecad/agent-harness/cli_anything/freecad/core/preview.py` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 430 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `blender/agent-harness/cli_anything/blender/core/preview.py:298` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `freecad/agent-harness/cli_anything/freecad/core/preview.py:329` calls `get_project` and `openscreen/agent-harness/cli_anything/openscreen/core/preview.py:113` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (17–18 lines × 3) cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1206— cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1206-1222 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1252-1268 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1307-1324 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1206` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 58) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:238— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:238-254 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:216-232 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:284-300 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:284-300 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:284-300 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:284-300 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:284-300 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:284-300 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:284-300 | cli-anything-plugin/repl_skin.py:284-300 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:284-300 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:284-300 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:284-300 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:284-300 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:284-300 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:284-300 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:249-265 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:284-300 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:284-300 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:284-300 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:284-300 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:284-300 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:284-300 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:284-300 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:284-300 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:284-300 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:284-300 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:284-300 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:238-254 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:284-300 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:222-238 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:284-300 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:284-300 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:284-300 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:284-300 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:284-300 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:284-300 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:284-300 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:284-300 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:284-300 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:284-300 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:284-300 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:284-300 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:284-300 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:284-300 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:284-300 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:284-300 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:284-300 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:284-300 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:284-300 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:284-300 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:249-265 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:238-254 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:216-232 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:284-300 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:284-300 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:284-300 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:284-300 — before extracting anything, compare `3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py` and `QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 274 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (15–17 lines × 18) QGIS/agent-harness/cli_anything/qgis/core/session.py:21— QGIS/agent-harness/cli_anything/qgis/core/session.py:21-37 | anygen/agent-harness/cli_anything/anygen/core/session.py:18-32 | audacity/agent-harness/cli_anything/audacity/core/session.py:21-35 | blender/agent-harness/cli_anything/blender/core/session.py:18-32 | drawio/agent-harness/cli_anything/drawio/core/session.py:27-41 | freecad/agent-harness/cli_anything/freecad/core/session.py:31-45 | gimp/agent-harness/cli_anything/gimp/core/session.py:18-32 | inkscape/agent-harness/cli_anything/inkscape/core/session.py:18-32 | kdenlive/agent-harness/cli_anything/kdenlive/core/session.py:18-32 | krita/agent-harness/cli_anything/krita/utils/io.py:21-35 | libreoffice/agent-harness/cli_anything/libreoffice/core/session.py:18-32 | macrocli/agent-harness/cli_anything/macrocli/core/session.py:27-41 | minimax/agent-harness/cli_anything/minimax/core/session.py:19-33 | novita/agent-harness/cli_anything/novita/core/session.py:19-33 | obs-studio/agent-harness/cli_anything/obs_studio/core/session.py:18-32 | openscreen/agent-harness/cli_anything/openscreen/core/session.py:27-41 | rms/agent-harness/cli_anything/rms/core/session.py:18-32 | shotcut/agent-harness/cli_anything/shotcut/core/session.py:27-41 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 18 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 18 times. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `data` to `dict` in one and `Any` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (7–17 lines × 4) audacity/agent-harness/cli_anything/audacity/core/clips.py:128— audacity/agent-harness/cli_anything/audacity/core/clips.py:128-134 | blender/agent-harness/cli_anything/blender/core/animation.py:102-118 | blender/agent-harness/cli_anything/blender/core/animation.py:236-251 | freecad/agent-harness/cli_anything/freecad/core/body.py:2138-2146 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (16–17 lines × 3) chromadb/agent-harness/cli_anything/chromadb/chromadb_cli.py:64— chromadb/agent-harness/cli_anything/chromadb/chromadb_cli.py:64-80 | seaclip/agent-harness/cli_anything/seaclip/seaclip_cli.py:116-131 | tigris/agent-harness/cli_anything/tigris/tigris_cli.py:113-129 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `tigris/agent-harness/cli_anything/tigris/tigris_cli.py:109` calls `get`, `error` and `chromadb/agent-harness/cli_anything/chromadb/chromadb_cli.py:62` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (16–17 lines × 2) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:402— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:402-417 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs:378-394 — before extracting anything, compare `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs` and `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 159 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:402` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15–17 lines × 2) blender/agent-harness/cli_anything/blender/core/modifiers.py:290— blender/agent-harness/cli_anything/blender/core/modifiers.py:290-306 | gimp/agent-harness/cli_anything/gimp/core/filters.py:368-382 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/core/modifiers.py` and `gimp/agent-harness/cli_anything/gimp/core/filters.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (15–16 lines × 3) freecad/agent-harness/cli_anything/freecad/core/body.py:1936— freecad/agent-harness/cli_anything/freecad/core/body.py:1936-1951 | freecad/agent-harness/cli_anything/freecad/core/body.py:1995-2010 | freecad/agent-harness/cli_anything/freecad/core/body.py:2045-2059 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (11–16 lines × 2) blender/agent-harness/cli_anything/blender/core/materials.py:117— blender/agent-harness/cli_anything/blender/core/materials.py:117-132 | inkscape/agent-harness/cli_anything/inkscape/core/gradients.py:108-118 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (14–16 lines × 2) gimp/agent-harness/cli_anything/gimp/utils/gimp_backend.py:86— gimp/agent-harness/cli_anything/gimp/utils/gimp_backend.py:86-101 | gimp/agent-harness/cli_anything/gimp/utils/gimp_backend.py:177-190 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 61) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:246— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:246-260 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:224-238 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:292-306 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:292-306 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:292-306 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:292-306 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:292-306 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:246-260 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:292-306 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:292-306 | cli-anything-plugin/repl_skin.py:292-306 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:292-306 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:292-306 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:292-306 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:292-306 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:292-306 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:292-306 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:257-271 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:292-306 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:292-306 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:292-306 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:292-306 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:292-306 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:292-306 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:292-306 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:292-306 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:292-306 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:292-306 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:292-306 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:246-260 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:292-306 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:230-244 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:292-306 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:292-306 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:296-310 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:292-306 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:292-306 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:292-306 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:292-306 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:292-306 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:292-306 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:292-306 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:292-306 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:292-306 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:292-306 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:292-306 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:292-306 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:292-306 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:292-306 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:292-306 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:292-306 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:292-306 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:292-306 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:257-271 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:246-260 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:224-238 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:294-308 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:292-306 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:292-306 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:292-306 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:292-306 — before extracting anything, compare `3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py` and `QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 274 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:245` calls `get` and `calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:244` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14–15 lines × 7) audacity/agent-harness/cli_anything/audacity/core/session.py:138— audacity/agent-harness/cli_anything/audacity/core/session.py:138-152 | blender/agent-harness/cli_anything/blender/core/session.py:130-144 | gimp/agent-harness/cli_anything/gimp/core/session.py:130-144 | inkscape/agent-harness/cli_anything/inkscape/core/session.py:130-143 | kdenlive/agent-harness/cli_anything/kdenlive/core/session.py:126-139 | libreoffice/agent-harness/cli_anything/libreoffice/core/session.py:137-150 | obs-studio/agent-harness/cli_anything/obs_studio/core/session.py:126-139 — before extracting anything, compare `audacity/agent-harness/cli_anything/audacity/core/session.py` and `blender/agent-harness/cli_anything/blender/core/session.py` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (15 lines × 6) blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:236— blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:236-250 | cli-anything-plugin/preview_bundle.py:236-250 | freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py:236-250 | openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.py:236-250 | renderdoc/agent-harness/cli_anything/renderdoc/utils/preview_bundle.py:236-250 | shotcut/agent-harness/cli_anything/shotcut/utils/preview_bundle.py:236-250 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/utils/preview_bundle.py` and `cli-anything-plugin/preview_bundle.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 255 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (14–15 lines × 2) slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:946— slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:946-959 | slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:998-1012 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:946` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13–15 lines × 2) openscreen/agent-harness/cli_anything/openscreen/core/preview.py:166— openscreen/agent-harness/cli_anything/openscreen/core/preview.py:166-178 | shotcut/agent-harness/cli_anything/shotcut/core/preview.py:191-205 — before extracting anything, compare `openscreen/agent-harness/cli_anything/openscreen/core/preview.py` and `shotcut/agent-harness/cli_anything/shotcut/core/preview.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `openscreen/agent-harness/cli_anything/openscreen/core/preview.py:166` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12–15 lines × 2) shotcut/agent-harness/cli_anything/shotcut/utils/mlt_xml.py:224— shotcut/agent-harness/cli_anything/shotcut/utils/mlt_xml.py:224-238 | shotcut/agent-harness/cli_anything/shotcut/utils/mlt_xml.py:249-260 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 7) browser/agent-harness/cli_anything/browser/browser_cli.py:426— browser/agent-harness/cli_anything/browser/browser_cli.py:426-439 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:796-809 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:444-457 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:476-489 | safari/agent-harness/cli_anything/safari/safari_cli.py:604-617 | videocaptioner/agent-harness/cli_anything/videocaptioner/videocaptioner_cli.py:360-373 | zoom/agent-harness/cli_anything/zoom/zoom_cli.py:495-508 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 7 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 7 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `browser/agent-harness/cli_anything/browser/browser_cli.py:424` calls `any`, `startswith` and `gimp/agent-harness/cli_anything/gimp/gimp_cli.py:795` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9–14 lines × 7) freecad/agent-harness/cli_anything/freecad/core/assembly.py:52— freecad/agent-harness/cli_anything/freecad/core/assembly.py:52-60 | freecad/agent-harness/cli_anything/freecad/core/draft.py:39-47 | freecad/agent-harness/cli_anything/freecad/core/draft.py:51-59 | freecad/agent-harness/cli_anything/freecad/core/fem.py:52-60 | freecad/agent-harness/cli_anything/freecad/core/parts.py:123-136 | freecad/agent-harness/cli_anything/freecad/core/techdraw.py:47-55 | freecad/agent-harness/cli_anything/freecad/core/techdraw.py:59-67 — there are 7 copies across 5 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 7 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13–14 lines × 5) drawio/agent-harness/cli_anything/drawio/utils/drawio_backend.py:121— drawio/agent-harness/cli_anything/drawio/utils/drawio_backend.py:121-134 | kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py:144-157 | kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py:209-221 | shotcut/agent-harness/cli_anything/shotcut/utils/melt_backend.py:138-151 | shotcut/agent-harness/cli_anything/shotcut/utils/melt_backend.py:203-215 — before extracting anything, compare `kdenlive/agent-harness/cli_anything/kdenlive/utils/melt_backend.py` and `shotcut/agent-harness/cli_anything/shotcut/utils/melt_backend.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 163 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `drawio/agent-harness/cli_anything/drawio/utils/drawio_backend.py:121` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (13–14 lines × 4) libreoffice/agent-harness/cli_anything/libreoffice/core/writer.py:24— libreoffice/agent-harness/cli_anything/libreoffice/core/writer.py:24-36 | libreoffice/agent-harness/cli_anything/libreoffice/core/writer.py:52-65 | libreoffice/agent-harness/cli_anything/libreoffice/core/writer.py:82-94 | libreoffice/agent-harness/cli_anything/libreoffice/core/writer.py:112-125 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `libreoffice/agent-harness/cli_anything/libreoffice/core/writer.py:51` calls `ValueError` and `libreoffice/agent-harness/cli_anything/libreoffice/core/writer.py:23` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12–14 lines × 3) blender/agent-harness/cli_anything/blender/core/render.py:109— blender/agent-harness/cli_anything/blender/core/render.py:109-121 | krita/agent-harness/cli_anything/krita/core/project.py:454-467 | obs-studio/agent-harness/cli_anything/obs_studio/core/output.py:88-99 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `blender/agent-harness/cli_anything/blender/core/render.py:123` calls `ValueError` and `obs-studio/agent-harness/cli_anything/obs_studio/core/output.py:99` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13–14 lines × 2) lldb/agent-harness/cli_anything/lldb/utils/output.py:21— lldb/agent-harness/cli_anything/lldb/utils/output.py:21-33 | renderdoc/agent-harness/cli_anything/renderdoc/utils/output.py:21-34 — before extracting anything, compare `lldb/agent-harness/cli_anything/lldb/utils/output.py` and `renderdoc/agent-harness/cli_anything/renderdoc/utils/output.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 13) comfyui/agent-harness/cli_anything/comfyui/utils/comfyui_backend.py:38— comfyui/agent-harness/cli_anything/comfyui/utils/comfyui_backend.py:38-50 | comfyui/agent-harness/cli_anything/comfyui/utils/comfyui_backend.py:74-86 | comfyui/agent-harness/cli_anything/comfyui/utils/comfyui_backend.py:110-122 | comfyui/agent-harness/cli_anything/comfyui/utils/comfyui_backend.py:144-156 | REDACTED:42-54 | REDACTED:73-85 | REDACTED:111-123 | REDACTED:142-154 | REDACTED:171-183 | ollama/agent-harness/cli_anything/ollama/utils/ollama_backend.py:41-53 | ollama/agent-harness/cli_anything/ollama/utils/ollama_backend.py:79-91 | ollama/agent-harness/cli_anything/ollama/utils/ollama_backend.py:117-129 | ollama/agent-harness/cli_anything/ollama/utils/ollama_backend.py:159-171 — there are 13 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 13 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (13 lines × 12) cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:377— cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:377-390 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:416-428 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:458-471 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:500-512 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:542-554 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:582-595 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:635-648 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:849-863 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:905-918 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1211-1224 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1257-1270 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1313-1326 — all 12 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. Read the line range as the matched WINDOW rather than a finished unit: at `cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:635` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 5) audacity/agent-harness/cli_anything/audacity/audacity_cli.py:808— audacity/agent-harness/cli_anything/audacity/audacity_cli.py:808-820 | inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:1059-1071 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:731-743 | libreoffice/agent-harness/cli_anything/libreoffice/libreoffice_cli.py:766-778 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:819-831 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 5 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7–13 lines × 3) audacity/agent-harness/cli_anything/audacity/core/effects.py:200— audacity/agent-harness/cli_anything/audacity/core/effects.py:200-212 | blender/agent-harness/cli_anything/blender/core/modifiers.py:166-172 | gimp/agent-harness/cli_anything/gimp/core/filters.py:262-268 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `audacity/agent-harness/cli_anything/audacity/core/effects.py:200` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10–13 lines × 3) kdenlive/agent-harness/cli_anything/kdenlive/core/timeline.py:140— kdenlive/agent-harness/cli_anything/kdenlive/core/timeline.py:140-149 | kdenlive/agent-harness/cli_anything/kdenlive/core/timeline.py:173-185 | kdenlive/agent-harness/cli_anything/kdenlive/core/timeline.py:225-234 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (12–13 lines × 3) renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:458— renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:458-469 | renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:1333-1344 | renderdoc/agent-harness/cli_anything/renderdoc/core/pipeline.py:1377-1389 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 61) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:334— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:334-345 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:312-323 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:380-391 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:380-391 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:380-391 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:380-391 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:380-391 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:334-345 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:380-391 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:380-391 | cli-anything-plugin/repl_skin.py:380-391 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:380-391 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:380-391 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:380-391 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:380-391 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:380-391 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:380-391 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:345-356 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:380-391 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:380-391 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:380-391 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:380-391 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:380-391 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:380-391 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:380-391 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:380-391 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:380-391 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:380-391 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:380-391 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:334-345 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:380-391 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:320-331 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:380-391 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:380-391 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:384-395 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:380-391 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:380-391 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:380-391 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:380-391 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:380-391 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:380-391 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:380-391 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:380-391 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:380-391 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:380-391 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:380-391 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:380-391 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:380-391 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:380-391 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:380-391 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:380-391 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:380-391 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:380-391 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:345-356 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:334-345 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:312-323 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:382-393 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:380-391 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:380-391 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:380-391 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:380-391 — before extracting anything, compare `3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py` and `QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 274 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 54) adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:149— adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:149-160 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:149-160 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:149-160 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:149-160 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:149-160 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:149-160 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:149-160 | cli-anything-plugin/repl_skin.py:149-160 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:149-160 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:149-160 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:149-160 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:149-160 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:149-160 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:149-160 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:128-139 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:149-160 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:149-160 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:149-160 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:149-160 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:149-160 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:149-160 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:149-160 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:149-160 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:149-160 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:149-160 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:149-160 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:149-160 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:149-160 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:149-160 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:154-165 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:149-160 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:149-160 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:149-160 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:149-160 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:149-160 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:149-160 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:149-160 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:149-160 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:149-160 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:149-160 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:149-160 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:149-160 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:149-160 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:149-160 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:149-160 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:149-160 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:149-160 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:149-160 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:128-139 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:150-161 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:149-160 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:149-160 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:149-160 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:149-160 — before extracting anything, compare `adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py` and `anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 396 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 51) adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:229— adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:229-240 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:229-240 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:229-240 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:229-240 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:229-240 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:229-240 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:229-240 | cli-anything-plugin/repl_skin.py:229-240 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:229-240 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:229-240 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:229-240 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:229-240 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:229-240 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:229-240 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:229-240 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:229-240 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:229-240 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:229-240 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:229-240 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:229-240 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:229-240 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:229-240 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:229-240 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:229-240 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:229-240 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:229-240 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:229-240 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:229-240 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:234-245 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:229-240 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:229-240 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:229-240 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:229-240 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:229-240 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:229-240 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:229-240 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:229-240 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:229-240 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:229-240 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:229-240 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:229-240 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:229-240 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:229-240 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:229-240 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:229-240 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:229-240 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:229-240 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:229-240 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:229-240 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:229-240 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:229-240 — before extracting anything, compare `adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py` and `anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 396 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 20) QGIS/agent-harness/cli_anything/qgis/core/session.py:20— QGIS/agent-harness/cli_anything/qgis/core/session.py:20-33 | anygen/agent-harness/cli_anything/anygen/core/session.py:17-28 | audacity/agent-harness/cli_anything/audacity/core/session.py:20-31 | blender/agent-harness/cli_anything/blender/core/session.py:17-28 | drawio/agent-harness/cli_anything/drawio/core/session.py:26-37 | eez-studio/agent-harness/cli_anything/eez_studio/core/project.py:37-49 | freecad/agent-harness/cli_anything/freecad/core/session.py:30-42 | gimp/agent-harness/cli_anything/gimp/core/session.py:17-28 | inkscape/agent-harness/cli_anything/inkscape/core/session.py:17-28 | kdenlive/agent-harness/cli_anything/kdenlive/core/session.py:17-28 | krita/agent-harness/cli_anything/krita/utils/io.py:20-31 | libreoffice/agent-harness/cli_anything/libreoffice/core/session.py:17-28 | macrocli/agent-harness/cli_anything/macrocli/core/session.py:26-37 | minimax/agent-harness/cli_anything/minimax/core/session.py:18-29 | novita/agent-harness/cli_anything/novita/core/session.py:18-29 | obs-studio/agent-harness/cli_anything/obs_studio/core/session.py:17-28 | openrefine/agent-harness/cli_anything/openrefine/core/session.py:93-105 | openscreen/agent-harness/cli_anything/openscreen/core/session.py:26-37 | rms/agent-harness/cli_anything/rms/core/session.py:17-28 | shotcut/agent-harness/cli_anything/shotcut/core/session.py:26-37 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 20 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 20 times. Note first that the copies are not typed on the same thing: the declarations holding them bind `data` to `dict` in one and `Any` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `eez-studio/agent-harness/cli_anything/eez_studio/core/project.py:50` calls `write` and `anygen/agent-harness/cli_anything/anygen/core/session.py:29` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12 lines × 18) anygen/agent-harness/cli_anything/anygen/core/session.py:16— anygen/agent-harness/cli_anything/anygen/core/session.py:16-27 | audacity/agent-harness/cli_anything/audacity/core/session.py:19-30 | blender/agent-harness/cli_anything/blender/core/session.py:16-27 | drawio/agent-harness/cli_anything/drawio/core/session.py:25-36 | freecad/agent-harness/cli_anything/freecad/core/session.py:28-41 | gimp/agent-harness/cli_anything/gimp/core/session.py:16-27 | inkscape/agent-harness/cli_anything/inkscape/core/session.py:16-27 | kdenlive/agent-harness/cli_anything/kdenlive/core/session.py:16-27 | krita/agent-harness/cli_anything/krita/utils/io.py:19-30 | libreoffice/agent-harness/cli_anything/libreoffice/core/session.py:16-27 | macrocli/agent-harness/cli_anything/macrocli/core/session.py:25-36 | minimax/agent-harness/cli_anything/minimax/core/session.py:17-28 | mubu/agent-harness/cli_anything/mubu/mubu_cli.py:140-152 | novita/agent-harness/cli_anything/novita/core/session.py:17-28 | obs-studio/agent-harness/cli_anything/obs_studio/core/session.py:16-27 | openscreen/agent-harness/cli_anything/openscreen/core/session.py:25-36 | rms/agent-harness/cli_anything/rms/core/session.py:16-27 | shotcut/agent-harness/cli_anything/shotcut/core/session.py:25-36 — before extracting anything, compare `anygen/agent-harness/cli_anything/anygen/core/session.py` and `audacity/agent-harness/cli_anything/audacity/core/session.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `path` to `str` in one and `Path` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `anygen/agent-harness/cli_anything/anygen/core/session.py:15` calls `makedirs`, `dirname`, `abspath` and `mubu/agent-harness/cli_anything/mubu/mubu_cli.py:139` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12 lines × 9) audacity/agent-harness/cli_anything/audacity/audacity_cli.py:104— audacity/agent-harness/cli_anything/audacity/audacity_cli.py:104-115 | blender/agent-harness/cli_anything/blender/blender_cli.py:165-176 | drawio/agent-harness/cli_anything/drawio/drawio_cli.py:100-111 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:91-102 | inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:113-124 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:93-104 | libreoffice/agent-harness/cli_anything/libreoffice/libreoffice_cli.py:91-102 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:79-90 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:91-102 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 9 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 9 times.
Duplicated block (12 lines × 8) audacity/agent-harness/cli_anything/audacity/audacity_cli.py:463— audacity/agent-harness/cli_anything/audacity/audacity_cli.py:463-474 | blender/agent-harness/cli_anything/blender/blender_cli.py:332-343 | blender/agent-harness/cli_anything/blender/blender_cli.py:546-557 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:482-493 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:422-433 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:510-521 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:310-321 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:428-439 — there are 8 copies across 5 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 8 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (12 lines × 6) blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:212— blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:212-223 | cli-anything-plugin/preview_bundle.py:212-223 | freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py:212-223 | openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.py:212-223 | renderdoc/agent-harness/cli_anything/renderdoc/utils/preview_bundle.py:212-223 | shotcut/agent-harness/cli_anything/shotcut/utils/preview_bundle.py:212-223 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/utils/preview_bundle.py` and `cli-anything-plugin/preview_bundle.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 255 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10–12 lines × 3) audacity/agent-harness/cli_anything/audacity/core/effects.py:189— audacity/agent-harness/cli_anything/audacity/core/effects.py:189-200 | blender/agent-harness/cli_anything/blender/core/modifiers.py:156-165 | gimp/agent-harness/cli_anything/gimp/core/filters.py:252-261 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11–12 lines × 3) lldb/agent-harness/cli_anything/lldb/lldb_cli.py:674— lldb/agent-harness/cli_anything/lldb/lldb_cli.py:674-684 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/nsight_graphics_cli.py:481-492 | unrealinsights/agent-harness/cli_anything/unrealinsights/unrealinsights_cli.py:1050-1061 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `lldb/agent-harness/cli_anything/lldb/lldb_cli.py:686` calls `get` and `nsight-graphics/agent-harness/cli_anything/nsight_graphics/nsight_graphics_cli.py:493` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11–12 lines × 2) REDACTED:265— REDACTED:265-276 | REDACTED:294-304 — 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–12 lines × 2) n8n/agent-harness/cli_anything/n8n/core/versions.py:89— n8n/agent-harness/cli_anything/n8n/core/versions.py:89-96 | n8n/agent-harness/cli_anything/n8n/core/versions.py:158-169 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `n8n/agent-harness/cli_anything/n8n/core/versions.py:158` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `keep` to `int = 50` in one and `int = 10` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (10–12 lines × 2) novita/agent-harness/cli_anything/novita/novita_cli.py:135— novita/agent-harness/cli_anything/novita/novita_cli.py:135-146 | novita/agent-harness/cli_anything/novita/novita_cli.py:190-199 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 61) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:350— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:350-360 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:328-338 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:396-406 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:396-406 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:396-406 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:396-406 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:396-406 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:350-360 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:396-406 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:396-406 | cli-anything-plugin/repl_skin.py:396-406 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:396-406 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:396-406 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:396-406 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:396-406 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:396-406 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:396-406 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:361-371 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:396-406 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:396-406 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:396-406 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:396-406 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:396-406 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:396-406 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:396-406 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:396-406 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:396-406 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:396-406 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:396-406 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:350-360 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:396-406 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:336-346 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:396-406 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:396-406 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:400-410 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:396-406 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:396-406 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:396-406 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:396-406 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:396-406 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:396-406 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:396-406 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:396-406 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:396-406 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:396-406 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:396-406 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:396-406 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:396-406 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:396-406 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:396-406 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:396-406 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:396-406 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:396-406 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:361-371 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:350-360 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:328-338 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:398-408 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:396-406 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:396-406 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:396-406 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:396-406 — before extracting anything, compare `3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py` and `QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 274 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 19) 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:37— 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:37-47 | anygen/agent-harness/cli_anything/anygen/anygen_cli.py:49-59 | audacity/agent-harness/cli_anything/audacity/audacity_cli.py:54-64 | blender/agent-harness/cli_anything/blender/blender_cli.py:53-63 | browser/agent-harness/cli_anything/browser/browser_cli.py:44-54 | comfyui/agent-harness/cli_anything/comfyui/comfyui_cli.py:48-58 | drawio/agent-harness/cli_anything/drawio/drawio_cli.py:49-59 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:50-60 | inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:72-82 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:52-62 | libreoffice/agent-harness/cli_anything/libreoffice/libreoffice_cli.py:50-60 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:36-46 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:50-60 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:38-48 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:39-49 | openscreen/agent-harness/cli_anything/openscreen/openscreen_cli.py:37-47 | rms/agent-harness/cli_anything/rms/rms_cli.py:43-53 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:54-64 | zoom/agent-harness/cli_anything/zoom/zoom_cli.py:48-58 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 19 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 19 times. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `rms/agent-harness/cli_anything/rms/rms_cli.py:38` calls `_get_token`, `get_api_token` and `anygen/agent-harness/cli_anything/anygen/anygen_cli.py:45` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 52) adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:234— adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:234-243 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:234-243 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:234-243 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:234-243 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:234-243 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:234-243 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:234-243 | cli-anything-plugin/repl_skin.py:234-243 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:234-243 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:234-243 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:234-243 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:234-243 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:234-243 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:234-243 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:234-243 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:234-243 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:234-243 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:234-243 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:234-243 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:234-243 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:234-243 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:234-243 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:234-243 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:234-243 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:234-243 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:234-243 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:234-243 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:234-243 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:239-248 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:234-243 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:234-243 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:234-243 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:234-243 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:234-243 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:234-243 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:234-243 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:234-243 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:234-243 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:234-243 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:234-243 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:234-243 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:234-243 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:234-243 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:234-243 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:234-243 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:234-243 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:234-243 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:237-246 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:234-243 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:234-243 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:234-243 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:234-243 — before extracting anything, compare `adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py` and `anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 396 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:236` calls `extend`, `_meta_lines`, `_display_home_path` and `adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:233` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 24) 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:51— 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:51-60 | QGIS/agent-harness/cli_anything/qgis/qgis_cli.py:54-63 | anygen/agent-harness/cli_anything/anygen/anygen_cli.py:63-72 | audacity/agent-harness/cli_anything/audacity/audacity_cli.py:77-86 | blender/agent-harness/cli_anything/blender/blender_cli.py:138-147 | browser/agent-harness/cli_anything/browser/browser_cli.py:58-67 | comfyui/agent-harness/cli_anything/comfyui/comfyui_cli.py:73-82 | drawio/agent-harness/cli_anything/drawio/drawio_cli.py:64-73 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:64-73 | inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:86-95 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:66-75 | libreoffice/agent-harness/cli_anything/libreoffice/libreoffice_cli.py:64-73 | live2d/agent-harness/cli_anything/live2d/live2d_cli.py:70-79 | minimax/agent-harness/cli_anything/minimax/minimax_cli.py:64-73 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:50-59 | novita/agent-harness/cli_anything/novita/novita_cli.py:59-68 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:64-73 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:52-61 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:53-62 | rms/agent-harness/cli_anything/rms/rms_cli.py:57-66 | safari/agent-harness/cli_anything/safari/safari_cli.py:103-112 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:140-149 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/web_yu_pri_cli.py:55-64 | zoom/agent-harness/cli_anything/zoom/zoom_cli.py:62-71 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 24 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 24 times. Note first that the copies are not typed on the same thing: the declarations holding them bind `data` to `dict` in one and `dict[str, Any]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (9–10 lines × 7) 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:86— 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:86-94 | anygen/agent-harness/cli_anything/anygen/anygen_cli.py:90-98 | browser/agent-harness/cli_anything/browser/browser_cli.py:92-100 | minimax/agent-harness/cli_anything/minimax/minimax_cli.py:91-100 | novita/agent-harness/cli_anything/novita/novita_cli.py:86-95 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:93-101 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:87-95 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 7 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 7 times. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:104` calls `_require_api_key`, `RuntimeError` and `3MF/agent-harness/cli_anything/threemf/threemf_cli.py:98` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9–10 lines × 4) jumpserver/agent-harness/cli_anything/jumpserver/core/commands_account.py:103— jumpserver/agent-harness/cli_anything/jumpserver/core/commands_account.py:103-112 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_perm.py:97-105 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_user.py:93-102 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_user.py:248-256 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `jumpserver/agent-harness/cli_anything/jumpserver/core/commands_account.py:103` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8–10 lines × 3) shotcut/agent-harness/cli_anything/shotcut/core/compositing.py:113— shotcut/agent-harness/cli_anything/shotcut/core/compositing.py:113-122 | shotcut/agent-harness/cli_anything/shotcut/core/compositing.py:164-172 | shotcut/agent-harness/cli_anything/shotcut/core/filters.py:769-776 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Note first that the copies are not typed on the same thing: the declarations holding them bind `track_index` to `int` in one and `Optional[int] = None` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (9 lines × 61) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:419— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:419-427 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:397-405 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:465-473 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:465-473 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:465-473 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:465-473 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:465-473 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:419-427 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:465-473 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:465-473 | cli-anything-plugin/repl_skin.py:465-473 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:465-473 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:465-473 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:465-473 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:465-473 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:465-473 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:465-473 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:430-438 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:465-473 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:465-473 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:465-473 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:465-473 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:465-473 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:465-473 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:465-473 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:465-473 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:465-473 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:465-473 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:465-473 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:419-427 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:465-473 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:405-413 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:465-473 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:465-473 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:467-475 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:465-473 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:465-473 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:465-473 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:465-473 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:465-473 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:465-473 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:465-473 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:465-473 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:465-473 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:465-473 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:465-473 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:465-473 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:465-473 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:465-473 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:465-473 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:465-473 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:465-473 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:465-473 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:430-438 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:419-427 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:397-405 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:467-475 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:465-473 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:465-473 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:465-473 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:465-473 — before extracting anything, compare `3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py` and `QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 274 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 15) seaclip/agent-harness/cli_anything/seaclip/core/activity.py:26— seaclip/agent-harness/cli_anything/seaclip/core/activity.py:26-34 | seaclip/agent-harness/cli_anything/seaclip/core/agents.py:25-33 | seaclip/agent-harness/cli_anything/seaclip/core/issues.py:29-37 | seaclip/agent-harness/cli_anything/seaclip/core/issues.py:69-77 | seaclip/agent-harness/cli_anything/seaclip/core/issues.py:94-102 | seaclip/agent-harness/cli_anything/seaclip/core/issues.py:119-127 | seaclip/agent-harness/cli_anything/seaclip/core/issues.py:143-151 | seaclip/agent-harness/cli_anything/seaclip/core/pipeline.py:27-35 | seaclip/agent-harness/cli_anything/seaclip/core/pipeline.py:51-59 | seaclip/agent-harness/cli_anything/seaclip/core/pipeline.py:80-88 | seaclip/agent-harness/cli_anything/seaclip/core/pipeline.py:104-112 | seaclip/agent-harness/cli_anything/seaclip/core/scheduler.py:25-33 | seaclip/agent-harness/cli_anything/seaclip/core/scheduler.py:69-77 | seaclip/agent-harness/cli_anything/seaclip/core/scheduler.py:93-101 | seaclip/agent-harness/cli_anything/seaclip/seaclip_cli.py:41-49 — before extracting anything, compare `seaclip/agent-harness/cli_anything/seaclip/core/activity.py` and `seaclip/agent-harness/cli_anything/seaclip/core/agents.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 10) audacity/agent-harness/cli_anything/audacity/audacity_cli.py:101— audacity/agent-harness/cli_anything/audacity/audacity_cli.py:101-109 | blender/agent-harness/cli_anything/blender/blender_cli.py:162-170 | drawio/agent-harness/cli_anything/drawio/drawio_cli.py:90-98 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:88-96 | inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:110-118 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:90-98 | libreoffice/agent-harness/cli_anything/libreoffice/libreoffice_cli.py:88-96 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:76-84 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:88-96 | openscreen/agent-harness/cli_anything/openscreen/openscreen_cli.py:79-87 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 10 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 10 times. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `musescore/agent-harness/cli_anything/musescore/musescore_cli.py:74` calls `wraps` and `audacity/agent-harness/cli_anything/audacity/audacity_cli.py:99` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 9) audacity/agent-harness/cli_anything/audacity/audacity_cli.py:118— audacity/agent-harness/cli_anything/audacity/audacity_cli.py:118-126 | blender/agent-harness/cli_anything/blender/blender_cli.py:179-187 | drawio/agent-harness/cli_anything/drawio/drawio_cli.py:114-122 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:105-113 | inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:127-135 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:107-115 | libreoffice/agent-harness/cli_anything/libreoffice/libreoffice_cli.py:105-113 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:105-113 | videocaptioner/agent-harness/cli_anything/videocaptioner/videocaptioner_cli.py:50-58 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 9 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 9 times. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:118` calls `parse_time`, `timecode_to_seconds` and `audacity/agent-harness/cli_anything/audacity/audacity_cli.py:130` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6–9 lines × 5) audacity/agent-harness/cli_anything/audacity/core/effects.py:194— audacity/agent-harness/cli_anything/audacity/core/effects.py:194-202 | blender/agent-harness/cli_anything/blender/core/materials.py:173-179 | blender/agent-harness/cli_anything/blender/core/modifiers.py:161-166 | freecad/agent-harness/cli_anything/freecad/core/materials.py:505-511 | gimp/agent-harness/cli_anything/gimp/core/filters.py:257-262 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 5 times. Read the line range as the matched WINDOW rather than a finished unit: at `audacity/agent-harness/cli_anything/audacity/core/effects.py:194` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8–9 lines × 3) docs/scripts/blender_orbital_relay_drone_demo.py:167— docs/scripts/blender_orbital_relay_drone_demo.py:167-174 | docs/scripts/blender_orbital_relay_drone_demo.py:175-182 | docs/scripts/blender_orbital_relay_drone_demo.py:190-198 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `docs/scripts/blender_orbital_relay_drone_demo.py:190` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `docs/scripts/blender_orbital_relay_drone_demo.py:201` calls `_build_stage_01_hull_blockout`, `add_object` and `docs/scripts/blender_orbital_relay_drone_demo.py:175` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7–9 lines × 2) audacity/agent-harness/cli_anything/audacity/core/export.py:325— audacity/agent-harness/cli_anything/audacity/core/export.py:325-331 | audacity/agent-harness/cli_anything/audacity/utils/audio_utils.py:274-282 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8–9 lines × 2) docs/scripts/blender_preview_story_demo.py:399— docs/scripts/blender_preview_story_demo.py:399-406 | docs/scripts/freecad_live_preview_demo.py:4541-4549 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `docs/scripts/blender_preview_story_demo.py:399` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (3–9 lines × 4) freecad/agent-harness/cli_anything/freecad/utils/freecad_macro_gen.py:58— freecad/agent-harness/cli_anything/freecad/utils/freecad_macro_gen.py:58-60 | freecad/agent-harness/cli_anything/freecad/utils/freecad_macro_gen.py:61-69 | freecad/agent-harness/cli_anything/freecad/utils/freecad_macro_gen.py:82-84 | freecad/agent-harness/cli_anything/freecad/utils/freecad_macro_gen.py:85-93 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6–9 lines × 2) inkscape/agent-harness/cli_anything/inkscape/core/layers.py:174— inkscape/agent-harness/cli_anything/inkscape/core/layers.py:174-179 | libreoffice/agent-harness/cli_anything/libreoffice/core/impress.py:142-150 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (4–9 lines × 3) sbox/agent-harness/cli_anything/sbox/core/export.py:226— sbox/agent-harness/cli_anything/sbox/core/export.py:226-229 | sbox/agent-harness/cli_anything/sbox/core/export.py:374-380 | sbox/agent-harness/cli_anything/sbox/core/validate.py:143-151 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 60) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:405— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:405-412 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:383-390 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:451-458 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:451-458 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:451-458 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:451-458 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:451-458 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:405-412 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:451-458 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:451-458 | cli-anything-plugin/repl_skin.py:451-458 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:451-458 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:451-458 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:451-458 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:451-458 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:451-458 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:451-458 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:416-423 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:451-458 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:451-458 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:451-458 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:451-458 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:451-458 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:451-458 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:451-458 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:451-458 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:451-458 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:451-458 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:451-458 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:405-412 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:451-458 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:391-398 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:451-458 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:451-458 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:451-458 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:451-458 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:451-458 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:451-458 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:451-458 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:451-458 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:451-458 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:451-458 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:451-458 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:451-458 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:451-458 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:451-458 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:451-458 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:451-458 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:451-458 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:451-458 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:451-458 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:451-458 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:416-423 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:405-412 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:383-390 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:453-460 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:451-458 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:451-458 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:451-458 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:451-458 — before extracting anything, compare `3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py` and `QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 274 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 53) adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:132— adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:132-139 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:132-139 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:132-139 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:132-139 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:132-139 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:132-139 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:132-139 | cli-anything-plugin/repl_skin.py:132-139 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:132-139 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:132-139 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:132-139 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:132-139 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:132-139 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:132-139 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:132-139 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:132-139 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:132-139 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:132-139 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:132-139 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:132-139 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:132-139 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:132-139 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:132-139 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:132-139 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:132-139 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:132-139 | mermaid/agent-harness/cli_anything/mermaid/utils/repl_skin.py:31-38 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:132-139 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:132-139 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:137-144 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:132-139 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:132-139 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:132-139 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:132-139 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:132-139 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:132-139 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:132-139 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:132-139 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:132-139 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:132-139 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:132-139 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:132-139 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:132-139 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:132-139 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:132-139 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:132-139 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:132-139 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:132-139 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:133-140 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:132-139 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:132-139 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:132-139 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:132-139 — before extracting anything, compare `adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py` and `anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 396 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 12) audacity/agent-harness/cli_anything/audacity/audacity_cli.py:100— audacity/agent-harness/cli_anything/audacity/audacity_cli.py:100-107 | blender/agent-harness/cli_anything/blender/blender_cli.py:161-168 | drawio/agent-harness/cli_anything/drawio/drawio_cli.py:89-96 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:87-94 | inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:109-116 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:89-96 | libreoffice/agent-harness/cli_anything/libreoffice/libreoffice_cli.py:87-94 | live2d/agent-harness/cli_anything/live2d/live2d_cli.py:96-103 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:75-82 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:87-94 | openscreen/agent-harness/cli_anything/openscreen/openscreen_cli.py:78-85 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:165-172 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 12 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 12 times. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `live2d/agent-harness/cli_anything/live2d/live2d_cli.py:95` calls `wraps` and `audacity/agent-harness/cli_anything/audacity/audacity_cli.py:99` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 9) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:158— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:158-165 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:146-153 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:159-166 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:169-176 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:158-165 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:150-157 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:169-176 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:158-165 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:146-153 — before extracting anything, compare `3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py` and `QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 274 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 5) tigris/agent-harness/cli_anything/tigris/core/access_key.py:70— tigris/agent-harness/cli_anything/tigris/core/access_key.py:70-77 | tigris/agent-harness/cli_anything/tigris/core/access_key.py:94-101 | tigris/agent-harness/cli_anything/tigris/core/access_key.py:172-179 | tigris/agent-harness/cli_anything/tigris/core/bucket.py:104-111 | tigris/agent-harness/cli_anything/tigris/core/object.py:172-179 — there are 5 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (7–8 lines × 3) anygen/agent-harness/cli_anything/anygen/utils/anygen_backend.py:108— anygen/agent-harness/cli_anything/anygen/utils/anygen_backend.py:108-115 | anygen/agent-harness/cli_anything/anygen/utils/anygen_backend.py:183-189 | anygen/agent-harness/cli_anything/anygen/utils/anygen_backend.py:257-263 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `anygen/agent-harness/cli_anything/anygen/utils/anygen_backend.py:108` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6–8 lines × 2) 3MF/agent-harness/cli_anything/threemf/utils/threemf_backend.py:394— 3MF/agent-harness/cli_anything/threemf/utils/threemf_backend.py:394-401 | 3MF/agent-harness/cli_anything/threemf/utils/threemf_backend.py:446-451 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7 lines × 61) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:167— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:167-173 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:155-161 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:218-224 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:218-224 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:218-224 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:218-224 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:218-224 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:168-174 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:218-224 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:218-224 | cli-anything-plugin/repl_skin.py:218-224 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:218-224 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:218-224 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:218-224 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:218-224 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:218-224 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:218-224 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:178-184 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:218-224 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:218-224 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:218-224 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:218-224 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:218-224 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:218-224 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:218-224 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:218-224 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:218-224 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:218-224 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:218-224 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:167-173 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:218-224 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:159-165 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:218-224 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:218-224 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:223-229 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:218-224 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:218-224 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:218-224 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:218-224 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:218-224 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:218-224 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:218-224 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:218-224 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:218-224 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:218-224 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:218-224 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:218-224 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:218-224 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:218-224 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:218-224 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:218-224 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:218-224 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:218-224 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:178-184 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:167-173 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:155-161 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:219-225 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:218-224 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:218-224 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:218-224 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:218-224 — before extracting anything, compare `3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py` and `QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 274 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 24) 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:64— 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:64-70 | QGIS/agent-harness/cli_anything/qgis/qgis_cli.py:67-73 | anygen/agent-harness/cli_anything/anygen/anygen_cli.py:76-82 | audacity/agent-harness/cli_anything/audacity/audacity_cli.py:90-96 | blender/agent-harness/cli_anything/blender/blender_cli.py:151-157 | browser/agent-harness/cli_anything/browser/browser_cli.py:71-77 | comfyui/agent-harness/cli_anything/comfyui/comfyui_cli.py:86-92 | drawio/agent-harness/cli_anything/drawio/drawio_cli.py:78-84 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:77-83 | inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:99-105 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:79-85 | libreoffice/agent-harness/cli_anything/libreoffice/libreoffice_cli.py:77-83 | live2d/agent-harness/cli_anything/live2d/live2d_cli.py:83-89 | minimax/agent-harness/cli_anything/minimax/minimax_cli.py:77-83 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:63-69 | novita/agent-harness/cli_anything/novita/novita_cli.py:72-78 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:77-83 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:65-71 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:66-72 | rms/agent-harness/cli_anything/rms/rms_cli.py:70-76 | safari/agent-harness/cli_anything/safari/safari_cli.py:116-122 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:154-160 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/web_yu_pri_cli.py:68-74 | zoom/agent-harness/cli_anything/zoom/zoom_cli.py:75-81 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 24 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 24 times. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `live2d/agent-harness/cli_anything/live2d/live2d_cli.py:95` calls `wraps` and `3MF/agent-harness/cli_anything/threemf/threemf_cli.py:75` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6–7 lines × 5) cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:938— cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:938-943 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:963-968 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1005-1011 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1031-1036 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1114-1119 — all 5 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:947` calls `argument` and `cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1123` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 5) docs/scripts/blender_orbital_relay_drone_demo.py:172— docs/scripts/blender_orbital_relay_drone_demo.py:172-178 | docs/scripts/blender_orbital_relay_drone_demo.py:180-186 | docs/scripts/blender_orbital_relay_drone_demo.py:209-215 | docs/scripts/blender_orbital_relay_drone_demo.py:227-233 | docs/scripts/blender_orbital_relay_drone_demo.py:390-396 — all 5 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. Read the line range as the matched WINDOW rather than a finished unit: at `docs/scripts/blender_orbital_relay_drone_demo.py:172` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (3–7 lines × 3) inkscape/agent-harness/cli_anything/inkscape/core/export.py:237— inkscape/agent-harness/cli_anything/inkscape/core/export.py:237-239 | inkscape/agent-harness/cli_anything/inkscape/core/export.py:240-246 | inkscape/agent-harness/cli_anything/inkscape/core/export.py:248-254 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `inkscape/agent-harness/cli_anything/inkscape/core/export.py:237` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `inkscape/agent-harness/cli_anything/inkscape/core/export.py:235` calls `rectangle` and `inkscape/agent-harness/cli_anything/inkscape/core/export.py:248` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 52) adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:228— adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:228-233 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:228-233 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:228-233 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:228-233 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:228-233 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:228-233 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:228-233 | cli-anything-plugin/repl_skin.py:228-233 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:228-233 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:228-233 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:228-233 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:228-233 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:228-233 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:228-233 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:228-233 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:228-233 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:228-233 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:228-233 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:228-233 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:228-233 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:228-233 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:228-233 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:228-233 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:228-233 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:228-233 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:228-233 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:228-233 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:228-233 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:233-238 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:228-233 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:228-233 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:228-233 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:228-233 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:228-233 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:228-233 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:228-233 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:228-233 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:228-233 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:228-233 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:228-233 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:228-233 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:228-233 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:228-233 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:228-233 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:228-233 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:228-233 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:228-233 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:229-234 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:228-233 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:228-233 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:228-233 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:228-233 — before extracting anything, compare `adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py` and `anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 396 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:236` calls `extend`, `_meta_lines`, `_display_home_path` and `adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:234` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 20) 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:79— 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:79-84 | 3MF/agent-harness/cli_anything/threemf/threemf_cli.py:86-91 | anygen/agent-harness/cli_anything/anygen/anygen_cli.py:90-95 | audacity/agent-harness/cli_anything/audacity/audacity_cli.py:111-116 | blender/agent-harness/cli_anything/blender/blender_cli.py:172-177 | browser/agent-harness/cli_anything/browser/browser_cli.py:92-97 | drawio/agent-harness/cli_anything/drawio/drawio_cli.py:107-112 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:98-103 | inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:120-125 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:100-105 | libreoffice/agent-harness/cli_anything/libreoffice/libreoffice_cli.py:98-103 | macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py:110-115 | minimax/agent-harness/cli_anything/minimax/minimax_cli.py:91-96 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:86-91 | novita/agent-harness/cli_anything/novita/novita_cli.py:86-91 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:98-103 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:86-91 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:93-98 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:87-92 | rms/agent-harness/cli_anything/rms/rms_cli.py:85-90 — there are 20 copies across 18 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 20 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (6 lines × 13) audacity/agent-harness/cli_anything/audacity/audacity_cli.py:104— audacity/agent-harness/cli_anything/audacity/audacity_cli.py:104-109 | blender/agent-harness/cli_anything/blender/blender_cli.py:165-170 | browser/agent-harness/cli_anything/browser/browser_cli.py:85-90 | drawio/agent-harness/cli_anything/drawio/drawio_cli.py:100-105 | gimp/agent-harness/cli_anything/gimp/gimp_cli.py:91-96 | inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:113-118 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:93-98 | libreoffice/agent-harness/cli_anything/libreoffice/libreoffice_cli.py:91-96 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:79-84 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:91-96 | obsidian/agent-harness/cli_anything/obsidian/obsidian_cli.py:79-84 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:80-85 | openscreen/agent-harness/cli_anything/openscreen/openscreen_cli.py:82-87 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 13 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 13 times.
Duplicated block (5–6 lines × 3) browser/agent-harness/cli_anything/browser/browser_cli.py:239— browser/agent-harness/cli_anything/browser/browser_cli.py:239-244 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:136-141 | ollama/agent-harness/cli_anything/ollama/ollama_cli.py:218-222 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ollama/agent-harness/cli_anything/ollama/ollama_cli.py:217` calls `echo` and `ollama/agent-harness/cli_anything/ollama/ollama_cli.py:136` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (4–5 lines × 8) cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:375— cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:375-379 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:456-460 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:498-502 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:540-544 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:580-584 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:791-794 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:903-907 | cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:1364-1368 — all 8 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:382` calls `get` and `cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py:463` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 6) blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:255— blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:255-259 | cli-anything-plugin/preview_bundle.py:255-259 | freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py:255-259 | openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.py:255-259 | renderdoc/agent-harness/cli_anything/renderdoc/utils/preview_bundle.py:255-259 | shotcut/agent-harness/cli_anything/shotcut/utils/preview_bundle.py:255-259 — before extracting anything, compare `blender/agent-harness/cli_anything/blender/utils/preview_bundle.py` and `cli-anything-plugin/preview_bundle.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 255 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (3–5 lines × 3) blender/agent-harness/cli_anything/blender/blender_cli.py:327— blender/agent-harness/cli_anything/blender/blender_cli.py:327-329 | blender/agent-harness/cli_anything/blender/blender_cli.py:385-389 | blender/agent-harness/cli_anything/blender/blender_cli.py:691-695 — 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (4–5 lines × 5) sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1281— sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1281-1284 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1309-1312 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1855-1859 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1944-1948 | sbox/agent-harness/cli_anything/sbox/sbox_cli.py:2028-2031 — all 5 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. Read the line range as the matched WINDOW rather than a finished unit: at `sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1855` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1278` calls `abspath` and `sbox/agent-harness/cli_anything/sbox/sbox_cli.py:1306` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (17 lines × 5) rms/agent-harness/cli_anything/rms/core/companies.py:7— rms/agent-harness/cli_anything/rms/core/companies.py:7-23 | rms/agent-harness/cli_anything/rms/core/reports.py:7-39 | rms/agent-harness/cli_anything/rms/core/smtp.py:7-23 | rms/agent-harness/cli_anything/rms/core/tags.py:7-23 | rms/agent-harness/cli_anything/rms/core/users.py:7-23 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 5 call sites, so a change lands once.
Duplicated block (8 lines × 61) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:140— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:140-147 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:128-135 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:171-178 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:171-178 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:171-178 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:171-178 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:171-178 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:141-148 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:171-178 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:171-178 | cli-anything-plugin/repl_skin.py:171-178 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:171-178 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:171-178 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:171-178 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:171-178 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:171-178 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:171-178 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:151-158 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:171-178 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:171-178 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:171-178 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:171-178 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:171-178 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:171-178 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:171-178 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:171-178 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:171-178 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:171-178 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:171-178 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:140-147 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:171-178 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:132-139 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:171-178 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:171-178 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:176-183 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:171-178 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:171-178 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:171-178 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:171-178 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:171-178 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:171-178 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:171-178 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:171-178 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:171-178 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:171-178 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:171-178 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:171-178 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:171-178 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:171-178 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:171-178 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:171-178 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:171-178 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:171-178 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:151-158 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:140-147 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:128-135 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:172-179 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:171-178 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:171-178 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:171-178 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:171-178 — before extracting anything, compare `3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py` and `QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 274 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (29 lines × 61) 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:263— 3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py:263-291 | QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py:241-269 | adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:309-337 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:309-337 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:309-337 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:309-337 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:309-337 | calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py:263-291 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:309-337 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:309-337 | cli-anything-plugin/repl_skin.py:309-337 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:309-337 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:309-337 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:309-337 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:309-337 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:309-337 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:309-337 | exa/agent-harness/cli_anything/exa/utils/repl_skin.py:274-302 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:309-337 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:309-337 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:309-337 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:309-337 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:309-337 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:309-337 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:309-337 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:309-337 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:309-337 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:309-337 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:309-337 | macrocli/agent-harness/cli_anything/macrocli/utils/repl_skin.py:263-291 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:309-337 | minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:247-277 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:309-337 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:309-337 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:313-341 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:309-337 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:309-337 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:309-337 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:309-337 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:309-337 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:309-337 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:309-337 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:309-337 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:309-337 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:309-337 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:309-337 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:309-337 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:309-337 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:309-337 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:309-337 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:309-337 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:309-337 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:309-337 | unimol_tools/agent-harness/cli_anything/unimol_tools/utils/repl_skin.py:274-302 | unrealinsights/agent-harness/cli_anything/unrealinsights/utils/repl_skin.py:263-291 | videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:241-269 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:311-339 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:309-337 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:309-337 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:309-337 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:309-337 — before extracting anything, compare `3MF/agent-harness/cli_anything/threemf/utils/repl_skin.py` and `QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 274 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 52) adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:96— adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py:96-103 | anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py:96-103 | audacity/agent-harness/cli_anything/audacity/utils/repl_skin.py:96-103 | blender/agent-harness/cli_anything/blender/utils/repl_skin.py:96-103 | browser/agent-harness/cli_anything/browser/utils/repl_skin.py:96-103 | cc-switch/agent-harness/cli_anything/ccswitch/utils/repl_skin.py:96-103 | chromadb/agent-harness/cli_anything/chromadb/utils/repl_skin.py:96-103 | cli-anything-plugin/repl_skin.py:96-103 | cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/repl_skin.py:96-103 | cloudcompare/agent-harness/cli_anything/cloudcompare/utils/repl_skin.py:96-103 | dify-workflow/agent-harness/cli_anything/dify_workflow/utils/repl_skin.py:96-103 | drawio/agent-harness/cli_anything/drawio/utils/repl_skin.py:96-103 | eez-studio/agent-harness/cli_anything/eez_studio/utils/repl_skin.py:96-103 | eth2-quickstart/agent-harness/cli_anything/eth2_quickstart/utils/repl_skin.py:96-103 | freecad/agent-harness/cli_anything/freecad/utils/repl_skin.py:96-103 | gimp/agent-harness/cli_anything/gimp/utils/repl_skin.py:96-103 | godot/agent-harness/cli_anything/godot/utils/repl_skin.py:96-103 | inkscape/agent-harness/cli_anything/inkscape/utils/repl_skin.py:96-103 | intelwatch/agent-harness/cli_anything/intelwatch/utils/repl_skin.py:96-103 | iterm2/agent-harness/cli_anything/iterm2_ctl/utils/repl_skin.py:96-103 | joplin/agent-harness/cli_anything/joplin/utils/repl_skin.py:96-103 | kdenlive/agent-harness/cli_anything/kdenlive/utils/repl_skin.py:96-103 | krita/agent-harness/cli_anything/krita/utils/repl_skin.py:96-103 | libreoffice/agent-harness/cli_anything/libreoffice/utils/repl_skin.py:96-103 | lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py:96-103 | mailchimp/agent-harness/cli_anything/mailchimp/utils/repl_skin.py:96-103 | mubu/agent-harness/cli_anything/mubu/utils/repl_skin.py:96-103 | musescore/agent-harness/cli_anything/musescore/utils/repl_skin.py:96-103 | n8n/agent-harness/cli_anything/n8n/utils/repl_skin.py:102-109 | novita/agent-harness/cli_anything/novita/utils/repl_skin.py:96-103 | nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py:96-103 | nslogger/agent-harness/cli_anything/nslogger/utils/repl_skin.py:96-103 | obs-studio/agent-harness/cli_anything/obs_studio/utils/repl_skin.py:96-103 | obsidian/agent-harness/cli_anything/obsidian/utils/repl_skin.py:96-103 | ollama/agent-harness/cli_anything/ollama/utils/repl_skin.py:96-103 | openrefine/agent-harness/cli_anything/openrefine/utils/repl_skin.py:96-103 | openscreen/agent-harness/cli_anything/openscreen/utils/repl_skin.py:96-103 | pm2/agent-harness/cli_anything/pm2/utils/repl_skin.py:96-103 | renderdoc/agent-harness/cli_anything/renderdoc/utils/repl_skin.py:96-103 | rms/agent-harness/cli_anything/rms/utils/repl_skin.py:96-103 | safari/agent-harness/cli_anything/safari/utils/repl_skin.py:96-103 | sbox/agent-harness/cli_anything/sbox/utils/repl_skin.py:96-103 | seaclip/agent-harness/cli_anything/seaclip/utils/repl_skin.py:96-103 | shotcut/agent-harness/cli_anything/shotcut/utils/repl_skin.py:96-103 | siyuan/agent-harness/cli_anything/siyuan/utils/repl_skin.py:96-103 | slay_the_spire_ii/agent-harness/cli_anything/slay_the_spire_ii/utils/repl_skin.py:96-103 | tigris/agent-harness/cli_anything/tigris/utils/repl_skin.py:96-103 | wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py:96-103 | web-yu-pri/agent-harness/cli_anything/web_yu_pri/utils/repl_skin.py:96-103 | wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py:96-103 | zoom/agent-harness/cli_anything/zoom/utils/repl_skin.py:96-103 | zotero/agent-harness/cli_anything/zotero/utils/repl_skin.py:96-103 — before extracting anything, compare `adguardhome/agent-harness/cli_anything/adguardhome/utils/repl_skin.py` and `anygen/agent-harness/cli_anything/anygen/utils/repl_skin.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 396 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (18 lines × 5) audacity/agent-harness/cli_anything/audacity/audacity_cli.py:831— audacity/agent-harness/cli_anything/audacity/audacity_cli.py:831-851 | inkscape/agent-harness/cli_anything/inkscape/inkscape_cli.py:1082-1102 | libreoffice/agent-harness/cli_anything/libreoffice/libreoffice_cli.py:789-806 | musescore/agent-harness/cli_anything/musescore/musescore_cli.py:608-625 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:842-860 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 5 times. Note first that the copies are not typed on the same thing: `Session` names `cli_anything.audacity.core.session` in one and `cli_anything.inkscape.core.session` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (28 lines × 3) blender/agent-harness/cli_anything/blender/blender_cli.py:67— blender/agent-harness/cli_anything/blender/blender_cli.py:67-94 | freecad/agent-harness/cli_anything/freecad/freecad_cli.py:85-112 | shotcut/agent-harness/cli_anything/shotcut/shotcut_cli.py:68-95 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (29 lines × 3) freecad/agent-harness/cli_anything/freecad/core/assembly.py:81— freecad/agent-harness/cli_anything/freecad/core/assembly.py:81-109 | freecad/agent-harness/cli_anything/freecad/core/fem.py:87-117 | freecad/agent-harness/cli_anything/freecad/core/techdraw.py:102-133 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (15 lines × 3) gimp/agent-harness/cli_anything/gimp/gimp_cli.py:125— gimp/agent-harness/cli_anything/gimp/gimp_cli.py:125-139 | kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py:132-146 | obs-studio/agent-harness/cli_anything/obs_studio/obs_studio_cli.py:125-139 — before extracting anything, compare `gimp/agent-harness/cli_anything/gimp/gimp_cli.py` and `kdenlive/agent-harness/cli_anything/kdenlive/kdenlive_cli.py` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 175 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 11) jumpserver/agent-harness/cli_anything/jumpserver/core/commands_account.py:64— jumpserver/agent-harness/cli_anything/jumpserver/core/commands_account.py:64-69 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_account.py:193-198 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_account.py:205-210 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_asset.py:376-381 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_audit.py:176-181 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_perm.py:54-59 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_perm.py:173-178 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_perm.py:185-190 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_session.py:59-64 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_session.py:172-177 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_user.py:60-65 — there are 11 copies across 6 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 11 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `jumpserver/agent-harness/cli_anything/jumpserver/core/commands_account.py:73` calls `option` and `jumpserver/agent-harness/cli_anything/jumpserver/core/commands_perm.py:63` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 9) jumpserver/agent-harness/cli_anything/jumpserver/core/commands_account.py:226— jumpserver/agent-harness/cli_anything/jumpserver/core/commands_account.py:226-236 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_asset.py:359-369 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_asset.py:397-407 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_audit.py:207-217 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_session.py:155-165 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_system.py:102-112 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_system.py:128-138 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_user.py:222-232 | jumpserver/agent-harness/cli_anything/jumpserver/core/commands_user.py:290-300 — there are 9 copies across 6 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 9 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `jumpserver/agent-harness/cli_anything/jumpserver/core/commands_system.py:118` calls `group`, `role_group` and `jumpserver/agent-harness/cli_anything/jumpserver/core/commands_system.py:141` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (25 lines × 10) freecad/agent-harness/cli_anything/freecad/core/cam.py:173— freecad/agent-harness/cli_anything/freecad/core/cam.py:173-210 | freecad/agent-harness/cli_anything/freecad/core/cam.py:221-254 | freecad/agent-harness/cli_anything/freecad/core/cam.py:264-294 | freecad/agent-harness/cli_anything/freecad/core/cam.py:303-330 | freecad/agent-harness/cli_anything/freecad/core/cam.py:341-378 | freecad/agent-harness/cli_anything/freecad/core/fem.py:125-149 | freecad/agent-harness/cli_anything/freecad/core/fem.py:203-230 | freecad/agent-harness/cli_anything/freecad/core/fem.py:280-307 | freecad/agent-harness/cli_anything/freecad/core/fem.py:316-343 | freecad/agent-harness/cli_anything/freecad/core/fem.py:525-552 — there are 10 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 10 sites; resolving a subset leaves the remainder to drift apart. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (21 lines × 4) freecad/agent-harness/cli_anything/freecad/core/cam.py:536— freecad/agent-harness/cli_anything/freecad/core/cam.py:536-570 | freecad/agent-harness/cli_anything/freecad/core/cam.py:622-654 | freecad/agent-harness/cli_anything/freecad/core/techdraw.py:574-594 | freecad/agent-harness/cli_anything/freecad/core/techdraw.py:602-622 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
End-of-life runtime: .NET net9.0 slay_the_spire_ii/agent-harness/bridge/plugin/STS2_Bridge.csproj:3— slay_the_spire_ii/agent-harness/bridge/plugin/STS2_Bridge.csproj declares .NET net9.0 as this project's target framework, and .NET 9 STS, support ended 2026-05-12. An unsupported runtime receives no security patches, so every vulnerability disclosed in it since 2026-05-12 is present and unfixable without moving off it. This is a migration rather than an upgrade: there is no newer release of a runtime that has ended.
Coverage not measured — .NET and JavaScript/TypeScript suite — Coverage NOT MEASURED: the .NET half could not be measured — the repository wires up no coverage collector for `--collect:"XPlat Code Coverage"` to use; the JavaScript/TypeScript half could not be measured — the jest suite in sketch/agent-harness/ ran and passed but wrote no lcov report. This repository's production source spans both ecosystems, and no partial figure is published as if it were the whole: coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan. Alternatively, commit the lcov/Cobertura report your CI produces and it is read without a re-run.
Type Safety — 0 typed · 6 plain JS — the untyped files are sketch/agent-harness/src/builder.js, sketch/agent-harness/src/cli.js, sketch/agent-harness/src/layout.js, sketch/agent-harness/src/primitives.js, sketch/agent-harness/tests/build.test.js, sketch/agent-harness/tests/security.test.js.
R10 · Code Duplication· Duplicated block with local edits (13 matched lines × 2 locations) · ×1
Duplicated block with local edits (13 matched lines × 2 locations) sketch/agent-harness/src/layout.js:78— sketch/agent-harness/src/layout.js:78 · sketch/agent-harness/src/layout.js:133 — the two spans are one implementation copied and then locally edited — 94 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication· Duplicated block with local edits (8 matched lines × 2 locations) · ×1
Duplicated block with local edits (8 matched lines × 2 locations) sketch/agent-harness/src/primitives.js:86— sketch/agent-harness/src/primitives.js:86 · sketch/agent-harness/src/primitives.js:103 — the two spans are one implementation copied and then locally edited — 53 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Complex function buildLayer (cyclomatic 28, cognitive 24) sketch/agent-harness/src/builder.js:190— buildLayer has cyclomatic complexity 28 and cognitive complexity 24; 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 layoutVerticalStack (cyclomatic 25, cognitive 28) sketch/agent-harness/src/layout.js:78— layoutVerticalStack has cyclomatic complexity 25 and cognitive complexity 28; 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 layoutHorizontalStack (cyclomatic 23, cognitive 32) sketch/agent-harness/src/layout.js:133— layoutHorizontalStack has cyclomatic complexity 23 and cognitive complexity 32; 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 intrinsicSize (cyclomatic 22, cognitive 23) sketch/agent-harness/src/layout.js:40— intrinsicSize has cyclomatic complexity 22 and cognitive complexity 23; 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 build (cyclomatic 14, cognitive 16) sketch/agent-harness/src/builder.js:326— build has cyclomatic complexity 14 and cognitive complexity 16; 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 createLabeledRectangle (cyclomatic 12, cognitive 11) sketch/agent-harness/src/primitives.js:222— createLabeledRectangle has cyclomatic complexity 12 and cognitive complexity 11; 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 createText (cyclomatic 12, cognitive 10) sketch/agent-harness/src/primitives.js:122— createText has cyclomatic complexity 12 and cognitive complexity 10; 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 resolveTokenValue (cyclomatic 11, cognitive 10) sketch/agent-harness/src/builder.js:126— resolveTokenValue has cyclomatic complexity 11 and cognitive complexity 10; 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.
No lint or typecheck script — test ✓ · lint ✗ · typecheck ✗ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
Orphaned file sbox/agent-harness/cli_anything/sbox/core/export.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file anygen/agent-harness/cli_anything/anygen/anygen_cli.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file freecad/agent-harness/cli_anything/freecad/core/techdraw.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file ollama/agent-harness/cli_anything/ollama/ollama_cli.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file freecad/agent-harness/cli_anything/freecad/core/cam.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file freecad/agent-harness/cli_anything/freecad/core/assembly.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file safari/agent-harness/scripts/extract_tools.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file jumpserver/agent-harness/cli_anything/jumpserver/core/commands_asset.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file sbox/agent-harness/cli_anything/sbox/core/project.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file freecad/agent-harness/cli_anything/freecad/core/import_mod.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file krita/agent-harness/cli_anything/krita/core/export.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file renderdoc/agent-harness/cli_anything/renderdoc/core/diff.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file freecad/agent-harness/cli_anything/freecad/core/spreadsheet.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file anygen/agent-harness/cli_anything/anygen/utils/anygen_backend.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file krita/agent-harness/cli_anything/krita/utils/krita_backend.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file iterm2/agent-harness/cli_anything/iterm2_ctl/core/session.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file krita/agent-harness/cli_anything/krita/core/project.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file tigris/agent-harness/cli_anything/tigris/utils/tigris_backend.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file pm2/agent-harness/cli_anything/pm2/pm2_cli.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file musescore/agent-harness/cli_anything/musescore/utils/mscx_xml.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file unimol_tools/agent-harness/cli_anything/unimol_tools/core/models_manager.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file novita/agent-harness/cli_anything/novita/novita_cli.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Duplicated predicate slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:353— `hand != null && (hand.InCardPlay || hand.CurrentMode != NPlayerHand.Mode.Play)` appears character-identically in 2 files — slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs, slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerActions.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs:530— `merchUI != null && !merchUI.Inventory.IsOpen` appears character-identically in 3 files — slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Actions.cs, slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs, slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:417— `player.Character.ShouldAlwaysShowStarCounter || combatState.Stars > 0` appears character-identically in 2 files — slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs, slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs:101— `playerHand != null && playerHand.IsInCardSelection` appears character-identically in 2 files — slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs, slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.StateBuilder.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate ollama/agent-harness/cli_anything/ollama/core/generate.py:81— `"message" in chunk and "content" in chunk["message"]` appears character-identically in 2 files — ollama/agent-harness/cli_anything/ollama/core/generate.py, ollama/agent-harness/cli_anything/ollama/ollama_cli.py. 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 gimp/agent-harness/cli_anything/gimp/core/project.py:82— `"version" not in project or "canvas" not in project` appears character-identically in 2 files — gimp/agent-harness/cli_anything/gimp/core/project.py, krita/agent-harness/cli_anything/krita/core/project.py. 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 joplin/agent-harness/setup.py:23— `__name__ == "__main__" and _handle_metadata_query(sys.argv)` appears character-identically in 3 files — joplin/agent-harness/setup.py, mubu/agent-harness/setup.py, zotero/agent-harness/setup.py. 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 macrocli/agent-harness/cli_anything/macrocli/core/llm_assist.py:332— `api_key or os.environ.get("MACROCLI_API_KEY", "")` appears character-identically in 2 files — macrocli/agent-harness/cli_anything/macrocli/core/llm_assist.py, macrocli/agent-harness/cli_anything/macrocli/core/parameterize.py. 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 macrocli/agent-harness/cli_anything/macrocli/core/llm_assist.py:333— `base_url or os.environ.get("MACROCLI_BASE_URL", "")` appears character-identically in 2 files — macrocli/agent-harness/cli_anything/macrocli/core/llm_assist.py, macrocli/agent-harness/cli_anything/macrocli/core/parameterize.py. 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 blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:158— `bundle_kind and manifest.get("bundle_kind") != bundle_kind` appears character-identically in 6 files — blender/agent-harness/cli_anything/blender/utils/preview_bundle.py, cli-anything-plugin/preview_bundle.py, freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py, openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.py. 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 audacity/agent-harness/cli_anything/audacity/core/effects.py:157— `category and info["category"] != category` appears character-identically in 5 files — audacity/agent-harness/cli_anything/audacity/core/effects.py, blender/agent-harness/cli_anything/blender/core/modifiers.py, gimp/agent-harness/cli_anything/gimp/core/filters.py, shotcut/agent-harness/cli_anything/shotcut/core/filters.py. 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 kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py:311— `category and spec.get("category") != category` appears character-identically in 2 files — kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py, obs-studio/agent-harness/cli_anything/obs_studio/core/filters.py. 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 shotcut/agent-harness/cli_anything/shotcut/core/compositing.py:176— `clip_index < 0 or clip_index >= len(clip_entries)` appears character-identically in 3 files — shotcut/agent-harness/cli_anything/shotcut/core/compositing.py, shotcut/agent-harness/cli_anything/shotcut/core/filters.py, shotcut/agent-harness/cli_anything/shotcut/core/timeline.py. 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 audacity/agent-harness/cli_anything/audacity/core/clips.py:135— `clip_index < 0 or clip_index >= len(clips)` appears character-identically in 3 files — audacity/agent-harness/cli_anything/audacity/core/clips.py, kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py, kdenlive/agent-harness/cli_anything/kdenlive/core/timeline.py. 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 blender/agent-harness/cli_anything/blender/utils/preview_bundle.py:426— `command_finished_at or bundle_manifest.get("created_at") or datetime.now(timezone.utc).isoformat().replace("+00:00", "Z")` appears character-identically in 6 files — blender/agent-harness/cli_anything/blender/utils/preview_bundle.py, cli-anything-plugin/preview_bundle.py, freecad/agent-harness/cli_anything/freecad/utils/preview_bundle.py, openscreen/agent-harness/cli_anything/openscreen/utils/preview_bundle.py. 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 sbox/agent-harness/cli_anything/sbox/core/prefab.py:302— `component_guid and comp.get( "__guid" ) == component_guid` appears character-identically in 2 files — sbox/agent-harness/cli_anything/sbox/core/prefab.py, sbox/agent-harness/cli_anything/sbox/core/scene.py. 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 sbox/agent-harness/cli_anything/sbox/core/prefab.py:277— `component_guid is None and component_type is None` appears character-identically in 2 files — sbox/agent-harness/cli_anything/sbox/core/prefab.py, sbox/agent-harness/cli_anything/sbox/core/scene.py. 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 sbox/agent-harness/cli_anything/sbox/core/prefab.py:305— `component_type and comp.get( "__type" ) == component_type` appears character-identically in 2 files — sbox/agent-harness/cli_anything/sbox/core/prefab.py, sbox/agent-harness/cli_anything/sbox/core/scene.py. 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 blender/agent-harness/cli_anything/blender/core/preview.py:776— `current_fingerprint and current_fingerprint == last_rendered` appears character-identically in 3 files — blender/agent-harness/cli_anything/blender/core/preview.py, freecad/agent-harness/cli_anything/freecad/core/preview.py, shotcut/agent-harness/cli_anything/shotcut/core/preview.py. 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 blender/agent-harness/cli_anything/blender/core/preview.py:217— `current_link.is_dir() and not current_link.is_symlink()` appears character-identically in 3 files — blender/agent-harness/cli_anything/blender/core/preview.py, freecad/agent-harness/cli_anything/freecad/core/preview.py, shotcut/agent-harness/cli_anything/shotcut/core/preview.py. 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 blender/agent-harness/cli_anything/blender/core/preview.py:216— `current_link.is_symlink() or current_link.exists()` appears character-identically in 3 files — blender/agent-harness/cli_anything/blender/core/preview.py, freecad/agent-harness/cli_anything/freecad/core/preview.py, shotcut/agent-harness/cli_anything/shotcut/core/preview.py. 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 gimp/agent-harness/cli_anything/gimp/core/filters.py:327— `filter_index < 0 or filter_index >= len(filters)` appears character-identically in 3 files — gimp/agent-harness/cli_anything/gimp/core/filters.py, kdenlive/agent-harness/cli_anything/kdenlive/core/filters.py, shotcut/agent-harness/cli_anything/shotcut/core/filters.py. 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 browser/agent-harness/cli_anything/browser/core/page.py:86— `isinstance(result, dict) and "url" in result` appears character-identically in 2 files — browser/agent-harness/cli_anything/browser/core/page.py, tigris/agent-harness/cli_anything/tigris/utils/tigris_backend.py. 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 blender/agent-harness/cli_anything/blender/core/preview.py:151— `isinstance(value, dict) and isinstance(base.get(key), dict)` appears character-identically in 3 files — blender/agent-harness/cli_anything/blender/core/preview.py, freecad/agent-harness/cli_anything/freecad/core/preview.py, shotcut/agent-harness/cli_anything/shotcut/core/preview.py. 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 wavetone/agent-harness/cli_anything/wavetone/core/project.py:165— `isinstance(value, float) and not math.isfinite(value)` appears character-identically in 2 files — wavetone/agent-harness/cli_anything/wavetone/core/project.py, wavetone/agent-harness/cli_anything/wavetone/core/session.py. 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.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 15 significant file(s) lose their only recent owner: nsight-graphics/agent-harness/cli_anything/nsight_graphics/core/gpu_trace.py, lldb/agent-harness/cli_anything/lldb/utils/repl_skin.py, nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/repl_skin.py, lldb/agent-harness/cli_anything/lldb/lldb_cli.py, nsight-graphics/agent-harness/cli_anything/nsight_graphics/nsight_graphics_cli.py, nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/backend/discovery.py, unrealinsights/agent-harness/cli_anything/unrealinsights/utils/unrealinsights_backend.py, unrealinsights/agent-harness/cli_anything/unrealinsights/core/export.py (+7 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 10 significant file(s) lose their only recent owner: macrocli/agent-harness/cli_anything/macrocli/macrocli_cli.py, macrocli/agent-harness/cli_anything/macrocli/core/recorder.py, macrocli/agent-harness/cli_anything/macrocli/backends/visual_anchor.py, macrocli/agent-harness/cli_anything/macrocli/backends/semantic_ui.py, macrocli/agent-harness/cli_anything/macrocli/backends/gui_agent.py, macrocli/agent-harness/cli_anything/macrocli/core/llm_assist.py, macrocli/agent-harness/cli_anything/macrocli/core/macro_model.py, macrocli/agent-harness/cli_anything/macrocli/core/parameterize.py (+2 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 7 significant file(s) lose their only recent owner: calibre/agent-harness/cli_anything/calibre/calibre_cli.py, calibre/agent-harness/cli_anything/calibre/utils/repl_skin.py, REDACTED, calibre/agent-harness/cli_anything/calibre/core/library.py, calibre/agent-harness/cli_anything/calibre/utils/calibre_backend.py, calibre/agent-harness/cli_anything/calibre/core/formats.py, calibre/agent-harness/cli_anything/calibre/core/custom.py. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #4 — If anonymized user #4 becomes unavailable, 5 significant file(s) lose their only recent owner: wavetone/agent-harness/cli_anything/wavetone/utils/repl_skin.py, wavetone/agent-harness/cli_anything/wavetone/wavetone_cli.py, wavetone/agent-harness/cli_anything/wavetone/core/project.py, wavetone/agent-harness/cli_anything/wavetone/utils/wavetone_backend.py, wavetone/agent-harness/cli_anything/wavetone/core/audio.py. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #5 — If anonymized user #5 becomes unavailable, 4 significant file(s) lose their only recent owner: cloudcompare/agent-harness/cli_anything/cloudcompare/cloudcompare_cli.py, cloudcompare/agent-harness/cli_anything/cloudcompare/utils/cc_backend.py, cloudcompare/agent-harness/cli_anything/cloudcompare/core/project.py, cloudcompare/agent-harness/cli_anything/cloudcompare/core/export.py. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #6 — If anonymized user #6 becomes unavailable, 4 significant file(s) lose their only recent owner: firefly-iii/agent-harness/cli_anything/firefly_iii/utils/firefly_iii_backend.py, firefly-iii/agent-harness/cli_anything/firefly_iii/core/bills.py, firefly-iii/agent-harness/cli_anything/firefly_iii/core/budgets.py, firefly-iii/agent-harness/cli_anything/firefly_iii/core/piggy_banks.py. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #7 — If anonymized user #7 becomes unavailable, 4 significant file(s) lose their only recent owner: QGIS/agent-harness/cli_anything/qgis/qgis_cli.py, QGIS/agent-harness/cli_anything/qgis/utils/repl_skin.py, QGIS/agent-harness/cli_anything/qgis/core/layouts.py, QGIS/agent-harness/cli_anything/qgis/core/export.py. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #8 — If anonymized user #8 becomes unavailable, 4 significant file(s) lose their only recent owner: godot/agent-harness/cli_anything/godot/utils/repl_skin.py, godot/agent-harness/cli_anything/godot/godot_cli.py, godot/agent-harness/cli_anything/godot/core/scene.py, godot/agent-harness/cli_anything/godot/core/export.py. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #9 — If anonymized user #9 becomes unavailable, 4 significant file(s) lose their only recent owner: musescore/agent-harness/cli_anything/musescore/core/instruments.py, musescore/agent-harness/cli_anything/musescore/core/parts.py, musescore/agent-harness/cli_anything/musescore/core/project.py, musescore/agent-harness/cli_anything/musescore/core/media.py. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #10 — If anonymized user #10 becomes unavailable, 4 significant file(s) lose their only recent owner: comfyui/agent-harness/cli_anything/comfyui/utils/comfyui_backend.py, comfyui/agent-harness/cli_anything/comfyui/core/models.py, comfyui/agent-harness/cli_anything/comfyui/core/workflows.py, comfyui/agent-harness/cli_anything/comfyui/core/images.py. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #11 — If anonymized user #11 becomes unavailable, 3 significant file(s) lose their only recent owner: sbox/agent-harness/cli_anything/sbox/sbox_cli.py, sbox/agent-harness/cli_anything/sbox/core/codegen.py, sbox/agent-harness/cli_anything/sbox/core/session.py. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #12 — If anonymized user #12 becomes unavailable, 3 significant file(s) lose their only recent owner: siyuan/agent-harness/cli_anything/siyuan/siyuan_cli.py, siyuan/agent-harness/cli_anything/siyuan/core/client.py, siyuan/agent-harness/cli_anything/siyuan/core/session.py. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #13 — If anonymized user #13 becomes unavailable, 3 significant file(s) lose their only recent owner: zotero/agent-harness/cli_anything/zotero/utils/zotero_sqlite.py, REDACTED, zotero/agent-harness/cli_anything/zotero/utils/zotero_paths.py. Pair on, review, or document these before any departure.
README/code drift docs/PREVIEW_PROGRESS.md:660— docs/PREVIEW_PROGRESS.md documents the environment variable `WAYLAND_DISPLAY`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift eez-studio/agent-harness/cli_anything/eez_studio/README.md:17— eez-studio/agent-harness/cli_anything/eez_studio/README.md runs `npm run build`, but no package.json declares a `build` script. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift unimol_tools/agent-harness/docs/architecture/API.md:154— unimol_tools/agent-harness/docs/architecture/API.md documents the environment variable `INPUT_CSV`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift unimol_tools/agent-harness/docs/architecture/API.md:741— unimol_tools/agent-harness/docs/architecture/API.md documents the environment variable `CUDA_VISIBLE_DEVICES`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift unimol_tools/agent-harness/docs/architecture/API.md:742— unimol_tools/agent-harness/docs/architecture/API.md documents the environment variable `UNIMOL_ARCHIVE_DIR`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift unimol_tools/agent-harness/docs/architecture/API.md:743— unimol_tools/agent-harness/docs/architecture/API.md documents the environment variable `UNIMOL_DEBUG`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift unimol_tools/agent-harness/docs/guides/01-INSTALLATION.md:223— unimol_tools/agent-harness/docs/guides/01-INSTALLATION.md documents the environment variable `CUDA_VISIBLE_DEVICES`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift unimol_tools/agent-harness/docs/guides/02-QUICK-START.md:466— unimol_tools/agent-harness/docs/guides/02-QUICK-START.md documents the environment variable `CUDA_VISIBLE_DEVICES`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift unimol_tools/agent-harness/docs/guides/03-BASIC-USAGE.md:260— unimol_tools/agent-harness/docs/guides/03-BASIC-USAGE.md documents the environment variable `INPUT_CSV`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift unimol_tools/agent-harness/docs/guides/05-TROUBLESHOOTING.md:138— unimol_tools/agent-harness/docs/guides/05-TROUBLESHOOTING.md documents the environment variable `CUDA_VISIBLE_DEVICES`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift unimol_tools/agent-harness/docs/guides/05-TROUBLESHOOTING.md:670— unimol_tools/agent-harness/docs/guides/05-TROUBLESHOOTING.md documents the environment variable `UNIMOL_DEBUG`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift unimol_tools/agent-harness/docs/workflows/CLEANUP-SOP.md:499— unimol_tools/agent-harness/docs/workflows/CLEANUP-SOP.md documents the environment variable `PROD_MODEL`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
Silent fallback default on parse failure slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:250— `FormatEventMarkdown` falls back to `"Unknown Event"` when `evt.TryGetValue("event_name", out var n) && n != null` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
Silent fallback default on parse failure slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:548— `FormatHandSelectMarkdown` falls back to `"simple_select"` when `handSelect.TryGetValue("mode", out var m)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
Silent fallback default on parse failure slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.Formatting.cs:578— `FormatCardSelectMarkdown` falls back to `"select"` when `cardSelect.TryGetValue("screen_type", out var st)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
Silent fallback default on parse failure anygen/agent-harness/cli_anything/anygen/utils/anygen_backend.py:51— `load_config` returns `{}` when `(json.JSONDecodeError, IOError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default on parse failure cli-hub/cli_hub/installer.py:99— `_command_exists` returns `False` when `ValueError` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default on parse failure minimax/agent-harness/cli_anything/minimax/utils/minimax_backend.py:218— `load_config` returns `{}` when `(json.JSONDecodeError, IOError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default on parse failure novita/agent-harness/cli_anything/novita/utils/novita_backend.py:33— `load_config` returns `{}` when `(json.JSONDecodeError, IOError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default on parse failure rms/agent-harness/cli_anything/rms/utils/rms_backend.py:33— `load_config` returns `{}` when `(json.JSONDecodeError, IOError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default on parse failure shotcut/agent-harness/cli_anything/shotcut/core/media.py:128— `_parse_fps` returns `0.0` when `(ValueError, ZeroDivisionError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default on parse failure REDACTED:182— `parse_revision_generation` returns `0` when `ValueError` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default on parse failure REDACTED:286— `parse_child_refs` returns `[]` when `json.JSONDecodeError` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch cli-hub/cli_hub/analytics.py:100— `_stdin_is_tty` 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 cli-hub/cli_hub/analytics.py:120— `_read_process_cmdline` 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 cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/ca_backend.py:38— `get_version` swallows every exception into `return 'unknown'` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch nsight-graphics/agent-harness/cli_anything/nsight_graphics/utils/backend/discovery.py:77— `_fixed_windows_drive_roots` 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:31— `_get_local_ip` swallows every exception into `return '127.0.0.1'` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Silent fallback default in catch safari/agent-harness/scripts/extract_tools.py:483— `_extract_pkg_version` swallows every exception into `return 'unknown'` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 19 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (98 single-owned of 522 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 522 of the 1037 production source files in this repository met that bar). They are anonymized user #14 (2 file(s)), anonymized user #15 (2 file(s)), anonymized user #16 (2 file(s)), anonymized user #17 (2 file(s)), anonymized user #18 (2 file(s)), anonymized user #19 (2 file(s)) (+13 more) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/cloudanalyzer_cli.py, cloudanalyzer/agent-harness/cli_anything/cloudanalyzer/utils/ca_backend.py, wiremock/agent-harness/cli_anything/wiremock/utils/repl_skin.py, wiremock/agent-harness/cli_anything/wiremock/wiremock_cli.py, openscreen/agent-harness/cli_anything/openscreen/core/timeline.py, openscreen/agent-harness/cli_anything/openscreen/core/project.py, novita/agent-harness/cli_anything/novita/novita_cli.py, novita/agent-harness/cli_anything/novita/core/session.py (+20 more).
D34 · Knowledge Freshness· Further orphaned files (smaller) · ×1
Further orphaned files (smaller) — 194 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: sbox/agent-harness/cli_anything/sbox/core/export.py, minimax/agent-harness/cli_anything/minimax/utils/repl_skin.py, videocaptioner/agent-harness/cli_anything/videocaptioner/utils/repl_skin.py, anygen/agent-harness/cli_anything/anygen/anygen_cli.py, slay_the_spire_ii/agent-harness/bridge/plugin/BridgeMod.MultiplayerState.cs, freecad/agent-harness/cli_anything/freecad/core/techdraw.py, ollama/agent-harness/cli_anything/ollama/ollama_cli.py, freecad/agent-harness/cli_anything/freecad/core/cam.py (and 186 more) (249 orphaned of 522 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 522 of the 1037 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.
M2 · Architecture documentation· ADRs not easily discoverable · ×1
ADRs not easily discoverable — 1 ADR-shaped document(s) detected by content — `safari/agent-harness/HARNESS.md`. They are not under a conventional ADR folder (docs/adr/) and are not named NNNN-title.md, and this check found them by their decision signature rather than by where they live — so a reader who does not already know these paths has no route to them. Detected by content signature only: records kept outside the repository, or written without a Status/Decision/Consequences shape, are not visible to this check and are not counted here.
No src/ separation — Production code isn't grouped under a src/ folder — it's spread across several top-level directories, so there's no one place that says 'this is the product'.
Logging is not universal — Only 2/71 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `3MF/agent-harness`, `QGIS/agent-harness`, `adguardhome/agent-harness`, `anygen/agent-harness` and 64 more.
No SAST — No static application security testing detected. For this repository's stack, add bandit, `semgrep --config=p/python`, or CodeQL's python pack as a CI step. What was searched, so you can tell an absence from a miss: the 8833 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
Changelog looks stale/thin — The changelog this check read carries 2 versioned entries, against a bar of 3. Counted as either the distinct `x.y.z` versions it names (a link's target is not counted) or its version-shaped section headings (`## [1.2.0]`, `## V14.x.x`, `## Updates in 8.0.x`), whichever is the larger — so a log sectioned by minor series counts its sections, not its individual patch numbers. Entries recorded somewhere this check does not read — release notes generated at tag time from a generator config it did not recognise, or a log kept outside the repository — are not counted here, and this row is about what is re-findable in the tree rather than about how often you release.
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.
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
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.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a171fc-2bfb-7d58-a254-30de4699e786 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 97 · Warnings: 1312 · Recommendations: 285 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 25-10-2026 @ 07:35 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.