Public report — EcoPaste, published 29 Sep 2026. Concrete security findings (which rule fired, in which file, on which line; CVE IDs, secret matches, dependency versions) are REDACTED in this version; ask the repo owner for the full report.
Public
Codebase survey Measured under the Code Assurance Index · rubric rubric-2026.09.17 (frozen) · verify this survey Filed cd_07479e184b0641558006728cf2231d44 Filed 29 September 2026, 13:38 UTC Public

EcoPasteHub/EcoPaste

Measured 29 September 2026, 13:21 UTC

56% Adequate
CriticalWeakAdequateStrongExemplary

Medium · 38,088 LoC · 2 projects · rebuild ~0.3 person-years · weakest lens: Accessibility (51%)

Findings by grade

38 critical 349 serious 15 minor 49 could not be resolved — could be critical — see Limitations

This survey was produced by

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
29 September 2026, 13:21 UTC

A measurement, not a certificate. The Code Assurance Index does not certify, approve or guarantee this codebase; it records a reproducible number and the evidence it was computed from. The standard is authored by Canine Development, who also build Watchdog — its only implementation today. That is said here so the number is checked rather than believed.

Grounded in facts. Every number here is computed, not narrated — reproducible, tool-backed, and traceable to a line of code. How to trust this ▸

48/52dimensions tool-verifieddeterministic · confidence 1.0 · 4 LLM-assisted, advisory
384findings with an exact file:lineof 402 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
52/132dimensions across the health lenses38088 LoC · 2 projects — wide & deep
Chapters

Executive summary

The system holds an adequate standing with a health score of 56%, indicating a workable asset that carries significant operational risk. While the core architecture is robust and performance is excellent, the overall reliability is compromised by gaps in accessibility and documentation maturity. This balance means the business can continue operations, but future changes will be slower and more expensive than necessary due to hidden maintenance taxes.

The value tied up in this medium-sized system is substantial, with nearly 40,000 lines of production code and 18,000 lines of frontend logic. Rebuilding this from scratch would cost approximately €39,000 and take about three months of engineering effort. However, the true cost lies in the annual drag on the team’s velocity. Current code quality signals suggest a 2–6% efficiency tax on every change, meaning the team pays a continuous premium in time and defects for every feature delivered, rather than just a one-time rebuild cost.

The most critical risk is accessibility, which scores poorly at 51%. This is not merely a compliance issue but a direct barrier to user trust and market reach. The cost of inaction is high, with estimated annual delays equivalent to over 30 engineer-days, making this the single highest-leverage area for improvement. Addressing this quickly pays for itself within months by removing the friction that slows down all subsequent development work.

A second theme is the concentration of knowledge in recent work, which threatens long-term maintainability. With low documentation maturity, new team members will struggle to pick up the code, increasing the risk of errors and extending onboarding times. This fragility is exacerbated by the lack of automated checks for accessibility in the current toolchain, allowing defects to slip into production.

The system’s genuine strengths lie in its solid architectural foundation and perfect performance metrics. The code is clean, with no boilerplate or straight-line logic, ensuring that the core business logic is efficient and easy to understand. This stability provides a reliable base for future growth, provided the accessibility and documentation gaps are addressed.

Focus first on enforcing accessibility in the development toolchain. By adding programmatic labels to controls and enabling automated accessibility checks in the continuous integration pipeline, the team can eliminate the most costly drag on velocity. This single action offers the fastest return on investment, stabilizing the system and freeing up engineering capacity for higher-value features.

How the score is built — each lens's share of the headline Width is the lens's weight in the worst-heaviest fold (the weakest area pulls hardest); colour is that lens's own band. A lens fixes the score in proportion to its width.
Accessibility 51% · 46% weightReadiness 52% · 25% weightMaturity 58% · 14% weightSecurity 63% · 8% weightCode Health 81% · 4% weightArchitecture 88% · 2% weightPerformance 100% · 1% weight

Raise Accessibility 51 → 70 (the Healthy floor) ⇒ headline 56 → ~59.

Code composition — where the lines go
Tests 100%
New since the last scan (100+)

117 finding(s) are new versus the previous scan (2026-09-13) — surfaced by this scheduled scan itself, no pull request required. Showing the first 100; the full set is in the report.

  • D4 · Near-duplicate member family (6 members, 43 shared lines) .claude/hooks/session-start.py
  • D4 · Members sharing a duplicated core (12 members, 50+ identical tokens) .claude/hooks/inject-subagent-context.py
  • D4 · Members sharing a duplicated core (8 members, 50+ identical tokens) .claude/hooks/session-start.py
  • D4 · Members sharing a duplicated core (6 members, 50+ identical tokens) .claude/hooks/inject-subagent-context.py
  • D4 · Members sharing a duplicated core (6 members, 50+ identical tokens) .claude/hooks/session-start.py
  • D4 · Members sharing a duplicated core (6 members, 50+ identical tokens) .claude/hooks/session-start.py
  • D4 · Members sharing a duplicated core (6 members, 50+ identical tokens) .claude/hooks/session-start.py
  • D4 · Members sharing a duplicated core (6 members, 50+ identical tokens) .claude/hooks/session-start.py
  • D4 · Members sharing a duplicated core (6 members, 50+ identical tokens) .claude/hooks/session-start.py
  • D4 · Members sharing a duplicated core (6 members, 50+ identical tokens) .claude/hooks/session-start.py
  • D4 · Members sharing a duplicated core (6 members, 50+ identical tokens) .claude/hooks/session-start.py
  • D4 · Members sharing a duplicated core (5 members, 50+ identical tokens) .claude/hooks/inject-workflow-state.py
  • D4 · Members sharing a duplicated core (5 members, 50+ identical tokens) .claude/hooks/inject-workflow-state.py
  • D4 · Members sharing a duplicated core (5 members, 50+ identical tokens) .claude/hooks/inject-workflow-state.py
  • D4 · Members sharing a duplicated core (5 members, 50+ identical tokens) .claude/hooks/inject-workflow-state.py
  • D4 · Members sharing a duplicated core (5 members, 50+ identical tokens) .claude/hooks/inject-workflow-state.py
  • D4 · Members sharing a duplicated core (5 members, 50+ identical tokens) .claude/hooks/inject-workflow-state.py
  • D4 · Members sharing a duplicated core (5 members, 50+ identical tokens) .claude/hooks/inject-workflow-state.py
  • D4 · Members sharing a duplicated core (4 members, 50+ identical tokens) .claude/hooks/session-start.py
  • D4 · Members sharing a duplicated core (4 members, 50+ identical tokens) .claude/hooks/session-start.py
  • D4 · Members sharing a duplicated core (4 members, 50+ identical tokens) .claude/hooks/session-start.py
  • D4 · Members sharing a duplicated core (4 members, 50+ identical tokens) .claude/hooks/session-start.py
  • D4 · Members sharing a duplicated core (4 members, 50+ identical tokens) .claude/hooks/session-start.py
  • D4 · Members sharing a duplicated core (4 members, 50+ identical tokens) .claude/hooks/session-start.py
  • D4 · Duplicated block (93 lines × 4) .claude/hooks/session-start.py
  • D4 · Duplicated block (90 lines × 4) .claude/hooks/session-start.py
  • D4 · Duplicated block (80 lines × 3) .claude/hooks/inject-subagent-context.py
  • D4 · Duplicated block (68 lines × 2) .codex/hooks/session-start.py
  • D4 · Duplicated block (66 lines × 3) .claude/hooks/inject-subagent-context.py
  • D4 · Duplicated block (61 lines × 5) .claude/hooks/inject-workflow-state.py
  • D4 · Duplicated block (59–61 lines × 2) .codex/hooks/session-start.py
  • D4 · Duplicated block (51–60 lines × 2) .trellis/scripts/common/config.py
  • D4 · Duplicated block (53 lines × 6) .claude/hooks/session-start.py
  • D4 · Duplicated block (51 lines × 3) .claude/hooks/inject-subagent-context.py
  • D4 · Duplicated block (50 lines × 4) .claude/hooks/session-start.py
  • D4 · Duplicated block (43 lines × 4) .claude/hooks/session-start.py
  • D4 · Duplicated block (41 lines × 4) .claude/hooks/session-start.py
  • D4 · Duplicated block (39 lines × 3) .claude/hooks/inject-subagent-context.py
  • D4 · Duplicated block (37 lines × 3) .claude/hooks/inject-subagent-context.py
  • D4 · Duplicated block (36 lines × 6) .claude/hooks/session-start.py
  • D4 · Duplicated block (30–31 lines × 12) .claude/hooks/inject-subagent-context.py
  • D4 · Duplicated block (30 lines × 5) .claude/hooks/inject-workflow-state.py
  • D4 · Duplicated block (28 lines × 5) .claude/hooks/inject-workflow-state.py
  • D4 · Duplicated block (27 lines × 4) .claude/hooks/session-start.py
  • D4 · Duplicated block (25 lines × 3) .claude/hooks/inject-subagent-context.py
  • D4 · Duplicated block (24 lines × 5) .claude/hooks/inject-workflow-state.py
  • D4 · Duplicated block (23 lines × 5) .claude/hooks/inject-workflow-state.py
  • D4 · Duplicated block (23 lines × 2) .trellis/scripts/common/task_store.py
  • D4 · Duplicated block (17–22 lines × 2) .trellis/scripts/common/active_task.py
  • D4 · Duplicated block (20–21 lines × 6) .claude/hooks/session-start.py
  • D4 · Duplicated block (20 lines × 5) .claude/hooks/inject-workflow-state.py
  • D4 · Duplicated block (20 lines × 3) .claude/hooks/inject-subagent-context.py
  • D4 · Duplicated block (17–20 lines × 2) .trellis/scripts/common/config.py
  • D4 · Duplicated block (19 lines × 6) .claude/hooks/inject-subagent-context.py
  • D4 · Duplicated block (19 lines × 3) .trellis/scripts/common/safe_commit.py
  • D4 · Duplicated block (19 lines × 2) .codex/hooks/session-start.py
  • D4 · Duplicated block (19 lines × 2) .trellis/scripts/common/task_store.py
  • D4 · Duplicated block (18 lines × 4) .claude/hooks/session-start.py
  • D4 · Duplicated block (16–17 lines × 6) .claude/hooks/session-start.py
  • D4 · Duplicated block (16 lines × 4) .claude/hooks/session-start.py
  • D4 · Duplicated block (16 lines × 3) .trellis/scripts/common/task_store.py
  • D4 · Duplicated block (15 lines × 6) .claude/hooks/session-start.py
  • D4 · Duplicated block (15 lines × 6) .claude/hooks/session-start.py
  • D4 · Duplicated block (15 lines × 5) .claude/hooks/inject-workflow-state.py
  • D4 · Duplicated block (15 lines × 3) .claude/hooks/inject-subagent-context.py
  • D4 · Duplicated block (13–15 lines × 2) .trellis/scripts/common/cli_adapter.py
  • D4 · Duplicated block (15 lines × 2) .trellis/scripts/common/cli_adapter.py
  • D4 · Duplicated block (14 lines × 6) .claude/hooks/session-start.py
  • D4 · Duplicated block (11 lines × 8) .claude/hooks/session-start.py
  • D4 · Duplicated block (3–11 lines × 6) .claude/hooks/session-start.py
  • D4 · Duplicated block (11 lines × 2) .trellis/scripts/task.py
  • D4 · Duplicated block (9 lines × 3) .claude/hooks/inject-subagent-context.py
  • D4 · Duplicated block (8 lines × 3) .claude/hooks/inject-subagent-context.py
  • D4 · Duplicated block (7 lines × 6) .claude/hooks/session-start.py
  • D4 · Duplicated block (7 lines × 6) .claude/hooks/session-start.py
  • D4 · Duplicated block (12 lines × 3) .claude/hooks/inject-subagent-context.py
  • D4 · Duplicated block (11 lines × 3) .claude/hooks/inject-subagent-context.py
  • D4 · Duplicated block (13 lines × 3) .claude/hooks/inject-subagent-context.py
  • D4 · Duplicated block (11 lines × 5) .claude/hooks/inject-workflow-state.py
  • D4 · Duplicated block (6 lines × 5) .claude/hooks/inject-workflow-state.py
  • D4 · Duplicated block (16 lines × 5) .claude/hooks/inject-workflow-state.py
  • D4 · Duplicated block (19 lines × 4) .claude/hooks/session-start.py
  • D4 · Duplicated block (6 lines × 4) .claude/hooks/session-start.py
  • D4 · Duplicated block (17 lines × 4) .claude/hooks/session-start.py
  • D4 · Duplicated block (10 lines × 4) .claude/hooks/session-start.py
  • D4 · Duplicated block (7 lines × 6) .claude/hooks/session-start.py
  • D4 · Duplicated block (16 lines × 6) .claude/hooks/session-start.py
  • D4 · Duplicated block (5 lines × 2) .codex/hooks/session-start.py
  • D4 · Duplicated block (11 lines × 2) .codex/hooks/session-start.py
  • D4 · Duplicated block (8 lines × 2) .codex/hooks/session-start.py
  • D4 · Duplicated block (6 lines × 2) .codex/hooks/session-start.py
  • D15 · Hotspot: src/pages/Preference/components/settingControls/ActionControl.tsx src/pages/Preference/components/settingControls/ActionControl.tsx
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • D44 · End-of-life runtime: Rust 1.96
  • R10 · Duplicated block with local edits (124 matched lines × 2 locations) src/pages/Preference/components/BackupExportModal.tsx
  • R10 · Duplicated block (30 lines × 2 locations) src/pages/Onboarding/components/DoneStep.tsx
  • R10 · Duplicated block (24 lines × 2 locations) src/pages/Preference/components/settingControls/CaptureOrderControl.tsx
  • R10 · Duplicated block (23 lines × 2 locations) src/pages/Clipboard/components/Group.tsx

A full-fidelity diff against the previous run's complete recorded findings — line-move tolerant: a finding that only shifted line counts as unchanged, only genuinely new titles/files surface here.

Rebuild cost & value ~ Modeled — €13,000–€64,000
Cost to rebuild€13,000–€64,000 (0.1–0.4 person-years (214–678 h), ~1 engineer)
Domain complexityStandard — harder problems cost more per line
Quality factor0.8× (at 56% quality) — the last 20% of quality is most of the work
Size & shapeMedium · effort split not classified (source measured from disk; the effort-tier breakdown is a C#-only syntax walk)

This codebase represents roughly ~0.3 person-years of build effort (about ~€39,000 to rebuild). Its weakest lens is Accessibility at 51% — the part of that asset most exposed by the findings below.

How we model this: boilerplate at a scaffolding rate + logic × domain Standard (×1.0) — standard service × a 0.8× quality factor, at €60–95/h; indicative, ±~30% · size measured directly from source · effort from total production LoC as straight-line logic (the tier split is a C#-only syntax walk), a conservative lower bound. Indicative only — most sensitive to the hourly rate and the domain tier (both tunable in config).

Top priorities

The highest-leverage moves; the full ranked list is in the Roadmap below.

1
Resolve the 1 No ADRs found finding(s) in ADR Quality.
+2.4 pts · Low effort · ADR Quality
2
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
+4.6 pts · Medium effort · Forms & labels
3
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
+4.6 pts · Medium effort · Keyboard semantics

Diagnosis — what's actually going on

The top fix pays for itself · High · Economics
The top-ranked fix costs roughly 1–3 engineer-days once. Not doing it costs about 32.2–193.3 engineer-days every year, paid as drag on the ~525,267 lines this team changes annually — a bill that arrives whether or not anyone books it. On those figures the fix breaks even in roughly 1–2 months and is free after that. Method, stated so this is not read as a quotation: debt from the ranked task's effort band; interest = annual changed lines (measured, annualised from the 90-day window) ÷ an ASSUMED 150–400 lines per engineer-day × the 2–6% drag implied by the code-quality signals; breaking point = debt ÷ annual interest. A modelled planning range built from measured inputs and one named assumption — not a quotation, a valuation, or a certified figure.
Evidence: D15 churn: 129,518 line(s) changed over a 90-day window ⇒ ~525,267/year · D1/D2/D4/D6 code quality: averaging 7.0/10 ⇒ a 2–6% drag on each change · top-ranked remediation: Low effort ⇒ about 1–3 engineer-day(s)
→ Do the top-ranked fix now if this code will still be yours in 2 months.
Value concentrated against a weak lens · Medium · Value at risk
This is a Medium asset (~0.3 person-years to rebuild), and its weakest lens is Accessibility at 51%. The operational and business risk on an asset this size concentrates there — that's where remediation buys the most protection.
Evidence: valuation: Medium, ~0.3 person-years rebuild (38,088 LoC) · weakest lens: Accessibility 51%
→ Direct remediation budget at Accessibility first — highest risk-reduction per euro on an asset this size.
Highest-leverage move · Medium · Leverage
Of everything flagged, the best return on effort is: Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label. The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
A velocity tax on every change · Medium · Economics
The code-quality signals (complexity, duplication, cohesion) average 7.0/10, which acts as a tax on every change in the weaker areas: modifications there plausibly cost on the order of 2–6% more than in clean code, and the tax compounds as the codebase grows. (A modelled estimate, not a measured fact.)
Evidence: D1/D2/D4/D6 code quality: averaging 7.0/10 across the code-quality signals actually measured
→ Pay it down where churn is highest — the hotspots — not everywhere; that's where the tax is actually paid.

Architecture — module dependency matrix

Rows and columns are the same modules, ordered so that a module only depends on ones above it. A cell means the row depends on the column, and its number is how many type pairs create that dependency. Read one thing: is anything above the diagonal? A mark there is a dependency cycle. (A cycle is all this shows — an unusual but cycle-free dependency sits below the diagonal like any other.)

215 modules, 165 dependencies. 1 dependency cycle across 2 modules, marked above the diagonal.

Showing the 40 most-connected modules; 175 more are not drawn.

Module dependency matrix. The row depends on the column; the number is how many type pairs create the dependency. A cell above the diagonal is part of a dependency cycle.
depends on →1 .trellis.scripts.common2 EcoPaste.clipboard.app_store3 EcoPaste.clipboard.file_icon_store4 EcoPaste.clipboard.guard5 EcoPaste.clipboard.payload6 EcoPaste.core.error7 EcoPaste.core.paths8 EcoPaste.db.models9 EcoPaste.db.state10 src.types.clipboard11 EcoPaste.clipboard.apps_registry12 EcoPaste.clipboard.source13 EcoPaste.clipboard.storage14 EcoPaste.commands.backup15 EcoPaste.settings.model16 src.commands17 src.hooks18 src.types.settings19 EcoPaste.clipboard.ingest20 EcoPaste.clipboard.read21 EcoPaste.clipboard.write22 EcoPaste.commands.clipboard23 EcoPaste.commands.drag24 EcoPaste.commands.onboarding25 EcoPaste.commands.window26 EcoPaste.menu.clipboard_item27 EcoPaste.update28 src29 src.constants30 src.pages.Preference.types.preferences31 src.pages.Preview32 EcoPaste.clipboard.watcher33 EcoPaste.commands.context_menu34 EcoPaste.menu.clipboard_item.native35 src.pages.Preference.components.SourceAppsTransfer36 src.pages.Preference.components.settingControls37 EcoPaste.backup38 EcoPaste.menu.context_window39 src.pages.Preference.components40 EcoPaste.commands.storage
1 .trellis.scripts.common
2 EcoPaste.clipboard.app_store
3 EcoPaste.clipboard.file_icon_store
4 EcoPaste.clipboard.guard
5 EcoPaste.clipboard.payload
6 EcoPaste.core.error
7 EcoPaste.core.paths
8 EcoPaste.db.models
9 EcoPaste.db.state
10 src.types.clipboard
11 EcoPaste.clipboard.apps_registry13
12 EcoPaste.clipboard.source1
13 EcoPaste.clipboard.storage11
14 EcoPaste.commands.backup4
15 EcoPaste.settings.model1
16 src.commands3
17 src.hooks2
18 src.types.settings1
19 EcoPaste.clipboard.ingest2312
20 EcoPaste.clipboard.read112
21 EcoPaste.clipboard.write1111
22 EcoPaste.commands.clipboard11101
23 EcoPaste.commands.drag1211
24 EcoPaste.commands.onboarding11
25 EcoPaste.commands.window1
26 EcoPaste.menu.clipboard_item1
27 EcoPaste.update1
28 src281
29 src.constants22
30 src.pages.Preference.types.preferences1
31 src.pages.Preview3
32 EcoPaste.clipboard.watcher2222121
33 EcoPaste.commands.context_menu2
34 EcoPaste.menu.clipboard_item.native11
35 src.pages.Preference.components.SourceAppsTransfer11
36 src.pages.Preference.components.settingControls228
37 EcoPaste.backup1111
38 EcoPaste.menu.context_window125
39 src.pages.Preference.components111
40 EcoPaste.commands.storage11111
Dependency, pointing down the layeringAbove the diagonal — part of a cycleThe module itself
…rellis.scripts.common…e.clipboard.app_store…board.file_icon_store…Paste.clipboard.guard…ste.clipboard.payloadEcoPaste.core.errorEcoPaste.core.pathsEcoPaste.db.modelsEcoPaste.db.statesrc.types.clipboard…ipboard.apps_registry…aste.clipboard.source…ste.clipboard.storage…Paste.commands.backup…oPaste.settings.modelsrc.commandssrc.hookssrc.types.settings…aste.clipboard.ingest…oPaste.clipboard.read…Paste.clipboard.write…te.commands.clipboardEcoPaste.commands.drag…e.commands.onboarding…Paste.commands.window…e.menu.clipboard_itemEcoPaste.updatesrcsrc.constants…nce.types.preferencessrc.pages.Preview…ste.clipboard.watcher…commands.context_menu…clipboard_item.native…ts.SourceAppsTransfer…nents.settingControlsEcoPaste.backup…e.menu.context_window…Preference.components…aste.commands.storage…rellis.scripts.common1…e.clipboard.app_store2…board.file_icon_store3…Paste.clipboard.guard4…ste.clipboard.payload5EcoPaste.core.error6EcoPaste.core.paths7EcoPaste.db.models8EcoPaste.db.state9src.types.clipboard10…ipboard.apps_registry11…aste.clipboard.source12…ste.clipboard.storage13…Paste.commands.backup14…oPaste.settings.model15src.commands16src.hooks17src.types.settings18…aste.clipboard.ingest19…oPaste.clipboard.read20…Paste.clipboard.write21…te.commands.clipboard22EcoPaste.commands.drag23…e.commands.onboarding24…Paste.commands.window25…e.menu.clipboard_item26EcoPaste.update27src28src.constants29…nce.types.preferences30src.pages.Preview31…ste.clipboard.watcher32…commands.context_menu33…clipboard_item.native34…ts.SourceAppsTransfer35…nents.settingControls36EcoPaste.backup37…e.menu.context_window38…Preference.components39…aste.commands.storage40131114132123121121111111011211111112812213222212121111228111112511111111+175 more modules (most-connected shown)

At a glance — Code Health · 81% · Adequate · gated by D2 ·

At a glance — Architecture · 88% · Adequate · gated by D26 ·

At a glance — Maturity · 58% · Adequate · gated by M2 ·

At a glance — Readiness · 52% · Adequate · gated by R4 ·

At a glance — Security · 63% · Adequate · gated by D29, D36 ·

At a glance — Accessibility · 51% · Adequate · gated by AC4 ·

At a glance — Performance · 100% · Exemplary ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A03:2021 — Injection30High / Critical
A06:2021 — Vulnerable & Outdated Components13High / Critical
A02:2021 — Cryptographic Failures1High / Critical

Roadmap

First, ensure all form controls and buttons have proper programmatic labels and make custom interactive elements fully keyboard-operable with correct semantics. Next, enforce accessibility standards by enabling linting rules, adding automated checks in tests, and gating them in CI. Finally, enable dependency scanning tools to improve security and add tests for currently unreached production modules to increase coverage.

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

Do thisHelpsEffortDimension
Resolve the 1 No ADRs found finding(s) in ADR Quality.+2.4 ptsLowADR Quality
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.+4.6 ptsMediumForms & labels
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.+4.6 ptsMediumKeyboard semantics
Enforce accessibility in the toolchain you already use: enable Biome's a11y rule group in your biome.json `linter.rules` (it is off whenever `recommended` is false and the group is unlisted), then assert with your test runner's axe binding (jest-axe, vitest-axe, cypress-axe or @axe-core/playwright) in tests, then gate axe/pa11y/Lighthouse in CI.+4.6 ptsMediumA11y enforcement
Enable Dependabot/Renovate or a dependency-review gate.+4.1 ptsMediumSecurity & performance tooling
Add tests that import the unreached modules (directly or through their public entry).+4.1 ptsMediumTest Coverage
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.+3.2 ptsMediumDependency Hygiene
Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree, with each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form).+2.6 ptsMediumArchitecture documentation

File quality

Per-file score 0–10 — a quality signature. Of 81 files carrying findings, judged against the Production bar: 2% slop · 60% mixed · 38% near-clean.

FileScoreBandWorst signal
REDACTED2.0SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
src/pages/Preference/index.tsx5.4MixedChange Coupling: Boundary-crossing change coupling: index.tsx ↔ index.ts
REDACTED5.8MixedDependency Vulnerabilities: Medium advisory (unmaintained): REDACTED
.claude/hooks/session-start.py7.0MixedCyclomatic Complexity: session-start._resolve_spec_scope (cyclomatic 20)
.claude/hooks/inject-subagent-context.py7.0MixedCyclomatic Complexity: inject-subagent-context._extract_subagent_name (cyclomatic 18)
.codex/hooks/session-start.py7.0MixedCyclomatic Complexity: session-start._build_compact_current_state (cyclomatic 16)
.claude/hooks/inject-workflow-state.py7.0MixedCode Duplication: Members sharing a duplicated core (5 members, 50+ identical tokens)
.cursor/hooks/session-start.py7.0MixedCyclomatic Complexity: session-start._resolve_spec_scope (cyclomatic 20)
.gemini/hooks/session-start.py7.0MixedCyclomatic Complexity: session-start._resolve_spec_scope (cyclomatic 20)
.kiro/hooks/session-start.py7.0MixedCyclomatic Complexity: session-start._resolve_spec_scope (cyclomatic 20)
.trellis/scripts/common/cli_adapter.py7.0MixedCyclomatic Complexity: cli_adapter.detect_platform (cyclomatic 30)
.trellis/scripts/common/task_store.py7.1MixedCyclomatic Complexity: task_store.cmd_create (cyclomatic 28)
src/pages/Clipboard/components/List.tsx7.1MixedCyclomatic Complexity: List.List (cyclomatic 150)
src-tauri/src/clipboard/app_store.rs7.1MixedCode Duplication: Duplicated block (6 lines × 2)
src/pages/Clipboard/components/Group.tsx7.2MixedCyclomatic Complexity: Group.Group (cyclomatic 43)
src-tauri/src/keyboard/windows.rs7.2MixedCyclomatic Complexity: EcoPaste::keyboard::windows::hook_proc (cyclomatic 32)
.opencode/lib/session-utils.js7.2MixedCyclomatic Complexity: buildSessionContext (cyclomatic 31)

How the grades work

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

Critical — 38

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

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

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

Could not be resolved — 49

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. 48 of 52 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 4 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.8 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.

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

What we checked — 52 dimensions across the health lenses
D1D2D3D4D5D6D9D13D15D17D19D20D21D26D28D29D30D35D36D43D44AC1AC2AC3AC4AC5AC6AC7AX10AX3AX4AX9M1M2M3M4P1P2P3P4P6P8PF3R1R10R2R3R4R6R7R8R9

Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.

How to trust any code-health report — three questions
  1. Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 384 of 402 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

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

Tools & methods

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

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

Every finding is locatable in findings.md. Run 01a0ed54-3d03-7487-a8af-097ee094b58b.

The exact command behind every deep-scan dimension — tool, version, invocation and retained raw output — is in Appendix B — Reproduction & audit trail.

Run transparency — what happened this run

What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.

  • D8 Code Coverage — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.rs) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo. To have real coverage read, produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) 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. You can widen what we reach: optional: produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) 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 — then the real number is read on the next scan.
  • D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.rs) and this repository declares a Cargo test suite (src-tauri, 28 test files), but it was not re-run: no test result was produced. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
  • 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 — 46 direct Cargo declaration(s) were read, but the outdated signal needs crates.io, which could not be reached on this run, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
  • D14 License Compliance — 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. License Compliance couldn't be assessed within its 15-minute budget on a solution this large — not included in this run.
  • D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Single-maintainer repository — bus factor is not applicable (23 contributor(s) across 813 commit(s) sampled, automation and bot accounts excluded). One of them holds 85% of the history; the other 22 hold 0.7% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
  • D22 Internal API Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: it declares a published package (src-tauri/Cargo.toml), but no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — no change to the scan image can close it.
  • D32 Data Compliance (PII/GDPR) — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `.release-it.ts`, `src/App.tsx`, `src/components/ScrollArea/index.tsx`, `src/components/VirtuosoScroller/index.tsx`, `src/constants/windowOpenSelection.ts`, … (+5 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • D34 Knowledge Freshness — 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. File-level freshness contradicts repo activity: 48 commits in the last 90 days, yet 80 of 118 significant files carry no living knowledge. Those two readings cannot both be true, so the per-file recency signal is treated as unreliable here and freshness is not scored for this run.
  • AX1 Captive dependencies — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • AX2 Stateful singletons — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • AX6 Interface segregation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • C1 Data Protection — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
  • C2 Access Controls — 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. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
  • C3 Audit Trail — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
  • C4 Data Retention — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
  • C5 Data-Subject Rights — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
  • ED5 Idempotency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check finds retry-prone mutations by walking the repository's declared types, and NONE was loaded on this run, so it had nothing to look at. That is a limit of the analyzer's reach — it reads .NET projects — not a finding that this repository has no command handlers or message consumers.
  • GD1 Unfinished & placeholder code — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • P10 Library API & versioning — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads NuGet packaging and C# public API only, and no .NET project was loaded for this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • PF1 Benchmark discipline — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • PF2 Allocation 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. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • S1 Web-Security Posture — 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. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
  • X1 Async correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X10 Duplicated predicate — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X12 Unreachable branch — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X13 Undrained process stream — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X14 Bypassable address classification — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X15 Unvalidated length from an untrusted reader — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X16 Unfloored truncation loop — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X17 Uncapped recursion over a caller-supplied document — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X18 Disposal-pattern correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X19 Unrestored process-global state — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X2 Cancellation propagation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X20 Mistyped argument guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X21 Side-effecting pattern guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X22 Contradicted release guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X23 Unguarded diagnostic materialisation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X24 Document value interpolated into markup unescaped — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X25 Inert configuration knob — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X26 Unsynchronised callback handoff — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X27 Collection changed while being enumerated — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X28 Index access outside its own emptiness guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X29 Per-element action decided by a fixed element — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X3 Exception handling — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X30 Support guard that admits what it rejects — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X32 Type resolved by simple name across every loaded assembly — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X4 Structured logging — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X5 Nullable reference types — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X6 Hand-rolled structured-format parsing — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X7 Silent fallback defaults — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.

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

Limitations & what we did not check

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.
  • 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.
  • 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").
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality 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.
  • 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.
  • 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.
  • AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
  • AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
  • AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

The LLM boundary

LLM-set scores this run (4): D19, D21, D26, 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.

Dimensions

D1 · Cyclomatic Complexity5.4 / 10Adequate✓ Tool-verified

What it measures: How tangled the control flow is — methods with many branches are hard to test and change.

Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.

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

45 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was List.List at 150. A further 4 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 EcoPaste::i18n::zh_cn::clipboard_menu::label at 17 — they are counted neither in the figure above nor in this dimension's score. 2 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold functions was excluded, so the exclusion is disclosed nowhere in the file itself: src-tauri/src/i18n/en_us/clipboard_menu.rs (EcoPaste::i18n::en_us::clipboard_menu::label at 17), src-tauri/src/i18n/zh_cn/clipboard_menu.rs (EcoPaste::i18n::zh_cn::clipboard_menu::label at 17). 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.

session-start._build_compact_current_state (cyclomatic 16) · ×6.claude/hooks/session-start.py:600
session-start._resolve_spec_scope (cyclomatic 20) · ×4.claude/hooks/session-start.py:510
session-start._get_task_status (cyclomatic 19) · ×4.claude/hooks/session-start.py:327
inject-subagent-context._extract_subagent_name (cyclomatic 18) · ×3.claude/hooks/inject-subagent-context.py:577
EcoPaste::keyboard::windows::hook_proc (cyclomatic 32) · ×2src-tauri/src/keyboard/windows.rs:131

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

What to do

  1. Resolve the 6 session-start._build_compact_current_state (cyclomatic 16) finding(s) in Cyclomatic Complexity — start with session-start.py (6). — One of this dimension's main actionable groups (6 warning-level).
  2. Resolve the 4 session-start._resolve_spec_scope (cyclomatic 20) finding(s) in Cyclomatic Complexity — start with session-start.py (4). — One of this dimension's main actionable groups (4 warning-level).
  3. Resolve the 4 session-start._get_task_status (cyclomatic 19) finding(s) in Cyclomatic Complexity — start with session-start.py (4). — One of this dimension's main actionable groups (4 warning-level).
  4. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D2 · Cognitive Complexity3.8 / 10Weak✓ Tool-verified

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

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

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

79 method(s) exceeded the cognitive complexity threshold of 15; the worst was List.List at 132.

session-start._build_compact_current_state (cognitive 23) · ×6.claude/hooks/session-start.py:600
EcoPaste::keyboard::windows::hook_proc (cognitive 76) · ×5src-tauri/src/keyboard/windows.rs:131
session-start._resolve_spec_scope (cognitive 30) · ×4.claude/hooks/session-start.py:510
session-start._get_task_status (cognitive 23) · ×4.claude/hooks/session-start.py:327
session-start._collect_spec_index_paths (cognitive 19) · ×4.claude/hooks/session-start.py:569

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

What to do

  1. Resolve the 6 session-start._build_compact_current_state (cognitive 23) finding(s) in Cognitive Complexity — start with session-start.py (6). — One of this dimension's main actionable groups (6 warning-level).
  2. Resolve the 5 EcoPaste finding(s) in Cognitive Complexity — start with ingest.rs (2), windows.rs, lib.rs. — One of this dimension's main actionable groups (5 warning-level).
  3. Resolve the 4 session-start._resolve_spec_scope (cognitive 30) finding(s) in Cognitive Complexity — start with session-start.py (4). — One of this dimension's main actionable groups (4 warning-level).
  4. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D3 · God Classes5.8 / 10Adequate✓ Tool-verified

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

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

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

37 god class(es) detected.

FunctionTooLong: List.List · ×23src/pages/Clipboard/components/List.tsx:86
FileTooLong: backup/mod.rs · ×13src-tauri/src/backup/mod.rs
ClassTooLong: Listsrc/pages/Clipboard/components/List.tsx:1

What to do

  1. Resolve the 23 FunctionTooLong finding(s) in God Classes — start with index.tsx (5), List.tsx, Group.tsx. — One of this dimension's main actionable groups (23 warning-level).
  2. Resolve the 13 FileTooLong finding(s) in God Classes — start with session-start.py (4), mod.rs, clipboard.rs. — One of this dimension's main actionable groups (13 warning-level).
  3. Resolve the 1 ClassTooLong finding(s) in God Classes — start with List.tsx. — One of this dimension's main actionable groups (1 warning-level).
  4. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D4 · Code Duplication8.9 / 10Strong✓ Tool-verified

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

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

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

91 duplicated block group(s) detected. A further 24 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. Measured on part of this repository only: .tsx, .ts (48% of production source) was not exposed to THIS dimension's token comparison and is not in this count; duplication there is measured by R10 Code Duplication, the frontend lens's card running the same clone algorithm over the JS/TS token stream.

Members sharing a duplicated core (6 members, 50+ identical tokens) · ×8.claude/hooks/inject-subagent-context.py:276
Members sharing a duplicated core (5 members, 50+ identical tokens) · ×7.claude/hooks/inject-workflow-state.py:144
Members sharing a duplicated core (4 members, 50+ identical tokens) · ×6.claude/hooks/session-start.py:269
Duplicated block (11 lines × 2) · ×6src-tauri/src/backup/mod.rs:1277
Duplicated block (5 lines × 2) · ×5src-tauri/src/clipboard/apps_registry.rs:350

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

What to do

  1. Resolve the 8 Members sharing a duplicated core (6 members, 50+ identical tokens) finding(s) in Code Duplication — start with session-start.py (7), inject-subagent-context.py. — One of this dimension's main actionable groups (8 warning-level).
  2. Resolve the 7 Members sharing a duplicated core (5 members, 50+ identical tokens) finding(s) in Code Duplication — start with inject-workflow-state.py (7). — One of this dimension's main actionable groups (7 warning-level).
  3. Resolve the 6 Members sharing a duplicated core (4 members, 50+ identical tokens) finding(s) in Code Duplication — start with session-start.py (6). — One of this dimension's main actionable groups (6 warning-level).
  4. Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

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

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

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

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

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

2 production modules (Cargo+npm), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 0 module(s) off the main sequence.

✓ On the Gold path — maintain.

Detailed fixes: d5_recommendation.md.

D6 · Cohesion (LCOM4)10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether a class's methods are focused on a single responsibility.

Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.

Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.

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

0 of 18 classes have LCOM4 above 3.

✓ On the Gold path — maintain.

Detailed fixes: d6_recommendation.md.

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

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

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

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

188 test methods: 188 unit, 0 integration, 0 BDD, 0 e2e. The Rust suite contributes 188 `#[test]` function(s) across 28 file(s) declaring at least one; its unit/integration split is Cargo's own — 0 of those file(s) are integration-test targets under a crate's tests/ directory, and the rest are #[test] functions compiled into the crate they test.

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

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

What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.

Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.

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

REDACTED scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

D15 · Churn × Complexity Hotspots9.8 / 10Stronggated by 4 serious findings✓ Tool-verified

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

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

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

Top hotspots: src/pages/Clipboard/components/List.tsx (2×150=300); src-tauri/src/lib.rs (9×26=234); src/pages/Preference/components/settingControls/ActionControl.tsx (6×27=162) Repeated repair below the complexity floor: src-tauri/src/commands/onboarding.rs (3 of 4 changes were fixes)

Hotspot: src/pages/Clipboard/components/List.tsx · ×3src/pages/Clipboard/components/List.tsx:86
Repeated repair: src-tauri/src/commands/onboarding.rssrc-tauri/src/commands/onboarding.rs:139

What to do

  1. Resolve the 3 Hotspot finding(s) in Churn × Complexity Hotspots — start with List.tsx, lib.rs, ActionControl.tsx. — One of this dimension's main actionable groups (3 warning-level).
  2. Resolve the 1 Repeated repair finding(s) in Churn × Complexity Hotspots — start with onboarding.rs. — One of this dimension's main actionable groups (1 warning-level).

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

D17 · Explicit Debt10.0 / 10Exemplary○ Nothing flagged

What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.

Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.

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

0 deducted task-comment markers across 38088 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.

✓ On the Gold path — maintain.

Detailed fixes: d17_recommendation.md.

D19 · Documentation QualityExemplary◐ Sampled · advisory

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.

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

The repository's root README (README.md) and four architecture/Docs markdown files form a complete documentation set: the root gives an overview of EcoPaste as a Rust-first Tauri clipboard manager with features like local storage, SQLite search, native shortcuts, backup support, and cross-platform surface; the .trellis/spec/backend/architecture.md covers startup ordering, module ownership, platform boundary, error/async/concurrency constraints, and bundled-skills context injection; four bundled-skill architecture docs cover what counts as a bundled skill (multi-file vs single-file), current skills, where they land per platform, dispatch wiring, adding new skills, overriding locally, removing from projects, and operating rules; the .trellis/spec/overview.md gives an overview of the local Trellis architecture model with workflow, persistence, and integration layers plus core paths and AI customization principles. All documents are well-structured and complete for their scope. The Trellis local-architecture documentation is complete and well structured: a single README (the overview) plus four architecture/Docs markdown files covering workflow, workspace memory, bundled skills, context injection, generated-files, multi-agent channels, and the spec system. Each document has an explicit heading outline; every named section exists in the visible text. The README below the repository root is the project's own directory description (the overview), so it does not suffer from missing-overview or missing-usage defects. The repository is well documented with a single README (the root overview) and four separate architecture/design documents covering the workflow, workspace memory, bundled skills, and multi-agent channel layers. Each document has an explicit scope heading and a full outline; the visible content is clear and complete for its tier. The README below the root covers what the repository is for, installation, usage, contribution guidance, and licence — all four are present and well written.

Documentation: no installation or build instructions · ×2README.md

✓ On the Gold path — maintain.

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

D20 · ADR Quality0.0 / 10Critical✓ Tool-verified

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

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

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

No architecture decision records were found.

No ADRs found

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality. — One of this dimension's main actionable groups (1 recommendation-level).

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

D21 · Naming ConsistencyExemplary◐ Sampled · 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.

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

0 naming inconsistencies across 0 sampled symbols.

✓ On the Gold path — maintain.

Detailed fixes: d21_recommendation.md.

D26 · Project Cohesion0.0 / 10Critical✓ Tool-verified

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

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

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

1 of 1 build units (Cargo) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

  1. Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).

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

D28 · Secrets (history)9.0 / 10Adequategated by 1 critical finding✓ Tool-verified

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.

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

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

REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).

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

D29 · Static Analysis (SAST)4.0 / 10Weak✓ Tool-verified

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

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

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

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

30 finding(s): 0 critical, 29 high, 1 medium, 0 low. 24 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 11 file(s) — `.agents/skills/sync-zh-changelog/agents/openai.yaml`, `.release-it.ts` (line 63), `src/App.tsx` (line 24), `src/components/ScrollArea/index.tsx` (line 14), `src/components/VirtuosoScroller/index.tsx` (line 11), … (+6 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 3 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

What to do

  1. Resolve the 5 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3), REDACTED (2). — One of this dimension's main actionable groups (5 issue-level).
  2. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
  3. No action in Static Analysis (SAST) — all 24 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 (24 issue-level, 0 of them charged here).

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

D30 · Dependency Vulnerabilities6.2 / 10Adequate✓ Tool-verified

What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.

Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05.

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

13 finding(s): 0 critical, 3 high, 10 medium, 0 low.

REDACTED
REDACTED
REDACTED
REDACTED

What to do

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

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

D35 · Change Coupling10.0 / 10Adequategated by 1 critical finding✓ Tool-verified

What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.

Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.

Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.

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

Strongest change-coupling: index.tsx↔index.ts 74%

Boundary-crossing change coupling: index.tsx ↔ index.tssrc/pages/Preference/index.tsx

What to do

  1. Resolve the 1 Boundary-crossing change coupling finding(s) in Change Coupling — start with index.tsx. — One of this dimension's main actionable groups (1 issue-level).

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

D36 · Supply-chain Provenance & Signing2.5 / 10Weak✓ Tool-verified

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

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

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

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

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

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

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

D44 · Platform End-of-Life6.0 / 10Adequate✓ Tool-verified

What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.

Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.

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

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

End-of-life runtime: Rust 1.96

What to do

  1. Resolve the 1 End-of-life runtime finding(s) in Platform End-of-Life. — 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.

Frontend & cross-cutting dimensions

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

AC1 · Text alternatives10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.

AC2 · Forms & labels4.0 / 10Weak✓ Tool-verified

Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.

Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one). (×2) — src/components/ClipboardGroupModal/index.tsx:200, src/pages/Clipboard/components/Group.tsx:655
  • This UI-library field component has no label / aria-label / aria-labelledby / id / name — and neither does anything it renders — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. (×4) — src/components/LanguageSwitcher/index.tsx:120, src/pages/Preference/components/settingControls/ClipboardGroupSelectControl.tsx:93, src/pages/Preference/components/settingControls/SelectControls.tsx:33, …
  • A fieldset groups related controls but has no <legend> to name the group. Add a <legend> as its first child — or, if the group already has a visible caption beside it (or the fieldset is there only to disable its subtree and carries no group box), point aria-labelledby at that caption's id instead, which names the group without rendering a second one. — src/components/ShortcutRecorder/index.tsx:314
  • This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. — src/pages/Clipboard/components/Header.tsx:189

What to do

  • Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
AC3 · Page structure10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.

Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

AC4 · Keyboard semantics1.0 / 10Critical✓ Tool-verified

Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: elements that pose a keyboard-semantics question, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) — a non-natively-interactive element carrying a click handler, a double-click or hover enter/leave binding, a pointer-only gesture on a tabindex="0" element, or `cursor: pointer` from the repo's own CSS; an href-less or placeholder-href (#, javascript:) anchor; and any element with a positive tabindex. Natively interactive elements used correctly (<button>, <a href>, form controls) are NOT in the population — there is nothing to judge — so a page of nothing but correct controls gives AC4 nothing to measure. Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".

  • This <div> binds mousedown, pointermove, dragstart and double-click — pointer gestures with no keyboard form, a double-click among them. No click, no key handler, and no tabIndex={0}, so it cannot even take focus. Nothing synthesises a double-click from the keyboard: Enter and Space fire a single click, and only on a native <button> or <a href>. So this behaviour has no keyboard path at all. Expose the same action on a real control, or add role + tabIndex={0} + a key handler alongside the double-click. — src/pages/Clipboard/components/cards/ClipboardCard.tsx:136

What to do

  • Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
AC5 · ARIA correctness10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.

Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

AC6 · Visual & motion safety10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.

Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.

Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

AC7 · A11y enforcement4.0 / 10Weak✓ Tool-verified

Other · Accessibility — Whether accessibility is ENFORCED in the toolchain — an accessibility checker configured over the markup (an a11y lint rule set, e.g. eslint-plugin-jsx-a11y or vuejs-accessibility where the project lints JavaScript) and an automated accessibility assertion wired into tests or CI (axe/pa11y/Lighthouse or an equivalent) — on the Documented→Verified→Prevented ladder.

Method: Repo config/CI scan: an accessibility checker configured over the markup (an a11y lint rule set such as eslint-plugin-jsx-a11y / vuejs-accessibility where JavaScript is linted) and an automated accessibility assertion in tests or CI (axe/pa11y/Lighthouse or equivalent), graded on the Documented→Verified→Prevented rungs. Deterministic, presence/rung detection.

Coverage: Population: the repository's own tooling configuration — lint config, test and CI files — NOT the markup. It is read for a configured accessibility checker and an automated accessibility assertion (axe/pa11y/Lighthouse, or a native-toolkit equivalent), and it credits an INVOCATION, never a mention: a licence filename, an import comment or a doc reference earns no rung. Enforcement configured entirely outside the repository leaves no evidence here and cannot be credited.

  • No accessibility enforcement found — your Biome config enables no a11y rules and there's no axe/pa11y/Lighthouse in tests or CI. Start by turning on Biome's own a11y rule group to catch issues at author time. What was searched, so you can tell an absence from a miss: the 80 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.

What to do

  • Enforce accessibility in the toolchain you already use: enable Biome's a11y rule group in your biome.json `linter.rules` (it is off whenever `recommended` is false and the group is unlisted), then assert with your test runner's axe binding (jest-axe, vitest-axe, cypress-axe or @axe-core/playwright) in tests, then gate axe/pa11y/Lighthouse in CI.
AX10 · Code composition9.7 / 10Exemplary✓ Tool-verified

Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.

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

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

What to do

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

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

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

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

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

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

AX9 · CQS / query purity10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.

Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.

Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.

M1 · Documentation (README)6.0 / 10Adequate✓ Tool-verified

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

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

What to do

  • Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
  • Add a 'Testing' section to the root README — how to run the test suite.
  • Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
  • Add a README to the 2 of 2 project(s) that lack one — worth up to 2 pts.
M2 · Architecture documentation2.0 / 10Critical✓ Tool-verified

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

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

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

What to do

  • Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree, with each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form).
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

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

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

M4 · Documentation accuracy7.0 / 10Strong◐ Sampled · advisory

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.

  • Tauri version claimed (v2) vs evidence — searched for: `Tauri v2`. Each was matched case- and separator-insensitively against file and directory NAMES anywhere in the tree, and against the CONTENTS of manifest files (package.json, *.csproj, *.props, *.slnx, *.yml, Dockerfile); the README's own prose never counts, so a claim is never refuted by merely being made. Nothing outside that search was read — a footprint living only in a submodule, in a file type not listed here, or under a name none of those terms matches is not seen, and this row is then wrong.
  • React 19 frontend claim contradicts no component in the repo — reported by the model that read the README against this repository; no term search was run for this one, so nothing here has been checked against the tree. Treat it as a reading to confirm, not as a measured contradiction: verify it against the code before acting on it, and if the footprint it describes does exist, this row is wrong.
  • README advertises Docker containerisation, but no Dockerfile/compose file exists — searched for: `dockerfile`, `docker-compose`, `compose.yaml`, `compose.yml`. Each was matched case- and separator-insensitively against file and directory NAMES anywhere in the tree, and against the CONTENTS of manifest files (package.json, *.csproj, *.props, *.slnx, *.yml, Dockerfile); the README's own prose never counts, so a claim is never refuted by merely being made. Nothing outside that search was read — a footprint living only in a submodule, in a file type not listed here, or under a name none of those terms matches is not seen, and this row is then wrong.

What to do

  • Reconcile the README with reality: Tauri version claimed (v2) vs evidence; React 19 frontend claim contradicts no component in the repo; README advertises Docker containerisation, but no Dockerfile/compose file exists.
P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

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

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

P2 · Observability7.0 / 10Strong✓ Tool-verified

Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.

Method: Filesystem/Roslyn scan: structured-logging frameworks (Serilog, NLog), OpenTelemetry, and health-check endpoint patterns. Exhaustive, deterministic.

P3 · Security & performance tooling4.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).

Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.

What to do

  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback7.0 / 10Strong✓ Tool-verified

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

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

P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.

Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.

P8 · Schema migrations10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — Whether database schema changes go through versioned migrations rather than being auto-created from the model at startup.

Method: Roslyn scan: EF Core DbContext for a versioned migrations directory versus bare EnsureCreated usage; off .NET, a file scan of dependency manifests, migration histories (Flyway, Liquibase, Alembic, Django, Rails, Prisma, TypeORM, Knex/Sequelize, golang-migrate, goose, Laravel, Doctrine, Diesel/sqlx) and schema auto-create in production source or config. Exhaustive, deterministic.

PF3 · Async & latency hygiene10.0 / 10Exemplary✓ Tool-verified

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

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

R1 · Type Safety10.0 / 10Exemplary✓ Tool-verified

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

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

R10 · Code Duplication9.5 / 10Exemplary✓ Tool-verified

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

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

  • 7 duplicated blocks under src/pages/ have copies in at least two of the sibling directories Clipboard, ContextMenu, Preference, Preview, Update — 5 of them are reported below, and 2 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 7 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 7 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 7 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — src/pages/Clipboard/components/Group.tsx:427
  • src/pages/Preference/components/BackupExportModal.tsx:55 · src/pages/Preference/components/BackupImportModal.tsx:53 — the two spans are one implementation copied and then locally edited — 561 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/pages/Preference/components/BackupExportModal.tsx:55
  • src/pages/Onboarding/components/DoneStep.tsx:14 · src/pages/Onboarding/components/WelcomeStep.tsx:14 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — src/pages/Onboarding/components/DoneStep.tsx:14
  • src/pages/Preference/components/settingControls/CaptureOrderControl.tsx:54 · src/pages/Preference/components/settingControls/SortableCheckboxTreeControl.tsx:76 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/pages/Preference/components/settingControls/CaptureOrderControl.tsx:54
  • src/pages/Clipboard/components/Group.tsx:427 · src/pages/Preference/components/ClipboardGroupManagerModal.tsx:124 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/pages/Clipboard/components/Group.tsx:427
  • src/hooks/useClipboardItems.ts:159 · src/hooks/useClipboardItems.ts:185 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — src/hooks/useClipboardItems.ts:159
  • src/components/LanguageSwitcher/index.tsx:43 · src/components/LanguageSwitcher/index.tsx:82 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/components/LanguageSwitcher/index.tsx:43
  • src/pages/Clipboard/components/Group.tsx:322 · src/pages/Preference/components/ClipboardGroupManagerModal.tsx:74 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/pages/Clipboard/components/Group.tsx:322
  • src/components/Dropdown/index.tsx:83 · src/components/Popover/index.tsx:20 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/components/Dropdown/index.tsx:83
  • src/pages/Preview/components/PreviewContent.tsx:107 · src/pages/Preview/components/PreviewContent.tsx: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. — src/pages/Preview/components/PreviewContent.tsx:107
  • src/components/ShortcutRecorder/index.tsx:220 · src/components/ShortcutRecorder/index.tsx:270 — the two spans are one implementation copied and then locally edited — 67 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/components/ShortcutRecorder/index.tsx:220
  • src/pages/Clipboard/components/Group.tsx:136 · src/pages/Clipboard/components/List.tsx:183 — the two spans are one implementation copied and then locally edited — 62 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/pages/Clipboard/components/Group.tsx:136
  • src/pages/Preference/config/preferenceSchema.ts:908 · src/pages/Preference/index.tsx:422 — the two spans are one implementation copied and then locally edited — 53 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/pages/Preference/config/preferenceSchema.ts:908
  • src/pages/ContextMenu/index.tsx:242 · src/pages/Preview/index.tsx:109 — the two spans are one implementation copied and then locally edited — 51 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/pages/ContextMenu/index.tsx:242
  • src/pages/Preference/utils/storageUsage.ts:11 · src/pages/Preview/components/PreviewContent.tsx:380 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — src/pages/Preference/utils/storageUsage.ts:11
  • src/pages/Update/index.tsx:117 · src/pages/Update/index.tsx:130 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/pages/Update/index.tsx:117
  • src/utils/shortcut.ts:207 · src/utils/shortcut.ts:233 — the two spans are one implementation copied and then locally edited — 56 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/utils/shortcut.ts:207
  • src/pages/Preference/components/SourceAppsTransfer.tsx:129 · src/pages/Preference/components/SourceAppsTransfer.tsx:151 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/pages/Preference/components/SourceAppsTransfer.tsx:129
  • src/pages/Preference/components/settingControls/NumberControl.tsx:11 · src/pages/Preference/components/settingControls/TextControl.tsx:9 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — src/pages/Preference/components/settingControls/NumberControl.tsx:11
  • src/pages/Preference/components/settingControls/SelectControls.tsx:18 · src/pages/Preference/components/settingControls/SelectControls.tsx:50 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/pages/Preference/components/settingControls/SelectControls.tsx:18
  • src/pages/Preference/components/settingControls/NumberControl.tsx:13 · src/pages/Preference/components/settingControls/RetentionControl.tsx:36 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/pages/Preference/components/settingControls/NumberControl.tsx:13
  • src/pages/Clipboard/components/Group.tsx:111 · src/pages/Preference/components/ClipboardGroupManagerModal.tsx:54 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — src/pages/Clipboard/components/Group.tsx:111

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.
R2 · Cyclomatic Complexity8.6 / 10Strong✓ Tool-verified

React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.

Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.

  • handleKeyDown has cyclomatic complexity 32 and cognitive complexity 39; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/pages/Clipboard/components/List.tsx:587
  • PreferenceSettingControl has cyclomatic complexity 26 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/pages/Preference/components/settingControls/PreferenceSettingControl.tsx:50
  • current has cyclomatic complexity 23 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 sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/pages/Clipboard/components/List.tsx:522
  • resolveSectionVisual has cyclomatic complexity 22 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/pages/Preference/components/PreferenceSection.tsx:136
  • Update has cyclomatic complexity 20 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/pages/Update/index.tsx:43
  • handleQuickAction has cyclomatic complexity 20 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/pages/Clipboard/components/List.tsx:872
  • (anonymous) has cyclomatic complexity 18 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/commands/index.ts:1082
  • PreferenceSettingRow has cyclomatic complexity 18 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/pages/Preference/components/PreferenceSettingRow.tsx:42
  • BackupImportModal has cyclomatic complexity 15 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/pages/Preference/components/BackupImportModal.tsx:31
  • isItemActionAvailable has cyclomatic complexity 15 and cognitive complexity 3; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/constants/itemActions.ts:240
  • Preview has cyclomatic complexity 14 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/pages/Preview/index.tsx:62
  • getEmptyDescription has cyclomatic complexity 13 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/pages/Clipboard/components/List.tsx:1117
  • handleWindowVisibility has cyclomatic complexity 13 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. — src/pages/Clipboard/components/List.tsx:284
  • settingValuesEqual has cyclomatic complexity 12 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/pages/Preference/services/preferenceSettings.ts:26
  • handleClick 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. — src/pages/Preference/components/settingControls/ActionControl.tsx:323
  • (anonymous) has cyclomatic complexity 11 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/hooks/useClipboardItems.ts:80
  • ClipboardCard 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. — src/pages/Clipboard/components/cards/ClipboardCard.tsx:58
  • openPreviewForItem 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. — src/pages/Clipboard/hooks/useClipboardPreviewController.ts:348
  • PreferenceStorageUsagePanel 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. — src/pages/Preference/components/PreferenceStorageUsagePanel.tsx:21
  • Preference 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. — src/pages/Preference/index.tsx:70

What to do

  • Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
R3 · Large Files8.2 / 10Strong✓ Tool-verified

React / JS · Code Health — How many source files exceed the large-file threshold.

Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.

What to do

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

  • 0% of 125 production file(s) reachable from 0 test file(s) via the import graph — 'production' here is the RESIDUE: every source file left once tests, tooling, generated output, config, declarations and declaration-only modules, fixture corpora, type fixtures, behaviour-free data modules, re-export barrels, registration/constant data modules and service workers are set aside, so the percentage is taken over a smaller denominator than the workspace's file count

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R6 · Tooling10.0 / 10Exemplary✓ Tool-verified

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

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

R7 · Dead Code9.8 / 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.

  • Unreachable from the 5 application, 5 tooling and 0 test entry point(s) detected in this repo. Gate removals on `pnpm run build` — an undetected custom entry would make these reachable.
  • no import path from any entry point (5 application, 5 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make — src/hooks/useWindowLifecycle.ts
  • Nothing imports this binding — it is safe to review for removal. (×4) — src/constants/urls.ts:6, src/stores/windowLifecycle.ts:54, src/unocss/presetAntdColors.ts:78, …

What to do

  • Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
R8 · Dependency Hygiene7.5 / 10Strong✓ Tool-verified

React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.

Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.

  • Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×3)

What to do

  • Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
R9 · Circular Imports8.3 / 10Strong✓ Tool-verified

React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.

Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.

  • src/commands/index.ts → src/stores/settings.ts → src/commands/index.ts — src/commands/index.ts

What to do

  • Break each cycle by extracting the shared piece into a module both sides can import.

WCAG coverage — what static analysis assessed

Statically assessed 15 of 55 WCAG 2.2 Level A/AA success criteria (27%; ≈30% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 40 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).

DimensionWCAG 2.2 A/AA criteriaCoverage
AC1 · Text alternatives1.1.1, 1.2.2, 1.2.5Partial signal
AC2 · Forms & labels1.3.1, 3.3.2, 4.1.2Partial signal
AC3 · Page structure1.4.4, 2.2.1, 2.4.1, 2.4.2, 3.1.1, 4.1.2Partial signal
AC4 · Keyboard semantics2.1.1, 2.4.3Partial signal
AC5 · ARIA correctness4.1.2Partial signal
AC6 · Visual & motion safety1.4.3, 2.4.7Partial — literal CSS only
AC7 · A11y enforcementenforcement — no page criterionEnforcement posture (process)

Not statically assessed — these 40 Level A/AA criteria need runtime or manual evaluation (WCAG-EM): 1.2.1, 1.2.3, 1.2.4, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.4.1, 1.4.2, 1.4.5, 1.4.10, 1.4.11, 1.4.12, 1.4.13, 2.1.2, 2.1.4, 2.2.2, 2.3.1, 2.4.4, 2.4.5, 2.4.6, 2.4.11, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.7, 2.5.8, 3.1.2, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.6, 3.3.1, 3.3.3, 3.3.4, 3.3.7, 3.3.8, 4.1.3.

Reference — by lens

The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.

LensScoreRatingImpact
Code Health81%Adequate — gated by D2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture88%Adequate — gated by D26Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity58%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness52%Adequate — gated by R4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security63%Adequate — gated by D29, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility51%Adequate — gated by AC4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance100%ExemplaryStrongest area.
Not evidenced — 4 control(s) we could not find positive evidence for

These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.

  • C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 76 check(s) not relevant to this codebase

These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.

  • AX1 Captive dependencies — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX2 Stateful singletons — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — the dev server did not expose a crawlable HTTP endpoint in time — no runtime evidence This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • D10 Test Quality — ~3 lines of test source are present (.rs) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D11 Test Reliability — Test reliability not included — the .rs suite was found but not re-run
  • D12 Dependency Hygiene — Not scored — 46 direct Cargo declaration(s) were read, but the outdated signal needs crates.io, which could not be reached on this run, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
  • D14 License Compliance — License Compliance not included (time budget)
  • D16 Bus Factor — single-maintainer repository — bus factor is not applicable
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout nor 2+ sibling source directories each declaring an aggregate root. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — No inline comments to assess — comment value is not applicable here.
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — symbol resolution incomplete — navigability not assessed
  • 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) — 10 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D34 Knowledge Freshness — knowledge concentrated in recent work — freshness signal contradicted by repo activity
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not included — suite not readable by the collector
  • DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (8 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 a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
  • ED5 Idempotency — This check finds retry-prone mutations (command handlers and message/event consumers) by walking the repository's declared types, and none was loaded here, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C# syntax, and none was loaded for this repository. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P10 Library API & versioning — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • 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 — no HTTP server, API framework or worker entry point was found in the JavaScript/TypeScript, Rust source, so there is no service whose uptime a failing dependency could take down
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) 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 — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • PF2 Allocation hygiene — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
  • R5 Dependency Freshness — uses a pnpm lockfile — dependency freshness not measured here; JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
  • S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X1 Async correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X10 Duplicated predicate — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X12 Unreachable branch — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X13 Undrained process stream — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X14 Bypassable address classification — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X15 Unvalidated length from an untrusted reader — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X16 Unfloored truncation loop — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X17 Uncapped recursion over a caller-supplied document — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X18 Disposal-pattern correctness — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X19 Unrestored process-global state — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X20 Mistyped argument guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X21 Side-effecting pattern guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X22 Contradicted release guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X23 Unguarded diagnostic materialisation — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X24 Document value interpolated into markup unescaped — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X25 Inert configuration knob — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X26 Unsynchronised callback handoff — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X27 Collection changed while being enumerated — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X28 Index access outside its own emptiness guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X29 Per-element action decided by a fixed element — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X3 Exception handling — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X30 Support guard that admits what it rejects — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X32 Type resolved by simple name across every loaded assembly — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X6 Hand-rolled structured-format parsing — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X7 Silent fallback defaults — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.

Critical — 38 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · High CVE · ×3
  • REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · <button> with no accessible text · ×2
  • <button> with no accessible text src/components/ClipboardGroupModal/index.tsx:200 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text src/pages/Clipboard/components/Group.tsx:655 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
AC4 · Keyboard semantics · Double-click handler on a non-interactive <div> · ×1
  • Double-click handler on a non-interactive <div> src/pages/Clipboard/components/cards/ClipboardCard.tsx:136 — This <div> binds mousedown, pointermove, dragstart and double-click — pointer gestures with no keyboard form, a double-click among them. No click, no key handler, and no tabIndex={0}, so it cannot even take focus. Nothing synthesises a double-click from the keyboard: Enter and Space fire a single click, and only on a native <button> or <a href>. So this behaviour has no keyboard path at all. Expose the same action on a real control, or add role + tabIndex={0} + a key handler alongside the double-click.
D28 · Secrets (history) · REDACTED · ×1
  • REDACTED
D35 · Change Coupling · Boundary-crossing change coupling · ×1
  • Boundary-crossing change coupling: index.tsx ↔ index.ts src/pages/Preference/index.tsx — `src/pages/Preference/index.tsx` (context pages) and `src/router/index.ts` (context router) sit in DIFFERENT parts of the tree yet change together 74% of the time (14 of the 19 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 14 shared commits counted here, the most recent 3 are `b9afe513` feat: 在偏好设置窗口中切换页面时,新增了过渡动画 (#748) (at that commit the file was still `src/layouts/Preference/index.tsx`); `62aa9809` refactor: 双窗口模式+哈希路由 (#357) (at that commit the file was still `src/layouts/Preference/index.tsx`); `2f74cb00` fix: 修复在 Windows 上 app 无限重启的 bug (#327) (at that commit the file was still `src/layouts/Preference/index.tsx`) — run `git show` on any of them.
R9 · Circular Imports · Import cycle (2 files) · ×1
  • Import cycle (2 files) src/commands/index.ts — src/commands/index.ts → src/stores/settings.ts → src/commands/index.ts
Serious — 349 finding(s)
D3 · God Classes · FunctionTooLong · ×23
  • FunctionTooLong: List.List src/pages/Clipboard/components/List.tsx:86 — FunctionTooLong — List runs 654 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 554 over it, 6.54× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: Group.Group src/pages/Clipboard/components/Group.tsx:109 — FunctionTooLong — Group runs 348 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 248 over it, 3.48× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: useClipboardPreviewController.useClipboardPreviewController src/pages/Clipboard/hooks/useClipboardPreviewController.ts:46 — FunctionTooLong — useClipboardPreviewController runs 287 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 187 over it, 2.87× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: ActionControl.ActionControl src/pages/Preference/components/settingControls/ActionControl.tsx:100 — FunctionTooLong — ActionControl runs 268 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 168 over it, 2.68× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: index.Preference src/pages/Preference/index.tsx:70 — FunctionTooLong — Preference runs 245 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 145 over it, 2.45× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: EcoPaste::run src-tauri/src/lib.rs:25 — FunctionTooLong — EcoPaste::run runs 224 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 124 over it, 2.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: useClipboardItems.useClipboardItems src/hooks/useClipboardItems.ts:28 — FunctionTooLong — useClipboardItems runs 218 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 118 over it, 2.18× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: index.ShortcutRecorder src/components/ShortcutRecorder/index.tsx:43 — FunctionTooLong — ShortcutRecorder runs 202 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 102 over it, 2.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: index.Update src/pages/Update/index.tsx:43 — FunctionTooLong — Update runs 201 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 101 over it, 2.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: BackupExportModal.BackupExportModal src/pages/Preference/components/BackupExportModal.tsx:32 — FunctionTooLong — BackupExportModal runs 178 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 78 over it, 1.78× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: motion.usePreviewMotion src/pages/Preview/motion.ts:16 — FunctionTooLong — usePreviewMotion runs 172 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 72 over it, 1.72× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: BackupImportModal.BackupImportModal src/pages/Preference/components/BackupImportModal.tsx:31 — FunctionTooLong — BackupImportModal runs 159 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 59 over it, 1.59× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: LegacyImportStep.LegacyImportStep src/pages/Onboarding/components/LegacyImportStep.tsx:17 — FunctionTooLong — LegacyImportStep runs 149 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 49 over it, 1.49× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: PreferenceSearchResults.PreferenceSearchResults src/pages/Preference/components/PreferenceSearchResults.tsx:33 — FunctionTooLong — PreferenceSearchResults runs 135 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 35 over it, 1.35× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: ClipboardGroupManagerModal.ClipboardGroupManagerModal src/pages/Preference/components/ClipboardGroupManagerModal.tsx:48 — FunctionTooLong — ClipboardGroupManagerModal runs 127 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 27 over it, 1.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: index.ClipboardGroupModal src/components/ClipboardGroupModal/index.tsx:74 — FunctionTooLong — ClipboardGroupModal runs 126 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 26 over it, 1.26× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: PreferenceSettingControl.PreferenceSettingControl src/pages/Preference/components/settingControls/PreferenceSettingControl.tsx:50 — FunctionTooLong — PreferenceSettingControl runs 126 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 26 over it, 1.26× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: index.Preview src/pages/Preview/index.tsx:62 — FunctionTooLong — Preview runs 126 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 26 over it, 1.26× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: SourceAppsTransfer.SourceAppsTransfer src/pages/Preference/components/SourceAppsTransfer.tsx:48 — FunctionTooLong — SourceAppsTransfer runs 117 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 17 over it, 1.17× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: Header.Header src/pages/Clipboard/components/Header.tsx:40 — FunctionTooLong — Header runs 113 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 13 over it, 1.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: ClipboardCard.ClipboardCard src/pages/Clipboard/components/cards/ClipboardCard.tsx:58 — FunctionTooLong — ClipboardCard runs 113 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 13 over it, 1.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: EcoPaste::clipboard::ingest::build_item_with_settings src-tauri/src/clipboard/ingest.rs:193 — FunctionTooLong — EcoPaste::clipboard::ingest::build_item_with_settings runs 111 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 11 over it, 1.11× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: PreferenceSettingRow.PreferenceSettingRow src/pages/Preference/components/PreferenceSettingRow.tsx:42 — FunctionTooLong — PreferenceSettingRow runs 104 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 4 over it, 1.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D3 · God Classes · FileTooLong · ×13
  • FileTooLong: backup/mod.rs src-tauri/src/backup/mod.rs — FileTooLong — 1027 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 57 free functions. The bar is 500 significant lines; this is 527 over it, 2.05× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: commands/clipboard.rs src-tauri/src/commands/clipboard.rs — FileTooLong — 1005 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 61 free functions. The bar is 500 significant lines; this is 505 over it, 2.01× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: components/List.tsx src/pages/Clipboard/components/List.tsx — FileTooLong — 887 significant lines (blank, comment-only and punctuation-only lines excluded), about 74% of them inside a single declaration: List (86-1112). The bar is 500 significant lines; this is 387 over it, 1.77× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: commands/index.ts src/commands/index.ts — FileTooLong — 771 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 271 over it, 1.54× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: components/Group.tsx src/pages/Clipboard/components/Group.tsx — FileTooLong — 607 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 107 over it, 1.21× 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: config/preferenceSchema.ts src/pages/Preference/config/preferenceSchema.ts — FileTooLong — 604 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 104 over it, 1.21× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: commands/onboarding.rs src-tauri/src/commands/onboarding.rs — FileTooLong — 576 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 76 over it, 1.15× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: hooks/session-start.py .claude/hooks/session-start.py — FileTooLong — 561 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 61 over it, 1.12× 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: hooks/session-start.py .cursor/hooks/session-start.py — FileTooLong — 561 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 61 over it, 1.12× 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: hooks/session-start.py .gemini/hooks/session-start.py — FileTooLong — 561 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 61 over it, 1.12× 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: hooks/session-start.py .kiro/hooks/session-start.py — FileTooLong — 561 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 61 over it, 1.12× 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: common/session_context.py .trellis/scripts/common/session_context.py — FileTooLong — 555 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 55 over it, 1.11× 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: window/preview.rs src-tauri/src/window/preview.rs — FileTooLong — 531 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 36 free functions. The bar is 500 significant lines; this is 31 over it, 1.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.
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×8
  • Members sharing a duplicated core (6 members, 50+ identical tokens) .claude/hooks/inject-subagent-context.py:276 — .claude/hooks/inject-subagent-context.py:276-311 | .claude/hooks/inject-subagent-context.py:315-339 | .cursor/hooks/inject-subagent-context.py:276-311 | .cursor/hooks/inject-subagent-context.py:315-339 | .kiro/hooks/inject-subagent-context.py:276-311 | .kiro/hooks/inject-subagent-context.py:315-339 — 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) .claude/hooks/session-start.py:100 — .claude/hooks/session-start.py:100-120 | .codex/hooks/session-start.py:123-142 | .cursor/hooks/session-start.py:100-120 | .gemini/hooks/session-start.py:100-120 | .github/copilot/hooks/session-start.py:128-147 | .kiro/hooks/session-start.py:100-120 — 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) .claude/hooks/session-start.py:160 — .claude/hooks/session-start.py:160-174 | .codex/hooks/session-start.py:295-309 | .cursor/hooks/session-start.py:160-174 | .gemini/hooks/session-start.py:160-174 | .github/copilot/hooks/session-start.py:300-314 | .kiro/hooks/session-start.py:160-174 — 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) .claude/hooks/session-start.py:178 — .claude/hooks/session-start.py:178-184 | .codex/hooks/session-start.py:313-319 | .cursor/hooks/session-start.py:178-184 | .gemini/hooks/session-start.py:178-184 | .github/copilot/hooks/session-start.py:318-324 | .kiro/hooks/session-start.py:178-184 — 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) .claude/hooks/session-start.py:570 — .claude/hooks/session-start.py:570-597 | .codex/hooks/session-start.py:330-353 | .cursor/hooks/session-start.py:570-597 | .gemini/hooks/session-start.py:570-597 | .github/copilot/hooks/session-start.py:335-358 | .kiro/hooks/session-start.py:570-597 — 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) .claude/hooks/session-start.py:605 — .claude/hooks/session-start.py:605-657 | .codex/hooks/session-start.py:361-413 | .cursor/hooks/session-start.py:605-657 | .gemini/hooks/session-start.py:605-657 | .github/copilot/hooks/session-start.py:366-418 | .kiro/hooks/session-start.py:605-657 — 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) .claude/hooks/session-start.py:661 — .claude/hooks/session-start.py:661-682 | .codex/hooks/session-start.py:417-433 | .cursor/hooks/session-start.py:661-682 | .gemini/hooks/session-start.py:661-682 | .github/copilot/hooks/session-start.py:422-438 | .kiro/hooks/session-start.py:661-682 — 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) .claude/hooks/session-start.py:692 — .claude/hooks/session-start.py:692-703 | .codex/hooks/session-start.py:443-446 | .cursor/hooks/session-start.py:692-703 | .gemini/hooks/session-start.py:692-703 | .github/copilot/hooks/session-start.py:448-451 | .kiro/hooks/session-start.py:692-703 — 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) · ×7
  • Members sharing a duplicated core (5 members, 50+ identical tokens) .claude/hooks/inject-workflow-state.py:144 — .claude/hooks/inject-workflow-state.py:144-167 | .codex/hooks/inject-workflow-state.py:144-167 | .gemini/hooks/inject-workflow-state.py:144-167 | .github/copilot/hooks/inject-workflow-state.py:144-167 | .kiro/hooks/inject-workflow-state.py:144-167 — 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) .claude/hooks/inject-workflow-state.py:182 — .claude/hooks/inject-workflow-state.py:182-204 | .codex/hooks/inject-workflow-state.py:182-204 | .gemini/hooks/inject-workflow-state.py:182-204 | .github/copilot/hooks/inject-workflow-state.py:182-204 | .kiro/hooks/inject-workflow-state.py:182-204 — 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) .claude/hooks/inject-workflow-state.py:227 — .claude/hooks/inject-workflow-state.py:227-254 | .codex/hooks/inject-workflow-state.py:227-254 | .gemini/hooks/inject-workflow-state.py:227-254 | .github/copilot/hooks/inject-workflow-state.py:227-254 | .kiro/hooks/inject-workflow-state.py:227-254 — 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) .claude/hooks/inject-workflow-state.py:260 — .claude/hooks/inject-workflow-state.py:260-279 | .codex/hooks/inject-workflow-state.py:260-279 | .gemini/hooks/inject-workflow-state.py:260-279 | .github/copilot/hooks/inject-workflow-state.py:260-279 | .kiro/hooks/inject-workflow-state.py:260-279 — 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) .claude/hooks/inject-workflow-state.py:289 — .claude/hooks/inject-workflow-state.py:289-303 | .codex/hooks/inject-workflow-state.py:289-303 | .gemini/hooks/inject-workflow-state.py:289-303 | .github/copilot/hooks/inject-workflow-state.py:289-303 | .kiro/hooks/inject-workflow-state.py:289-303 — 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) .claude/hooks/inject-workflow-state.py:311 — .claude/hooks/inject-workflow-state.py:311-340 | .codex/hooks/inject-workflow-state.py:311-340 | .gemini/hooks/inject-workflow-state.py:311-340 | .github/copilot/hooks/inject-workflow-state.py:311-340 | .kiro/hooks/inject-workflow-state.py:311-340 — 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) .claude/hooks/inject-workflow-state.py:344 — .claude/hooks/inject-workflow-state.py:344-404 | .codex/hooks/inject-workflow-state.py:344-404 | .gemini/hooks/inject-workflow-state.py:344-404 | .github/copilot/hooks/inject-workflow-state.py:344-404 | .kiro/hooks/inject-workflow-state.py:344-404 — 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.
D1 · Cyclomatic Complexity · session-start._build_compact_current_state (cyclomatic 16) · ×6
  • session-start._build_compact_current_state (cyclomatic 16) .claude/hooks/session-start.py:600 — session-start._build_compact_current_state has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • session-start._build_compact_current_state (cyclomatic 16) .codex/hooks/session-start.py:356 — session-start._build_compact_current_state has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • session-start._build_compact_current_state (cyclomatic 16) .cursor/hooks/session-start.py:600 — session-start._build_compact_current_state has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • session-start._build_compact_current_state (cyclomatic 16) .gemini/hooks/session-start.py:600 — session-start._build_compact_current_state has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • session-start._build_compact_current_state (cyclomatic 16) .github/copilot/hooks/session-start.py:361 — session-start._build_compact_current_state has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • session-start._build_compact_current_state (cyclomatic 16) .kiro/hooks/session-start.py:600 — session-start._build_compact_current_state 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.
D2 · Cognitive Complexity · session-start._build_compact_current_state (cognitive 23) · ×6
  • session-start._build_compact_current_state (cognitive 23) .claude/hooks/session-start.py:600 — session-start._build_compact_current_state has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 3 (6 pts), boolean chains 4, 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.
  • session-start._build_compact_current_state (cognitive 23) .codex/hooks/session-start.py:356 — session-start._build_compact_current_state has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 3 (6 pts), boolean chains 4, 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.
  • session-start._build_compact_current_state (cognitive 23) .cursor/hooks/session-start.py:600 — session-start._build_compact_current_state has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 3 (6 pts), boolean chains 4, 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.
  • session-start._build_compact_current_state (cognitive 23) .gemini/hooks/session-start.py:600 — session-start._build_compact_current_state has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 3 (6 pts), boolean chains 4, 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.
  • session-start._build_compact_current_state (cognitive 23) .github/copilot/hooks/session-start.py:361 — session-start._build_compact_current_state has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 3 (6 pts), boolean chains 4, 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.
  • session-start._build_compact_current_state (cognitive 23) .kiro/hooks/session-start.py:600 — session-start._build_compact_current_state has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 3 (6 pts), boolean chains 4, 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.
D30 · Dependency Vulnerabilities · Medium advisory (unmaintained) · ×6
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×6
  • Members sharing a duplicated core (4 members, 50+ identical tokens) .claude/hooks/session-start.py:269 — .claude/hooks/session-start.py:269-295 | .cursor/hooks/session-start.py:269-295 | .gemini/hooks/session-start.py:269-295 | .kiro/hooks/session-start.py:269-295 — 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) .claude/hooks/session-start.py:328 — .claude/hooks/session-start.py:328-417 | .cursor/hooks/session-start.py:328-417 | .gemini/hooks/session-start.py:328-417 | .kiro/hooks/session-start.py:328-417 — 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) .claude/hooks/session-start.py:421 — .claude/hooks/session-start.py:421-461 | .cursor/hooks/session-start.py:421-461 | .gemini/hooks/session-start.py:421-461 | .kiro/hooks/session-start.py:421-461 — 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) .claude/hooks/session-start.py:465 — .claude/hooks/session-start.py:465-507 | .cursor/hooks/session-start.py:465-507 | .gemini/hooks/session-start.py:465-507 | .kiro/hooks/session-start.py:465-507 — 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) .claude/hooks/session-start.py:517 — .claude/hooks/session-start.py:517-566 | .cursor/hooks/session-start.py:517-566 | .gemini/hooks/session-start.py:517-566 | .kiro/hooks/session-start.py:517-566 — 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) .claude/hooks/session-start.py:726 — .claude/hooks/session-start.py:726-818 | .cursor/hooks/session-start.py:726-818 | .gemini/hooks/session-start.py:726-818 | .kiro/hooks/session-start.py:726-818 — 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.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×6
  • Duplicated block (11 lines × 2) src-tauri/src/backup/mod.rs:1277 — src-tauri/src/backup/mod.rs:1277-1287 | src-tauri/src/commands/storage.rs:395-405 — 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) src-tauri/src/backup/mod.rs:1331 — src-tauri/src/backup/mod.rs:1331-1341 | src-tauri/src/backup/mod.rs:1429-1439 — 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) src-tauri/src/keyboard/windows.rs:79 — src-tauri/src/keyboard/windows.rs:79-89 | src-tauri/src/shortcut/win_v.rs:54-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.
  • Duplicated block (11 lines × 2) src-tauri/src/keyboard/windows.rs:202 — src-tauri/src/keyboard/windows.rs:202-212 | src-tauri/src/keyboard/windows.rs:244-254 — 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) .trellis/scripts/task.py:430 — .trellis/scripts/task.py:430-440 | .trellis/scripts/task.py:455-465 — 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) .codex/hooks/session-start.py:109 — .codex/hooks/session-start.py:109-119 | .github/copilot/hooks/session-start.py:114-124 — before extracting anything, compare `.codex/hooks/session-start.py` and `.github/copilot/hooks/session-start.py` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 408 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.
D2 · Cognitive Complexity · EcoPaste · ×5
  • EcoPaste::keyboard::windows::hook_proc (cognitive 76) src-tauri/src/keyboard/windows.rs:131 — EcoPaste::keyboard::windows::hook_proc has cognitive complexity 76 (threshold 15). Drivers by points: if/else 29 (71 pts), boolean chains 5 (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.
  • EcoPaste::run (cognitive 38) src-tauri/src/lib.rs:25 — EcoPaste::run has cognitive complexity 38 (threshold 15). Drivers by points: if/else 24 (35 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • EcoPaste::clipboard::ingest::build_item_with_settings (cognitive 22) src-tauri/src/clipboard/ingest.rs:193 — EcoPaste::clipboard::ingest::build_item_with_settings has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 1, match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • EcoPaste::clipboard::ingest::draft_from_text (cognitive 21) src-tauri/src/clipboard/ingest.rs:81 — EcoPaste::clipboard::ingest::draft_from_text has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 1 (3 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.
  • EcoPaste::window::show_window (cognitive 19) src-tauri/src/window/mod.rs:112 — EcoPaste::window::show_window has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (18 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.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×5
  • Duplicated block (5 lines × 2) src-tauri/src/clipboard/apps_registry.rs:350 — src-tauri/src/clipboard/apps_registry.rs:350-354 | src-tauri/src/clipboard/source.rs:78-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 both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) src-tauri/src/commands/clipboard.rs:835 — src-tauri/src/commands/clipboard.rs:835-839 | src-tauri/src/commands/clipboard.rs:928-932 — 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) src-tauri/src/menu/context_window.rs:157 — src-tauri/src/menu/context_window.rs:157-161 | src-tauri/src/menu/context_window.rs:196-200 — 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) src-tauri/src/window/position.rs:55 — src-tauri/src/window/position.rs:55-59 | src-tauri/src/window/position.rs:80-84 — 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) .codex/hooks/session-start.py:101 — .codex/hooks/session-start.py:101-105 | .github/copilot/hooks/session-start.py:106-110 — before extracting anything, compare `.codex/hooks/session-start.py` and `.github/copilot/hooks/session-start.py` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 408 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.
AC2 · Forms & labels · <Select> field component without a label · ×4
  • <Select> field component without a label src/components/LanguageSwitcher/index.tsx:120 — This UI-library field component has no label / aria-label / aria-labelledby / id / name — and neither does anything it renders — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Select> field component without a label src/pages/Preference/components/settingControls/ClipboardGroupSelectControl.tsx:93 — This UI-library field component has no label / aria-label / aria-labelledby / id / name — and neither does anything it renders — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Select> field component without a label src/pages/Preference/components/settingControls/SelectControls.tsx:33 — This UI-library field component has no label / aria-label / aria-labelledby / id / name — and neither does anything it renders — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Select> field component without a label src/pages/Preference/components/settingControls/SelectControls.tsx:65 — This UI-library field component has no label / aria-label / aria-labelledby / id / name — and neither does anything it renders — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
D1 · Cyclomatic Complexity · session-start._resolve_spec_scope (cyclomatic 20) · ×4
  • session-start._resolve_spec_scope (cyclomatic 20) .claude/hooks/session-start.py:510 — session-start._resolve_spec_scope 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.
  • session-start._resolve_spec_scope (cyclomatic 20) .cursor/hooks/session-start.py:510 — session-start._resolve_spec_scope 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.
  • session-start._resolve_spec_scope (cyclomatic 20) .gemini/hooks/session-start.py:510 — session-start._resolve_spec_scope 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.
  • session-start._resolve_spec_scope (cyclomatic 20) .kiro/hooks/session-start.py:510 — session-start._resolve_spec_scope has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · session-start._get_task_status (cyclomatic 19) · ×4
  • session-start._get_task_status (cyclomatic 19) .claude/hooks/session-start.py:327 — session-start._get_task_status has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • session-start._get_task_status (cyclomatic 19) .cursor/hooks/session-start.py:327 — session-start._get_task_status has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • session-start._get_task_status (cyclomatic 19) .gemini/hooks/session-start.py:327 — session-start._get_task_status has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • session-start._get_task_status (cyclomatic 19) .kiro/hooks/session-start.py:327 — session-start._get_task_status has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · session-start._resolve_spec_scope (cognitive 30) · ×4
  • session-start._resolve_spec_scope (cognitive 30) .claude/hooks/session-start.py:510 — session-start._resolve_spec_scope has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 7, 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.
  • session-start._resolve_spec_scope (cognitive 30) .cursor/hooks/session-start.py:510 — session-start._resolve_spec_scope has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 7, 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.
  • session-start._resolve_spec_scope (cognitive 30) .gemini/hooks/session-start.py:510 — session-start._resolve_spec_scope has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 7, 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.
  • session-start._resolve_spec_scope (cognitive 30) .kiro/hooks/session-start.py:510 — session-start._resolve_spec_scope has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 7, 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.
D2 · Cognitive Complexity · session-start._get_task_status (cognitive 23) · ×4
  • session-start._get_task_status (cognitive 23) .claude/hooks/session-start.py:327 — session-start._get_task_status has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 5, error handling 1 (2 pts), ternaries 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • session-start._get_task_status (cognitive 23) .cursor/hooks/session-start.py:327 — session-start._get_task_status has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 5, error handling 1 (2 pts), ternaries 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • session-start._get_task_status (cognitive 23) .gemini/hooks/session-start.py:327 — session-start._get_task_status has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 5, error handling 1 (2 pts), ternaries 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • session-start._get_task_status (cognitive 23) .kiro/hooks/session-start.py:327 — session-start._get_task_status has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 5, error handling 1 (2 pts), ternaries 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · session-start._collect_spec_index_paths (cognitive 19) · ×4
  • session-start._collect_spec_index_paths (cognitive 19) .claude/hooks/session-start.py:569 — session-start._collect_spec_index_paths has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • session-start._collect_spec_index_paths (cognitive 19) .cursor/hooks/session-start.py:569 — session-start._collect_spec_index_paths has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • session-start._collect_spec_index_paths (cognitive 19) .gemini/hooks/session-start.py:569 — session-start._collect_spec_index_paths has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • session-start._collect_spec_index_paths (cognitive 19) .kiro/hooks/session-start.py:569 — session-start._collect_spec_index_paths has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · session-start._load_trellis_config (cognitive 17) · ×4
  • session-start._load_trellis_config (cognitive 17) .claude/hooks/session-start.py:420 — session-start._load_trellis_config has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 2 (4 pts), boolean chains 2 (nesting depth added 8). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • session-start._load_trellis_config (cognitive 17) .cursor/hooks/session-start.py:420 — session-start._load_trellis_config has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 2 (4 pts), boolean chains 2 (nesting depth added 8). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • session-start._load_trellis_config (cognitive 17) .gemini/hooks/session-start.py:420 — session-start._load_trellis_config has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 2 (4 pts), boolean chains 2 (nesting depth added 8). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • session-start._load_trellis_config (cognitive 17) .kiro/hooks/session-start.py:420 — session-start._load_trellis_config has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 2 (4 pts), boolean chains 2 (nesting depth added 8). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×4
  • Duplicated block (6 lines × 2) src-tauri/src/settings/store.rs:32 — src-tauri/src/settings/store.rs:32-40 | src-tauri/src/settings/store.rs:113-118 — 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) src-tauri/src/autostart/macos.rs:26 — src-tauri/src/autostart/macos.rs:26-31 | src-tauri/src/autostart/windows.rs:35-40 — 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) src-tauri/src/clipboard/app_store.rs:54 — src-tauri/src/clipboard/app_store.rs:54-59 | src-tauri/src/clipboard/file_icon_store.rs:43-48 — before extracting anything, compare `src-tauri/src/clipboard/app_store.rs` and `src-tauri/src/clipboard/file_icon_store.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 33 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 (6 lines × 2) .codex/hooks/session-start.py:164 — .codex/hooks/session-start.py:164-169 | .github/copilot/hooks/session-start.py:169-174 — before extracting anything, compare `.codex/hooks/session-start.py` and `.github/copilot/hooks/session-start.py` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 408 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.
D1 · Cyclomatic Complexity · inject-subagent-context._extract_subagent_name (cyclomatic 18) · ×3
  • inject-subagent-context._extract_subagent_name (cyclomatic 18) .claude/hooks/inject-subagent-context.py:577 — inject-subagent-context._extract_subagent_name 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.
  • inject-subagent-context._extract_subagent_name (cyclomatic 18) .cursor/hooks/inject-subagent-context.py:577 — inject-subagent-context._extract_subagent_name 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.
  • inject-subagent-context._extract_subagent_name (cyclomatic 18) .kiro/hooks/inject-subagent-context.py:577 — inject-subagent-context._extract_subagent_name 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.
D15 · Churn × Complexity Hotspots · Hotspot · ×3
  • Hotspot: src/pages/Clipboard/components/List.tsx src/pages/Clipboard/components/List.tsx:86 — src/pages/Clipboard/components/List.tsx changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 150 in List.List at line 86. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-05-14..2026-08-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-05-14 12:05:51 +08:00' --until='2026-08-12 12:05:51 +08:00' --full-history --no-merges -- src/pages/Clipboard/components/List.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src-tauri/src/lib.rs src-tauri/src/lib.rs:25 — src-tauri/src/lib.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in EcoPaste::run at line 25. 4 of those changes were fix/bug commits, and the other 5 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-05-14..2026-08-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-05-14 12:05:51 +08:00' --until='2026-08-12 12:05:51 +08:00' --full-history --no-merges -- src-tauri/src/lib.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/pages/Preference/components/settingControls/ActionControl.tsx src/pages/Preference/components/settingControls/ActionControl.tsx:100 — src/pages/Preference/components/settingControls/ActionControl.tsx changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in ActionControl.ActionControl at line 100. 3 of those changes were fix/bug commits, and the other 3 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-05-14..2026-08-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-05-14 12:05:51 +08:00' --until='2026-08-12 12:05:51 +08:00' --full-history --no-merges -- src/pages/Preference/components/settingControls/ActionControl.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D2 · Cognitive Complexity · inject-subagent-context._extract_subagent_name (cognitive 30) · ×3
  • inject-subagent-context._extract_subagent_name (cognitive 30) .claude/hooks/inject-subagent-context.py:577 — inject-subagent-context._extract_subagent_name has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (28 pts), loops 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • inject-subagent-context._extract_subagent_name (cognitive 30) .cursor/hooks/inject-subagent-context.py:577 — inject-subagent-context._extract_subagent_name has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (28 pts), loops 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • inject-subagent-context._extract_subagent_name (cognitive 30) .kiro/hooks/inject-subagent-context.py:577 — inject-subagent-context._extract_subagent_name has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (28 pts), loops 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · inject-subagent-context.read_jsonl_entries (cognitive 17) · ×3
  • inject-subagent-context.read_jsonl_entries (cognitive 17) .claude/hooks/inject-subagent-context.py:190 — inject-subagent-context.read_jsonl_entries has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), error handling 2 (3 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • inject-subagent-context.read_jsonl_entries (cognitive 17) .cursor/hooks/inject-subagent-context.py:190 — inject-subagent-context.read_jsonl_entries has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), error handling 2 (3 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • inject-subagent-context.read_jsonl_entries (cognitive 17) .kiro/hooks/inject-subagent-context.py:190 — inject-subagent-context.read_jsonl_entries has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), error handling 2 (3 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · inject-subagent-context.main (cognitive 16) · ×3
  • inject-subagent-context.main (cognitive 16) .claude/hooks/inject-subagent-context.py:687 — inject-subagent-context.main has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (14 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.
  • inject-subagent-context.main (cognitive 16) .cursor/hooks/inject-subagent-context.py:687 — inject-subagent-context.main has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (14 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.
  • inject-subagent-context.main (cognitive 16) .kiro/hooks/inject-subagent-context.py:687 — inject-subagent-context.main has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (14 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.
D4 · Code Duplication · Duplicated block (7 lines × 6) · ×3
  • Duplicated block (7 lines × 6) .claude/hooks/session-start.py:61 — .claude/hooks/session-start.py:61-67 | .codex/hooks/session-start.py:83-89 | .cursor/hooks/session-start.py:61-67 | .gemini/hooks/session-start.py:61-67 | .github/copilot/hooks/session-start.py:93-99 | .kiro/hooks/session-start.py:61-67 — before extracting anything, compare `.claude/hooks/session-start.py` and `.codex/hooks/session-start.py` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 230 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 (7 lines × 6) .claude/hooks/session-start.py:178 — .claude/hooks/session-start.py:178-184 | .codex/hooks/session-start.py:313-319 | .cursor/hooks/session-start.py:178-184 | .gemini/hooks/session-start.py:178-184 | .github/copilot/hooks/session-start.py:318-324 | .kiro/hooks/session-start.py:178-184 — before extracting anything, compare `.claude/hooks/session-start.py` and `.codex/hooks/session-start.py` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 230 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) .claude/hooks/session-start.py:318 — .claude/hooks/session-start.py:318-324 | .codex/hooks/session-start.py:214-220 | .cursor/hooks/session-start.py:318-324 | .gemini/hooks/session-start.py:318-324 | .github/copilot/hooks/session-start.py:219-225 | .kiro/hooks/session-start.py:318-324 — before extracting anything, compare `.claude/hooks/session-start.py` and `.codex/hooks/session-start.py` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 230 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.
R10 · Code Duplication · Duplicated block with local edits (12 matched lines × 2 locations) · ×3
  • Duplicated block with local edits (12 matched lines × 2 locations) src/components/ShortcutRecorder/index.tsx:220 — src/components/ShortcutRecorder/index.tsx:220 · src/components/ShortcutRecorder/index.tsx:270 — the two spans are one implementation copied and then locally edited — 67 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (12 matched lines × 2 locations) src/pages/Clipboard/components/Group.tsx:136 — src/pages/Clipboard/components/Group.tsx:136 · src/pages/Clipboard/components/List.tsx:183 — the two spans are one implementation copied and then locally edited — 62 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (12 matched lines × 2 locations) src/pages/Preference/config/preferenceSchema.ts:908 — src/pages/Preference/config/preferenceSchema.ts:908 · src/pages/Preference/index.tsx:422 — the two spans are one implementation copied and then locally edited — 53 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
D1 · Cyclomatic Complexity · EcoPaste · ×2
  • EcoPaste::keyboard::windows::hook_proc (cyclomatic 32) src-tauri/src/keyboard/windows.rs:131 — EcoPaste::keyboard::windows::hook_proc 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.
  • EcoPaste::run (cyclomatic 26) src-tauri/src/lib.rs:25 — EcoPaste::run 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.
D2 · Cognitive Complexity · session-start._collect_spec_index_paths (cognitive 16) · ×2
  • session-start._collect_spec_index_paths (cognitive 16) .codex/hooks/session-start.py:329 — session-start._collect_spec_index_paths has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • session-start._collect_spec_index_paths (cognitive 16) .github/copilot/hooks/session-start.py:334 — session-start._collect_spec_index_paths has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D30 · Dependency Vulnerabilities · Medium CVE · ×2
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Medium vulnerability · ×2
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×2
  • Duplicated block (13 lines × 2) src-tauri/src/clipboard/apps_registry.rs:537 — src-tauri/src/clipboard/apps_registry.rs:537-549 | src-tauri/src/clipboard/source.rs:130-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.
  • Duplicated block (13 lines × 2) src-tauri/src/mouse/windows.rs:21 — src-tauri/src/mouse/windows.rs:21-33 | src-tauri/src/shortcut/win_v.rs:47-59 — 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.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×2
  • Duplicated block (9 lines × 2) src-tauri/src/window/state.rs:37 — src-tauri/src/window/state.rs:37-45 | src-tauri/src/window/state.rs:108-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 (9 lines × 2) src-tauri/src/admin.rs:196 — src-tauri/src/admin.rs:196-204 | src-tauri/src/admin.rs:281-289 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×2
  • Duplicated block (8 lines × 2) src-tauri/src/update.rs:95 — src-tauri/src/update.rs:95-102 | src-tauri/src/update.rs:114-121 — 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) .codex/hooks/session-start.py:153 — .codex/hooks/session-start.py:153-160 | .github/copilot/hooks/session-start.py:158-165 — before extracting anything, compare `.codex/hooks/session-start.py` and `.github/copilot/hooks/session-start.py` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 408 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.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×2
  • Duplicated block (8 lines × 3) src-tauri/src/clipboard/app_store.rs:44 — src-tauri/src/clipboard/app_store.rs:44-51 | src-tauri/src/clipboard/file_icon_store.rs:33-40 | src-tauri/src/clipboard/storage.rs:72-79 — before extracting anything, compare `src-tauri/src/clipboard/app_store.rs` and `src-tauri/src/clipboard/file_icon_store.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 33 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 (8 lines × 3) .claude/hooks/inject-subagent-context.py:486 — .claude/hooks/inject-subagent-context.py:486-493 | .cursor/hooks/inject-subagent-context.py:486-493 | .kiro/hooks/inject-subagent-context.py:486-493 — before extracting anything, compare `.claude/hooks/inject-subagent-context.py` and `.cursor/hooks/inject-subagent-context.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 436 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.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×2
  • Duplicated block (12 lines × 3) src-tauri/src/backup/mod.rs:1089 — src-tauri/src/backup/mod.rs:1089-1100 | src-tauri/src/backup/mod.rs:1126-1137 | src-tauri/src/backup/mod.rs:1155-1166 — 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) .claude/hooks/inject-subagent-context.py:68 — .claude/hooks/inject-subagent-context.py:68-79 | .cursor/hooks/inject-subagent-context.py:68-79 | .kiro/hooks/inject-subagent-context.py:68-79 — before extracting anything, compare `.claude/hooks/inject-subagent-context.py` and `.cursor/hooks/inject-subagent-context.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 436 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.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×2
  • Duplicated block (19 lines × 2) .codex/hooks/session-start.py:173 — .codex/hooks/session-start.py:173-191 | .github/copilot/hooks/session-start.py:178-196 — before extracting anything, compare `.codex/hooks/session-start.py` and `.github/copilot/hooks/session-start.py` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 408 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 × 2) .trellis/scripts/common/task_store.py:663 — .trellis/scripts/common/task_store.py:663-681 | .trellis/scripts/common/task_store.py:729-747 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (15 lines × 6) · ×2
  • Duplicated block (15 lines × 6) .claude/hooks/session-start.py:160 — .claude/hooks/session-start.py:160-174 | .codex/hooks/session-start.py:295-309 | .cursor/hooks/session-start.py:160-174 | .gemini/hooks/session-start.py:160-174 | .github/copilot/hooks/session-start.py:300-314 | .kiro/hooks/session-start.py:160-174 — before extracting anything, compare `.claude/hooks/session-start.py` and `.codex/hooks/session-start.py` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 230 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 × 6) .claude/hooks/session-start.py:300 — .claude/hooks/session-start.py:300-314 | .codex/hooks/session-start.py:196-210 | .cursor/hooks/session-start.py:300-314 | .gemini/hooks/session-start.py:300-314 | .github/copilot/hooks/session-start.py:201-215 | .kiro/hooks/session-start.py:300-314 — before extracting anything, compare `.claude/hooks/session-start.py` and `.codex/hooks/session-start.py` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 230 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.
R10 · Code Duplication · Duplicated block (13 lines × 2 locations) · ×2
  • Duplicated block (13 lines × 2 locations) src/components/Dropdown/index.tsx:83 — src/components/Dropdown/index.tsx:83 · src/components/Popover/index.tsx:20 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (13 lines × 2 locations) src/pages/Preview/components/PreviewContent.tsx:107 — src/pages/Preview/components/PreviewContent.tsx:107 · src/pages/Preview/components/PreviewContent.tsx: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.
R10 · Code Duplication · Duplicated block with local edits (11 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (11 matched lines × 2 locations) src/pages/ContextMenu/index.tsx:242 — src/pages/ContextMenu/index.tsx:242 · src/pages/Preview/index.tsx:109 — the two spans are one implementation copied and then locally edited — 51 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (11 matched lines × 2 locations) src/utils/shortcut.ts:207 — src/utils/shortcut.ts:207 · src/utils/shortcut.ts:233 — the two spans are one implementation copied and then locally edited — 56 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 (11 lines × 2 locations) · ×2
  • Duplicated block (11 lines × 2 locations) src/pages/Preference/utils/storageUsage.ts:11 — src/pages/Preference/utils/storageUsage.ts:11 · src/pages/Preview/components/PreviewContent.tsx:380 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
  • Duplicated block (11 lines × 2 locations) src/pages/Update/index.tsx:117 — src/pages/Update/index.tsx:117 · src/pages/Update/index.tsx:130 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (8 lines × 2 locations) · ×2
  • Duplicated block (8 lines × 2 locations) src/pages/Preference/components/settingControls/NumberControl.tsx:11 — src/pages/Preference/components/settingControls/NumberControl.tsx:11 · src/pages/Preference/components/settingControls/TextControl.tsx:9 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
  • Duplicated block (8 lines × 2 locations) src/pages/Preference/components/settingControls/SelectControls.tsx:18 — src/pages/Preference/components/settingControls/SelectControls.tsx:18 · src/pages/Preference/components/settingControls/SelectControls.tsx:50 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
AC2 · Forms & labels · <fieldset> without a <legend> · ×1
  • <fieldset> without a <legend> src/components/ShortcutRecorder/index.tsx:314 — A fieldset groups related controls but has no <legend> to name the group. Add a <legend> as its first child — or, if the group already has a visible caption beside it (or the fieldset is there only to disable its subtree and carries no group box), point aria-labelledby at that caption's id instead, which names the group without rendering a second one.
AC2 · Forms & labels · <SearchInput> field component without a label · ×1
  • <SearchInput> field component without a label src/pages/Clipboard/components/Header.tsx:189 — This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
AC7 · A11y enforcement · Accessibility enforcement below the top rung · ×1
  • Accessibility enforcement below the top rung — No accessibility enforcement found — your Biome config enables no a11y rules and there's no axe/pa11y/Lighthouse in tests or CI. Start by turning on Biome's own a11y rule group to catch issues at author time. What was searched, so you can tell an absence from a miss: the 80 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
D1 · Cyclomatic Complexity · List.List (cyclomatic 150) · ×1
  • List.List (cyclomatic 150) src/pages/Clipboard/components/List.tsx:86 — List.List has cyclomatic complexity 150 (threshold 15). Of this number, 24 points are the body's own statements and 126 belong to 22 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useClipboardPreviewController.useClipboardPreviewController (cyclomatic 61) · ×1
  • useClipboardPreviewController.useClipboardPreviewController (cyclomatic 61) src/pages/Clipboard/hooks/useClipboardPreviewController.ts:46 — useClipboardPreviewController.useClipboardPreviewController has cyclomatic complexity 61 (threshold 15). Most of this is not in the body itself: 14 of the 61 points are its own statements and the rest belongs to 16 function literals inside it that branch (lines 348, 159, 72, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · Group.Group (cyclomatic 43) · ×1
  • Group.Group (cyclomatic 43) src/pages/Clipboard/components/Group.tsx:109 — Group.Group has cyclomatic complexity 43 (threshold 15). Most of this is not in the body itself: 3 of the 43 points are its own statements and the rest belongs to 16 function literals inside it that branch (lines 261, 223, 369, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · index.Update (cyclomatic 35) · ×1
  • index.Update (cyclomatic 35) src/pages/Update/index.tsx:43 — index.Update has cyclomatic complexity 35 (threshold 15). Of this number, 20 points are the body's own statements and 15 belong to 7 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.ShortcutRecorder (cyclomatic 34) · ×1
  • index.ShortcutRecorder (cyclomatic 34) src/components/ShortcutRecorder/index.tsx:43 — index.ShortcutRecorder has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 8 of the 34 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 240, 216, 287, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · (anonymous) · ×1
  • (anonymous)::tool.execute.before (cyclomatic 32) .opencode/plugins/inject-subagent-context.js:380 — (anonymous)::tool.execute.before has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · buildSessionContext (cyclomatic 31) · ×1
  • buildSessionContext (cyclomatic 31) .opencode/lib/session-utils.js:236 — buildSessionContext has cyclomatic complexity 31 (threshold 15). Of this number, 28 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · cli_adapter.detect_platform (cyclomatic 30) · ×1
  • cli_adapter.detect_platform (cyclomatic 30) .trellis/scripts/common/cli_adapter.py:688 — cli_adapter.detect_platform has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · task_store.cmd_create (cyclomatic 28) · ×1
  • task_store.cmd_create (cyclomatic 28) .trellis/scripts/common/task_store.py:196 — task_store.cmd_create has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.Preference (cyclomatic 28) · ×1
  • index.Preference (cyclomatic 28) src/pages/Preference/index.tsx:70 — index.Preference has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 7 of the 28 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 203, 155, 298, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · ActionControl.ActionControl (cyclomatic 27) · ×1
  • ActionControl.ActionControl (cyclomatic 27) src/pages/Preference/components/settingControls/ActionControl.tsx:100 — ActionControl.ActionControl has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 11 of the 27 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 323, 270, 160). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · BackupImportModal.BackupImportModal (cyclomatic 26) · ×1
  • BackupImportModal.BackupImportModal (cyclomatic 26) src/pages/Preference/components/BackupImportModal.tsx:31 — BackupImportModal.BackupImportModal has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 12 of the 26 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 58, 96, 125, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · useClipboardItems.useClipboardItems (cyclomatic 25) · ×1
  • useClipboardItems.useClipboardItems (cyclomatic 25) src/hooks/useClipboardItems.ts:28 — useClipboardItems.useClipboardItems has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 2 of the 25 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 80, 261, 239, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · BackupExportModal.BackupExportModal (cyclomatic 25) · ×1
  • BackupExportModal.BackupExportModal (cyclomatic 25) src/pages/Preference/components/BackupExportModal.tsx:32 — BackupExportModal.BackupExportModal has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 11 of the 25 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 60, 87, 142, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · PreferenceSettingControl.PreferenceSettingControl (cyclomatic 24) · ×1
  • PreferenceSettingControl.PreferenceSettingControl (cyclomatic 24) src/pages/Preference/components/settingControls/PreferenceSettingControl.tsx:50 — PreferenceSettingControl.PreferenceSettingControl has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · CLIAdapter.get_commands_path (cyclomatic 22) · ×1
  • CLIAdapter.get_commands_path (cyclomatic 22) .trellis/scripts/common/cli_adapter.py:163 — CLIAdapter.get_commands_path has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PreferenceSection.resolveSectionVisual (cyclomatic 22) · ×1
  • PreferenceSection.resolveSectionVisual (cyclomatic 22) src/pages/Preference/components/PreferenceSection.tsx:136 — PreferenceSection.resolveSectionVisual has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · add_session.update_index (cyclomatic 21) · ×1
  • add_session.update_index (cyclomatic 21) .trellis/scripts/add_session.py:204 — add_session.update_index has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CLIAdapter.build_run_command (cyclomatic 20) · ×1
  • CLIAdapter.build_run_command (cyclomatic 20) .trellis/scripts/common/cli_adapter.py:321 — CLIAdapter.build_run_command has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · session_context.get_context_text (cyclomatic 18) · ×1
  • session_context.get_context_text (cyclomatic 18) .trellis/scripts/common/session_context.py:507 — session_context.get_context_text has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PreferenceSettingRow.PreferenceSettingRow (cyclomatic 18) · ×1
  • PreferenceSettingRow.PreferenceSettingRow (cyclomatic 18) src/pages/Preference/components/PreferenceSettingRow.tsx:42 — PreferenceSettingRow.PreferenceSettingRow has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ClipboardMenuAction · ×1
  • ClipboardMenuAction::label (cyclomatic 17) src-tauri/src/menu/clipboard_item.rs:47 — ClipboardMenuAction::label has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 17) · ×1
  • (anonymous) (cyclomatic 17) .opencode/plugins/session-start.js:22 — (anonymous) has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 3 function items inside it that branch (chat.message, event, chat.message::(anonymous)). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · resolveSpecScope (cyclomatic 17) · ×1
  • resolveSpecScope (cyclomatic 17) .opencode/lib/session-utils.js:202 — resolveSpecScope has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · packages_context._resolve_scope_set (cyclomatic 16) · ×1
  • packages_context._resolve_scope_set (cyclomatic 16) .trellis/scripts/common/packages_context.py:53 — packages_context._resolve_scope_set has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PermissionControl.PermissionControl (cyclomatic 16) · ×1
  • PermissionControl.PermissionControl (cyclomatic 16) src/pages/Preference/components/settingControls/PermissionControl.tsx:38 — PermissionControl.PermissionControl has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 101, 50, 130, …). 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.
D15 · Churn × Complexity Hotspots · Repeated repair · ×1
  • Repeated repair: src-tauri/src/commands/onboarding.rs src-tauri/src/commands/onboarding.rs:139 — src-tauri/src/commands/onboarding.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is EcoPaste::commands::onboarding::import_legacy_data at line 139), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: correct timezone offset for legacy data import (#1338)”; “fix: skip invalid legacy import rows (#1326)”; “fix: improve legacy import detection (#1289)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-05-14..2026-08-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-05-14 12:05:51 +08:00' --until='2026-08-12 12:05:51 +08:00' --full-history --no-merges -- src-tauri/src/commands/onboarding.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D2 · Cognitive Complexity · List.List (cognitive 132) · ×1
  • List.List (cognitive 132) src/pages/Clipboard/components/List.tsx:86 — List.List has cognitive complexity 132 (threshold 15). Drivers by points: if/else 84 (105 pts), boolean chains 18, ternaries 7, match/switch 2 (nesting depth added 21). Of this number, 23 points are the body's own statements and 109 belong to 22 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · buildSessionContext (cognitive 65) · ×1
  • buildSessionContext (cognitive 65) .opencode/lib/session-utils.js:236 — buildSessionContext has cognitive complexity 65 (threshold 15). Drivers by points: if/else 18 (37 pts), error handling 4 (12 pts), loops 5 (12 pts), boolean chains 3, ternaries 1 (nesting depth added 34). Of this number, 57 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useClipboardPreviewController.useClipboardPreviewController (cognitive 56) · ×1
  • useClipboardPreviewController.useClipboardPreviewController (cognitive 56) src/pages/Clipboard/hooks/useClipboardPreviewController.ts:46 — useClipboardPreviewController.useClipboardPreviewController has cognitive complexity 56 (threshold 15). Drivers by points: if/else 43 (46 pts), boolean chains 9, error handling 1 (nesting depth added 3). Most of this is not in the body itself: 13 of the 56 points are its own statements and the rest belongs to 16 function literals inside it that branch (lines 348, 159, 72, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · task_store.cmd_create (cognitive 44) · ×1
  • task_store.cmd_create (cognitive 44) .trellis/scripts/common/task_store.py:196 — task_store.cmd_create has cognitive complexity 44 (threshold 15). Drivers by points: if/else 21 (32 pts), boolean chains 4, error handling 2 (3 pts), ternaries 1 (3 pts), loops 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) · ×1
  • (anonymous)::tool.execute.before (cognitive 43) .opencode/plugins/inject-subagent-context.js:380 — (anonymous)::tool.execute.before has cognitive complexity 43 (threshold 15). Drivers by points: if/else 19 (32 pts), boolean chains 7, ternaries 1 (2 pts), error handling 1, match/switch 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Group.Group (cognitive 40) · ×1
  • Group.Group (cognitive 40) src/pages/Clipboard/components/Group.tsx:109 — Group.Group has cognitive complexity 40 (threshold 15). Drivers by points: if/else 23, ternaries 7 (9 pts), boolean chains 8 (nesting depth added 2). Most of this is not in the body itself: 2 of the 40 points are its own statements and the rest belongs to 16 function literals inside it that branch (lines 261, 223, 369, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · task_store.cmd_archive (cognitive 39) · ×1
  • task_store.cmd_archive (cognitive 39) .trellis/scripts/common/task_store.py:376 — task_store.cmd_archive has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (32 pts), loops 2 (6 pts), boolean chains 1 (nesting depth added 25). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · add_session.update_index (cognitive 37) · ×1
  • add_session.update_index (cognitive 37) .trellis/scripts/add_session.py:204 — add_session.update_index has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (32 pts), boolean chains 3, loops 1, ternaries 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.Update (cognitive 36) · ×1
  • index.Update (cognitive 36) src/pages/Update/index.tsx:43 — index.Update has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 13 (15 pts), if/else 9, boolean chains 7, error handling 5 (nesting depth added 2). Of this number, 21 points are the body's own statements and 15 belong to 7 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · CLIAdapter.get_commands_path (cognitive 33) · ×1
  • CLIAdapter.get_commands_path (cognitive 33) .trellis/scripts/common/cli_adapter.py:163 — CLIAdapter.get_commands_path has cognitive complexity 33 (threshold 15). Drivers by points: if/else 16 (28 pts), boolean chains 5 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cli_adapter.detect_platform (cognitive 33) · ×1
  • cli_adapter.detect_platform (cognitive 33) .trellis/scripts/common/cli_adapter.py:688 — cli_adapter.detect_platform has cognitive complexity 33 (threshold 15). Drivers by points: if/else 19 (21 pts), boolean chains 8, error handling 1 (2 pts), loops 1 (2 pts) (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.
D2 · Cognitive Complexity · index.ShortcutRecorder (cognitive 33) · ×1
  • index.ShortcutRecorder (cognitive 33) src/components/ShortcutRecorder/index.tsx:43 — index.ShortcutRecorder has cognitive complexity 33 (threshold 15). Drivers by points: if/else 23, ternaries 4 (5 pts), boolean chains 4, error handling 1 (nesting depth added 1). Most of this is not in the body itself: 7 of the 33 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 240, 216, 287, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · useClipboardItems.useClipboardItems (cognitive 31) · ×1
  • useClipboardItems.useClipboardItems (cognitive 31) src/hooks/useClipboardItems.ts:28 — useClipboardItems.useClipboardItems has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 3, loops 3, ternaries 2 (3 pts), error handling 1 (nesting depth added 7). Most of this is not in the body itself: 1 of the 31 points is its own statement and the rest belongs to 8 function literals inside it that branch (lines 80, 261, 239, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · index.Preference (cognitive 29) · ×1
  • index.Preference (cognitive 29) src/pages/Preference/index.tsx:70 — index.Preference has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14, ternaries 7 (9 pts), boolean chains 3, error handling 3 (nesting depth added 2). Most of this is not in the body itself: 8 of the 29 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 203, 155, 298, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · config._parse_yaml_block (cognitive 27) · ×1
  • config._parse_yaml_block (cognitive 27) .trellis/scripts/common/config.py:89 — config._parse_yaml_block has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (25 pts), boolean chains 1, loops 1 (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · session_context.get_context_text (cognitive 27) · ×1
  • session_context.get_context_text (cognitive 27) .trellis/scripts/common/session_context.py:507 — session_context.get_context_text has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (22 pts), loops 2, ternaries 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.
D2 · Cognitive Complexity · trellis_config._parse_yaml_block (cognitive 27) · ×1
  • trellis_config._parse_yaml_block (cognitive 27) .trellis/scripts/common/trellis_config.py:55 — trellis_config._parse_yaml_block has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (25 pts), boolean chains 1, loops 1 (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · task.cmd_start (cognitive 26) · ×1
  • task.cmd_start (cognitive 26) .trellis/scripts/task.py:70 — task.cmd_start has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 2, error handling 1 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · safe_commit.safe_trellis_paths_to_add (cognitive 25) · ×1
  • safe_commit.safe_trellis_paths_to_add (cognitive 25) .trellis/scripts/common/safe_commit.py:61 — safe_commit.safe_trellis_paths_to_add has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (21 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.
D2 · Cognitive Complexity · ActionControl.ActionControl (cognitive 25) · ×1
  • ActionControl.ActionControl (cognitive 25) src/pages/Preference/components/settingControls/ActionControl.tsx:100 — ActionControl.ActionControl has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15, boolean chains 6, ternaries 3, error handling 1. Most of this is not in the body itself: 9 of the 25 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 323, 270, 160). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · ClipboardReader · ×1
  • ClipboardReader::read_with_capture (cognitive 24) src-tauri/src/clipboard/read.rs:31 — ClipboardReader::read_with_capture has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (21 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · getResearchContext (cognitive 24) · ×1
  • getResearchContext (cognitive 24) .opencode/plugins/inject-subagent-context.js:90 — getResearchContext has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 2 (7 pts), error handling 2 (6 pts), boolean chains 2 (nesting depth added 14). Of this number, 22 points are the body's own statements and 2 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · resolveSpecScope (cognitive 24) · ×1
  • resolveSpecScope (cognitive 24) .opencode/lib/session-utils.js:202 — resolveSpecScope has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BackupImportModal.BackupImportModal (cognitive 23) · ×1
  • BackupImportModal.BackupImportModal (cognitive 23) src/pages/Preference/components/BackupImportModal.tsx:31 — BackupImportModal.BackupImportModal has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 8, ternaries 4, error handling 1 (nesting depth added 1). Most of this is not in the body itself: 10 of the 23 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 58, 125, 76, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · packages_context.get_context_packages_text (cognitive 22) · ×1
  • packages_context.get_context_packages_text (cognitive 22) .trellis/scripts/common/packages_context.py:157 — packages_context.get_context_packages_text has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 3 (6 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.
D2 · Cognitive Complexity · BackupExportModal.BackupExportModal (cognitive 22) · ×1
  • BackupExportModal.BackupExportModal (cognitive 22) src/pages/Preference/components/BackupExportModal.tsx:32 — BackupExportModal.BackupExportModal has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 8, ternaries 2, error handling 1 (nesting depth added 2). Most of this is not in the body itself: 8 of the 22 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 60, 142, 78, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · add_session.main (cognitive 21) · ×1
  • add_session.main (cognitive 21) .trellis/scripts/add_session.py:499 — add_session.main has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 3 (6 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · packages_context._resolve_scope_set (cognitive 21) · ×1
  • packages_context._resolve_scope_set (cognitive 21) .trellis/scripts/common/packages_context.py:53 — packages_context._resolve_scope_set has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 5 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · task_context.cmd_list_context (cognitive 21) · ×1
  • task_context.cmd_list_context (cognitive 21) .trellis/scripts/common/task_context.py:172 — task_context.cmd_list_context has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), error handling 1 (3 pts), loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · task.cmd_list_archive (cognitive 20) · ×1
  • task.cmd_list_archive (cognitive 20) .trellis/scripts/task.py:268 — task.cmd_list_archive has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 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.
D2 · Cognitive Complexity · PreferenceSection.resolveSectionVisual (cognitive 20) · ×1
  • PreferenceSection.resolveSectionVisual (cognitive 20) src/pages/Preference/components/PreferenceSection.tsx:136 — PreferenceSection.resolveSectionVisual has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17, boolean chains 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · workflow_phase.filter_platform (cognitive 19) · ×1
  • workflow_phase.filter_platform (cognitive 19) .trellis/scripts/common/workflow_phase.py:171 — workflow_phase.filter_platform has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PreferenceSettingRow.PreferenceSettingRow (cognitive 19) · ×1
  • PreferenceSettingRow.PreferenceSettingRow (cognitive 19) src/pages/Preference/components/PreferenceSettingRow.tsx:42 — PreferenceSettingRow.PreferenceSettingRow has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 15 (17 pts), boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · active_task._lookup_env_context_key (cognitive 18) · ×1
  • active_task._lookup_env_context_key (cognitive 18) .trellis/scripts/common/active_task.py:218 — active_task._lookup_env_context_key has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 6 (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.
D2 · Cognitive Complexity · git_context.main (cognitive 18) · ×1
  • git_context.main (cognitive 18) .trellis/scripts/common/git_context.py:46 — git_context.main has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (16 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.
D2 · Cognitive Complexity · (anonymous) (cognitive 18) · ×1
  • (anonymous) (cognitive 18) .opencode/plugins/session-start.js:22 — (anonymous) has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8, boolean chains 6, error handling 2, ternaries 1 (2 pts) (nesting depth added 1). Most of this is not in the body itself: 0 of the 18 points are its own statements and the rest belongs to 3 function items inside it that branch (chat.message, event, chat.message::(anonymous)). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · add_session._auto_commit_workspace (cognitive 17) · ×1
  • add_session._auto_commit_workspace (cognitive 17) .trellis/scripts/add_session.py:323 — add_session._auto_commit_workspace has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · active_task.resolve_context_key (cognitive 16) · ×1
  • active_task.resolve_context_key (cognitive 16) .trellis/scripts/common/active_task.py:382 — active_task.resolve_context_key has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 5, 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.
D2 · Cognitive Complexity · PermissionControl.PermissionControl (cognitive 16) · ×1
  • PermissionControl.PermissionControl (cognitive 16) src/pages/Preference/components/settingControls/PermissionControl.tsx:38 — PermissionControl.PermissionControl has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), error handling 4, boolean chains 2, ternaries 1 (nesting depth added 1). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 101, 50, 130, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · (anonymous) (cognitive 16) · ×1
  • (anonymous) (cognitive 16) .opencode/plugins/inject-workflow-state.js:114 — (anonymous) has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6, ternaries 4 (5 pts), boolean chains 4, error handling 1 (nesting depth added 1). Most of this is not in the body itself: 0 of the 16 points are its own statements and the rest belongs to 2 function items inside it that branch (chat.message, chat.message::(anonymous)). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · readJsonlWithFiles (cognitive 16) · ×1
  • readJsonlWithFiles (cognitive 16) .opencode/lib/trellis-context.js:356 — readJsonlWithFiles has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D3 · God Classes · ClassTooLong · ×1
  • ClassTooLong: List src/pages/Clipboard/components/List.tsx:1 — ClassTooLong — 654 significant lines (blank, comment-only and punctuation-only lines excluded), 14 methods. The bar is 400 significant lines; this is 254 over it, 1.64× 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.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member family (6 members, 43 shared lines) · ×1
  • Near-duplicate member family (6 members, 43 shared lines) .claude/hooks/session-start.py:23 — .claude/hooks/session-start.py:23-67 | .codex/hooks/session-start.py:45-89 | .cursor/hooks/session-start.py:23-67 | .gemini/hooks/session-start.py:23-67 | .github/copilot/hooks/session-start.py:55-99 | .kiro/hooks/session-start.py:23-67 — These 6 members are variants of one another: a block of 43 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 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 (12 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (12 members, 50+ identical tokens) .claude/hooks/inject-subagent-context.py:83 — .claude/hooks/inject-subagent-context.py:83-113 | .claude/hooks/inject-workflow-state.py:96-131 | .claude/hooks/session-start.py:188-223 | .codex/hooks/inject-workflow-state.py:96-131 | .cursor/hooks/inject-subagent-context.py:83-113 | .cursor/hooks/session-start.py:188-223 | .gemini/hooks/inject-workflow-state.py:96-131 | .gemini/hooks/session-start.py:188-223 | .github/copilot/hooks/inject-workflow-state.py:96-131 | .kiro/hooks/inject-subagent-context.py:83-113 | .kiro/hooks/inject-workflow-state.py:96-131 | .kiro/hooks/session-start.py:188-223 — These 12 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 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.
D4 · Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (8 members, 50+ identical tokens) .claude/hooks/session-start.py:299 — .claude/hooks/session-start.py:299-314 | .codex/hooks/session-start.py:195-210 | .cursor/hooks/session-start.py:299-314 | .gemini/hooks/session-start.py:299-314 | .github/copilot/hooks/session-start.py:200-215 | .kiro/hooks/session-start.py:299-314 | .trellis/scripts/common/active_task.py:103-119 | .trellis/scripts/common/paths.py:211-232 — 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.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×1
  • Duplicated block (10 lines × 2) src-tauri/src/window/lifecycle/mod.rs:542 — src-tauri/src/window/lifecycle/mod.rs:542-551 | src-tauri/src/window/lifecycle/mod.rs:613-622 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (6–7 lines × 2) · ×1
  • Duplicated block (6–7 lines × 2) src-tauri/src/commands/clipboard.rs:374 — src-tauri/src/commands/clipboard.rs:374-380 | src-tauri/src/commands/clipboard.rs:410-415 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×1
  • Duplicated block (5 lines × 3) src-tauri/src/clipboard/app_store.rs:73 — src-tauri/src/clipboard/app_store.rs:73-77 | src-tauri/src/clipboard/file_icon_store.rs:62-66 | src-tauri/src/clipboard/storage.rs:176-180 — before extracting anything, compare `src-tauri/src/clipboard/app_store.rs` and `src-tauri/src/clipboard/file_icon_store.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×1
  • Duplicated block (7 lines × 2) src-tauri/src/clipboard/app_store.rs:28 — src-tauri/src/clipboard/app_store.rs:28-34 | src-tauri/src/clipboard/file_icon_store.rs:24-30 — before extracting anything, compare `src-tauri/src/clipboard/app_store.rs` and `src-tauri/src/clipboard/file_icon_store.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×1
  • Duplicated block (12 lines × 2) src-tauri/src/window/mod.rs:291 — src-tauri/src/window/mod.rs:291-302 | src-tauri/src/window/mod.rs:327-338 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×1
  • Duplicated block (7 lines × 3) src-tauri/src/clipboard/app_store.rs:80 — src-tauri/src/clipboard/app_store.rs:80-86 | src-tauri/src/clipboard/file_icon_store.rs:69-75 | src-tauri/src/clipboard/storage.rs:184-190 — before extracting anything, compare `src-tauri/src/clipboard/app_store.rs` and `src-tauri/src/clipboard/file_icon_store.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (93 lines × 4) · ×1
  • Duplicated block (93 lines × 4) .claude/hooks/session-start.py:726 — .claude/hooks/session-start.py:726-818 | .cursor/hooks/session-start.py:726-818 | .gemini/hooks/session-start.py:726-818 | .kiro/hooks/session-start.py:726-818 — before extracting anything, compare `.claude/hooks/session-start.py` and `.cursor/hooks/session-start.py` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 691 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 `.claude/hooks/session-start.py:726` 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.
D4 · Code Duplication · Duplicated block (90 lines × 4) · ×1
  • Duplicated block (90 lines × 4) .claude/hooks/session-start.py:328 — .claude/hooks/session-start.py:328-417 | .cursor/hooks/session-start.py:328-417 | .gemini/hooks/session-start.py:328-417 | .kiro/hooks/session-start.py:328-417 — before extracting anything, compare `.claude/hooks/session-start.py` and `.cursor/hooks/session-start.py` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 691 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.
D4 · Code Duplication · Duplicated block (80 lines × 3) · ×1
  • Duplicated block (80 lines × 3) .claude/hooks/inject-subagent-context.py:688 — .claude/hooks/inject-subagent-context.py:688-767 | .cursor/hooks/inject-subagent-context.py:688-767 | .kiro/hooks/inject-subagent-context.py:688-767 — before extracting anything, compare `.claude/hooks/inject-subagent-context.py` and `.cursor/hooks/inject-subagent-context.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 436 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.
D4 · Code Duplication · Duplicated block (68 lines × 2) · ×1
  • Duplicated block (68 lines × 2) .codex/hooks/session-start.py:224 — .codex/hooks/session-start.py:224-291 | .github/copilot/hooks/session-start.py:229-296 — before extracting anything, compare `.codex/hooks/session-start.py` and `.github/copilot/hooks/session-start.py` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 408 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.
D4 · Code Duplication · Duplicated block (66 lines × 3) · ×1
  • Duplicated block (66 lines × 3) .claude/hooks/inject-subagent-context.py:191 — .claude/hooks/inject-subagent-context.py:191-256 | .cursor/hooks/inject-subagent-context.py:191-256 | .kiro/hooks/inject-subagent-context.py:191-256 — before extracting anything, compare `.claude/hooks/inject-subagent-context.py` and `.cursor/hooks/inject-subagent-context.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 436 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.
D4 · Code Duplication · Duplicated block (61 lines × 5) · ×1
  • Duplicated block (61 lines × 5) .claude/hooks/inject-workflow-state.py:344 — .claude/hooks/inject-workflow-state.py:344-404 | .codex/hooks/inject-workflow-state.py:344-404 | .gemini/hooks/inject-workflow-state.py:344-404 | .github/copilot/hooks/inject-workflow-state.py:344-404 | .kiro/hooks/inject-workflow-state.py:344-404 — before extracting anything, compare `.claude/hooks/inject-workflow-state.py` and `.codex/hooks/inject-workflow-state.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 265 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.
D4 · Code Duplication · Duplicated block (59–61 lines × 2) · ×1
  • Duplicated block (59–61 lines × 2) .codex/hooks/session-start.py:469 — .codex/hooks/session-start.py:469-529 | .github/copilot/hooks/session-start.py:474-532 — before extracting anything, compare `.codex/hooks/session-start.py` and `.github/copilot/hooks/session-start.py` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 408 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 `.codex/hooks/session-start.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.
D4 · Code Duplication · Duplicated block (51–60 lines × 2) · ×1
  • Duplicated block (51–60 lines × 2) .trellis/scripts/common/config.py:93 — .trellis/scripts/common/config.py:93-152 | .trellis/scripts/common/trellis_config.py:58-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 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.
D4 · Code Duplication · Duplicated block (53 lines × 6) · ×1
  • Duplicated block (53 lines × 6) .claude/hooks/session-start.py:605 — .claude/hooks/session-start.py:605-657 | .codex/hooks/session-start.py:361-413 | .cursor/hooks/session-start.py:605-657 | .gemini/hooks/session-start.py:605-657 | .github/copilot/hooks/session-start.py:366-418 | .kiro/hooks/session-start.py:605-657 — before extracting anything, compare `.claude/hooks/session-start.py` and `.codex/hooks/session-start.py` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 230 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.
D4 · Code Duplication · Duplicated block (51 lines × 3) · ×1
  • Duplicated block (51 lines × 3) .claude/hooks/inject-subagent-context.py:578 — .claude/hooks/inject-subagent-context.py:578-628 | .cursor/hooks/inject-subagent-context.py:578-628 | .kiro/hooks/inject-subagent-context.py:578-628 — before extracting anything, compare `.claude/hooks/inject-subagent-context.py` and `.cursor/hooks/inject-subagent-context.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 436 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.
D4 · Code Duplication · Duplicated block (50 lines × 4) · ×1
  • Duplicated block (50 lines × 4) .claude/hooks/session-start.py:517 — .claude/hooks/session-start.py:517-566 | .cursor/hooks/session-start.py:517-566 | .gemini/hooks/session-start.py:517-566 | .kiro/hooks/session-start.py:517-566 — before extracting anything, compare `.claude/hooks/session-start.py` and `.cursor/hooks/session-start.py` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 691 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.
D4 · Code Duplication · Duplicated block (43 lines × 4) · ×1
  • Duplicated block (43 lines × 4) .claude/hooks/session-start.py:465 — .claude/hooks/session-start.py:465-507 | .cursor/hooks/session-start.py:465-507 | .gemini/hooks/session-start.py:465-507 | .kiro/hooks/session-start.py:465-507 — before extracting anything, compare `.claude/hooks/session-start.py` and `.cursor/hooks/session-start.py` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 691 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.
D4 · Code Duplication · Duplicated block (41 lines × 4) · ×1
  • Duplicated block (41 lines × 4) .claude/hooks/session-start.py:421 — .claude/hooks/session-start.py:421-461 | .cursor/hooks/session-start.py:421-461 | .gemini/hooks/session-start.py:421-461 | .kiro/hooks/session-start.py:421-461 — before extracting anything, compare `.claude/hooks/session-start.py` and `.cursor/hooks/session-start.py` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 691 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.
D4 · Code Duplication · Duplicated block (39 lines × 3) · ×1
  • Duplicated block (39 lines × 3) .claude/hooks/inject-subagent-context.py:149 — .claude/hooks/inject-subagent-context.py:149-187 | .cursor/hooks/inject-subagent-context.py:149-187 | .kiro/hooks/inject-subagent-context.py:149-187 — before extracting anything, compare `.claude/hooks/inject-subagent-context.py` and `.cursor/hooks/inject-subagent-context.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 436 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.
D4 · Code Duplication · Duplicated block (37 lines × 3) · ×1
  • Duplicated block (37 lines × 3) .claude/hooks/inject-subagent-context.py:648 — .claude/hooks/inject-subagent-context.py:648-684 | .cursor/hooks/inject-subagent-context.py:648-684 | .kiro/hooks/inject-subagent-context.py:648-684 — before extracting anything, compare `.claude/hooks/inject-subagent-context.py` and `.cursor/hooks/inject-subagent-context.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 436 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.
D4 · Code Duplication · Duplicated block (36 lines × 6) · ×1
  • Duplicated block (36 lines × 6) .claude/hooks/session-start.py:23 — .claude/hooks/session-start.py:23-58 | .codex/hooks/session-start.py:45-80 | .cursor/hooks/session-start.py:23-58 | .gemini/hooks/session-start.py:23-58 | .github/copilot/hooks/session-start.py:55-90 | .kiro/hooks/session-start.py:23-58 — before extracting anything, compare `.claude/hooks/session-start.py` and `.codex/hooks/session-start.py` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 230 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.
D4 · Code Duplication · Duplicated block (30–31 lines × 12) · ×1
  • Duplicated block (30–31 lines × 12) .claude/hooks/inject-subagent-context.py:83 — .claude/hooks/inject-subagent-context.py:83-112 | .claude/hooks/inject-workflow-state.py:96-126 | .claude/hooks/session-start.py:188-218 | .codex/hooks/inject-workflow-state.py:96-126 | .cursor/hooks/inject-subagent-context.py:83-112 | .cursor/hooks/session-start.py:188-218 | .gemini/hooks/inject-workflow-state.py:96-126 | .gemini/hooks/session-start.py:188-218 | .github/copilot/hooks/inject-workflow-state.py:96-126 | .kiro/hooks/inject-subagent-context.py:83-112 | .kiro/hooks/inject-workflow-state.py:96-126 | .kiro/hooks/session-start.py:188-218 — before extracting anything, compare `.claude/hooks/inject-subagent-context.py` and `.cursor/hooks/inject-subagent-context.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 436 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.
D4 · Code Duplication · Duplicated block (30 lines × 5) · ×1
  • Duplicated block (30 lines × 5) .claude/hooks/inject-workflow-state.py:311 — .claude/hooks/inject-workflow-state.py:311-340 | .codex/hooks/inject-workflow-state.py:311-340 | .gemini/hooks/inject-workflow-state.py:311-340 | .github/copilot/hooks/inject-workflow-state.py:311-340 | .kiro/hooks/inject-workflow-state.py:311-340 — before extracting anything, compare `.claude/hooks/inject-workflow-state.py` and `.codex/hooks/inject-workflow-state.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 265 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.
D4 · Code Duplication · Duplicated block (28 lines × 5) · ×1
  • Duplicated block (28 lines × 5) .claude/hooks/inject-workflow-state.py:227 — .claude/hooks/inject-workflow-state.py:227-254 | .codex/hooks/inject-workflow-state.py:227-254 | .gemini/hooks/inject-workflow-state.py:227-254 | .github/copilot/hooks/inject-workflow-state.py:227-254 | .kiro/hooks/inject-workflow-state.py:227-254 — before extracting anything, compare `.claude/hooks/inject-workflow-state.py` and `.codex/hooks/inject-workflow-state.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 265 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.
D4 · Code Duplication · Duplicated block (27 lines × 4) · ×1
  • Duplicated block (27 lines × 4) .claude/hooks/session-start.py:269 — .claude/hooks/session-start.py:269-295 | .cursor/hooks/session-start.py:269-295 | .gemini/hooks/session-start.py:269-295 | .kiro/hooks/session-start.py:269-295 — before extracting anything, compare `.claude/hooks/session-start.py` and `.cursor/hooks/session-start.py` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 691 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.
D4 · Code Duplication · Duplicated block (25 lines × 3) · ×1
  • Duplicated block (25 lines × 3) .claude/hooks/inject-subagent-context.py:276 — .claude/hooks/inject-subagent-context.py:276-300 | .cursor/hooks/inject-subagent-context.py:276-300 | .kiro/hooks/inject-subagent-context.py:276-300 — before extracting anything, compare `.claude/hooks/inject-subagent-context.py` and `.cursor/hooks/inject-subagent-context.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 436 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 `.claude/hooks/inject-subagent-context.py:276` 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.
D4 · Code Duplication · Duplicated block (24 lines × 5) · ×1
  • Duplicated block (24 lines × 5) .claude/hooks/inject-workflow-state.py:144 — .claude/hooks/inject-workflow-state.py:144-167 | .codex/hooks/inject-workflow-state.py:144-167 | .gemini/hooks/inject-workflow-state.py:144-167 | .github/copilot/hooks/inject-workflow-state.py:144-167 | .kiro/hooks/inject-workflow-state.py:144-167 — before extracting anything, compare `.claude/hooks/inject-workflow-state.py` and `.codex/hooks/inject-workflow-state.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 265 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.
D4 · Code Duplication · Duplicated block (23 lines × 5) · ×1
  • Duplicated block (23 lines × 5) .claude/hooks/inject-workflow-state.py:182 — .claude/hooks/inject-workflow-state.py:182-204 | .codex/hooks/inject-workflow-state.py:182-204 | .gemini/hooks/inject-workflow-state.py:182-204 | .github/copilot/hooks/inject-workflow-state.py:182-204 | .kiro/hooks/inject-workflow-state.py:182-204 — before extracting anything, compare `.claude/hooks/inject-workflow-state.py` and `.codex/hooks/inject-workflow-state.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 265 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.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×1
  • Duplicated block (23 lines × 2) .trellis/scripts/common/task_store.py:558 — .trellis/scripts/common/task_store.py:558-580 | .trellis/scripts/common/task_store.py:611-633 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (17–22 lines × 2) · ×1
  • Duplicated block (17–22 lines × 2) .trellis/scripts/common/active_task.py:103 — .trellis/scripts/common/active_task.py:103-119 | .trellis/scripts/common/paths.py:211-232 — 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.
D4 · Code Duplication · Duplicated block (20–21 lines × 6) · ×1
  • Duplicated block (20–21 lines × 6) .claude/hooks/session-start.py:100 — .claude/hooks/session-start.py:100-120 | .codex/hooks/session-start.py:123-142 | .cursor/hooks/session-start.py:100-120 | .gemini/hooks/session-start.py:100-120 | .github/copilot/hooks/session-start.py:128-147 | .kiro/hooks/session-start.py:100-120 — before extracting anything, compare `.claude/hooks/session-start.py` and `.codex/hooks/session-start.py` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 230 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.
D4 · Code Duplication · Duplicated block (20 lines × 5) · ×1
  • Duplicated block (20 lines × 5) .claude/hooks/inject-workflow-state.py:260 — .claude/hooks/inject-workflow-state.py:260-279 | .codex/hooks/inject-workflow-state.py:260-279 | .gemini/hooks/inject-workflow-state.py:260-279 | .github/copilot/hooks/inject-workflow-state.py:260-279 | .kiro/hooks/inject-workflow-state.py:260-279 — before extracting anything, compare `.claude/hooks/inject-workflow-state.py` and `.codex/hooks/inject-workflow-state.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 265 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.
D4 · Code Duplication · Duplicated block (20 lines × 3) · ×1
  • Duplicated block (20 lines × 3) .claude/hooks/inject-subagent-context.py:465 — .claude/hooks/inject-subagent-context.py:465-484 | .cursor/hooks/inject-subagent-context.py:465-484 | .kiro/hooks/inject-subagent-context.py:465-484 — before extracting anything, compare `.claude/hooks/inject-subagent-context.py` and `.cursor/hooks/inject-subagent-context.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 436 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.
D4 · Code Duplication · Duplicated block (17–20 lines × 2) · ×1
  • Duplicated block (17–20 lines × 2) .trellis/scripts/common/config.py:40 — .trellis/scripts/common/config.py:40-59 | .trellis/scripts/common/trellis_config.py:26-42 — 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.
D4 · Code Duplication · Duplicated block (19 lines × 6) · ×1
  • Duplicated block (19 lines × 6) .claude/hooks/inject-subagent-context.py:293 — .claude/hooks/inject-subagent-context.py:293-311 | .claude/hooks/inject-subagent-context.py:321-339 | .cursor/hooks/inject-subagent-context.py:293-311 | .cursor/hooks/inject-subagent-context.py:321-339 | .kiro/hooks/inject-subagent-context.py:293-311 | .kiro/hooks/inject-subagent-context.py:321-339 — before extracting anything, compare `.claude/hooks/inject-subagent-context.py` and `.cursor/hooks/inject-subagent-context.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 436 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.
D4 · Code Duplication · Duplicated block (19 lines × 3) · ×1
  • Duplicated block (19 lines × 3) .trellis/scripts/common/safe_commit.py:265 — .trellis/scripts/common/safe_commit.py:265-283 | .trellis/scripts/common/safe_commit.py:297-315 | .trellis/scripts/task.py:365-383 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `.trellis/scripts/common/safe_commit.py:265` 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.
D4 · Code Duplication · Duplicated block (18 lines × 4) · ×1
  • Duplicated block (18 lines × 4) .claude/hooks/session-start.py:580 — .claude/hooks/session-start.py:580-597 | .cursor/hooks/session-start.py:580-597 | .gemini/hooks/session-start.py:580-597 | .kiro/hooks/session-start.py:580-597 — before extracting anything, compare `.claude/hooks/session-start.py` and `.cursor/hooks/session-start.py` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 691 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.
D4 · Code Duplication · Duplicated block (16–17 lines × 6) · ×1
  • Duplicated block (16–17 lines × 6) .claude/hooks/session-start.py:570 — .claude/hooks/session-start.py:570-586 | .codex/hooks/session-start.py:330-345 | .cursor/hooks/session-start.py:570-586 | .gemini/hooks/session-start.py:570-586 | .github/copilot/hooks/session-start.py:335-350 | .kiro/hooks/session-start.py:570-586 — before extracting anything, compare `.claude/hooks/session-start.py` and `.codex/hooks/session-start.py` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 230 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.
D4 · Code Duplication · Duplicated block (16 lines × 4) · ×1
  • Duplicated block (16 lines × 4) .claude/hooks/session-start.py:661 — .claude/hooks/session-start.py:661-676 | .cursor/hooks/session-start.py:661-676 | .gemini/hooks/session-start.py:661-676 | .kiro/hooks/session-start.py:661-676 — before extracting anything, compare `.claude/hooks/session-start.py` and `.cursor/hooks/session-start.py` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 691 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.
D4 · Code Duplication · Duplicated block (16 lines × 3) · ×1
  • Duplicated block (16 lines × 3) .trellis/scripts/common/task_store.py:665 — .trellis/scripts/common/task_store.py:665-680 | .trellis/scripts/common/task_store.py:699-714 | .trellis/scripts/common/task_store.py:731-746 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (15 lines × 5) · ×1
  • Duplicated block (15 lines × 5) .claude/hooks/inject-workflow-state.py:289 — .claude/hooks/inject-workflow-state.py:289-303 | .codex/hooks/inject-workflow-state.py:289-303 | .gemini/hooks/inject-workflow-state.py:289-303 | .github/copilot/hooks/inject-workflow-state.py:289-303 | .kiro/hooks/inject-workflow-state.py:289-303 — before extracting anything, compare `.claude/hooks/inject-workflow-state.py` and `.codex/hooks/inject-workflow-state.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 265 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.
D4 · Code Duplication · Duplicated block (15 lines × 3) · ×1
  • Duplicated block (15 lines × 3) .claude/hooks/inject-subagent-context.py:117 — .claude/hooks/inject-subagent-context.py:117-131 | .cursor/hooks/inject-subagent-context.py:117-131 | .kiro/hooks/inject-subagent-context.py:117-131 — before extracting anything, compare `.claude/hooks/inject-subagent-context.py` and `.cursor/hooks/inject-subagent-context.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 436 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.
D4 · Code Duplication · Duplicated block (13–15 lines × 2) · ×1
  • Duplicated block (13–15 lines × 2) .trellis/scripts/common/cli_adapter.py:105 — .trellis/scripts/common/cli_adapter.py:105-117 | .trellis/scripts/common/cli_adapter.py:526-540 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×1
  • Duplicated block (15 lines × 2) .trellis/scripts/common/cli_adapter.py:121 — .trellis/scripts/common/cli_adapter.py:121-135 | .trellis/scripts/common/cli_adapter.py:536-550 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (14 lines × 6) · ×1
  • Duplicated block (14 lines × 6) .claude/hooks/session-start.py:669 — .claude/hooks/session-start.py:669-682 | .codex/hooks/session-start.py:420-433 | .cursor/hooks/session-start.py:669-682 | .gemini/hooks/session-start.py:669-682 | .github/copilot/hooks/session-start.py:425-438 | .kiro/hooks/session-start.py:669-682 — before extracting anything, compare `.claude/hooks/session-start.py` and `.codex/hooks/session-start.py` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 230 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.
D4 · Code Duplication · Duplicated block (11 lines × 8) · ×1
  • Duplicated block (11 lines × 8) .claude/hooks/session-start.py:299 — .claude/hooks/session-start.py:299-309 | .codex/hooks/session-start.py:195-205 | .cursor/hooks/session-start.py:299-309 | .gemini/hooks/session-start.py:299-309 | .github/copilot/hooks/session-start.py:200-210 | .kiro/hooks/session-start.py:299-309 | .trellis/scripts/common/active_task.py:104-114 | .trellis/scripts/common/paths.py:217-227 — before extracting anything, compare `.claude/hooks/session-start.py` and `.codex/hooks/session-start.py` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 230 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.
D4 · Code Duplication · Duplicated block (3–11 lines × 6) · ×1
  • Duplicated block (3–11 lines × 6) .claude/hooks/session-start.py:692 — .claude/hooks/session-start.py:692-702 | .codex/hooks/session-start.py:443-445 | .cursor/hooks/session-start.py:692-702 | .gemini/hooks/session-start.py:692-702 | .github/copilot/hooks/session-start.py:448-450 | .kiro/hooks/session-start.py:692-702 — before extracting anything, compare `.claude/hooks/session-start.py` and `.codex/hooks/session-start.py` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 230 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.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×1
  • Duplicated block (9 lines × 3) .claude/hooks/inject-subagent-context.py:135 — .claude/hooks/inject-subagent-context.py:135-143 | .cursor/hooks/inject-subagent-context.py:135-143 | .kiro/hooks/inject-subagent-context.py:135-143 — before extracting anything, compare `.claude/hooks/inject-subagent-context.py` and `.cursor/hooks/inject-subagent-context.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 436 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.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×1
  • Duplicated block (11 lines × 3) .claude/hooks/inject-subagent-context.py:262 — .claude/hooks/inject-subagent-context.py:262-272 | .cursor/hooks/inject-subagent-context.py:262-272 | .kiro/hooks/inject-subagent-context.py:262-272 — before extracting anything, compare `.claude/hooks/inject-subagent-context.py` and `.cursor/hooks/inject-subagent-context.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 436 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.
D4 · Code Duplication · Duplicated block (13 lines × 3) · ×1
  • Duplicated block (13 lines × 3) .claude/hooks/inject-subagent-context.py:632 — .claude/hooks/inject-subagent-context.py:632-644 | .cursor/hooks/inject-subagent-context.py:632-644 | .kiro/hooks/inject-subagent-context.py:632-644 — before extracting anything, compare `.claude/hooks/inject-subagent-context.py` and `.cursor/hooks/inject-subagent-context.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 436 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.
D4 · Code Duplication · Duplicated block (11 lines × 5) · ×1
  • Duplicated block (11 lines × 5) .claude/hooks/inject-workflow-state.py:78 — .claude/hooks/inject-workflow-state.py:78-88 | .codex/hooks/inject-workflow-state.py:78-88 | .gemini/hooks/inject-workflow-state.py:78-88 | .github/copilot/hooks/inject-workflow-state.py:78-88 | .kiro/hooks/inject-workflow-state.py:78-88 — before extracting anything, compare `.claude/hooks/inject-workflow-state.py` and `.codex/hooks/inject-workflow-state.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 265 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.
D4 · Code Duplication · Duplicated block (6 lines × 5) · ×1
  • Duplicated block (6 lines × 5) .claude/hooks/inject-workflow-state.py:135 — .claude/hooks/inject-workflow-state.py:135-140 | .codex/hooks/inject-workflow-state.py:135-140 | .gemini/hooks/inject-workflow-state.py:135-140 | .github/copilot/hooks/inject-workflow-state.py:135-140 | .kiro/hooks/inject-workflow-state.py:135-140 — before extracting anything, compare `.claude/hooks/inject-workflow-state.py` and `.codex/hooks/inject-workflow-state.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 265 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.
D4 · Code Duplication · Duplicated block (16 lines × 5) · ×1
  • Duplicated block (16 lines × 5) .claude/hooks/inject-workflow-state.py:208 — .claude/hooks/inject-workflow-state.py:208-223 | .codex/hooks/inject-workflow-state.py:208-223 | .gemini/hooks/inject-workflow-state.py:208-223 | .github/copilot/hooks/inject-workflow-state.py:208-223 | .kiro/hooks/inject-workflow-state.py:208-223 — before extracting anything, compare `.claude/hooks/inject-workflow-state.py` and `.codex/hooks/inject-workflow-state.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 265 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.
D4 · Code Duplication · Duplicated block (19 lines × 4) · ×1
  • Duplicated block (19 lines × 4) .claude/hooks/session-start.py:124 — .claude/hooks/session-start.py:124-142 | .cursor/hooks/session-start.py:124-142 | .gemini/hooks/session-start.py:124-142 | .kiro/hooks/session-start.py:124-142 — before extracting anything, compare `.claude/hooks/session-start.py` and `.cursor/hooks/session-start.py` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 691 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.
D4 · Code Duplication · Duplicated block (6 lines × 4) · ×1
  • Duplicated block (6 lines × 4) .claude/hooks/session-start.py:227 — .claude/hooks/session-start.py:227-232 | .cursor/hooks/session-start.py:227-232 | .gemini/hooks/session-start.py:227-232 | .kiro/hooks/session-start.py:227-232 — before extracting anything, compare `.claude/hooks/session-start.py` and `.cursor/hooks/session-start.py` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 691 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.
D4 · Code Duplication · Duplicated block (17 lines × 4) · ×1
  • Duplicated block (17 lines × 4) .claude/hooks/session-start.py:236 — .claude/hooks/session-start.py:236-252 | .cursor/hooks/session-start.py:236-252 | .gemini/hooks/session-start.py:236-252 | .kiro/hooks/session-start.py:236-252 — before extracting anything, compare `.claude/hooks/session-start.py` and `.cursor/hooks/session-start.py` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 691 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.
D4 · Code Duplication · Duplicated block (10 lines × 4) · ×1
  • Duplicated block (10 lines × 4) .claude/hooks/session-start.py:256 — .claude/hooks/session-start.py:256-265 | .cursor/hooks/session-start.py:256-265 | .gemini/hooks/session-start.py:256-265 | .kiro/hooks/session-start.py:256-265 — before extracting anything, compare `.claude/hooks/session-start.py` and `.cursor/hooks/session-start.py` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 691 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.
D4 · Code Duplication · Duplicated block (16 lines × 6) · ×1
  • Duplicated block (16 lines × 6) .claude/hooks/session-start.py:707 — .claude/hooks/session-start.py:707-722 | .codex/hooks/session-start.py:450-465 | .cursor/hooks/session-start.py:707-722 | .gemini/hooks/session-start.py:707-722 | .github/copilot/hooks/session-start.py:455-470 | .kiro/hooks/session-start.py:707-722 — before extracting anything, compare `.claude/hooks/session-start.py` and `.codex/hooks/session-start.py` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 230 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.
D44 · Platform End-of-Life · End-of-life runtime · ×1
  • End-of-life runtime: Rust 1.96 — rust-toolchain.toml declares Rust 1.96 as this project's toolchain file, and Rust 1.96, superseded by 1.97 on 2026-07-09 (the Rust project patches only the current stable). An unsupported runtime receives no security patches, so every vulnerability disclosed in it since 2026-07-09 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.
R10 · Code Duplication · Duplication concentrated across 5 sibling directories (7 clone groups) · ×1
  • Duplication concentrated across 5 sibling directories (7 clone groups) src/pages/Clipboard/components/Group.tsx:427 — 7 duplicated blocks under src/pages/ have copies in at least two of the sibling directories Clipboard, ContextMenu, Preference, Preview, Update — 5 of them are reported below, and 2 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 7 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 7 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 7 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplicated block with local edits (124 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (124 matched lines × 2 locations) src/pages/Preference/components/BackupExportModal.tsx:55 — src/pages/Preference/components/BackupExportModal.tsx:55 · src/pages/Preference/components/BackupImportModal.tsx:53 — the two spans are one implementation copied and then locally edited — 561 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (30 lines × 2 locations) · ×1
  • Duplicated block (30 lines × 2 locations) src/pages/Onboarding/components/DoneStep.tsx:14 — src/pages/Onboarding/components/DoneStep.tsx:14 · src/pages/Onboarding/components/WelcomeStep.tsx:14 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication · Duplicated block (24 lines × 2 locations) · ×1
  • Duplicated block (24 lines × 2 locations) src/pages/Preference/components/settingControls/CaptureOrderControl.tsx:54 — src/pages/Preference/components/settingControls/CaptureOrderControl.tsx:54 · src/pages/Preference/components/settingControls/SortableCheckboxTreeControl.tsx:76 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (23 lines × 2 locations) · ×1
  • Duplicated block (23 lines × 2 locations) src/pages/Clipboard/components/Group.tsx:427 — src/pages/Clipboard/components/Group.tsx:427 · src/pages/Preference/components/ClipboardGroupManagerModal.tsx:124 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (21 lines × 2 locations) · ×1
  • Duplicated block (21 lines × 2 locations) src/hooks/useClipboardItems.ts:159 — src/hooks/useClipboardItems.ts:159 · src/hooks/useClipboardItems.ts:185 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (18 lines × 2 locations) · ×1
  • Duplicated block (18 lines × 2 locations) src/components/LanguageSwitcher/index.tsx:43 — src/components/LanguageSwitcher/index.tsx:43 · src/components/LanguageSwitcher/index.tsx:82 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (17 lines × 2 locations) · ×1
  • Duplicated block (17 lines × 2 locations) src/pages/Clipboard/components/Group.tsx:322 — src/pages/Clipboard/components/Group.tsx:322 · src/pages/Preference/components/ClipboardGroupManagerModal.tsx:74 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (10 lines × 2 locations) · ×1
  • Duplicated block (10 lines × 2 locations) src/pages/Preference/components/SourceAppsTransfer.tsx:129 — src/pages/Preference/components/SourceAppsTransfer.tsx:129 · src/pages/Preference/components/SourceAppsTransfer.tsx:151 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (6 lines × 2 locations) · ×1
  • Duplicated block (6 lines × 2 locations) src/pages/Preference/components/settingControls/NumberControl.tsx:13 — src/pages/Preference/components/settingControls/NumberControl.tsx:13 · src/pages/Preference/components/settingControls/RetentionControl.tsx:36 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (5 lines × 2 locations) · ×1
  • Duplicated block (5 lines × 2 locations) src/pages/Clipboard/components/Group.tsx:111 — src/pages/Clipboard/components/Group.tsx:111 · src/pages/Preference/components/ClipboardGroupManagerModal.tsx:54 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R2 · Cyclomatic Complexity · Complex function handleKeyDown (cyclomatic 32, cognitive 39) · ×1
  • Complex function handleKeyDown (cyclomatic 32, cognitive 39) src/pages/Clipboard/components/List.tsx:587 — handleKeyDown has cyclomatic complexity 32 and cognitive complexity 39; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function PreferenceSettingControl (cyclomatic 26, cognitive 15) · ×1
  • Complex function PreferenceSettingControl (cyclomatic 26, cognitive 15) src/pages/Preference/components/settingControls/PreferenceSettingControl.tsx:50 — PreferenceSettingControl has cyclomatic complexity 26 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function current (cyclomatic 23, cognitive 16) · ×1
  • Complex function current (cyclomatic 23, cognitive 16) src/pages/Clipboard/components/List.tsx:522 — current has cyclomatic complexity 23 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 sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function resolveSectionVisual (cyclomatic 22, cognitive 20) · ×1
  • Complex function resolveSectionVisual (cyclomatic 22, cognitive 20) src/pages/Preference/components/PreferenceSection.tsx:136 — resolveSectionVisual has cyclomatic complexity 22 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function Update (cyclomatic 20, cognitive 19) · ×1
  • Complex function Update (cyclomatic 20, cognitive 19) src/pages/Update/index.tsx:43 — Update has cyclomatic complexity 20 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function handleQuickAction (cyclomatic 20, cognitive 13) · ×1
  • Complex function handleQuickAction (cyclomatic 20, cognitive 13) src/pages/Clipboard/components/List.tsx:872 — handleQuickAction has cyclomatic complexity 20 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 18, cognitive 17) · ×1
  • Complex function (anonymous) (cyclomatic 18, cognitive 17) src/commands/index.ts:1082 — (anonymous) has cyclomatic complexity 18 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function PreferenceSettingRow (cyclomatic 18, cognitive 17) · ×1
  • Complex function PreferenceSettingRow (cyclomatic 18, cognitive 17) src/pages/Preference/components/PreferenceSettingRow.tsx:42 — PreferenceSettingRow has cyclomatic complexity 18 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function BackupImportModal (cyclomatic 15, cognitive 12) · ×1
  • Complex function BackupImportModal (cyclomatic 15, cognitive 12) src/pages/Preference/components/BackupImportModal.tsx:31 — BackupImportModal has cyclomatic complexity 15 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function isItemActionAvailable (cyclomatic 15, cognitive 3) · ×1
  • Complex function isItemActionAvailable (cyclomatic 15, cognitive 3) src/constants/itemActions.ts:240 — isItemActionAvailable has cyclomatic complexity 15 and cognitive complexity 3; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function Preview (cyclomatic 14, cognitive 13) · ×1
  • Complex function Preview (cyclomatic 14, cognitive 13) src/pages/Preview/index.tsx:62 — Preview has cyclomatic complexity 14 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function getEmptyDescription (cyclomatic 13, cognitive 15) · ×1
  • Complex function getEmptyDescription (cyclomatic 13, cognitive 15) src/pages/Clipboard/components/List.tsx:1117 — getEmptyDescription has cyclomatic complexity 13 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function handleWindowVisibility (cyclomatic 13, cognitive 11) · ×1
  • Complex function handleWindowVisibility (cyclomatic 13, cognitive 11) src/pages/Clipboard/components/List.tsx:284 — handleWindowVisibility has cyclomatic complexity 13 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.
R2 · Cyclomatic Complexity · Complex function settingValuesEqual (cyclomatic 12, cognitive 15) · ×1
  • Complex function settingValuesEqual (cyclomatic 12, cognitive 15) src/pages/Preference/services/preferenceSettings.ts:26 — settingValuesEqual has cyclomatic complexity 12 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function handleClick (cyclomatic 12, cognitive 11) · ×1
  • Complex function handleClick (cyclomatic 12, cognitive 11) src/pages/Preference/components/settingControls/ActionControl.tsx:323 — handleClick 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.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 11, cognitive 13) · ×1
  • Complex function (anonymous) (cyclomatic 11, cognitive 13) src/hooks/useClipboardItems.ts:80 — (anonymous) has cyclomatic complexity 11 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function ClipboardCard (cyclomatic 11, cognitive 10) · ×1
  • Complex function ClipboardCard (cyclomatic 11, cognitive 10) src/pages/Clipboard/components/cards/ClipboardCard.tsx:58 — ClipboardCard 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.
R2 · Cyclomatic Complexity · Complex function openPreviewForItem (cyclomatic 11, cognitive 10) · ×1
  • Complex function openPreviewForItem (cyclomatic 11, cognitive 10) src/pages/Clipboard/hooks/useClipboardPreviewController.ts:348 — openPreviewForItem 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.
R2 · Cyclomatic Complexity · Complex function PreferenceStorageUsagePanel (cyclomatic 11, cognitive 10) · ×1
  • Complex function PreferenceStorageUsagePanel (cyclomatic 11, cognitive 10) src/pages/Preference/components/PreferenceStorageUsagePanel.tsx:21 — PreferenceStorageUsagePanel 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.
R2 · Cyclomatic Complexity · Complex function Preference (cyclomatic 11, cognitive 10) · ×1
  • Complex function Preference (cyclomatic 11, cognitive 10) src/pages/Preference/index.tsx:70 — Preference 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.
R4 · Test Coverage · Test Coverage · ×1
  • Test Coverage — 0% of 125 production file(s) reachable from 0 test file(s) via the import graph — 'production' here is the RESIDUE: every source file left once tests, tooling, generated output, config, declarations and declaration-only modules, fixture corpora, type fixtures, behaviour-free data modules, re-export barrels, registration/constant data modules and service workers are set aside, so the percentage is taken over a smaller denominator than the workspace's file count
R7 · Dead Code · Dead file (~11 LoC) · ×1
  • Dead file (~11 LoC) src/hooks/useWindowLifecycle.ts — no import path from any entry point (5 application, 5 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R8 · Dependency Hygiene · Unused dependency '@iconify-json/lets-icons' · ×1
  • Unused dependency '@iconify-json/lets-icons' — Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency '@iconify-json/lucide' · ×1
  • Unused dependency '@iconify-json/lucide' — Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency '@iconify-json/ph' · ×1
  • Unused dependency '@iconify-json/ph' — Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Minor — 15 finding(s)
M4 · Documentation accuracy · README/code drift · ×3
  • README/code drift — Tauri version claimed (v2) vs evidence — searched for: `Tauri v2`. Each was matched case- and separator-insensitively against file and directory NAMES anywhere in the tree, and against the CONTENTS of manifest files (package.json, *.csproj, *.props, *.slnx, *.yml, Dockerfile); the README's own prose never counts, so a claim is never refuted by merely being made. Nothing outside that search was read — a footprint living only in a submodule, in a file type not listed here, or under a name none of those terms matches is not seen, and this row is then wrong.
  • README/code drift — React 19 frontend claim contradicts no component in the repo — reported by the model that read the README against this repository; no term search was run for this one, so nothing here has been checked against the tree. Treat it as a reading to confirm, not as a measured contradiction: verify it against the code before acting on it, and if the footprint it describes does exist, this row is wrong.
  • README/code drift — README advertises Docker containerisation, but no Dockerfile/compose file exists — searched for: `dockerfile`, `docker-compose`, `compose.yaml`, `compose.yml`. Each was matched case- and separator-insensitively against file and directory NAMES anywhere in the tree, and against the CONTENTS of manifest files (package.json, *.csproj, *.props, *.slnx, *.yml, Dockerfile); the README's own prose never counts, so a claim is never refuted by merely being made. Nothing outside that search was read — a footprint living only in a submodule, in a file type not listed here, or under a name none of those terms matches is not seen, and this row is then wrong.
D19 · Documentation Quality · Documentation · ×2
  • Documentation: no installation or build instructions README.md — The README has no installation, build, or setup instructions; it only shows a logo and Tauri badge. Add the exact commands to run the app (cargo + tauri) and any prerequisites.
  • Documentation: no usage examples README.md — The README has no usage examples, so readers cannot tell how to run or interact with EcoPaste. Add a short 'how to run it' example showing the app's main screen and key actions.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 1 of 1 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is `src-tauri` (19761 LoC, 208 public types across 20 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
R7 · Dead Code · Unused export 'SVG_ICON_HELP_URL' · ×1
  • Unused export 'SVG_ICON_HELP_URL' src/constants/urls.ts:6 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'windowLifecycleReady' · ×1
  • Unused export 'windowLifecycleReady' src/stores/windowLifecycle.ts:54 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'default' · ×1
  • Unused export 'default' src/unocss/presetAntdColors.ts:78 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'isImage' · ×1
  • Unused export 'isImage' src/utils/is.ts:30 — Nothing imports this binding — it is safe to review for removal.

Appendix B — Reproduction & audit trail

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

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-f14c4c4d3e214229aad837ff5e841c54/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-f14c4c4d3e214229aad837ff5e841c54/tree.json --exit-code 0 --source .1artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off .30artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update13artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 10 file(s) — `.release-it.ts`, `src/App.tsx`, `src/components/ScrollArea/index.tsx`, `src/components/VirtuosoScroller/index.tsx`, `src/constants/windowOpenSelection.ts`, … (+5 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update0artifacts/raw/trivy-fs.json

Run 01a0ed54-3d03-7487-a8af-097ee094b58b · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md