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

clacky-ai/openclacky

Measured 21 October 2026, 06:48 UTC, at code version c4d4cd2

CAI score 32out of 100 Weak
CriticalWeakAdequateStrongExemplary
Down 9 since the last survey

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

A medium codebase: 76,251 lines of product code in 1 project, tests not counted · Estimated rebuild effort: about 0.8 person-years · Weakest lens: Code Health, 25

Findings by how serious they are

83 critical 1060 serious 131 minor

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

This survey was produced by

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
21 October 2026, 06:48 UTC

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

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

74of 79 dimensions measured by tools. The other 5 are advisory notes from an AI model, which explain the code but don't count towards the score.
1250of 1274 findings point to an exact file and line, so you can open each one in the code. The other 24 concern the repository as a whole, such as missing documentation.
79dimensions across 7 lenses, read from 76,251 lines of product code in 1 project.
Chapters

Executive summary

clacky-ai/openclacky scores 32 out of 100 and is rated Weak, while five of its seven lenses score higher still: Performance at 100, rated Exemplary, Architecture at 78, rated Adequate, and Production Readiness at 42, Maturity at 38 and Accessibility at 37, all rated Weak.

The score is lower than those five because the weakest lens counts most, and here that is Code Health, which scores 25 and is rated Weak. Its Type Safety dimension scores 0 out of 10, and until that reaches 4, Code Health can't be rated higher than Adequate. The first actions are to stop accepting every TLS certificate: delete `verify_mode = OpenSSL::SSL::VERIFY_NONE` / `verify: false` / `verify_ssl: false` so the chain, hostname and expiry are verified, and trust a self-signed or private server by giving the client its CA (`ca_file`, `cert_store`) — never by switching verification off and to adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up, and if Code Health rose to 70, the score would rise from 32 to about 37.

83 findings are critical: 39 in Keyboard semantics, 23 in Static Analysis (SAST), nine in Web-Security Posture, six in Forms & labels, four in IaC & Container Security and two in Dependency Vulnerabilities.

Watchdog couldn't measure 6 dimensions in this code, among them Code Coverage, Test Reliability and Navigability, so they are left out of the score. The product code is 76,251 lines, which would take an estimated 0.8 person-years, around €110,000, to rebuild.

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

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

If Code Health rose from 25 to 70, the lowest score rated Strong, the score would rise from 32 to about 37.

Code composition: what the lines of code are
Product code 57%Tests 43%
New since the last survey: 176 findings

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

  • Cyclomatic Complexity · (anonymous) (cyclomatic 54) lib/clacky/web/features/archive/store.js
  • Cyclomatic Complexity · (anonymous) (cyclomatic 28) lib/clacky/web/features/channels/store.js
  • Cyclomatic Complexity · (anonymous)._renderHeatmap (cyclomatic 26) lib/clacky/web/features/billing/view.js
  • Cyclomatic Complexity · OpenAICompat.generate_video (cyclomatic 21) lib/clacky/media/openai_compat.rb
  • Cyclomatic Complexity · Adapter.attachment_to_file (cyclomatic 21) REDACTED
  • Cyclomatic Complexity · HttpServer.api_rename_session (cyclomatic 21) lib/clacky/server/http_server.rb
  • Cyclomatic Complexity · (anonymous)._wire (cyclomatic 21) lib/clacky/web/features/archive/view.js
  • Cyclomatic Complexity · (anonymous)._renderCostTrend (cyclomatic 20) lib/clacky/web/features/billing/view.js
  • Cyclomatic Complexity · Anthropic.build_request_body (cyclomatic 19) lib/clacky/message_format/anthropic.rb
  • Cyclomatic Complexity · (anonymous)::patch (cyclomatic 19) REDACTED
  • Cyclomatic Complexity · (anonymous)._wire (cyclomatic 18) lib/clacky/web/features/trash/view.js
  • Cyclomatic Complexity · (anonymous).createViewer.buildImageTab (cyclomatic 17) lib/clacky/web/features/workspace/view.js
  • Cognitive Complexity · (anonymous) (cognitive 71) lib/clacky/web/features/trash/store.js
  • Cognitive Complexity · (anonymous) (cognitive 57) lib/clacky/web/features/archive/store.js
  • Cognitive Complexity · (anonymous)._renderHeatmap (cognitive 30) lib/clacky/web/features/billing/view.js
  • Cognitive Complexity · (anonymous)._wire (cognitive 29) lib/clacky/web/features/archive/view.js
  • Cognitive Complexity · (anonymous)::patch (cognitive 27) REDACTED
  • Cognitive Complexity · (anonymous) (cognitive 27) lib/clacky/web/features/channels/store.js
  • Cognitive Complexity · _renderTicks (cognitive 25) lib/clacky/web/components/chat-navigator.js
  • Cognitive Complexity · Adapter.attachment_to_file (cognitive 23) REDACTED
  • Cognitive Complexity · (anonymous)._initSearchSettings::_syncKeyVisibility (cognitive 22) lib/clacky/web/settings.js
  • Cognitive Complexity · OpenAICompat.generate_video (cognitive 21) lib/clacky/media/openai_compat.rb
  • Cognitive Complexity · Anthropic.build_request_body (cognitive 21) lib/clacky/message_format/anthropic.rb
  • Cognitive Complexity · chat-navigator._renderPreview (cognitive 21) lib/clacky/web/components/chat-navigator.js
  • Cognitive Complexity · HttpServer.api_serve_local_image (cognitive 19) lib/clacky/server/http_server.rb
  • Cognitive Complexity · HttpServer.api_rename_session (cognitive 19) lib/clacky/server/http_server.rb
  • Cognitive Complexity · sessions.document.addEventListener("click") (cognitive 19) REDACTED
  • Cognitive Complexity · (anonymous) (cognitive 19) REDACTED
  • Cognitive Complexity · (anonymous)._renderCostTrend (cognitive 19) lib/clacky/web/features/billing/view.js
  • Cognitive Complexity · (anonymous).reconcileEntries (cognitive 17) lib/clacky/web/features/workspace/view.js
  • Cognitive Complexity · (anonymous).createViewer.buildImageTab (cognitive 17) lib/clacky/web/features/workspace/view.js
  • Cognitive Complexity · (anonymous)._render (cognitive 17) lib/clacky/web/features/archive/view.js
  • God Classes · TooManyMethods: Adapter REDACTED
  • God Classes · FileTooLong: media/openai_compat.rb lib/clacky/media/openai_compat.rb
  • Code Duplication · Duplicated block (32–33 lines × 2) lib/clacky/server/channel/adapters/discord/gateway_client.rb
  • Code Duplication · Duplicated block (22–24 lines × 2) lib/clacky/client.rb
  • Code Duplication · Duplicated block (18–19 lines × 2) lib/clacky/server/channel/adapters/discord/gateway_client.rb
  • Code Duplication · Duplicated block (14 lines × 2) REDACTED
  • Code Duplication · Duplicated block (13 lines × 2) lib/clacky/default_parsers/docx_parser.rb
  • Code Duplication · Duplicated block (13 lines × 2) lib/clacky/default_skills/channel-manager/discord_setup.rb
  • Code Duplication · Duplicated block (12 lines × 2) lib/clacky/server/channel/adapters/discord/gateway_client.rb
  • Code Duplication · Duplicated block (8–12 lines × 2) lib/clacky/server/session_registry.rb
  • Code Duplication · Duplicated block (9 lines × 2) lib/clacky/default_skills/channel-manager/discord_setup.rb
  • Code Duplication · Duplicated block (7 lines × 2) lib/clacky/server/channel/adapters/discord/gateway_client.rb
  • Churn × Complexity Hotspots · Hotspot: lib/clacky/message_format/anthropic.rb lib/clacky/message_format/anthropic.rb
  • Churn × Complexity Hotspots · Hotspot: lib/clacky/web/features/new-session/store.js lib/clacky/web/features/new-session/store.js
  • Churn × Complexity Hotspots · Repeated repair: lib/clacky/extension/verifier.rb lib/clacky/extension/verifier.rb
  • Static Analysis (SAST) · REDACTED
  • Static Analysis (SAST) · REDACTED
  • Static Analysis (SAST) · REDACTED
  • Static Analysis (SAST) · REDACTED
  • Static Analysis (SAST) · REDACTED
  • Change Coupling · Change-coupling hub: i18n.js → channel_config.rb, model-picker.js, view.js, view.js, view.js, store.js, view.js, view.js, ws-dispatcher.js lib/clacky/web/i18n.js
  • Change Coupling · Change-coupling hub: http_server.rb → json_ui_controller.rb, message_history.rb, plain_ui_controller.rb, channel_ui_controller.rb, ext.js, view.js, view.js, store.js, view.js, ws-dispatcher.js lib/clacky/server/http_server.rb
  • Supply-chain Provenance & Signing · REDACTED
  • Code Duplication · Duplication concentrated across 15 sibling directories (34 clone groups) lib/clacky/web/features/channels/view.js
  • Code Duplication · Duplicated block (31 lines × 2 locations) lib/clacky/web/features/new-session/view.js
  • Code Duplication · Duplicated block (23 lines × 2 locations) lib/clacky/web/features/channels/view.js
  • Code Duplication · Duplicated block (15 lines × 2 locations) lib/clacky/web/app.js
  • Code Duplication · Duplicated block (15 lines × 2 locations) lib/clacky/web/features/archive/store.js
  • Code Duplication · Duplicated block (14 lines × 2 locations) lib/clacky/web/features/archive/store.js
  • Code Duplication · Duplicated block (14 lines × 2 locations) lib/clacky/web/features/new-session/view.js
  • Code Duplication · Duplicated block (13 lines × 2 locations) lib/clacky/default_extensions/git/panels/git/view.js
  • Code Duplication · Duplicated block (13 lines × 2 locations) lib/clacky/web/features/channels/view.js
  • Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 31, cognitive 30) lib/clacky/web/components/model-picker.js
  • Cyclomatic Complexity · Complex function _renderPreview (cyclomatic 24, cognitive 21) lib/clacky/web/components/chat-navigator.js
  • Large Files · REDACTED: 6488 lines of code REDACTED
  • Large Files · lib/clacky/web/i18n.js: 2879 lines of code lib/clacky/web/i18n.js
  • Large Files · lib/clacky/web/settings.js: 2806 lines of code lib/clacky/web/settings.js
  • Large Files · lib/clacky/default_extensions/ext-studio/panels/studio/view.js: 2208 lines of code lib/clacky/default_extensions/ext-studio/panels/studio/view.js
  • Large Files · lib/clacky/web/features/workspace/view.js: 1739 lines of code lib/clacky/web/features/workspace/view.js
  • Large Files · lib/clacky/web/projects.js: 1048 lines of code lib/clacky/web/projects.js
  • Large Files · lib/clacky/web/features/billing/view.js: 1005 lines of code lib/clacky/web/features/billing/view.js
  • Large Files · lib/clacky/web/features/skills/view.js: 970 lines of code lib/clacky/web/features/skills/view.js
  • Large Files · lib/clacky/web/app.js: 962 lines of code lib/clacky/web/app.js
  • Large Files · lib/clacky/web/features/new-session/view.js: 937 lines of code lib/clacky/web/features/new-session/view.js
  • Large Files · lib/clacky/default_extensions/meeting/panels/meeting/view.js: 878 lines of code lib/clacky/default_extensions/meeting/panels/meeting/view.js
  • Large Files · lib/clacky/web/features/extensions/view.js: 793 lines of code lib/clacky/web/features/extensions/view.js
  • Large Files · lib/clacky/web/core/ext.js: 757 lines of code lib/clacky/web/core/ext.js
  • Large Files · lib/clacky/web/components/model-picker.js: 739 lines of code lib/clacky/web/components/model-picker.js
  • Large Files · lib/clacky/web/ws-dispatcher.js: 737 lines of code lib/clacky/web/ws-dispatcher.js
  • Large Files · lib/clacky/web/components/mentions.js: 591 lines of code lib/clacky/web/components/mentions.js
  • Large Files · lib/clacky/web/features/share/view.js: 581 lines of code lib/clacky/web/features/share/view.js
  • Large Files · lib/clacky/default_extensions/git/panels/git/view.js: 578 lines of code lib/clacky/default_extensions/git/panels/git/view.js
  • Large Files · lib/clacky/default_extensions/time_machine/panels/time_machine/view.js: 578 lines of code lib/clacky/default_extensions/time_machine/panels/time_machine/view.js
  • Large Files · spec/support/workspace_tab_menu_test.js: 566 lines of code spec/support/workspace_tab_menu_test.js
  • Large Files · lib/clacky/web/skills.js: 535 lines of code lib/clacky/web/skills.js
  • Large Files · REDACTED: 526 lines of code REDACTED
  • Large Files · lib/clacky/web/components/onboard.js: 500 lines of code lib/clacky/web/components/onboard.js
  • Large Files · lib/clacky/web/components/chat-navigator.js: 499 lines of code lib/clacky/web/components/chat-navigator.js
  • Large Files · lib/clacky/web/features/trash/view.js: 489 lines of code lib/clacky/web/features/trash/view.js
  • Large Files · lib/clacky/web/features/channels/view.js: 468 lines of code lib/clacky/web/features/channels/view.js
  • Large Files · lib/clacky/web/features/extensions/store.js: 462 lines of code lib/clacky/web/features/extensions/store.js
  • Large Files · lib/clacky/web/features/tasks/view.js: 458 lines of code lib/clacky/web/features/tasks/view.js
  • Large Files · lib/clacky/default_extensions/advisor/panels/advisor/view.js: 435 lines of code lib/clacky/default_extensions/advisor/panels/advisor/view.js
  • Large Files · lib/clacky/default_extensions/preview/panels/preview/view.js: 430 lines of code lib/clacky/default_extensions/preview/panels/preview/view.js
  • Large Files · lib/clacky/web/components/code-editor.js: 406 lines of code lib/clacky/web/components/code-editor.js
  • Large Files · lib/clacky/web/components/composer.js: 405 lines of code lib/clacky/web/components/composer.js
  • Test Coverage · No test reaches this file lib/clacky/web/features/archive/view.js
  • Test Coverage · No test reaches this file lib/clacky/web/features/archive/store.js

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

Fixed since the last survey: 337 findings

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

  • Cyclomatic Complexity · (anonymous) (cyclomatic 22) lib/clacky/web/features/channels/store.js
  • Cyclomatic Complexity · chat-navigator.init (cyclomatic 20) lib/clacky/web/components/chat-navigator.js
  • Cyclomatic Complexity · (anonymous)::patch (cyclomatic 16) REDACTED
  • Cognitive Complexity · (anonymous) (cognitive 72) lib/clacky/web/features/trash/store.js
  • Cognitive Complexity · chat-navigator._renderTicks (cognitive 34) lib/clacky/web/components/chat-navigator.js
  • Cognitive Complexity · (anonymous)::patch (cognitive 25) REDACTED
  • Cognitive Complexity · (anonymous) (cognitive 21) lib/clacky/web/features/channels/store.js
  • Cognitive Complexity · init (cognitive 20) lib/clacky/web/components/chat-navigator.js
  • Churn × Complexity Hotspots · Hotspot: REDACTED REDACTED
  • Churn × Complexity Hotspots · Hotspot: lib/clacky/web/core/ext.js lib/clacky/web/core/ext.js
  • Churn × Complexity Hotspots · Hotspot: lib/clacky/utils/file_processor.rb lib/clacky/utils/file_processor.rb
  • Churn × Complexity Hotspots · Repeated repair: lib/clacky/web/features/new-session/store.js lib/clacky/web/features/new-session/store.js
  • Churn × Complexity Hotspots · Repeated repair: lib/clacky/message_format/anthropic.rb lib/clacky/message_format/anthropic.rb
  • Change Coupling · Change-coupling hub: i18n.js → channel_config.rb, view.js, view.js, view.js, store.js, view.js, ws-dispatcher.js lib/clacky/web/i18n.js
  • Change Coupling · Change-coupling hub: http_server.rb → json_ui_controller.rb, message_history.rb, plain_ui_controller.rb, ext.js, view.js, view.js, store.js, settings.js, ws-dispatcher.js lib/clacky/server/http_server.rb
  • Supply-chain Provenance & Signing REDACTED
  • Code Duplication · Duplication concentrated across 14 sibling directories (23 clone groups) lib/clacky/web/features/channels/view.js
  • Code Duplication · Duplicated block with local edits (37 matched lines × 2 locations) lib/clacky/web/features/channels/view.js
  • Code Duplication · Duplicated block (30 lines × 2 locations) lib/clacky/web/features/new-session/view.js
  • Code Duplication · Duplicated block with local edits (22 matched lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (15 lines × 2 locations) lib/clacky/web/app.js
  • Code Duplication · Duplicated block (14 lines × 2 locations) lib/clacky/web/features/new-session/view.js
  • Code Duplication · Duplicated block (14 lines × 2 locations) lib/clacky/web/projects.js
  • Code Duplication · Duplicated block (12 lines × 2 locations) lib/clacky/web/features/billing/store.js
  • Code Duplication · Duplicated block (12 lines × 3 locations) lib/clacky/web/features/channels/view.js
  • Code Duplication · Duplicated block (12 lines × 2 locations) lib/clacky/web/features/extensions/view.js
  • Code Duplication · Duplicated block (12 lines × 2 locations) lib/clacky/web/features/trash/view.js
  • Code Duplication · Duplicated block (12 lines × 2 locations) lib/clacky/web/features/workspace/view.js
  • Code Duplication · Duplicated block (12 lines × 2 locations) lib/clacky/web/projects.js
  • Code Duplication · Duplicated block (11 lines × 2 locations) lib/clacky/default_extensions/git/panels/git/view.js
  • Code Duplication · Duplicated block with local edits (11 matched lines × 2 locations) lib/clacky/web/components/notify.js
  • Code Duplication · Duplicated block (11 lines × 2 locations) lib/clacky/web/features/brand/view.js
  • Code Duplication · Duplicated block (11 lines × 2 locations) lib/clacky/web/features/new-session/view.js
  • Code Duplication · Duplicated block (11 lines × 2 locations) lib/clacky/web/features/new-session/view.js
  • Code Duplication · Duplicated block (11 lines × 2 locations) lib/clacky/web/features/skills/store.js
  • Code Duplication · Duplicated block (11 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (11 lines × 3 locations) lib/clacky/web/settings.js
  • Code Duplication · Duplicated block (10 lines × 2 locations) lib/clacky/default_extensions/ext-studio/panels/studio/view.js
  • Code Duplication · Duplicated block with local edits (10 matched lines × 2 locations) lib/clacky/default_extensions/ext-studio/panels/studio/view.js
  • Code Duplication · Duplicated block (10 lines × 2 locations) lib/clacky/default_extensions/time_machine/panels/time_machine/view.js
  • Code Duplication · Duplicated block (10 lines × 2 locations) lib/clacky/web/components/composer.js
  • Code Duplication · Duplicated block (10 lines × 2 locations) lib/clacky/web/features/billing/view.js
  • Code Duplication · Duplicated block (10 lines × 2 locations) lib/clacky/web/features/brand/store.js
  • Code Duplication · Duplicated block (10 lines × 4 locations) lib/clacky/web/features/channels/store.js
  • Code Duplication · Duplicated block (10 lines × 2 locations) lib/clacky/web/features/channels/view.js
  • Code Duplication · Duplicated block (10 lines × 2 locations) lib/clacky/web/features/extensions/view.js
  • Code Duplication · Duplicated block (10 lines × 2 locations) lib/clacky/web/features/profile/store.js
  • Code Duplication · Duplicated block with local edits (10 matched lines × 2 locations) lib/clacky/web/features/profile/view.js
  • Code Duplication · Duplicated block (10 lines × 3 locations) lib/clacky/web/features/skills/store.js
  • Code Duplication · Duplicated block (10 lines × 3 locations) lib/clacky/web/features/trash/store.js
  • Code Duplication · Duplicated block (10 lines × 2 locations) lib/clacky/web/features/trash/view.js
  • Code Duplication · Duplicated block (10 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (10 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (9 lines × 2 locations) lib/clacky/default_extensions/advisor/panels/advisor/view.js
  • Code Duplication · Duplicated block (9 lines × 2 locations) lib/clacky/web/features/billing/view.js
  • Code Duplication · Duplicated block (9 lines × 2 locations) lib/clacky/web/features/brand/view.js
  • Code Duplication · Duplicated block (9 lines × 2 locations) lib/clacky/web/features/trash/store.js
  • Code Duplication · Duplicated block (9 lines × 2 locations) lib/clacky/web/features/workspace/store.js
  • Code Duplication · Duplicated block (9 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (9 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (9 lines × 3 locations) lib/clacky/web/settings.js
  • Code Duplication · Duplicated block (9 lines × 2 locations) lib/clacky/web/settings.js
  • Code Duplication · Duplicated block (9 lines × 2 locations) lib/clacky/web/settings.js
  • Code Duplication · Duplicated block (8 lines × 2 locations) lib/clacky/default_extensions/ext-studio/panels/studio/view.js
  • Code Duplication · Duplicated block (8 lines × 3 locations) lib/clacky/web/app.js
  • Code Duplication · Duplicated block (8 lines × 2 locations) lib/clacky/web/components/code-editor.js
  • Code Duplication · Duplicated block (8 lines × 2 locations) lib/clacky/web/components/mentions.js
  • Code Duplication · Duplicated block (8 lines × 2 locations) lib/clacky/web/components/onboard.js
  • Code Duplication · Duplicated block (8 lines × 4 locations) lib/clacky/web/core/ext.js
  • Code Duplication · Duplicated block (8 lines × 2 locations) lib/clacky/web/features/backup/view.js
  • Code Duplication · Duplicated block (8 lines × 3 locations) lib/clacky/web/features/channels/view.js
  • Code Duplication · Duplicated block (8 lines × 2 locations) lib/clacky/web/features/channels/view.js
  • Code Duplication · Duplicated block (8 lines × 2 locations) lib/clacky/web/features/extensions/view.js
  • Code Duplication · Duplicated block (8 lines × 3 locations) lib/clacky/web/features/profile/store.js
  • Code Duplication · Duplicated block (8 lines × 2 locations) lib/clacky/web/features/trash/view.js
  • Code Duplication · Duplicated block (8 lines × 2 locations) lib/clacky/web/projects.js
  • Code Duplication · Duplicated block (8 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (8 lines × 2 locations) lib/clacky/web/settings.js
  • Code Duplication · Duplicated block (7 lines × 2 locations) lib/clacky/default_extensions/meeting/panels/meeting/view.js
  • Code Duplication · Duplicated block (7 lines × 2 locations) lib/clacky/web/app.js
  • Code Duplication · Duplicated block with local edits (7 matched lines × 2 locations) lib/clacky/web/app.js
  • Code Duplication · Duplicated block (7 lines × 2 locations) lib/clacky/web/components/mentions.js
  • Code Duplication · Duplicated block (7 lines × 3 locations) lib/clacky/web/components/model-picker.js
  • Code Duplication · Duplicated block (7 lines × 2 locations) lib/clacky/web/features/extensions/store.js
  • Code Duplication · Duplicated block (7 lines × 2 locations) lib/clacky/web/features/extensions/store.js
  • Code Duplication · Duplicated block (7 lines × 2 locations) lib/clacky/web/features/extensions/view.js
  • Code Duplication · Duplicated block (7 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (7 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (7 lines × 4 locations) REDACTED
  • Code Duplication · Duplicated block (7 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (7 lines × 2 locations) lib/clacky/web/settings.js
  • Code Duplication · Duplicated block (6 lines × 2 locations) lib/clacky/default_extensions/ext-studio/panels/studio/view.js
  • Code Duplication · Duplicated block (6 lines × 2 locations) lib/clacky/default_extensions/ext-studio/panels/studio/view.js
  • Code Duplication · Duplicated block with local edits (6 matched lines × 2 locations) lib/clacky/default_extensions/meeting/panels/meeting/view.js
  • Code Duplication · Duplicated block (6 lines × 2 locations) lib/clacky/web/components/mentions.js
  • Code Duplication · Duplicated block with local edits (6 matched lines × 2 locations) lib/clacky/web/core/ext.js
  • Code Duplication · Duplicated block (6 lines × 2 locations) lib/clacky/web/features/new-session/store.js
  • Code Duplication · Duplicated block (6 lines × 2 locations) lib/clacky/web/features/new-session/view.js
  • Code Duplication · Duplicated block (6 lines × 2 locations) lib/clacky/web/features/new-session/view.js
  • Code Duplication · Duplicated block (6 lines × 2 locations) lib/clacky/web/features/profile/store.js
Rebuild cost: about €110,000 · Estimate
Cost to rebuild€38,000 to €190,000, for 628 to 1,993 hours of work, about 0.8 person-years for 1 to 2 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.7 at a score of 32. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeMedium: 76,251 lines of product code

How the estimate is made: Watchdog prices the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.

Top priorities

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

1
Stop accepting every TLS certificate: delete `verify_mode = OpenSSL::SSL::VERIFY_NONE` / `verify: false` / `verify_ssl: false` so the chain, hostname and expiry are verified, and trust a self-signed or private server by giving the client its CA (`ca_file`, `cert_store`) — never by switching verification off.
This repository constructs a TLS client that accepts any certificate at 8 sites, not one: `lib/clacky/client.rb:717` (`ssl: { verify: false }`), `lib/clacky/client.rb:734` (`ssl: { verify: false }`), `lib/clacky/client.rb:761` (`ssl: { verify: false }`), `lib/clacky/server/channel/adapters/feishu/bot.rb:299` (`ssl: { verify: false }`), `lib/clacky/server/channel/adapters/feishu/bot.rb:954` (`ssl: { verify: false }`), `lib/clacky/server/channel/adapters/feishu/bot.rb:983` (`ssl: { verify: false }`), `lib/clacky/server/channel/adapters/feishu/bot.rb:1090` (`ssl: { verify: false }`), `lib/clacky/server/channel/adapters/wecom/media_downloader.rb:52` (`ssl: { verify: false }`). Each is a separate decision — fixing only the line this row cites leaves the others in place.
Raises the score by about 4 points · Medium effort · Web-Security Posture
2
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
Raises the score by about 3 points · Medium effort · Type Safety
3
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Raises the score by about 3 points · Medium effort · Large Files

Diagnosis: what the measurements show together

Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.

Where the investment is most exposed · Value at risk
This code would cost about €110,000 to build again, about 0.8 person-years of work. Its weakest lens is Code Health, at 25 (Weak). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first · First action
Stop accepting every TLS certificate: delete `verify_mode = OpenSSL::SSL::VERIFY_NONE` / `verify: false` / `verify_ssl: false` so the chain, hostname and expiry are verified, and trust a self-signed or private server by giving the client its CA (`ca_file`, `cert_store`) — never by switching verification off. Of all the actions in this report, it raises the score most for the work it takes: about 4 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 5.9 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 5% to 12% on every change. The history of the code shows how much it changes: about 112,130 lines over the last 90 days, which is about 454,749 lines a year. At that pace, the extra work comes to an estimated 60.1 to 360.6 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of Watchdog's own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture: which parts of the code depend on which

The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.

109 modules, with 22 dependencies between them. One loop runs through 4 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 69 more are left out to keep it readable.

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 Clacky.Advisor2 Clacky.ApiExtension3 Clacky.ApiExtensionLoader4 Clacky.Billing5 Clacky.Channel.Adapters6 Clacky.Channel.Adapters.Discord.ApiClient7 Clacky.Channel.Adapters.Discord.GatewayClient8 Clacky.Channel.Adapters.Feishu.Bot9 Clacky.Channel.Adapters.Feishu.WSClient10 Clacky.Channel.Adapters.Qq.ApiClient11 Clacky.Channel.Adapters.Qq.GatewayClient12 Clacky.Channel.Adapters.Qq.QrBinder13 Clacky.Channel.Adapters.Telegram.ApiClient14 Clacky.Channel.Adapters.UserAdapterLoader15 Clacky.Channel.Adapters.Wecom.WSClient16 Clacky.Channel.Adapters.Weixin.ApiClient17 Clacky.Channel.Adapters.Weixin.SendQueue18 Clacky.ChannelSetup19 Clacky.Computer20 Clacky.Computer.Geometry21 Clacky.Computer.Grid22 Clacky.RichUI.Components23 Clacky.Agent24 Clacky.Channel.Adapters.DingTalk25 Clacky.Channel.Adapters.Discord26 Clacky.Channel.Adapters.Feishu27 Clacky.Channel.Adapters.Qq28 Clacky.Channel.Adapters.Telegram29 Clacky.Channel.Adapters.Wecom30 Clacky.Channel.Adapters.Weixin31 Clacky.Computer.MacOS32 Clacky.Computer.Windows33 Clacky.RichUI34 Clacky.UI235 Clacky.UI2.Components36 Clacky37 (global)38 Clacky.Channel39 Clacky.Mcp40 Clacky.Server
1 Clacky.Advisor
2 Clacky.ApiExtension
3 Clacky.ApiExtensionLoader
4 Clacky.Billing
5 Clacky.Channel.Adapters
6 Clacky.Channel.Adapters.Discord.ApiClient
7 Clacky.Channel.Adapters.Discord.GatewayClient
8 Clacky.Channel.Adapters.Feishu.Bot
9 Clacky.Channel.Adapters.Feishu.WSClient
10 Clacky.Channel.Adapters.Qq.ApiClient
11 Clacky.Channel.Adapters.Qq.GatewayClient
12 Clacky.Channel.Adapters.Qq.QrBinder
13 Clacky.Channel.Adapters.Telegram.ApiClient
14 Clacky.Channel.Adapters.UserAdapterLoader
15 Clacky.Channel.Adapters.Wecom.WSClient
16 Clacky.Channel.Adapters.Weixin.ApiClient
17 Clacky.Channel.Adapters.Weixin.SendQueue
18 Clacky.ChannelSetup
19 Clacky.Computer
20 Clacky.Computer.Geometry
21 Clacky.Computer.Grid
22 Clacky.RichUI.Components
23 Clacky.Agent2
24 Clacky.Channel.Adapters.DingTalk1
25 Clacky.Channel.Adapters.Discord1
26 Clacky.Channel.Adapters.Feishu1
27 Clacky.Channel.Adapters.Qq1
28 Clacky.Channel.Adapters.Telegram1
29 Clacky.Channel.Adapters.Wecom1
30 Clacky.Channel.Adapters.Weixin1
31 Clacky.Computer.MacOS1
32 Clacky.Computer.Windows1
33 Clacky.RichUI6
34 Clacky.UI262
35 Clacky.UI2.Components2
36 Clacky1451
37 (global)3
38 Clacky.Channel1
39 Clacky.Mcp1
40 Clacky.Server31
Uses a module listed above itPart of a loopThe module itself
1 Clacky.Advisor2 Clacky.ApiExtension3 Clacky.ApiExtensionLoader4 Clacky.Billing5 Clacky.Channel.Adapters6 Clacky.Channel.Adapters.Discord.ApiClient7 Clacky.Channel.Adapters.Discord.GatewayClient8 Clacky.Channel.Adapters.Feishu.Bot9 Clacky.Channel.Adapters.Feishu.WSClient10 Clacky.Channel.Adapters.Qq.ApiClient11 Clacky.Channel.Adapters.Qq.GatewayClient12 Clacky.Channel.Adapters.Qq.QrBinder13 Clacky.Channel.Adapters.Telegram.ApiClient14 Clacky.Channel.Adapters.UserAdapterLoader15 Clacky.Channel.Adapters.Wecom.WSClient16 Clacky.Channel.Adapters.Weixin.ApiClient17 Clacky.Channel.Adapters.Weixin.SendQueue18 Clacky.ChannelSetup19 Clacky.Computer20 Clacky.Computer.Geometry21 Clacky.Computer.Grid22 Clacky.RichUI.Components23 Clacky.Agent24 Clacky.Channel.Adapters.DingTalk25 Clacky.Channel.Adapters.Discord26 Clacky.Channel.Adapters.Feishu27 Clacky.Channel.Adapters.Qq28 Clacky.Channel.Adapters.Telegram29 Clacky.Channel.Adapters.Wecom30 Clacky.Channel.Adapters.Weixin31 Clacky.Computer.MacOS32 Clacky.Computer.Windows33 Clacky.RichUI34 Clacky.UI235 Clacky.UI2.Components36 Clacky37 (global)38 Clacky.Channel39 Clacky.Mcp40 Clacky.ServerClacky.Advisor1Clacky.ApiExtension2Clacky.ApiExtensionLoader3Clacky.Billing4Clacky.Channel.Adapters5Clacky.Channel.Adapters.Discord.ApiClient6Clacky.Channel.Adapters.Discord.GatewayClient7Clacky.Channel.Adapters.Feishu.Bot8Clacky.Channel.Adapters.Feishu.WSClient9Clacky.Channel.Adapters.Qq.ApiClient10Clacky.Channel.Adapters.Qq.GatewayClient11Clacky.Channel.Adapters.Qq.QrBinder12Clacky.Channel.Adapters.Telegram.ApiClient13Clacky.Channel.Adapters.UserAdapterLoader14Clacky.Channel.Adapters.Wecom.WSClient15Clacky.Channel.Adapters.Weixin.ApiClient16Clacky.Channel.Adapters.Weixin.SendQueue17Clacky.ChannelSetup18Clacky.Computer19Clacky.Computer.Geometry20Clacky.Computer.Grid21Clacky.RichUI.Components22Clacky.Agent23Clacky.Channel.Adapters.DingTalk24Clacky.Channel.Adapters.Discord25Clacky.Channel.Adapters.Feishu26Clacky.Channel.Adapters.Qq27Clacky.Channel.Adapters.Telegram28Clacky.Channel.Adapters.Wecom29Clacky.Channel.Adapters.Weixin30Clacky.Computer.MacOS31Clacky.Computer.Windows32Clacky.RichUI33Clacky.UI234Clacky.UI2.Components35Clacky36(global)37Clacky.Channel38Clacky.Mcp39Clacky.Server4021111111116622145131131+69 more modules (most-connected shown)

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

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

At a glance — Maturity · 38% · Weak · gated by M2, M4 ·

At a glance — Readiness · 42% · Weak · gated by R4, P3 ·

At a glance — Security · 29% · Weak · gated by D29, D36, S1 ·

At a glance — Accessibility · 37% · Weak · gated by AC4, AC6 ·

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
A05:2025 — Injection57High / Critical
A03:2025 — Software Supply Chain Failures8High / Critical
A02:2025 — Security Misconfiguration6High / Critical

Roadmap

Immediately eliminate all instances of disabled TLS certificate verification to secure the application's communication channels. Concurrently, introduce TypeScript type checking to the frontend build process and begin refactoring the largest source files into smaller, focused modules. Finally, enforce strict type safety in Ruby by adopting a nil-checking tool and systematically reducing cyclomatic complexity in the most intricate dispatch methods.

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

Do thisHelpsEffortDimension
Stop accepting every TLS certificate: delete `verify_mode = OpenSSL::SSL::VERIFY_NONE` / `verify: false` / `verify_ssl: false` so the chain, hostname and expiry are verified, and trust a self-signed or private server by giving the client its CA (`ca_file`, `cert_store`) — never by switching verification off. This repository constructs a TLS client that accepts any certificate at 8 sites, not one: `lib/clacky/client.rb:717` (`ssl: { verify: false }`), `lib/clacky/client.rb:734` (`ssl: { verify: false }`), `lib/clacky/client.rb:761` (`ssl: { verify: false }`), `lib/clacky/server/channel/adapters/feishu/bot.rb:299` (`ssl: { verify: false }`), `lib/clacky/server/channel/adapters/feishu/bot.rb:954` (`ssl: { verify: false }`), `lib/clacky/server/channel/adapters/feishu/bot.rb:983` (`ssl: { verify: false }`), `lib/clacky/server/channel/adapters/feishu/bot.rb:1090` (`ssl: { verify: false }`), `lib/clacky/server/channel/adapters/wecom/media_downloader.rb:52` (`ssl: { verify: false }`). Each is a separate decision — fixing only the line this row cites leaves the others in place.+4.1 ptsMediumWeb-Security Posture
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.+3.1 ptsMediumType Safety
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.+3.1 ptsMediumLarge Files
Adopt a checker and raise it file by file: with Sorbet, `srb init` (or `bundle exec tapioca init`) commits `sorbet/config`, then move each file's sigil from `# typed: false` to `# typed: true` and on to `strict` as its methods get `sig`s — `spoom bump` does the moving; with Steep, write RBS signatures and `check` the product directories in the `Steepfile` under `D::Ruby.default` or `strict`, not `lenient`. Then pay down the assertions rather than adding to them: each `T.must` is a nil the checker could not rule out — narrow it (`return unless x`, `x&.`, `if (y = x)`), make the attribute non-nilable and set it in `initialize`, or change the method so the nil cannot arrive.+2.2 ptsMediumNullable reference types
Bring the 4 bodies over 120 down to 120 or less in Cyclomatic Complexity — start with HttpServer._dispatch_rest (cyclomatic 239), ws-dispatcher._dispatchEvent (cyclomatic 175), _dispatchEvent (cyclomatic 175).+1.5 ptsHighCyclomatic Complexity
Resolve the 4 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED, REDACTED.+0.7 ptsLowStatic Analysis (SAST)
Resolve the 2 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (2).+0.7 ptsLowDependency Vulnerabilities
Resolve the 4 High IaC finding(s) in IaC & Container Security — start with REDACTED (4).+0.7 ptsLowIaC & Container Security

File quality

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

FileScoreBandWorst signal
REDACTED0.2SlopStatic Analysis (SAST): High: REDACTED
REDACTED1.6SlopIaC & Container Security: High IaC: REDACTED
REDACTED3.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
lib/clacky/server/http_server.rb4.8MixedCyclomatic Complexity: HttpServer._dispatch_rest (cyclomatic 239)
REDACTED4.9MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.0MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.4MixedStatic Analysis (SAST): Medium: REDACTED
lib/clacky/ui2/screen_buffer.rb5.5MixedCyclomatic Complexity: ScreenBuffer.read_key (cyclomatic 45)
lib/clacky/ui2/components/input_area.rb5.5MixedCyclomatic Complexity: InputArea.handle_key (cyclomatic 43)
lib/clacky/server/session_registry.rb5.6MixedCyclomatic Complexity: SessionRegistry.list (cyclomatic 46)
REDACTED5.7MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.8MixedDependency Vulnerabilities: High CVE: REDACTED
lib/clacky/extension/api_extension.rb5.9MixedCyclomatic Complexity: ApiExtension.create_session (cyclomatic 21)
lib/clacky/plain_ui_controller.rb5.9MixedCyclomatic Complexity: PlainUIController.show_tool_call (cyclomatic 21)
lib/clacky/server/web_ui_controller.rb5.9MixedCyclomatic Complexity: WebUIController.show_user_message (cyclomatic 18)
lib/clacky/server/channel/adapters/feishu/bot.rb5.9MixedGod Classes: TooManyMethods: Bot

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

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

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

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

Could not be resolved — 6

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

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

What we checked — 79 dimensions across the health lenses
D1D2D3D4D6D12D13D14D15D16D17D19D21D22D26D28D29D30D31D34D35D36D43D44AC1AC2AC3AC4AC5AC6AC7AX10AX3AX4AX6GD1IC1M1M2M3M4P1P10P2P3P4P5P6PF3R1R10R2R3R4R7R9S1X1X12X13X14X15X16X17X18X19X2X21X22X23X24X25X26X27X28X29X3X30X5

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

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

Tools & methods

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

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

Every finding is locatable in findings.md. Run 01a15d37-a4e7-73ab-8960-ed75ce176699.

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 (.rb) 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 (SimpleCov — `require "simplecov"` in your `spec_helper.rb`/`test_helper.rb`, which writes `coverage/.resultset.json` (or lcov via `simplecov-lcov`)) 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 (SimpleCov — `require "simplecov"` in your `spec_helper.rb`/`test_helper.rb`, which writes `coverage/.resultset.json` (or lcov via `simplecov-lcov`)) 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 reliability not included — the Ruby suite (RSpec: 2 bundle roots) did not finish re-running within its budget: the Ruby suite did not finish re-running within its tier budget.
  • D27 Navigability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
  • AC4 Keyboard semantics — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 8 further occurrence(s) are not listed individually; the score already reflects all 48.
  • AC6 Visual & motion safety — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 61 further occurrence(s) are not listed individually; the score already reflects all 101.
  • AX1 Captive dependencies — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads Microsoft.Extensions.DependencyInjection registrations in C# and Spring beans in Java/Kotlin only, and this repository defines its own container in lib/clacky/web/core/ext.js, whose lifetimes are not modelled yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • AXR1 Runtime accessibility — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via REDACTED (REDACTED). docker build failed (exit 1) — DEPRECATED: The legacy builder is deprecated and will be removed in a future release. Install the buildx component to build images with BuildKit: https://docs.docker.com/go/bui…; runtime evidence skipped.
  • P7 Outbound HTTP resilience — 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 recognises outbound HTTP clients, their timeouts and resilience policies, and service entry points in .NET, Go, JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang. No service entry point was found in the JavaScript/TypeScript, Python, Ruby source it does read, and the rest of this repository's production source is , which it does not read yet — the service may well be there — a gap in this analyzer's language reach, not a finding about the code.
  • R10 Code Duplication — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 96 further occurrence(s) are not listed individually; the score already reflects all 136.
  • R4 Test Coverage — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 12 further occurrence(s) are not listed individually; the score already reflects all 52.
  • X2 Cancellation propagation — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 123 further occurrence(s) are not listed individually; the score already reflects all 163.
  • X24 Document value interpolated into markup unescaped — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 239 further occurrence(s) are not listed individually; the score already reflects all 279.
  • X3 Exception handling — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 302 further occurrence(s) are not listed individually; the score already reflects all 342.

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.
  • 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.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality 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.
  • D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
  • D22 Internal API Consistency: API-surface coherence is an LLM judgement over a sample of the public surface — consistency of intent across the whole API is approximated, not exhaustively verified.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • 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.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

The LLM boundary

LLM-set scores this run (5): D19, D21, D22, 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 Complexity2.7 / 10Weak✓ Tool-verified

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

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

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

246 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was HttpServer._dispatch_rest at 239. 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 ModelPricing.normalize_model_name at 72 — they are counted neither in the figure above nor in this dimension's score. 3 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: lib/clacky/utils/model_pricing.rb (ModelPricing.normalize_model_name at 72), lib/clacky/server/channel/adapters/dingtalk/api_client.rb (ApiClient.guess_ext at 32), lib/clacky/rich_ui/view_renderer.rb (ViewRenderer.parse_tool_info 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.

(anonymous)::_docTypeIcon (cyclomatic 113) · ×16REDACTED:701
showDirectoryPicker::(anonymous)::navigateTo (cyclomatic 31) · ×2REDACTED:6667
(anonymous) (cyclomatic 24) · ×2lib/clacky/web/features/mcp/store.js:15
HttpServer._dispatch_rest (cyclomatic 239)lib/clacky/server/http_server.rb:664
ws-dispatcher._dispatchEvent (cyclomatic 175)lib/clacky/web/ws-dispatcher.js:202

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

What to do

  1. Bring the 4 bodies over 120 down to 120 or less in Cyclomatic Complexity — start with HttpServer._dispatch_rest (cyclomatic 239), ws-dispatcher._dispatchEvent (cyclomatic 175), _dispatchEvent (cyclomatic 175). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 4 together lifts Cyclomatic Complexity from 2.7 to about 4.0/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
  2. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

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

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

305 method(s) exceeded the cognitive complexity threshold of 15; the worst was _dispatchEvent at 246.

(anonymous)::_renderHistoryEvent (cognitive 92) · ×22REDACTED:2072
showDirectoryPicker::(anonymous)::fetchDirs (cognitive 31) · ×2REDACTED:6091
(anonymous) (cognitive 24) · ×2lib/clacky/web/features/mcp/store.js:15
(anonymous)._render (cognitive 17) · ×2lib/clacky/web/skills.js:244
_dispatchEvent (cognitive 246)lib/clacky/web/ws-dispatcher.js:202

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

What to do

  1. Bring the 6 bodies over 120 down to 120 or less in Cognitive Complexity — start with _dispatchEvent (cognitive 246), ws-dispatcher._dispatchEvent (cognitive 209), viewer.html.renderBenchmark (cognitive 181). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 6 together lifts Cognitive Complexity from 2.0 to about 3.1/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
  2. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

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

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

60 god class(es) detected.

FileTooLong: server/http_server.rb · ×26lib/clacky/server/http_server.rb
TooManyMethods: HttpServer · ×26lib/clacky/server/http_server.rb:181
FunctionTooLong: sessions.showDirectoryPicker · ×8REDACTED:6064

What to do

  1. Resolve the 26 FileTooLong finding(s) in God Classes — start with view.js (3), http_server.rb, REDACTED. — One of this dimension's main actionable groups (26 warning-level).
  2. Resolve the 26 TooManyMethods finding(s) in God Classes — start with http_server.rb, ui_controller.rb, REDACTED. — One of this dimension's main actionable groups (26 warning-level).
  3. Resolve the 8 FunctionTooLong finding(s) in God Classes — start with view.js (5), REDACTED, ws-dispatcher.js. — One of this dimension's main actionable groups (8 warning-level).
  4. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D4 · Code Duplication9.6 / 10Stronggated by 68 serious findings✓ Tool-verified

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

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

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

65 duplicated block group(s) detected. A further 3 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted.

Duplicated block (10 lines × 2) · ×7lib/clacky/message_format/anthropic.rb:280
Duplicated block (9 lines × 2) · ×6lib/clacky/agent/time_machine.rb:421
Duplicated block (8 lines × 2) · ×6lib/clacky/anthropic_stream_aggregator.rb:47
Duplicated block (5 lines × 2) · ×5REDACTED:620
Duplicated block (14 lines × 2) · ×3lib/clacky/client.rb:709

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

What to do

  1. Resolve the 7 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with http_server.rb (3), anthropic.rb, layout_manager.rb. — One of this dimension's main actionable groups (7 warning-level).
  2. Resolve the 6 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with http_server.rb (2), time_machine.rb, discord_setup.rb. — One of this dimension's main actionable groups (6 warning-level).
  3. Resolve the 6 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with http_server.rb (3), anthropic_stream_aggregator.rb, terminal.rb. — 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.

D6 · Cohesion (LCOM4)9.3 / 10Stronggated by 7 serious findings✓ 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 9.3 / 10 · rule-coverage 100% · ceiling Verified

7 of 113 classes have LCOM4 above 3.

Low cohesion: Agent (LCOM4 9) · ×7REDACTED:32

What to do

  1. Resolve the 7 Low cohesion finding(s) in Cohesion (LCOM4) — start with REDACTED, http_server.rb, api_extension.rb. — One of this dimension's main actionable groups (7 warning-level).
  2. Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

D12 · Dependency Hygiene9.9 / 10Exemplary✓ Tool-verified

What it measures: Whether dependencies are current, secure, and not bloated.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (saturating for vulnerabilities, capped-linear for deprecation/outdated) per KLoC. Exhaustive, deterministic.

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

1 outdated direct gem(s), 0 pinning defect(s). 34 declaration(s) graded against rubygems.org, 25 of them against a version resolved in a committed REDACTED. 7 declaration(s) carry a requirement that EXCLUDES the current release; that is a deliberate constraint (a supported-version ceiling or a held-back CI pin) and is counted, not charged. Whether any of these gems is DEPRECATED or YANKED is not graded — rubygems.org publishes no deprecation marker, and a yank removes a version rather than flagging it. Whether any is UNMAINTAINED is not graded either: no registry publishes a maintenance status, and release age does not stand in for one. Whether any is UNUSED is a source question, not a registry one. Known CVEs in this dependency graph are D30's question, read from the manifest there.

Outdated: rubocop

✓ On the Gold path — maintain.

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

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

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

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

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

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

D14 · License Compliance10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether the licenses of third-party packages are compatible with your policy.

Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.

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

0 of 71 shipped gem(s) use a banned license. Licences were resolved from rubygems.org over the 71 gem(s) a consumer installs — this repository's runtime declarations closed transitively over its committed REDACTED. Development-group and `add_development_dependency` gems are excluded: they are not distributed with this repository. 1 of them publish no licence on rubygems.org; that is missing data, not a violation, and none of them is charged. This repository publishes itself under MIT, which is its own choice and is not judged here.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots6.2 / 10Adequate✓ 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 6.2 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: lib/clacky/server/http_server.rb (119×239=28441); REDACTED (96×145=13920); REDACTED (63×96=6048) Repeated repair below the complexity floor: lib/clacky/extension/packager.rb (6 of 9 changes were fixes); lib/clacky/extension/verifier.rb (4 of 7 changes were fixes); lib/clacky/default_extensions/advisor/panels/advisor/view.js (4 of 5 changes were fixes)

Hotspot: lib/clacky/server/http_server.rb · ×26lib/clacky/server/http_server.rb:664
Repeated repair: lib/clacky/extension/packager.rb · ×4lib/clacky/extension/packager.rb:258

What to do

  1. Resolve the 26 Hotspot finding(s) in Churn × Complexity Hotspots — start with store.js (2), http_server.rb, REDACTED. — One of this dimension's main actionable groups (26 warning-level).
  2. Resolve the 4 Repeated repair finding(s) in Churn × Complexity Hotspots — start with packager.rb, verifier.rb, view.js. — One of this dimension's main actionable groups (4 warning-level).

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

D16 · Bus Factor7.0 / 10Adequate✓ Tool-verified

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

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

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

63 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is lib/clacky/agent/skill_manager.rb. Counted over 215 of the 279 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

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

What to do

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

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

D17 · Explicit Debt10.0 / 10Stronggated by 13 serious findings✓ Tool-verified

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

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

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

13 deducted task-comment markers across 76251 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.

TodoComment · ×12lib/clacky/agent/tool_executor.rb:178
XxxCommentlib/clacky/tools/security.rb:17

What to do

  1. Resolve the 12 TodoComment finding(s) in Explicit Debt — start with user_adapter_loader.rb (4), tool_executor.rb (3), message_compressor_helper.rb. — One of this dimension's main actionable groups (12 warning-level).
  2. Resolve the 1 XxxComment finding(s) in Explicit Debt — start with security.rb. — One of this dimension's main actionable groups (1 warning-level).
  3. Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D19 · Documentation QualityStrong◐ 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 Strong / 10 · rule-coverage 100% · ceiling Documented

The repository's root README (OpenClacky) is clear and well-structured: it states what the project does (a token-efficient AI agent), shows a build/release badge, lists licensing, and opens with an overview of why OpenClacky exists over alternatives. The homebrew/README.md documents its own directory (Homebrew formula for OpenClacky) with one-time setup, update, and user-installation steps; it is focused on the homebrew tier rather than the repository's root project, so it does not fall under missing-overview or missing-installation. The architecture/design docs are comprehensive: agent-first UI design philosophy, billing system, channel architecture, emit/background skills, and an engineering article each cover their scope with a full outline (all sections present). The OpenClacky documentation is comprehensive and well-structured across READMEs, architecture/design docs, and a dedicated time-machine design doc. The root README (not shown) would cover installation/usage/contribution guidance, but the visible documents focus on the rich UI module's interface layout, refactoring plan, agent-turn lifecycle hooks, session/skill invocation pattern, time machine design, and ChatCut extension bridge implementation. All visible content is clear and complete for its scope. This is a well-structured design document for the ChatCut remote MCP OAuth fallback capability. It opens with an overview of purpose (provider-neutral client capability) and two independently usable versions (ChatCut extension bridge vs native OpenClacky OAuth), then dives into user experience (setup on native vs older clients, skill visibility, setup merging without overwriting existing servers), a shared configuration contract example, and the outline's promised sections. The visible content is rich in rationale for each mode.

Documentation: no project overview · ×3README.md

What to do

  1. Resolve the 3 Documentation finding(s) in Documentation Quality — start with README.md, engineering-article.md, session-observation-hooks.md. — One of this dimension's main actionable groups (3 recommendation-level).

Detailed fixes: d19_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.

D22 · Internal API ConsistencyStrong◐ Sampled · advisory

What it measures: Whether the internal API surface is consistent and coherent.

Method: Judged by language model at low temperature over a sample of the public API surface (IsPackable or .Contracts types). Sampled, advisory; confidence discounted by model uncertainty.

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

3 API inconsistencies across a 400-member sample of 362 exposed types.

Redundant model switching logic across Agent and AgentConfig. The Agent class exposes `switch_model_by_id`, which duplicates the capability already present in `AgentConfig`. Furthermore, `AgentConfig` offers both `switch_model_by_id` and `switch_model_by_name`, while `Agent` only offers `switch_model_by_id`. This creates an inconsistent API surface where the configuration object has more granular control methods than the agent object that uses it.
Inconsistent object construction patterns. `Agent` has a complex `initialize` method with 7 arguments, but also provides a class method `from_session` that reconstructs an agent from session data. This is a valid factory pattern, but it contrasts with other types in the API (like `GoalState` which has `from_h`) and `AccessKey` (which has `from_file`, `from_env`). While not strictly an error, the existence of `from_session` implies that `initialize` is not the primary way to create an Agent in many contexts, yet it remains the public constructor. This splits the mental model of 'how do I create an Agent?' between a raw initializer and a specific factory.
Inconsistent accessor naming for configuration values. `AgentConfig` uses standard Ruby-style getters/setters (`api_key`, `api_key=`) for some properties, but other properties like `ask_user_timeout_seconds` are listed as Properties without explicit setter signatures in the summary (though likely present). More importantly, `ClackyEnv` uses methods like `default_api_key()` and `lite_api_key()` instead of properties. This mixes property-style access in `AgentConfig` with method-style access in `ClackyEnv` for similar configuration retrieval tasks.

What to do

  1. Resolve the 1 Redundant model switching logic across Agent and AgentConfig. The Agent… finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 Inconsistent object construction patterns. `Agent` has a complex… finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 Inconsistent accessor naming for configuration values. `AgentConfig`… finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).

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

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 (Bundler) 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)10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.

Method: Secret scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.

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

gitleaks scanned the full history AND the current working tree and found no secrets.

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

D29 · Static Analysis (SAST)0.2 / 10Critical✓ Tool-verified

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

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

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

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

71 finding(s): 0 critical, 23 high, 10 medium, 38 low. 6 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 5 file(s) — `lib/clacky/tools/terminal/safe_rm.sh` (line 64), `lib/clacky/web/features/workspace/view.js`, `REDACTED`, `REDACTED`, `spec/fixtures/web_search/bing.html` (line 547, line 549, line 551, …) — 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 2 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

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

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

D30 · Dependency Vulnerabilities8.8 / 10Adequategated by 2 critical findings✓ Tool-verified

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

Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no REDACTED 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 8.8 / 10 · rule-coverage 100% · ceiling Documented

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

REDACTED

What to do

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

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

D31 · IaC & Container Security8.5 / 10Adequategated by 4 critical findings✓ Tool-verified

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

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

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

6 finding(s): 0 critical, 4 high, 2 medium, 0 low.

REDACTED
REDACTED

What to do

  1. Resolve the 4 High IaC finding(s) in IaC & Container Security — start with REDACTED (4). — One of this dimension's main actionable groups (4 issue-level).
  2. Resolve the 2 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (2). — One of this dimension's main actionable groups (2 warning-level).

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

D34 · Knowledge Freshness9.8 / 10Exemplary✓ Tool-verified

What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.

Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.

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

5 of 215 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is lib/clacky/rich_ui/components/dialogs/approval_dialog.rb. Counted over 215 of the 279 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned file · ×5lib/clacky/rich_ui/components/dialogs/approval_dialog.rb:1
Orphaned files with no living knowledge

✓ On the Gold path — maintain.

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

D35 · Change Coupling7.7 / 10Strong✓ 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 7.7 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: json_ui_controller.rb↔ui_controller.rb 100%; json_ui_controller.rb↔plain_ui_controller.rb 93%; channel_config.rb↔view.js 91%

Change coupling: channel_config.rb ↔ view.js · ×9lib/clacky/server/channel/channel_config.rb:1
Change-coupling hub: json_ui_controller.rb → REDACTED, plain_ui_controller.rb, channel_ui_controller.rb, web_ui_controller.rb, ui_controller.rb, REDACTED · ×5lib/clacky/json_ui_controller.rb
Change coupling clique: REDACTED, providers.rb, model_pricing.rbREDACTED

What to do

  1. Resolve the 9 Change coupling finding(s) in Change Coupling — start with channel_config.rb, REDACTED, REDACTED. — One of this dimension's main actionable groups (9 warning-level).
  2. Resolve the 5 Change-coupling hub finding(s) in Change Coupling — start with json_ui_controller.rb, i18n.js, plain_ui_controller.rb. — One of this dimension's main actionable groups (5 warning-level).
  3. Resolve the 1 Change coupling clique finding(s) in Change Coupling — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).

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

D36 · Supply-chain Provenance & Signing0.0 / 10Critical✓ 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 0.0 / 10 · rule-coverage 100% · ceiling Documented

0/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 — start with REDACTED. — 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 recommendation-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-Life10.0 / 10Exemplary✓ Tool-verified

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

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

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

0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 0 platform declaration(s) and 34 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

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 & labels6.6 / 10Adequate✓ Tool-verified

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

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

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

  • This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label. (×3) — lib/clacky/default_skills/skill-creator/eval-viewer/viewer.html:604, lib/clacky/web/design-sample.html:118, lib/clacky/web/features/new-session/view.js:642
  • 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) — lib/clacky/web/design-sample.html:119, REDACTED:1080
  • This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id. — lib/clacky/web/features/new-session/view.js:639

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 structure6.0 / 10Adequate✓ Tool-verified

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

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

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

  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×2) — lib/clacky/default_skills/skill-creator/eval-viewer/viewer.html:2, lib/clacky/web/weixin-qr.html:2

What to do

  • Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
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".

  • The repo's own CSS styles .task-item with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. (×8) — lib/clacky/web/design-sample.html:57, lib/clacky/web/design-sample.html:58, lib/clacky/web/design-sample.html:59, …
  • The repo's own CSS styles .version-badge with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. — lib/clacky/web/design-sample.html:76
  • The repo's own CSS styles .sib-clickable with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. (×5) — lib/clacky/web/design-sample.html:99, lib/clacky/web/design-sample.html:101, lib/clacky/web/design-sample.html:103, …
  • The repo's own CSS styles .custom-select-option with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. (×2) — lib/clacky/web/features/billing/view.js:130, lib/clacky/web/features/billing/view.js:131
  • The repo's own CSS styles .billing-trend-dot with `cursor: pointer`, so this <circle> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. — lib/clacky/web/features/billing/view.js:927
  • This <div role="dialog"> is a modal dialog, but focus is moved into it, but nothing keeps it there: Tab walks out to the page behind, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close. — lib/clacky/web/features/channels/view.js:364
  • The repo's own CSS styles .memory-card-info with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. — lib/clacky/web/features/profile/view.js:181
  • The repo's own CSS styles .session-actions-menu-item with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. (×21) — lib/clacky/web/features/workspace/view.js:330, lib/clacky/web/features/workspace/view.js:336, lib/clacky/web/features/workspace/view.js:345, …

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 safety1.0 / 10Critical✓ Tool-verified

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.

  • `.grades-toggle .arrow` moves (`transition: transform 0.15s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — lib/clacky/default_skills/skill-creator/eval-viewer/viewer.html:275
  • `.success-icon` moves (`animation: pop 0.3s ease-out`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — lib/clacky/web/weixin-qr.html:94
  • `.search-input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — lib/clacky/web/app.css:1337
  • `.search-date` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — lib/clacky/web/app.css:1413
  • `.session-rename-input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — lib/clacky/web/app.css:1964
  • `.new-session-textarea` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — lib/clacky/web/app.css:2825
  • `.wt-search-input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — lib/clacky/web/app.css:3402
  • `.wv-code .cm-editor.cm-focused` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — lib/clacky/web/app.css:3647
  • `.msg-user-edit-textarea` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — lib/clacky/web/app.css:4313
  • `.todo-panel.is-open .todo-trigger` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — lib/clacky/web/app.css:4961
  • `.skill-ac-item.active` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — lib/clacky/web/app.css:6809
  • `#user-input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — lib/clacky/web/app.css:7279
  • `.dp-address-input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — lib/clacky/web/app.css:8790
  • `.dp-name-input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — lib/clacky/web/app.css:8937
  • `.skill-import-input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — lib/clacky/web/app.css:9663
  • `.code-editor-body .cm-editor.cm-focused` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — lib/clacky/web/app.css:11131
  • `.brand-support-qr-btn` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — lib/clacky/web/app.css:12322
  • `.archive-search-input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — lib/clacky/web/app.css:14116
  • `.settings-accent-swatch` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — lib/clacky/web/app.css:15355
  • `.composer textarea` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — lib/clacky/web/design-sample.css:241
  • `.skel` moves (`animation: skel-shimmer 1.8s infinite linear`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — lib/clacky/web/app.css:413
  • `[data-theme="dark"] .skel` moves (`animation: skel-shimmer 1.8s infinite linear`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — lib/clacky/web/app.css:422
  • `[data-theme="dim"] .skel` moves (`animation: skel-shimmer 1.8s infinite linear`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — lib/clacky/web/app.css:431
  • `[data-theme="warm"] .skel` moves (`animation: skel-shimmer 1.8s infinite linear`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — lib/clacky/web/app.css:440
  • `[data-theme="bluedark"] .skel` moves (`animation: skel-shimmer 1.8s infinite linear`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — lib/clacky/web/app.css:449
  • `.chat-section-chevron` moves (`transition: transform 0.2s ease, opacity 0.15s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — lib/clacky/web/app.css:975
  • `.btn-split-arrow svg` moves (`transition: transform 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — lib/clacky/web/app.css:1040
  • `.btn-split-menu` moves (`transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.15s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — lib/clacky/web/app.css:1067
  • `.btn-split-dropdown:hover .btn-split-menu` moves (`transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — lib/clacky/web/app.css:1082
  • `.cmd-palette` moves (`transition: transform 0.16s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — lib/clacky/web/app.css:1248
  • `.session-actions-btn` moves (`transition: background .15s, color .15s, width .15s, opacity .15s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — lib/clacky/web/app.css:1725
  • `.session-actions-menu` moves (`animation: fadeIn 0.15s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — lib/clacky/web/app.css:1762
  • `.session-context-menu` moves (`animation: fadeIn 0.15s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — lib/clacky/web/app.css:1772
  • `.session-actions-submenu` moves (`animation: fadeIn 0.15s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — lib/clacky/web/app.css:1871
  • `.btn-create-task` moves (`transition: background-color 0.2s ease, transform 0.15s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — lib/clacky/web/app.css:2232
  • `.agent-card` moves (`transition: border-color 0.14s, background-color 0.14s, transform 0.14s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — lib/clacky/web/app.css:2687
  • `.new-session-advanced-caret` moves (`transition: transform 0.15s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — lib/clacky/web/app.css:2872
  • `.msg-time` moves (`transition: opacity 0.15s, transform 0.15s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — lib/clacky/web/app.css:4194
  • `.feedback-dot` moves (`transition: background 0.15s, transform 0.15s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — lib/clacky/web/app.css:4636
  • `.error-raw-detail summary::before` moves (`transition: transform 0.15s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — lib/clacky/web/app.css:4871

What to do

  • Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
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 — no automated accessibility check runs over the HTML your app renders. Assert the accessibility invariants over that HTML in the test suite you already have (parse the output and assert, or drive a browser), and gate that test in CI so a regression blocks the merge. What was searched, so you can tell an absence from a miss: the 38 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 test suite you already have: assert the accessibility invariants over the HTML your app renders — parse the rendered output in an existing test, or drive a real browser from one — and gate that test in CI so a regression blocks the merge.
AX10 · Code composition6.5 / 10Adequate✓ 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.

AX6 · Interface segregation10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').

Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.

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

Other · Code Health — Unreviewed-generation residue in this repository's Ruby: methods whose whole body still raises NotImplementedError where nothing overrides them, or a "not implemented" error, and placeholder text (lorem ipsum, changeme/replace_me…) left in strings of non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.

Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.

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

Other · Code Health — Unfinished work detected by code SHAPE, not keywords, in this repository's Ruby: methods that only raise NotImplementedError or a "not implemented" error where nothing overrides them, methods that take inputs and return a constant or do nothing, dead `if false` branches, and skeleton classes most of whose methods are holes.

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

  • A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something. (×2) — spec/clacky/rich_ui_controller_spec.rb:8, spec/clacky/server/http_server_preview_spec.rb:284

What to do

  • Clear the softer debt: re-enable or delete `xit`/`skip`ped tests, decide whether each empty method or NotImplementedError refusal is deliberate (and say so in a comment), and replace `# rubocop:disable all` with targeted, justified disables.
M1 · Documentation (README)6.7 / 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

  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
  • Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
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 your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
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 accuracy0.0 / 10Critical◐ 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.

  • docs/engineering-article.md names `benchmark/runner.rb`, but no file or folder `benchmark/runner.rb` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/engineering-article.md:314
  • docs/mcp-architecture.md names `lib/clacky/tools/mcp_call.rb`, but no file or folder `lib/clacky/tools/mcp_call.rb` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/mcp-architecture.md:89
  • docs/rich_ui_guide.md names `extensions/viewport_selection.rb`, but no file or folder `extensions/viewport_selection.rb` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/rich_ui_guide.md:96
  • docs/rich_ui_guide.md names `extensions/markdown_table_adapter.rb`, but no file or folder `extensions/markdown_table_adapter.rb` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/rich_ui_guide.md:104
  • docs/rich_ui_guide.md names `extensions/transcript_plain.rb`, but no file or folder `extensions/transcript_plain.rb` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/rich_ui_guide.md:219
  • docs/rich_ui_refactor_plan.md names `lib/clacky/rich_ui/extensions/viewport_selection.rb`, but no file or folder `lib/clacky/rich_ui/extensions/viewport_selection.rb` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/rich_ui_refactor_plan.md:130
  • docs/rich_ui_refactor_plan.md names `extensions/markdown_table_adapter.rb`, but no file or folder `extensions/markdown_table_adapter.rb` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/rich_ui_refactor_plan.md:151

What to do

  • Reconcile the README with reality: docs/engineering-article.md names `benchmark/runner.rb`, but no file or folder `benchmark/runner.rb` exists; docs/mcp-architecture.md names `lib/clacky/tools/mcp_call.rb`, but no file or folder `lib/clacky/tools/mcp_call.rb` exists; docs/rich_ui_guide.md names `extensions/viewport_selection.rb`, but no file or folder `extensions/viewport_selection.rb` exists; docs/rich_ui_guide.md names `extensions/markdown_table_adapter.rb`, but no file or folder `extensions/markdown_table_adapter.rb` exists; docs/rich_ui_guide.md names `extensions/transcript_plain.rb`, but no file or folder `extensions/transcript_plain.rb` 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.

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

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

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

P2 · Observability6.5 / 10Adequate✓ Tool-verified

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

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

  • Only 1/2 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`.

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
P3 · Security & performance tooling0.0 / 10Critical✓ Tool-verified

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

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

  • No static application security testing detected. For this repository's stack, add brakeman for Rails apps, otherwise `semgrep --config=auto` or CodeQL's ruby pack as a CI step. What was searched, so you can tell an absence from a miss: the 5062 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.

What to do

  • Add a SAST step to CI running what this repository's stack ships: brakeman for Rails apps, otherwise `semgrep --config=auto` or CodeQL's ruby pack — so a security regression fails the build instead of landing.
  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback8.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.

What to do

  • Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
P5 · DR & Backup4.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.

Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.

What to do

  • Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
  • Enable purge protection / soft-delete (and prevent_destroy on critical resources) so data stores can't be lost to an accidental or malicious delete.
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.

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, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.

R1 · Type Safety0.0 / 10Critical✓ Tool-verified

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

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

  • 0 typed · 83 plain JS — the untyped files are lib/clacky/default_extensions/advisor/panels/advisor/view.js, lib/clacky/default_extensions/ext-studio/panels/studio/view.js, lib/clacky/default_extensions/git/panels/git/view.js, lib/clacky/default_extensions/meeting/panels/meeting/view.js, lib/clacky/default_extensions/preview/panels/preview/view.js, lib/clacky/default_extensions/time_machine/panels/time_machine/view.js (+77 more).

What to do

  • Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
R10 · Code Duplication8.4 / 10Strong✓ 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.

  • 34 duplicated blocks under lib/clacky/web/features/ have copies in at least two of the sibling directories archive, backup, billing, brand, channels, extensions (+9 more sibling(s) not listed) — 29 of them are reported below, and 5 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 34 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 34 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 34 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. — lib/clacky/web/features/channels/view.js:235
  • 10 duplicated blocks under lib/clacky/ have copies in at least two of the sibling directories default_extensions, web — 4 of them are reported below, and 6 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 10 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 10 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 10 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. — lib/clacky/default_extensions/git/panels/git/view.js:154
  • 6 duplicated blocks under lib/clacky/web/ have copies in at least two of the sibling directories components, features — 3 of them are reported below, and 3 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 6 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 6 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 6 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — lib/clacky/web/components/code-editor.js:337
  • lib/clacky/web/features/new-session/view.js:377 · REDACTED:780 — 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. — lib/clacky/web/features/new-session/view.js:377
  • lib/clacky/web/features/new-session/view.js:469 · REDACTED:927 — 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. — lib/clacky/web/features/new-session/view.js:469
  • lib/clacky/web/features/channels/view.js:235 · lib/clacky/web/features/mcp/view.js:131 — 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. — lib/clacky/web/features/channels/view.js:235
  • lib/clacky/web/features/new-session/store.js:112 · lib/clacky/web/features/new-session/store.js:201 — the two spans are one implementation copied and then locally edited — 101 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. — lib/clacky/web/features/new-session/store.js:112
  • lib/clacky/web/features/workspace/store.js:97 · lib/clacky/web/features/workspace/store.js:141 — the two spans are one implementation copied and then locally edited — 153 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. — lib/clacky/web/features/workspace/store.js:97
  • lib/clacky/web/app.js:892 · lib/clacky/web/core/aside.js:265 — the two spans are one implementation copied and then locally edited — 144 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. — lib/clacky/web/app.js:892
  • lib/clacky/web/components/custom-select.js:22 · lib/clacky/web/settings.js:647 — 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. — lib/clacky/web/components/custom-select.js:22
  • lib/clacky/web/features/billing/store.js:46 · lib/clacky/web/settings.js:2947 — 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. — lib/clacky/web/features/billing/store.js:46
  • lib/clacky/web/settings.js:1036 · lib/clacky/web/settings.js:1289 — 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. — lib/clacky/web/settings.js:1036
  • lib/clacky/default_extensions/git/panels/git/view.js:111 · lib/clacky/default_extensions/time_machine/panels/time_machine/view.js:180 — 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. — lib/clacky/default_extensions/git/panels/git/view.js:111
  • REDACTED:4174 · REDACTED:4486 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — REDACTED:4174
  • lib/clacky/web/features/channels/store.js:18 · lib/clacky/web/features/mcp/store.js:18 · lib/clacky/web/features/share/store.js:27 · lib/clacky/web/features/skills/store.js:37 — the 4 copies are spread across 4 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. There is one copy in each of 4 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — lib/clacky/web/features/channels/store.js:18
  • lib/clacky/web/settings.js:1212 · lib/clacky/web/settings.js:1324 — 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. — lib/clacky/web/settings.js:1212
  • lib/clacky/web/app.js:81 · lib/clacky/web/features/new-session/view.js:290 — 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. — lib/clacky/web/app.js:81
  • lib/clacky/web/features/backup/store.js:15 · lib/clacky/web/features/channels/store.js:20 · lib/clacky/web/features/extensions/store.js:61 · lib/clacky/web/features/mcp/store.js:20 · +3 more site(s) not listed — the 7 copies are spread across 7 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. There is one copy in each of 7 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — lib/clacky/web/features/backup/store.js:15
  • lib/clacky/web/app.js:584 · lib/clacky/web/app.js:616 — 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. — lib/clacky/web/app.js:584
  • lib/clacky/web/components/mentions.js:490 · lib/clacky/web/skills.js:520 — the two spans are one implementation copied and then locally edited — 116 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. — lib/clacky/web/components/mentions.js:490
  • lib/clacky/web/components/onboard.js:275 · lib/clacky/web/settings.js:1100 — the two spans are one implementation copied and then locally edited — 98 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. — lib/clacky/web/components/onboard.js:275
  • lib/clacky/web/features/archive/store.js:18 · lib/clacky/web/features/new-session/store.js:33 — 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. — lib/clacky/web/features/archive/store.js:18
  • lib/clacky/web/features/billing/store.js:26 · lib/clacky/web/features/brand/store.js:21 · lib/clacky/web/features/trash/store.js:24 · lib/clacky/web/features/workspace/store.js:16 — the 4 copies are spread across 4 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. There is one copy in each of 4 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — lib/clacky/web/features/billing/store.js:26
  • lib/clacky/web/features/brand/store.js:18 · lib/clacky/web/features/share/store.js:25 — 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. — lib/clacky/web/features/brand/store.js:18
  • lib/clacky/web/features/skills/store.js:273 · lib/clacky/web/features/skills/store.js:290 — 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. — lib/clacky/web/features/skills/store.js:273
  • lib/clacky/web/features/skills/view.js:717 · lib/clacky/web/features/tasks/view.js:192 — 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. — lib/clacky/web/features/skills/view.js:717
  • lib/clacky/web/settings.js:786 · lib/clacky/web/settings.js:816 — 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. — lib/clacky/web/settings.js:786
  • lib/clacky/web/app.js:643 · lib/clacky/web/app.js:690 — 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. — lib/clacky/web/app.js:643
  • lib/clacky/web/features/archive/store.js:109 · lib/clacky/web/features/archive/store.js:131 — 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. — lib/clacky/web/features/archive/store.js:109
  • lib/clacky/web/features/new-session/view.js:501 · REDACTED:970 — 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. — lib/clacky/web/features/new-session/view.js:501
  • lib/clacky/default_extensions/ext-studio/panels/studio/view.js:458 · lib/clacky/default_extensions/ext-studio/panels/studio/view.js:474 — 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. — lib/clacky/default_extensions/ext-studio/panels/studio/view.js:458
  • lib/clacky/default_extensions/ext-studio/panels/studio/view.js:1496 · lib/clacky/default_extensions/ext-studio/panels/studio/view.js:1512 — 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. — lib/clacky/default_extensions/ext-studio/panels/studio/view.js:1496
  • lib/clacky/default_extensions/git/panels/git/view.js:154 · lib/clacky/web/features/workspace/view.js:785 — 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. — lib/clacky/default_extensions/git/panels/git/view.js:154
  • lib/clacky/default_extensions/git/panels/git/view.js:111 · lib/clacky/default_extensions/preview/panels/preview/view.js:38 — 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. — lib/clacky/default_extensions/git/panels/git/view.js:111
  • lib/clacky/web/components/composer.js:32 · lib/clacky/web/components/mentions.js:99 — 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. — lib/clacky/web/components/composer.js:32
  • lib/clacky/web/features/channels/view.js:217 · lib/clacky/web/features/mcp/view.js:113 — 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. — lib/clacky/web/features/channels/view.js:217
  • lib/clacky/web/features/extensions/store.js:120 · lib/clacky/web/features/extensions/store.js:186 — 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. — lib/clacky/web/features/extensions/store.js:120
  • lib/clacky/web/features/new-session/store.js:33 · lib/clacky/web/features/profile/store.js:16 · lib/clacky/web/features/workspace/store.js:16 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — lib/clacky/web/features/new-session/store.js:33
  • lib/clacky/default_extensions/ext-studio/panels/studio/view.js:1996 · lib/clacky/default_extensions/ext-studio/panels/studio/view.js:2157 — 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. — lib/clacky/default_extensions/ext-studio/panels/studio/view.js:1996
  • lib/clacky/web/components/mentions.js:392 · lib/clacky/web/components/mentions.js:433 — 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. — lib/clacky/web/components/mentions.js:392

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 Complexity5.0 / 10Adequate✓ 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.

  • _dispatchEvent has cyclomatic complexity 164 and cognitive complexity 219; 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. — lib/clacky/web/ws-dispatcher.js:202
  • _docTypeIcon has cyclomatic complexity 113 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. — REDACTED:701
  • _humanCron has cyclomatic complexity 81 and cognitive complexity 80; 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. — lib/clacky/web/features/tasks/view.js:15
  • _fetchHistory has cyclomatic complexity 63 and cognitive complexity 89; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:2289
  • _renderHistoryEvent has cyclomatic complexity 61 and cognitive complexity 92; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:2072
  • updateInfoBar has cyclomatic complexity 50 and cognitive complexity 81; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:4629
  • _apply has cyclomatic complexity 48 and cognitive complexity 44; 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. — lib/clacky/web/app.js:272
  • _renderContextBar has cyclomatic complexity 31 and cognitive complexity 34; 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. — lib/clacky/web/features/new-session/view.js:803
  • (anonymous) has cyclomatic complexity 31 and cognitive complexity 30; 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. — lib/clacky/web/components/model-picker.js:646
  • _renderSessionItem has cyclomatic complexity 31 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:3045
  • navigateTo has cyclomatic complexity 31 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:6667
  • fetchDirs has cyclomatic complexity 28 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:6091
  • appendTokenUsage has cyclomatic complexity 28 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:5014
  • _docTypeIcon has cyclomatic complexity 28 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. — lib/clacky/web/features/new-session/view.js:359
  • commitSearch has cyclomatic complexity 26 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:3722
  • _parseHash has cyclomatic complexity 26 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — lib/clacky/web/app.js:171
  • _saveModalModel has cyclomatic complexity 25 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — lib/clacky/web/settings.js:540
  • _renderPreview has cyclomatic complexity 24 and cognitive complexity 21; 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. — lib/clacky/web/components/chat-navigator.js:174
  • _detailContent has cyclomatic complexity 24 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. — lib/clacky/web/features/extensions/view.js:526
  • _handleKey has cyclomatic complexity 23 and cognitive complexity 34; 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. — lib/clacky/web/components/mentions.js:495

What to do

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

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

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

  • REDACTED has 6488 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • lib/clacky/web/i18n.js has 2879 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/clacky/web/i18n.js:1
  • lib/clacky/web/settings.js has 2806 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/clacky/web/settings.js:1
  • lib/clacky/default_extensions/ext-studio/panels/studio/view.js has 2208 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/clacky/default_extensions/ext-studio/panels/studio/view.js:1
  • lib/clacky/web/features/workspace/view.js has 1739 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/clacky/web/features/workspace/view.js:1
  • lib/clacky/web/projects.js has 1048 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/clacky/web/projects.js:1
  • lib/clacky/web/features/billing/view.js has 1005 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/clacky/web/features/billing/view.js:1
  • lib/clacky/web/features/skills/view.js has 970 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/clacky/web/features/skills/view.js:1
  • lib/clacky/web/app.js has 962 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/clacky/web/app.js:1
  • lib/clacky/web/features/new-session/view.js has 937 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/clacky/web/features/new-session/view.js:1
  • lib/clacky/default_extensions/meeting/panels/meeting/view.js has 878 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/clacky/default_extensions/meeting/panels/meeting/view.js:1
  • lib/clacky/web/features/extensions/view.js has 793 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/clacky/web/features/extensions/view.js:1
  • lib/clacky/web/core/ext.js has 757 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/clacky/web/core/ext.js:1
  • lib/clacky/web/components/model-picker.js has 739 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/clacky/web/components/model-picker.js:1
  • lib/clacky/web/ws-dispatcher.js has 737 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/clacky/web/ws-dispatcher.js:1
  • lib/clacky/web/components/mentions.js has 591 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/clacky/web/components/mentions.js:1
  • lib/clacky/web/features/share/view.js has 581 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/clacky/web/features/share/view.js:1
  • lib/clacky/default_extensions/git/panels/git/view.js has 578 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/clacky/default_extensions/git/panels/git/view.js:1
  • lib/clacky/default_extensions/time_machine/panels/time_machine/view.js has 578 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/clacky/default_extensions/time_machine/panels/time_machine/view.js:1
  • spec/support/workspace_tab_menu_test.js has 566 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — spec/support/workspace_tab_menu_test.js:1
  • lib/clacky/web/skills.js has 535 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/clacky/web/skills.js:1
  • REDACTED has 526 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • lib/clacky/web/components/onboard.js has 500 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/clacky/web/components/onboard.js:1
  • lib/clacky/web/components/chat-navigator.js has 499 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/clacky/web/components/chat-navigator.js:1
  • lib/clacky/web/features/trash/view.js has 489 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/clacky/web/features/trash/view.js:1
  • lib/clacky/web/features/channels/view.js has 468 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/clacky/web/features/channels/view.js:1
  • lib/clacky/web/features/extensions/store.js has 462 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/clacky/web/features/extensions/store.js:1
  • lib/clacky/web/features/tasks/view.js has 458 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/clacky/web/features/tasks/view.js:1
  • lib/clacky/default_extensions/advisor/panels/advisor/view.js has 435 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/clacky/default_extensions/advisor/panels/advisor/view.js:1
  • lib/clacky/default_extensions/preview/panels/preview/view.js has 430 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/clacky/default_extensions/preview/panels/preview/view.js:1
  • lib/clacky/web/components/code-editor.js has 406 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/clacky/web/components/code-editor.js:1
  • lib/clacky/web/components/composer.js has 405 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/clacky/web/components/composer.js:1

What to do

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

  • No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×40) — lib/clacky/web/settings.js:1, lib/clacky/web/i18n.js:1, lib/clacky/default_extensions/ext-studio/panels/studio/view.js:1, …

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R7 · Dead Code5.3 / 10Adequate✓ Tool-verified

React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).

Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.

  • Unreachable from the 56 application, 0 tooling and 21 test entry point(s) detected in this repo. This repository declares no build, type-check or test script, so nothing here would fail on a wrong deletion — confirm by hand that nothing loads each file (including by a path built at runtime) before removing it. An undetected custom entry would make these reachable.
  • no import path from any entry point (56 application, 0 tooling, 21 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 (×6) — lib/clacky/default_extensions/ext-studio/panels/studio/view.js, lib/clacky/default_extensions/meeting/panels/meeting/view.js, lib/clacky/default_extensions/time_machine/panels/time_machine/view.js, …

What to do

  • Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
R9 · Circular Imports10.0 / 10Exemplary✓ Tool-verified

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

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

S1 · Web-Security Posture0.0 / 10Critical✓ Tool-verified

Other · Security — Read from this repository's Ruby source: cryptographic hygiene (weak hash or cipher, key material fixed in the source) and outbound TLS (certificate validation, protocol version) — facts about code that hold whether or not it serves anything itself. Markup this repository SHIPS is scored for third-party script integrity whether or not the repository serves it itself, since a page handed to a consumer runs in that consumer’s origin. The server controls — HTTPS enforcement, HSTS, cookie flags, input validation — are NOT assessed for Ruby: this reading covers the code's own cryptography and the TLS connections it opens as a client, and a Rails, Rack or Sinatra application's transport, header and validation settings are not modelled. Their absence here is not a finding about this repository.

Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.

  • `ssl: { verify: false }` is set on a TLS client, so every peer certificate is accepted — including one an attacker presents. Chain, expiry, revocation and hostname are all skipped, so an attacker on the network path can present any certificate and read or rewrite the traffic — the connection is encrypted to the attacker, not to the intended host. Remove the override so OpenSSL verifies the peer — `OpenSSL::SSL::VERIFY_PEER` is what Net::HTTP, Faraday, HTTParty and rest-client use when nothing is set. If the server presents a self-signed or privately-issued certificate, trust THAT issuer rather than every certificate: give the client its CA (`http.ca_file = …` or `cert_store` on Net::HTTP, `ssl: { ca_file: … }` on Faraday, `ssl_ca_file:` on rest-client, or `SSL_CERT_FILE`), which keeps the chain and hostname checks on. (×8) — lib/clacky/client.rb:717, lib/clacky/client.rb:734, lib/clacky/client.rb:761, …
  • `CARD_HMAC_SECRET` is the MAC key, and its shipped DEFAULT is a compile-time constant — an installation that never overrides it encrypts with a value published in this repository, and the code cannot distinguish that state from a configured one. A key that ships with the source is not secret: every contributor, fork, mirror and released binary carries it, so anyone holding the repository can decrypt what any installation encrypted, and there is no way to invalidate what was already protected because every deployment built from this source shares the value. Where the constant is a password salt the consequence differs but is no smaller — one global salt means precomputation amortises across every installation, which is the property salting exists to destroy. Read the value from configuration, an environment variable or a secrets manager at startup and FAIL FAST when it is absent, so a missing key stops the process instead of silently falling back to a shared default; treat the committed value as disclosed and rotate it rather than only deleting the line. For a salt, generate a fresh random one per password and store it alongside the hash. — lib/clacky/default_skills/personal-website/publish.rb:29
  • MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`Digest::SHA256` or `OpenSSL::Digest.new("SHA256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call. (×10) — REDACTED:324, REDACTED:325, REDACTED:326, …
  • `https://cdn.jsdelivr.net/npm/qrcodejs@1.0.0/qrcode.min.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. — lib/clacky/web/weixin-qr.html:139

What to do

  • Stop accepting every TLS certificate: delete `verify_mode = OpenSSL::SSL::VERIFY_NONE` / `verify: false` / `verify_ssl: false` so the chain, hostname and expiry are verified, and trust a self-signed or private server by giving the client its CA (`ca_file`, `cert_store`) — never by switching verification off. This repository constructs a TLS client that accepts any certificate at 8 sites, not one: `lib/clacky/client.rb:717` (`ssl: { verify: false }`), `lib/clacky/client.rb:734` (`ssl: { verify: false }`), `lib/clacky/client.rb:761` (`ssl: { verify: false }`), `lib/clacky/server/channel/adapters/feishu/bot.rb:299` (`ssl: { verify: false }`), `lib/clacky/server/channel/adapters/feishu/bot.rb:954` (`ssl: { verify: false }`), `lib/clacky/server/channel/adapters/feishu/bot.rb:983` (`ssl: { verify: false }`), `lib/clacky/server/channel/adapters/feishu/bot.rb:1090` (`ssl: { verify: false }`), `lib/clacky/server/channel/adapters/wecom/media_downloader.rb:52` (`ssl: { verify: false }`). Each is a separate decision — fixing only the line this row cites leaves the others in place.
  • Load cryptographic key and salt material from configuration, an environment variable or a secrets manager rather than fixing it in the source, and fail fast at startup when it is absent — a default that silently works is the one that reaches production. Rotate anything already committed: it must be treated as disclosed. Salts should be generated per password and stored with the hash, never shared across installations.
  • Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key. This repository constructs a collision-broken hash (MD5/SHA1) at 10 sites, not one: `REDACTED:324` (Digest::MD5.hexdigest), `REDACTED:325` (Digest::SHA1.hexdigest), `REDACTED:326` (Digest::MD5.hexdigest), `REDACTED:352` (Digest::MD5.hexdigest), `REDACTED:309` (Digest::MD5.hexdigest), `REDACTED:221` (Digest::MD5.hexdigest), `REDACTED:350` (Digest::MD5.hexdigest), `REDACTED:103` (Digest::MD5.hexdigest), and 2 further site(s). Each is a separate decision — fixing only the line this row cites leaves the others in place.
  • Pin third-party scripts and verify them: name an exact version in the URL and add an `integrity="sha384-…"` hash alongside `crossorigin="anonymous"` (both are required — an integrity hash on a cross-origin script without `crossorigin` is not evaluated, it blocks the script). Where the vendor ships a continuously-updated loader and publishes no stable hash (tag managers, analytics, chat widgets), Subresource Integrity is not available: constrain it instead with a `Content-Security-Policy` that names the exact origins allowed to execute, and drop the script from the pages that do not need it. Where the page is shipped inside a package that others host, prefer vendoring the asset and serving it from the app’s own origin, so no consumer inherits a third-party dependency they did not choose.
X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

X13 · Undrained process stream5.2 / 10Adequate✓ Tool-verified

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

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

  • `Open3.popen3` always pipes both `stdout` and `stderr`, and here `@stderr` (its stderr) is read to its end — but nothing in this scope ever reads `@stdout` (its stdout). A read to the end returns only at EOF, which the child cannot reach once it fills the unread stdout pipe and blocks on the write (measured with Ruby 3.4 on Linux: 10 bytes finishes, 60 KB hangs forever). Ruby's own Open3 documentation names this deadlock. Use `Open3.capture3`, which drains both, read the two together (a thread per stream, or `IO.select`), or stop piping the one you do not want — `Open3.popen2` leaves stderr to the parent and `Open3.popen2e` merges it into stdout. — lib/clacky/mcp/stdio_transport.rb:37

What to do

  • Each finding names the span that makes the branch dead and the span it is dead because of. Confirm from the two, then delete the dead arm or fix the predicate that was meant to be reachable.
X14 · Bypassable address classification10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

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

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

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

X17 · Uncapped recursion over a caller-supplied document2.0 / 10Critical✓ Tool-verified

Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.

Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.

  • `append` is public, takes a document from its caller (line 48) and hands it to `deep_sanitize_utf8`, which walks `obj` as a `Hash` and calls itself at line 547 (`self.deep_sanitize_utf8`) with a piece of `obj` (and at line 550) — and nowhere in `deep_sanitize_utf8` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends stack per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A walk like this one raises `SystemStackError` past about 3,800 levels on the main thread and about 1,000 on a `Thread` — where Puma serves requests and Sidekiq runs jobs (MRI 3.3 and 4.0). `JSON.parse` stops at 100 levels by default, but the other parsers a caller may use do not: `YAML.safe_load` builds 1,400 levels from 2.8 KB, `Oj.load` 100,000, REXML 200,000, and `JSON.load` on json 2.7 (Ruby 3.3's default) or `JSON.parse(…, max_nesting: false)` 58,000. `SystemStackError` is not a `StandardError`: a bare `rescue` or `rescue => e` around the call does not stop it. Thread a depth argument through `deep_sanitize_utf8` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — lib/clacky/message_history.rb:547
  • `deep_clone` is public and takes `obj` — which it walks as a `Hash` — from its caller, and it calls itself at line 966 (`self.deep_clone`) with a piece of `obj` (and at line 967) — and nowhere in `deep_clone` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends stack per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A walk like this one raises `SystemStackError` past about 3,800 levels on the main thread and about 1,000 on a `Thread` — where Puma serves requests and Sidekiq runs jobs (MRI 3.3 and 4.0). `JSON.parse` stops at 100 levels by default, but the other parsers a caller may use do not: `YAML.safe_load` builds 1,400 levels from 2.8 KB, `Oj.load` 100,000, REXML 200,000, and `JSON.load` on json 2.7 (Ruby 3.3's default) or `JSON.parse(…, max_nesting: false)` 58,000. `SystemStackError` is not a `StandardError`: a bare `rescue` or `rescue => e` around the call does not stop it. Thread a depth argument through `deep_clone` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — lib/clacky/client.rb:966
  • `redact_value` is public and takes `obj` — which it walks as a `Hash` — from its caller, and it calls itself at line 2029 (`self.redact_value`) with a piece of `obj` (and at line 2031) — and nowhere in `redact_value` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends stack per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A walk like this one raises `SystemStackError` past about 3,800 levels on the main thread and about 1,000 on a `Thread` — where Puma serves requests and Sidekiq runs jobs (MRI 3.3 and 4.0). `JSON.parse` stops at 100 levels by default, but the other parsers a caller may use do not: `YAML.safe_load` builds 1,400 levels from 2.8 KB, `Oj.load` 100,000, REXML 200,000, and `JSON.load` on json 2.7 (Ruby 3.3's default) or `JSON.parse(…, max_nesting: false)` 58,000. `SystemStackError` is not a `StandardError`: a bare `rescue` or `rescue => e` around the call does not stop it. Thread a depth argument through `redact_value` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — REDACTED:2029
  • `deep_clone` is public and takes `obj` — which it walks as a `Hash` — from its caller, and it calls itself at line 399 (`self.deep_clone`) with a piece of `obj` (and at line 400) — and nowhere in `deep_clone` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends stack per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A walk like this one raises `SystemStackError` past about 3,800 levels on the main thread and about 1,000 on a `Thread` — where Puma serves requests and Sidekiq runs jobs (MRI 3.3 and 4.0). `JSON.parse` stops at 100 levels by default, but the other parsers a caller may use do not: `YAML.safe_load` builds 1,400 levels from 2.8 KB, `Oj.load` 100,000, REXML 200,000, and `JSON.load` on json 2.7 (Ruby 3.3's default) or `JSON.parse(…, max_nesting: false)` 58,000. `SystemStackError` is not a `StandardError`: a bare `rescue` or `rescue => e` around the call does not stop it. Thread a depth argument through `deep_clone` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — lib/clacky/message_format/open_ai.rb:399

What to do

  • Each finding names the externally-callable member that accepts the document and the self-call that descends, and states that no depth parameter or counter exists anywhere in the walk. Confirm from the two, then thread a depth argument through the walk and reject documents past a fixed maximum, or rewrite it with an explicit stack.
X18 · Disposal-pattern correctness10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

X2 · Cancellation propagation4.2 / 10Weak✓ Tool-verified

Other · Code Health — Whether async functions that make a cancellable request accept or pass on an AbortSignal (adoption curve).

Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.

  • Only 5/167 async functions that make a cancellable request (fetch, axios, ky, ofetch) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
  • `getJson` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — lib/clacky/default_extensions/ext-studio/panels/studio/view.js:454
  • `postJson` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. (×2) — lib/clacky/default_extensions/ext-studio/panels/studio/view.js:461, lib/clacky/default_extensions/meeting/panels/meeting/view.js:173
  • `patchJson` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — lib/clacky/default_extensions/ext-studio/panels/studio/view.js:477
  • `downloadPack` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — lib/clacky/default_extensions/ext-studio/panels/studio/view.js:493
  • `getHost` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — lib/clacky/default_extensions/ext-studio/panels/studio/view.js:517
  • `uploadScreenshot` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — lib/clacky/default_extensions/ext-studio/panels/studio/view.js:1389
  • `doDelete` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — lib/clacky/default_extensions/ext-studio/panels/studio/view.js:1939
  • `publish` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — lib/clacky/default_extensions/ext-studio/panels/studio/view.js:2029
  • `probeActiveMeeting` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — lib/clacky/default_extensions/meeting/panels/meeting/view.js:191
  • `openRel` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — lib/clacky/default_extensions/preview/panels/preview/view.js:247
  • `_fetchSkills` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — lib/clacky/web/skills.js:76
  • `_load` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — lib/clacky/web/settings.js:61
  • `_saveModel` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — lib/clacky/web/settings.js:1368
  • `_setAsDefault` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — lib/clacky/web/settings.js:1485
  • `_removeModel` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — lib/clacky/web/settings.js:1536
  • `_loadBrowserStatus` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — lib/clacky/web/settings.js:1594
  • `_toggleBrowser` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — lib/clacky/web/settings.js:1626
  • `_setupBrowser` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — lib/clacky/web/settings.js:1642
  • `_initNetworkSettings` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — lib/clacky/web/settings.js:1667
  • `_patchProxyUrl` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — lib/clacky/web/settings.js:1682
  • `_initSearchSettings` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — lib/clacky/web/settings.js:1723
  • `_initPlatformSourceSettings` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — lib/clacky/web/settings.js:1892
  • `_savePlatformSource` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — lib/clacky/web/settings.js:1942
  • `_loadBrand` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — lib/clacky/web/settings.js:2022
  • `_activateLicense` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — lib/clacky/web/settings.js:2165
  • `_loadAdvancedSettings` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — lib/clacky/web/settings.js:2310
  • `_saveAdvancedSetting` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — lib/clacky/web/settings.js:2327
  • `_loadAboutInfo` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — lib/clacky/web/settings.js:2354
  • `_loadMedia` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — lib/clacky/web/settings.js:2381
  • `_saveMediaConfig` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — lib/clacky/web/settings.js:2791
  • `_testMediaConfig` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — lib/clacky/web/settings.js:2805
  • `_updateLatestExchangeRate` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — lib/clacky/web/settings.js:3009
  • `findOrFetch` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — REDACTED:3317
  • `startWith` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — REDACTED:3504
  • `loadMore` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — REDACTED:3630
  • `loadMoreGroup` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — REDACTED:3675
  • `commitSearch` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — REDACTED:3722
  • `deleteSession` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — REDACTED:3912

What to do

  • Thread an AbortSignal through async functions that make requests, so the work stops when its caller gives up.
X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

X23 · Unguarded diagnostic materialisation6.3 / 10Adequate✓ Tool-verified

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

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

  • `debug` at line 138 is called with an argument built by `item.to_json` (line 138), whose cost grows with the collection it walks. Ruby evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `debug?` test, no debug flag, no block the logger calls only when the level is on. — REDACTED:138
  • `debug` at line 236 is called with an argument built by `upload_resp.to_json` (line 236), whose cost grows with the collection it walks. Ruby evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `debug?` test, no debug flag, no block the logger calls only when the level is on. — REDACTED:236
  • `debug` at line 390 is called with an argument built by `item_list.to_json` (line 390), whose cost grows with the collection it walks. Ruby evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `debug?` test, no debug flag, no block the logger calls only when the level is on. — lib/clacky/server/channel/adapters/weixin/adapter.rb:390
  • `debug` at line 479 is called with an argument built by `effective_cdn_media.to_json` (line 479), whose cost grows with the collection it walks. Ruby evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `debug?` test, no debug flag, no block the logger calls only when the level is on. — lib/clacky/server/channel/adapters/weixin/adapter.rb:479

What to do

  • In Ruby, hand the logger a block it calls only when the level is on (`logger.debug { "args: #{args.join(' ')}" }` — Logger, ActiveSupport, SemanticLogger and console all take one), or put the line behind `if logger.debug?`. Interpolating the value into the message is not the fix: Ruby builds the string, and every `map`, `join` or `to_json` inside its `#{…}`, before the call is entered.
X24 · Document value interpolated into markup unescaped4.7 / 10Weak✓ Tool-verified

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

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

  • `marked.parse(currentReadme,{breaks:true,gfm:true})` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — lib/clacky/default_extensions/ext-studio/panels/studio/view.js:1174
  • `currentReadme` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — lib/clacky/default_extensions/ext-studio/panels/studio/view.js:1175
  • `md&&typeof marked!=="undefined"?marked.parse(md,{breaks:true,gfm:true}):(md?`<pre>${md}</pre>`:"")` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — lib/clacky/default_extensions/ext-studio/panels/studio/view.js:1332
  • `md` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — lib/clacky/default_extensions/ext-studio/panels/studio/view.js:1334
  • `escHtml(t("captions.empty"))` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — lib/clacky/default_extensions/meeting/panels/meeting/view.js:527
  • `time` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — lib/clacky/default_extensions/meeting/panels/meeting/view.js:533
  • `escHtml(t("annotations.empty"))` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — lib/clacky/default_extensions/meeting/panels/meeting/view.js:544
  • `escHtml(a.text)` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — lib/clacky/default_extensions/meeting/panels/meeting/view.js:550
  • `(icons[type]||icons.info)` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — lib/clacky/web/app.js:778
  • `text.replace(/</g,"&lt;")` is text this program did not author, and it is written into the text of an element through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — lib/clacky/web/components/code-editor.js:296
  • `closeLabel` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — lib/clacky/web/components/code-editor.js:352
  • `cancelLabel` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — lib/clacky/web/components/code-editor.js:353
  • `closeLabel` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — lib/clacky/web/components/code-editor.js:359
  • `NAV_ICONS["-12"]` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — lib/clacky/web/components/datepicker.js:91
  • `NAV_ICONS["-1"]` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — lib/clacky/web/components/datepicker.js:92
  • `loc.title(_year,_month,loc.months)` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — lib/clacky/web/components/datepicker.js:93
  • `NAV_ICONS["1"]` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — lib/clacky/web/components/datepicker.js:94
  • `NAV_ICONS["12"]` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — lib/clacky/web/components/datepicker.js:95
  • `(rule.viewBox||"0 0 24 24")` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — lib/clacky/web/components/model-picker.js:99, lib/clacky/web/components/model-picker.js:101
  • `nameSpan.outerHTML` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — lib/clacky/web/components/onboard.js:167
  • `node` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — lib/clacky/web/core/ext.js:568, lib/clacky/web/core/ext.js:633
  • `Array.from({length:3},()=>` <div class="trash-session-skeleton"> <div class="trash-session-skeleton-inf…` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — lib/clacky/web/features/archive/view.js:94
  • `escapeHtml(group.color)` is text this program did not author, and it is written into a script or style context through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. A script or style context needs its own escaping (or a JSON serialiser that escapes `<`); better, pass the value through a data attribute. — lib/clacky/web/features/archive/view.js:189
  • `topBarH` is text this program did not author, and it is written into a script or style context through `insertAdjacentHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. A script or style context needs its own escaping (or a JSON serialiser that escapes `<`); better, pass the value through a data attribute. — lib/clacky/web/features/billing/view.js:28
  • `I18n.t("billing.error")||"Failed to load billing data"` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — lib/clacky/web/features/billing/view.js:34
  • `p` is text this program did not author, and it is written into a quoted attribute value through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — lib/clacky/web/features/billing/view.js:125
  • `_esc(m)` is text this program did not author, and it is written into a quoted attribute value through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — lib/clacky/web/features/billing/view.js:131
  • `I18n.t("billing.title")||"Usage"` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — lib/clacky/web/features/billing/view.js:138
  • `_getSummaryHint()` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — lib/clacky/web/features/billing/view.js:139
  • `I18n.t('billing.share.tooltip')||'Print receipt'` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — lib/clacky/web/features/billing/view.js:140
  • `I18n.t('billing.share.btn')||'Print receipt'` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — lib/clacky/web/features/billing/view.js:142
  • `I18n.t("billing.allModels")||"All Models"` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — lib/clacky/web/features/billing/view.js:149
  • `modelOptions` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — lib/clacky/web/features/billing/view.js:154
  • `I18n.t("billing.disclaimer")` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — lib/clacky/web/features/billing/view.js:161
  • `Billing.getCurrencySymbol()` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — lib/clacky/web/features/billing/view.js:170
  • `I18n.t("billing.totalCost")||"Total Cost"` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — lib/clacky/web/features/billing/view.js:171
  • `_formatCompact(summary.total_tokens)` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — lib/clacky/web/features/billing/view.js:179
  • `I18n.t("billing.totalTokens")||"Total Tokens"` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — lib/clacky/web/features/billing/view.js:180

What to do

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

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

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

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

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

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

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

Other · Code Health — Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items are never seen. Whether a walk over a `Hash` or `Set` (`each`, `each_pair`, `map`, `for … in` and the other block walks) leaves it alone — Ruby refuses `rehash`, `replace`, `compare_by_identity` and `transform_keys!` on a Hash, and `reset`, `replace`, `compare_by_identity` and `map!` on a Set, while it is being iterated: the call raises `RuntimeError` at once and the remaining entries are never seen.

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

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

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

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

X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.

Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.

X3 · Exception handling4.8 / 10Weak✓ Tool-verified

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

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

  • `… rescue nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×16) — lib/clacky/thread_registry.rb:81, REDACTED:248, REDACTED:263, …
  • `rescue` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×2) — REDACTED:501, lib/clacky/agent/tool_executor.rb:323
  • `rescue StandardError` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×10) — lib/clacky/proxy_config.rb:60, REDACTED:973, REDACTED:1609, …
  • `… rescue {}` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×4) — lib/clacky/platform_http_client.rb:289, lib/clacky/deepseek_web_tools.rb:60, lib/clacky/deepseek_web_tools.rb:97, …
  • `… rescue args` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×2) — lib/clacky/plain_ui_controller.rb:25, lib/clacky/json_ui_controller.rb:40
  • `… rescue "application/octet-stream"` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — lib/clacky/cli.rb:502
  • `… rescue b[:input_str]` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×2) — lib/clacky/bedrock_stream_aggregator.rb:95, lib/clacky/anthropic_stream_aggregator.rb:96
  • `… rescue 0.0` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×2) — lib/clacky/agent/skill_manager.rb:149, lib/clacky/agent/skill_manager.rb:475
  • `rescue => e` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — lib/clacky/agent/skill_manager.rb:542

What to do

  • Swallowed exception (caught, then discarded)
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged

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

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

X5 · Nullable reference types2.0 / 10Critical✓ Tool-verified

Other · Code Health — Whether Ruby's type checker checks nil and is not undermined by assertions — a file Sorbet reads at `# typed: true` or above, or a Steep target `check`s under its default or strict diagnostics, is one where a method call on a `T.nilable(String)` / `String?` is an error, and each `T.must`, `#: as !nil` or `# steep:ignore NoMethod` is the author telling the checker a value cannot be nil.

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

  • This repository commits no Sorbet configuration (`sorbet/config`) and no `Steepfile`, so nothing type-checks its 263 Ruby product file(s): a nilable value reaches a method call silently and raises `NoMethodError: undefined method … for nil` the first time it is nil. A `# typed:` sigil does nothing without a `sorbet/config` beside the code; a Steep run configured only on a command line is not something this check can read.

What to do

  • Adopt a checker and raise it file by file: with Sorbet, `srb init` (or `bundle exec tapioca init`) commits `sorbet/config`, then move each file's sigil from `# typed: false` to `# typed: true` and on to `strict` as its methods get `sig`s — `spoom bump` does the moving; with Steep, write RBS signatures and `check` the product directories in the `Steepfile` under `D::Ruby.default` or `strict`, not `lenient`. Then pay down the assertions rather than adding to them: each `T.must` is a nil the checker could not rule out — narrow it (`return unless x`, `x&.`, `if (y = x)`), make the attribute non-nilable and set it in `initialize`, or change the method so the nil cannot arrive.

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 Health25%Weak — gated by D1, D2, R1, R3, X5Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture78%Adequate — gated by D26Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity38%Weak — gated by M2, M4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness42%Weak — gated by R4, P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security29%Weak — gated by D29, D36, S1Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility37%Weak — gated by AC4, AC6Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance100%ExemplaryStrongest area.
Unscored — 6 check(s) recorded observations but carry no score

These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.

  • P12 CI test-gate honesty — 1 observation(s) recorded · Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
  • SC1 Supply-chain hygiene — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X10 Duplicated predicate — 25 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X6 Hand-rolled structured-format parsing — 15 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 29 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X9 Subsumed condition operand — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not included — 47 check(s) not relevant to this codebase

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

  • AX1 Captive dependencies — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. No class in this Ruby code is a Rails controller, a Sinatra, Grape or Roda app, a Hanami action or a Rack app (an instance `call(env)`), so no request handler shares state between request threads. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • 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
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — docker build failed (exit 1) — DEPRECATED: The legacy builder is deprecated and will be removed in a future release. Install the buildx component to build images with BuildKit: https://docs.docker.com/go/bui…; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in an ActiveRecord or Sequel migration, a db/schema.rb table or a Mongoid document — and no database or data-store client (an ActiveRecord model, Sequel, pg, mysql2, sqlite3, Mongo, …) in the source either, so this repository keeps no data at rest for these controls to protect.
  • C2 Access Controls — No access-control surface detected in the analyzed source — this repository draws no route and defines no request handler (no Rails routes.draw or controller, no Sinatra, Roda or Grape application, no Hanami action). Access control is therefore N/A here — a gem is authorized by the application that mounts it, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
  • C3 Audit Trail — No personal data detected in a persisted data model — no PII-named column (email, first_name, date_of_birth, phone_number, …) or stored credential in an ActiveRecord or Sequel migration, db/schema.rb or a Mongoid document — and no database client (an ActiveRecord model, Sequel, pg, mysql2, Mongo) in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a hosted backend configured outside this repository, for instance), the trail belongs to wherever that data is stored.
  • C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in an ActiveRecord or Sequel migration, db/schema.rb or a Mongoid document — and no database client (ActiveRecord, Sequel, pg, mysql2, mongo, …) in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound.
  • C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in an ActiveRecord or Sequel migration, a db/schema.rb table or a Mongoid document — and no database or data-store client (an ActiveRecord model, Sequel, pg, mysql2, sqlite3, Mongo, …) in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over.
  • D10 Test Quality — ~57092 lines of test source are present (.rb) 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
  • 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.
  • D20 ADR Quality — N/A — ADRs are expected on deployable products with a user-facing host, not consumed libraries; no ADR log is required here.
  • 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 — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.rb), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D32 Data Compliance (PII/GDPR) — 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.
  • 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.
  • D5 Coupling — Not applicable — this RubyGems build ships 1 production module(s), so there is no coupling BETWEEN modules to measure. (Its test and non-production modules are not part of the shipped graph.)
  • 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
  • D9 Test Distribution — Test source is present (.rb) 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 its unit/integration/BDD/E2E split couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (20 value object(s))
  • ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • P7 Outbound HTTP resilience — 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
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (SimpleCov — `require "simplecov"` in your `spec_helper.rb`/`test_helper.rb`, which writes `coverage/.resultset.json` (or lcov via `simplecov-lcov`)) 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 applicable: no benchmark suite was found. This check searched for `x.report(…)` entries in a `Benchmark.ips`/`bm`/`bmbm`/`benchmark`/`memory` block, `benchmark:` entries in a benchmark-driver YAML under a bench* directory, rspec-benchmark `perform_*` expectations where the gem is installed, or benchmark-ips, benchmark-memory, rspec-benchmark or benchmark-driver in a Gemfile or gemspec, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not applicable: Ruby and TypeScript/JavaScript runs on a garbage-collected runtime that gives a program no allocation-control idiom to choose on a hot path — no pools, stack allocation or value types — so allocation awareness is not something this code can be rated on.
  • R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
  • R5 Dependency Freshness — no package-lock.json — dependency freshness not measured (would require an npm lockfile); JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
  • R6 Tooling — no package.json in the repository — test/lint/typecheck wiring is read from package.json scripts (corroborated against CI), so this project's own toolchain isn't measured here
  • R8 Dependency Hygiene — Not measured — no package.json declares any dependency, so there is nothing to check imports against (imports may resolve through a host runtime rather than node).
  • X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X4 Structured logging — This check asks whether log calls keep a message's values apart from its text, which needs a logger that can carry them as fields. This repository's Ruby was read, and it logs through none: the standard library's Logger, which Rails.logger is, takes one finished message and no template arguments or fields (as log4net does in C#), so an interpolated message there loses nothing the API could have kept. The console gem (`Console.info`), SemanticLogger, Ougai and dry-logger would be judged.

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 — 83 finding(s)
AC4 · Keyboard semantics · Clickable element isn't keyboard-operable · ×39
  • Clickable element isn't keyboard-operable lib/clacky/web/design-sample.html:57 — The repo's own CSS styles .task-item with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable lib/clacky/web/design-sample.html:58 — The repo's own CSS styles .task-item with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable lib/clacky/web/design-sample.html:59 — The repo's own CSS styles .task-item with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable lib/clacky/web/design-sample.html:60 — The repo's own CSS styles .task-item with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable lib/clacky/web/design-sample.html:64 — The repo's own CSS styles .task-item with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable lib/clacky/web/design-sample.html:65 — The repo's own CSS styles .task-item with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable lib/clacky/web/design-sample.html:66 — The repo's own CSS styles .task-item with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable lib/clacky/web/design-sample.html:70 — The repo's own CSS styles .task-item with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable lib/clacky/web/design-sample.html:76 — The repo's own CSS styles .version-badge with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable lib/clacky/web/design-sample.html:99 — The repo's own CSS styles .sib-clickable with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable lib/clacky/web/design-sample.html:101 — The repo's own CSS styles .sib-clickable with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable lib/clacky/web/design-sample.html:103 — The repo's own CSS styles .sib-clickable with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable lib/clacky/web/design-sample.html:105 — The repo's own CSS styles .sib-clickable with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable lib/clacky/web/design-sample.html:107 — The repo's own CSS styles .sib-clickable with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable lib/clacky/web/features/billing/view.js:130 — The repo's own CSS styles .custom-select-option with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable lib/clacky/web/features/billing/view.js:131 — The repo's own CSS styles .custom-select-option with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable lib/clacky/web/features/billing/view.js:927 — The repo's own CSS styles .billing-trend-dot with `cursor: pointer`, so this <circle> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable lib/clacky/web/features/profile/view.js:181 — The repo's own CSS styles .memory-card-info with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable lib/clacky/web/features/workspace/view.js:330 — The repo's own CSS styles .session-actions-menu-item with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable lib/clacky/web/features/workspace/view.js:336 — The repo's own CSS styles .session-actions-menu-item with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable lib/clacky/web/features/workspace/view.js:345 — The repo's own CSS styles .session-actions-menu-item with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable lib/clacky/web/features/workspace/view.js:349 — The repo's own CSS styles .session-actions-menu-item with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable lib/clacky/web/features/workspace/view.js:353 — The repo's own CSS styles .session-actions-menu-item with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable lib/clacky/web/features/workspace/view.js:1071 — The repo's own CSS styles .session-actions-menu-item with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable lib/clacky/web/features/workspace/view.js:1075 — The repo's own CSS styles .session-actions-menu-item with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • + 14 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
S1 · Web-Security Posture · TLS certificate validation disabled · ×8
  • TLS certificate validation disabled lib/clacky/client.rb:717 — `ssl: { verify: false }` is set on a TLS client, so every peer certificate is accepted — including one an attacker presents. Chain, expiry, revocation and hostname are all skipped, so an attacker on the network path can present any certificate and read or rewrite the traffic — the connection is encrypted to the attacker, not to the intended host. Remove the override so OpenSSL verifies the peer — `OpenSSL::SSL::VERIFY_PEER` is what Net::HTTP, Faraday, HTTParty and rest-client use when nothing is set. If the server presents a self-signed or privately-issued certificate, trust THAT issuer rather than every certificate: give the client its CA (`http.ca_file = …` or `cert_store` on Net::HTTP, `ssl: { ca_file: … }` on Faraday, `ssl_ca_file:` on rest-client, or `SSL_CERT_FILE`), which keeps the chain and hostname checks on.
  • TLS certificate validation disabled lib/clacky/client.rb:734 — `ssl: { verify: false }` is set on a TLS client, so every peer certificate is accepted — including one an attacker presents. Chain, expiry, revocation and hostname are all skipped, so an attacker on the network path can present any certificate and read or rewrite the traffic — the connection is encrypted to the attacker, not to the intended host. Remove the override so OpenSSL verifies the peer — `OpenSSL::SSL::VERIFY_PEER` is what Net::HTTP, Faraday, HTTParty and rest-client use when nothing is set. If the server presents a self-signed or privately-issued certificate, trust THAT issuer rather than every certificate: give the client its CA (`http.ca_file = …` or `cert_store` on Net::HTTP, `ssl: { ca_file: … }` on Faraday, `ssl_ca_file:` on rest-client, or `SSL_CERT_FILE`), which keeps the chain and hostname checks on.
  • TLS certificate validation disabled lib/clacky/client.rb:761 — `ssl: { verify: false }` is set on a TLS client, so every peer certificate is accepted — including one an attacker presents. Chain, expiry, revocation and hostname are all skipped, so an attacker on the network path can present any certificate and read or rewrite the traffic — the connection is encrypted to the attacker, not to the intended host. Remove the override so OpenSSL verifies the peer — `OpenSSL::SSL::VERIFY_PEER` is what Net::HTTP, Faraday, HTTParty and rest-client use when nothing is set. If the server presents a self-signed or privately-issued certificate, trust THAT issuer rather than every certificate: give the client its CA (`http.ca_file = …` or `cert_store` on Net::HTTP, `ssl: { ca_file: … }` on Faraday, `ssl_ca_file:` on rest-client, or `SSL_CERT_FILE`), which keeps the chain and hostname checks on.
  • TLS certificate validation disabled lib/clacky/server/channel/adapters/feishu/bot.rb:299 — `ssl: { verify: false }` is set on a TLS client, so every peer certificate is accepted — including one an attacker presents. Chain, expiry, revocation and hostname are all skipped, so an attacker on the network path can present any certificate and read or rewrite the traffic — the connection is encrypted to the attacker, not to the intended host. Remove the override so OpenSSL verifies the peer — `OpenSSL::SSL::VERIFY_PEER` is what Net::HTTP, Faraday, HTTParty and rest-client use when nothing is set. If the server presents a self-signed or privately-issued certificate, trust THAT issuer rather than every certificate: give the client its CA (`http.ca_file = …` or `cert_store` on Net::HTTP, `ssl: { ca_file: … }` on Faraday, `ssl_ca_file:` on rest-client, or `SSL_CERT_FILE`), which keeps the chain and hostname checks on.
  • TLS certificate validation disabled lib/clacky/server/channel/adapters/feishu/bot.rb:954 — `ssl: { verify: false }` is set on a TLS client, so every peer certificate is accepted — including one an attacker presents. Chain, expiry, revocation and hostname are all skipped, so an attacker on the network path can present any certificate and read or rewrite the traffic — the connection is encrypted to the attacker, not to the intended host. Remove the override so OpenSSL verifies the peer — `OpenSSL::SSL::VERIFY_PEER` is what Net::HTTP, Faraday, HTTParty and rest-client use when nothing is set. If the server presents a self-signed or privately-issued certificate, trust THAT issuer rather than every certificate: give the client its CA (`http.ca_file = …` or `cert_store` on Net::HTTP, `ssl: { ca_file: … }` on Faraday, `ssl_ca_file:` on rest-client, or `SSL_CERT_FILE`), which keeps the chain and hostname checks on.
  • TLS certificate validation disabled lib/clacky/server/channel/adapters/feishu/bot.rb:983 — `ssl: { verify: false }` is set on a TLS client, so every peer certificate is accepted — including one an attacker presents. Chain, expiry, revocation and hostname are all skipped, so an attacker on the network path can present any certificate and read or rewrite the traffic — the connection is encrypted to the attacker, not to the intended host. Remove the override so OpenSSL verifies the peer — `OpenSSL::SSL::VERIFY_PEER` is what Net::HTTP, Faraday, HTTParty and rest-client use when nothing is set. If the server presents a self-signed or privately-issued certificate, trust THAT issuer rather than every certificate: give the client its CA (`http.ca_file = …` or `cert_store` on Net::HTTP, `ssl: { ca_file: … }` on Faraday, `ssl_ca_file:` on rest-client, or `SSL_CERT_FILE`), which keeps the chain and hostname checks on.
  • TLS certificate validation disabled lib/clacky/server/channel/adapters/feishu/bot.rb:1090 — `ssl: { verify: false }` is set on a TLS client, so every peer certificate is accepted — including one an attacker presents. Chain, expiry, revocation and hostname are all skipped, so an attacker on the network path can present any certificate and read or rewrite the traffic — the connection is encrypted to the attacker, not to the intended host. Remove the override so OpenSSL verifies the peer — `OpenSSL::SSL::VERIFY_PEER` is what Net::HTTP, Faraday, HTTParty and rest-client use when nothing is set. If the server presents a self-signed or privately-issued certificate, trust THAT issuer rather than every certificate: give the client its CA (`http.ca_file = …` or `cert_store` on Net::HTTP, `ssl: { ca_file: … }` on Faraday, `ssl_ca_file:` on rest-client, or `SSL_CERT_FILE`), which keeps the chain and hostname checks on.
  • TLS certificate validation disabled lib/clacky/server/channel/adapters/wecom/media_downloader.rb:52 — `ssl: { verify: false }` is set on a TLS client, so every peer certificate is accepted — including one an attacker presents. Chain, expiry, revocation and hostname are all skipped, so an attacker on the network path can present any certificate and read or rewrite the traffic — the connection is encrypted to the attacker, not to the intended host. Remove the override so OpenSSL verifies the peer — `OpenSSL::SSL::VERIFY_PEER` is what Net::HTTP, Faraday, HTTParty and rest-client use when nothing is set. If the server presents a self-signed or privately-issued certificate, trust THAT issuer rather than every certificate: give the client its CA (`http.ca_file = …` or `cert_store` on Net::HTTP, `ssl: { ca_file: … }` on Faraday, `ssl_ca_file:` on rest-client, or `SSL_CERT_FILE`), which keeps the chain and hostname checks on.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D31 · IaC & Container Security · High IaC · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · <textarea> without a programmatic label · ×2
  • <textarea> without a programmatic label lib/clacky/default_skills/skill-creator/eval-viewer/viewer.html:604 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <textarea> without a programmatic label lib/clacky/web/design-sample.html:118 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
AC2 · Forms & labels · <button> with no accessible text · ×2
  • <button> with no accessible text lib/clacky/web/design-sample.html:119 — 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 REDACTED:1080 — 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).
D30 · Dependency Vulnerabilities · High CVE · ×2
  • REDACTED
  • REDACTED
AC2 · Forms & labels · <label> that labels no control · ×1
  • <label> that labels no control lib/clacky/web/features/new-session/view.js:639 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
AC2 · Forms & labels · <input> without a programmatic label · ×1
  • <input> without a programmatic label lib/clacky/web/features/new-session/view.js:642 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
S1 · Web-Security Posture · Cryptographic key material is a compile-time constant · ×1
  • Cryptographic key material is a compile-time constant lib/clacky/default_skills/personal-website/publish.rb:29 — `CARD_HMAC_SECRET` is the MAC key, and its shipped DEFAULT is a compile-time constant — an installation that never overrides it encrypts with a value published in this repository, and the code cannot distinguish that state from a configured one. A key that ships with the source is not secret: every contributor, fork, mirror and released binary carries it, so anyone holding the repository can decrypt what any installation encrypted, and there is no way to invalidate what was already protected because every deployment built from this source shares the value. Where the constant is a password salt the consequence differs but is no smaller — one global salt means precomputation amortises across every installation, which is the property salting exists to destroy. Read the value from configuration, an environment variable or a secrets manager at startup and FAIL FAST when it is absent, so a missing key stops the process instead of silently falling back to a shared default; treat the committed value as disclosed and rotate it rather than only deleting the line. For a salt, generate a fresh random one per password and store it alongside the hash.
Serious — 1060 finding(s)
R4 · Test Coverage · No test reaches this file · ×40
  • No test reaches this file lib/clacky/web/settings.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file lib/clacky/web/i18n.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file lib/clacky/default_extensions/ext-studio/panels/studio/view.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file lib/clacky/web/features/skills/view.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file lib/clacky/web/features/billing/view.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file lib/clacky/web/app.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file lib/clacky/default_extensions/meeting/panels/meeting/view.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file lib/clacky/web/features/extensions/view.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file lib/clacky/web/components/model-picker.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file lib/clacky/web/core/ext.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file lib/clacky/web/ws-dispatcher.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file lib/clacky/web/features/share/view.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file lib/clacky/web/components/mentions.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file lib/clacky/default_extensions/time_machine/panels/time_machine/view.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file lib/clacky/default_extensions/git/panels/git/view.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file lib/clacky/web/skills.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file lib/clacky/web/components/onboard.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file lib/clacky/web/features/trash/view.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file lib/clacky/web/features/channels/view.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file lib/clacky/web/features/tasks/view.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file lib/clacky/web/features/extensions/store.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file lib/clacky/default_extensions/advisor/panels/advisor/view.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file lib/clacky/default_extensions/preview/panels/preview/view.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file lib/clacky/web/features/brand/view.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file lib/clacky/web/features/profile/view.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • + 15 more in this group — see findings.md.
X24 · Document value interpolated into markup unescaped · Untrusted text written into markup unescaped · ×40
  • Untrusted text written into markup unescaped lib/clacky/default_extensions/ext-studio/panels/studio/view.js:1174 — `marked.parse(currentReadme,{breaks:true,gfm:true})` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped lib/clacky/default_extensions/ext-studio/panels/studio/view.js:1175 — `currentReadme` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped lib/clacky/default_extensions/ext-studio/panels/studio/view.js:1332 — `md&&typeof marked!=="undefined"?marked.parse(md,{breaks:true,gfm:true}):(md?`<pre>${md}</pre>`:"")` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped lib/clacky/default_extensions/ext-studio/panels/studio/view.js:1334 — `md` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped lib/clacky/default_extensions/meeting/panels/meeting/view.js:527 — `escHtml(t("captions.empty"))` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped lib/clacky/default_extensions/meeting/panels/meeting/view.js:533 — `time` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped lib/clacky/default_extensions/meeting/panels/meeting/view.js:544 — `escHtml(t("annotations.empty"))` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped lib/clacky/default_extensions/meeting/panels/meeting/view.js:550 — `escHtml(a.text)` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped lib/clacky/web/app.js:778 — `(icons[type]||icons.info)` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped lib/clacky/web/components/code-editor.js:296 — `text.replace(/</g,"&lt;")` is text this program did not author, and it is written into the text of an element through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped lib/clacky/web/components/code-editor.js:352 — `closeLabel` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped lib/clacky/web/components/code-editor.js:353 — `cancelLabel` is text this program did not author, and it is written into the text of an element through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped lib/clacky/web/components/code-editor.js:359 — `closeLabel` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped lib/clacky/web/components/datepicker.js:91 — `NAV_ICONS["-12"]` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped lib/clacky/web/components/datepicker.js:92 — `NAV_ICONS["-1"]` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped lib/clacky/web/components/datepicker.js:93 — `loc.title(_year,_month,loc.months)` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped lib/clacky/web/components/datepicker.js:94 — `NAV_ICONS["1"]` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped lib/clacky/web/components/datepicker.js:95 — `NAV_ICONS["12"]` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped lib/clacky/web/components/model-picker.js:99 — `(rule.viewBox||"0 0 24 24")` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped lib/clacky/web/components/model-picker.js:101 — `(rule.viewBox||"0 0 24 24")` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped lib/clacky/web/components/onboard.js:167 — `nameSpan.outerHTML` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped lib/clacky/web/core/ext.js:568 — `node` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped lib/clacky/web/core/ext.js:633 — `node` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped lib/clacky/web/features/archive/view.js:94 — `Array.from({length:3},()=>` <div class="trash-session-skeleton"> <div class="trash-session-skeleton-inf…` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped lib/clacky/web/features/archive/view.js:189 — `escapeHtml(group.color)` is text this program did not author, and it is written into a script or style context through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. A script or style context needs its own escaping (or a JSON serialiser that escapes `<`); better, pass the value through a data attribute.
  • + 15 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×40
  • Swallowed exception (caught, then discarded) lib/clacky/thread_registry.rb:81 — `… rescue nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:248 — `… rescue nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:263 — `… rescue nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:265 — `… rescue nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:270 — `… rescue nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:312 — `… rescue nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:314 — `… rescue nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:501 — `rescue` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/clacky/proxy_config.rb:60 — `rescue StandardError` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/clacky/platform_http_client.rb:289 — `… rescue {}` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/clacky/plain_ui_controller.rb:25 — `… rescue args` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/clacky/json_ui_controller.rb:40 — `… rescue args` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/clacky/deepseek_web_tools.rb:60 — `… rescue {}` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/clacky/deepseek_web_tools.rb:97 — `… rescue {}` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/clacky/client.rb:790 — `… rescue nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/clacky/client.rb:813 — `… rescue nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/clacky/client.rb:909 — `… rescue nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/clacky/client.rb:913 — `… rescue nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/clacky/cli.rb:176 — `… rescue nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/clacky/cli.rb:502 — `… rescue "application/octet-stream"` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:973 — `rescue StandardError` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:996 — `… rescue {}` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:1609 — `rescue StandardError` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:1629 — `rescue StandardError` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/clacky/bedrock_stream_aggregator.rb:95 — `… rescue b[:input_str]` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • + 15 more in this group — see findings.md.
X2 · Cancellation propagation · Async function without AbortSignal · ×39
  • Async function without AbortSignal: getJson lib/clacky/default_extensions/ext-studio/panels/studio/view.js:454 — `getJson` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: postJson lib/clacky/default_extensions/ext-studio/panels/studio/view.js:461 — `postJson` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: patchJson lib/clacky/default_extensions/ext-studio/panels/studio/view.js:477 — `patchJson` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: downloadPack lib/clacky/default_extensions/ext-studio/panels/studio/view.js:493 — `downloadPack` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: getHost lib/clacky/default_extensions/ext-studio/panels/studio/view.js:517 — `getHost` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: uploadScreenshot lib/clacky/default_extensions/ext-studio/panels/studio/view.js:1389 — `uploadScreenshot` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: doDelete lib/clacky/default_extensions/ext-studio/panels/studio/view.js:1939 — `doDelete` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: publish lib/clacky/default_extensions/ext-studio/panels/studio/view.js:2029 — `publish` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: postJson lib/clacky/default_extensions/meeting/panels/meeting/view.js:173 — `postJson` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: probeActiveMeeting lib/clacky/default_extensions/meeting/panels/meeting/view.js:191 — `probeActiveMeeting` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: openRel lib/clacky/default_extensions/preview/panels/preview/view.js:247 — `openRel` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: _fetchSkills lib/clacky/web/skills.js:76 — `_fetchSkills` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: _load lib/clacky/web/settings.js:61 — `_load` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: _saveModel lib/clacky/web/settings.js:1368 — `_saveModel` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: _setAsDefault lib/clacky/web/settings.js:1485 — `_setAsDefault` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: _removeModel lib/clacky/web/settings.js:1536 — `_removeModel` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: _loadBrowserStatus lib/clacky/web/settings.js:1594 — `_loadBrowserStatus` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: _toggleBrowser lib/clacky/web/settings.js:1626 — `_toggleBrowser` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: _setupBrowser lib/clacky/web/settings.js:1642 — `_setupBrowser` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: _initNetworkSettings lib/clacky/web/settings.js:1667 — `_initNetworkSettings` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: _patchProxyUrl lib/clacky/web/settings.js:1682 — `_patchProxyUrl` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: _initSearchSettings lib/clacky/web/settings.js:1723 — `_initSearchSettings` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: _initPlatformSourceSettings lib/clacky/web/settings.js:1892 — `_initPlatformSourceSettings` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: _savePlatformSource lib/clacky/web/settings.js:1942 — `_savePlatformSource` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: _loadBrand lib/clacky/web/settings.js:2022 — `_loadBrand` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • + 14 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×26
  • Hotspot: lib/clacky/server/http_server.rb lib/clacky/server/http_server.rb:664 — lib/clacky/server/http_server.rb changed 119 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 239 in HttpServer._dispatch_rest at line 664. 41 of those changes were fix/bug commits, and the other 78 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 14:22:30 +08:00' --until='2026-10-21 14:22:30 +08:00' --full-history --no-merges -- lib/clacky/server/http_server.rb`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:6064 — REDACTED changed 96 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 145 in sessions.showDirectoryPicker at line 6064. 35 of those changes were fix/bug commits, and the other 61 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 14:22:30 +08:00' --until='2026-10-21 14:22:30 +08:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:523 — REDACTED changed 63 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 96 in Agent.run at line 523. 21 of those changes were fix/bug commits, and the other 42 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 14:22:30 +08:00' --until='2026-10-21 14:22:30 +08:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: lib/clacky/web/ws-dispatcher.js lib/clacky/web/ws-dispatcher.js:202 — lib/clacky/web/ws-dispatcher.js changed 33 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 175 in ws-dispatcher._dispatchEvent at line 202. 14 of those changes were fix/bug commits, and the other 19 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 14:22:30 +08:00' --until='2026-10-21 14:22:30 +08:00' --full-history --no-merges -- lib/clacky/web/ws-dispatcher.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: lib/clacky/utils/model_pricing.rb lib/clacky/utils/model_pricing.rb:1372 — lib/clacky/utils/model_pricing.rb changed 42 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 72 in ModelPricing.normalize_model_name at line 1372. 7 of those changes were fix/bug commits, and the other 35 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 14:22:30 +08:00' --until='2026-10-21 14:22:30 +08:00' --full-history --no-merges -- lib/clacky/utils/model_pricing.rb`: 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: lib/clacky/agent/session_serializer.rb lib/clacky/agent/session_serializer.rb:16 — lib/clacky/agent/session_serializer.rb changed 32 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 37 in SessionSerializer.restore_session at line 16. 13 of those changes were fix/bug commits, and the other 19 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 14:22:30 +08:00' --until='2026-10-21 14:22:30 +08:00' --full-history --no-merges -- lib/clacky/agent/session_serializer.rb`: 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: lib/clacky/web/settings.js lib/clacky/web/settings.js:540 — lib/clacky/web/settings.js changed 32 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in _saveModalModel at line 540. 13 of those changes were fix/bug commits, and the other 19 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 14:22:30 +08:00' --until='2026-10-21 14:22:30 +08:00' --full-history --no-merges -- lib/clacky/web/settings.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: lib/clacky/default_extensions/ext-studio/panels/studio/view.js lib/clacky/default_extensions/ext-studio/panels/studio/view.js:747 — lib/clacky/default_extensions/ext-studio/panels/studio/view.js changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in view.runPublishFlow at line 747. 11 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 14:22:30 +08:00' --until='2026-10-21 14:22:30 +08:00' --full-history --no-merges -- lib/clacky/default_extensions/ext-studio/panels/studio/view.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: lib/clacky/server/session_registry.rb lib/clacky/server/session_registry.rb:216 — lib/clacky/server/session_registry.rb changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 46 in SessionRegistry.list at line 216. 6 of those changes were fix/bug commits, and the other 8 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 14:22:30 +08:00' --until='2026-10-21 14:22:30 +08:00' --full-history --no-merges -- lib/clacky/server/session_registry.rb`: 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: lib/clacky/server/channel/channel_manager.rb lib/clacky/server/channel/channel_manager.rb:373 — lib/clacky/server/channel/channel_manager.rb changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in ChannelManager.handle_command at line 373. 5 of those changes were fix/bug commits, and the other 8 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 14:22:30 +08:00' --until='2026-10-21 14:22:30 +08:00' --full-history --no-merges -- lib/clacky/server/channel/channel_manager.rb`: 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: lib/clacky/agent/llm_caller.rb lib/clacky/agent/llm_caller.rb:48 — lib/clacky/agent/llm_caller.rb changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 65 in LlmCaller.call_llm at line 48. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 14:22:30 +08:00' --until='2026-10-21 14:22:30 +08:00' --full-history --no-merges -- lib/clacky/agent/llm_caller.rb`: 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: lib/clacky/agent_config.rb lib/clacky/agent_config.rb:171 — lib/clacky/agent_config.rb changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in AgentConfig.initialize at line 171. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 14:22:30 +08:00' --until='2026-10-21 14:22:30 +08:00' --full-history --no-merges -- lib/clacky/agent_config.rb`: 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: lib/clacky/message_format/open_ai.rb lib/clacky/message_format/open_ai.rb:260 — lib/clacky/message_format/open_ai.rb changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in OpenAI.apply_reasoning_params at line 260. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 14:22:30 +08:00' --until='2026-10-21 14:22:30 +08:00' --full-history --no-merges -- lib/clacky/message_format/open_ai.rb`: 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: lib/clacky/web/components/model-picker.js lib/clacky/web/components/model-picker.js:646 — lib/clacky/web/components/model-picker.js changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in (anonymous) at line 646. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 14:22:30 +08:00' --until='2026-10-21 14:22:30 +08:00' --full-history --no-merges -- lib/clacky/web/components/model-picker.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: lib/clacky/cli.rb lib/clacky/cli.rb:1429 — lib/clacky/cli.rb changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in CLI.server at line 1429. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 14:22:30 +08:00' --until='2026-10-21 14:22:30 +08:00' --full-history --no-merges -- lib/clacky/cli.rb`: 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: lib/clacky/tools/terminal.rb lib/clacky/tools/terminal.rb:1252 — lib/clacky/tools/terminal.rb changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in Terminal.read_until_marker at line 1252. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 14:22:30 +08:00' --until='2026-10-21 14:22:30 +08:00' --full-history --no-merges -- lib/clacky/tools/terminal.rb`: 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: lib/clacky/ui2/ui_controller.rb lib/clacky/ui2/ui_controller.rb:1875 — lib/clacky/ui2/ui_controller.rb changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in UIController.show_config_modal at line 1875. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 14:22:30 +08:00' --until='2026-10-21 14:22:30 +08:00' --full-history --no-merges -- lib/clacky/ui2/ui_controller.rb`: 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: lib/clacky/server/web_ui_controller.rb lib/clacky/server/web_ui_controller.rb:138 — lib/clacky/server/web_ui_controller.rb changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in WebUIController.show_user_message at line 138. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 14:22:30 +08:00' --until='2026-10-21 14:22:30 +08:00' --full-history --no-merges -- lib/clacky/server/web_ui_controller.rb`: 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: lib/clacky/web/features/extensions/store.js lib/clacky/web/features/extensions/store.js:305 — lib/clacky/web/features/extensions/store.js changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in install at line 305. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 14:22:30 +08:00' --until='2026-10-21 14:22:30 +08:00' --full-history --no-merges -- lib/clacky/web/features/extensions/store.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: lib/clacky/agent/message_compressor_helper.rb lib/clacky/agent/message_compressor_helper.rb:710 — lib/clacky/agent/message_compressor_helper.rb changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in MessageCompressorHelper.display_files_for_archive at line 710. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 14:22:30 +08:00' --until='2026-10-21 14:22:30 +08:00' --full-history --no-merges -- lib/clacky/agent/message_compressor_helper.rb`: 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: lib/clacky/message_format/anthropic.rb lib/clacky/message_format/anthropic.rb:85 — lib/clacky/message_format/anthropic.rb changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in Anthropic.build_request_body at line 85. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 14:22:30 +08:00' --until='2026-10-21 14:22:30 +08:00' --full-history --no-merges -- lib/clacky/message_format/anthropic.rb`: 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: lib/clacky/ui2/components/input_area.rb lib/clacky/ui2/components/input_area.rb:1167 — lib/clacky/ui2/components/input_area.rb changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in InputArea.build_sessionbar_content at line 1167. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 14:22:30 +08:00' --until='2026-10-21 14:22:30 +08:00' --full-history --no-merges -- lib/clacky/ui2/components/input_area.rb`: 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: lib/clacky/extension/api_extension.rb lib/clacky/extension/api_extension.rb:277 — lib/clacky/extension/api_extension.rb changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in ApiExtension.create_session at line 277. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 14:22:30 +08:00' --until='2026-10-21 14:22:30 +08:00' --full-history --no-merges -- lib/clacky/extension/api_extension.rb`: 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: lib/clacky/agent_profile.rb lib/clacky/agent_profile.rb:92 — lib/clacky/agent_profile.rb changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in AgentProfile.all at line 92. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 14:22:30 +08:00' --until='2026-10-21 14:22:30 +08:00' --full-history --no-merges -- lib/clacky/agent_profile.rb`: 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: lib/clacky/web/components/chat-navigator.js lib/clacky/web/components/chat-navigator.js:174 — lib/clacky/web/components/chat-navigator.js changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in chat-navigator._renderPreview at line 174. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 14:22:30 +08:00' --until='2026-10-21 14:22:30 +08:00' --full-history --no-merges -- lib/clacky/web/components/chat-navigator.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • + 1 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×26
  • FileTooLong: server/http_server.rb lib/clacky/server/http_server.rb — FileTooLong — 6137 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 5637 over it, 12.27× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 4703 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 79% of them inside a single declaration: Sessions (18-5806). The bar is 1500 significant lines; this is 3203 over it, 3.14× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: web/settings.js lib/clacky/web/settings.js — FileTooLong — 2068 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 1500 significant lines; this is 568 over it, 1.38× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: studio/view.js lib/clacky/default_extensions/ext-studio/panels/studio/view.js — FileTooLong — 1893 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 1500 significant lines; this is 393 over it, 1.26× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 1864 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1364 over it, 3.73× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: ui2/ui_controller.rb lib/clacky/ui2/ui_controller.rb — FileTooLong — 1404 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 904 over it, 2.81× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: workspace/view.js lib/clacky/web/features/workspace/view.js — FileTooLong — 1366 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: WorkspaceView (18-1928). The bar is 500 significant lines; this is 866 over it, 2.73× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 1220 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 720 over it, 2.44× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: clacky/cli.rb lib/clacky/cli.rb — FileTooLong — 1117 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 617 over it, 2.23× 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/input_area.rb lib/clacky/ui2/components/input_area.rb — FileTooLong — 1001 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 501 over it, 2.00× 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: utils/model_pricing.rb lib/clacky/utils/model_pricing.rb — FileTooLong — 922 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 422 over it, 1.84× 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: tools/terminal.rb lib/clacky/tools/terminal.rb — FileTooLong — 862 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 362 over it, 1.72× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: clacky/agent_config.rb lib/clacky/agent_config.rb — FileTooLong — 814 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 314 over it, 1.63× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: feishu/bot.rb lib/clacky/server/channel/adapters/feishu/bot.rb — FileTooLong — 774 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 274 over it, 1.55× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: meeting/view.js lib/clacky/default_extensions/meeting/panels/meeting/view.js — FileTooLong — 722 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 222 over it, 1.44× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: rich_ui/rich_ui_controller.rb lib/clacky/rich_ui/rich_ui_controller.rb — FileTooLong — 715 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 215 over it, 1.43× 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: agent/session_serializer.rb lib/clacky/agent/session_serializer.rb — FileTooLong — 699 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 199 over it, 1.40× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: tools/browser.rb lib/clacky/tools/browser.rb — FileTooLong — 682 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 182 over it, 1.36× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: channel/channel_manager.rb lib/clacky/server/channel/channel_manager.rb — FileTooLong — 671 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 171 over it, 1.34× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: clacky/providers.rb lib/clacky/providers.rb — FileTooLong — 661 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 161 over it, 1.32× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: agent/message_compressor_helper.rb lib/clacky/agent/message_compressor_helper.rb — FileTooLong — 659 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 159 over it, 1.32× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: clacky/client.rb lib/clacky/client.rb — FileTooLong — 637 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 137 over it, 1.27× 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: web/app.js lib/clacky/web/app.js — FileTooLong — 637 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 137 over it, 1.27× 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: web/ws-dispatcher.js lib/clacky/web/ws-dispatcher.js — FileTooLong — 530 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 30 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.
  • FileTooLong: ui2/layout_manager.rb lib/clacky/ui2/layout_manager.rb — FileTooLong — 528 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 28 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.
  • + 1 more in this group — see findings.md.
D3 · God Classes · TooManyMethods · ×26
  • TooManyMethods: HttpServer lib/clacky/server/http_server.rb:181 — TooManyMethods — 311 methods. The bar is 30 methods; this is 281 over it, 10.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: UIController lib/clacky/ui2/ui_controller.rb:18 — TooManyMethods — 97 methods. The bar is 30 methods; this is 67 over it, 3.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Agent REDACTED:32 — TooManyMethods — 96 methods. The bar is 30 methods; this is 66 over it, 3.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: InputArea lib/clacky/ui2/components/input_area.rb:16 — TooManyMethods — 83 methods. The bar is 30 methods; this is 53 over it, 2.77× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: BrandConfig REDACTED:33 — TooManyMethods — 70 methods. The bar is 30 methods; this is 40 over it, 2.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: RichUIController lib/clacky/rich_ui/rich_ui_controller.rb:24 — TooManyMethods — 68 methods. The bar is 30 methods; this is 38 over it, 2.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Bot lib/clacky/server/channel/adapters/feishu/bot.rb:49 — TooManyMethods — 64 methods. The bar is 30 methods; this is 34 over it, 2.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AgentConfig lib/clacky/agent_config.rb:145 — TooManyMethods — 62 methods. The bar is 30 methods; this is 32 over it, 2.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ChannelUIController lib/clacky/server/channel/channel_ui_controller.rb:18 — TooManyMethods — 56 methods. The bar is 30 methods; this is 26 over it, 1.87× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Terminal lib/clacky/tools/terminal.rb:67 — TooManyMethods — 51 methods. The bar is 30 methods; this is 21 over it, 1.70× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: LayoutManager lib/clacky/ui2/layout_manager.rb:32 — TooManyMethods — 47 methods. The bar is 30 methods; this is 17 over it, 1.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Client lib/clacky/client.rb:7 — TooManyMethods — 46 methods. The bar is 30 methods; this is 16 over it, 1.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: WebUIController lib/clacky/server/web_ui_controller.rb:16 — TooManyMethods — 45 methods. The bar is 30 methods; this is 15 over it, 1.50× the bar. Most of these members implement Clacky.UIInterface (34 of 45 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
  • TooManyMethods: SessionManager REDACTED:11 — TooManyMethods — 42 methods. The bar is 30 methods; this is 12 over it, 1.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: MacOS lib/clacky/default_extensions/computer-use/lib/computer/macos.rb:25 — TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Browser lib/clacky/tools/browser.rb:30 — TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: UIInterface lib/clacky/ui_interface.rb:8 — TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: MessageCompressorHelper lib/clacky/agent/message_compressor_helper.rb:7 — TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: MessageHistory lib/clacky/message_history.rb:11 — TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ApiExtension lib/clacky/extension/api_extension.rb:25 — TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Providers lib/clacky/providers.rb:6 — TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Adapter REDACTED:40 — TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ChannelManager lib/clacky/server/channel/channel_manager.rb:24 — TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Scheduler lib/clacky/server/scheduler.rb:25 — TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Skill lib/clacky/skill.rb:12 — TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • + 1 more in this group — see findings.md.
AC6 · Visual & motion safety · Animation without a prefers-reduced-motion guard · ×22
  • Animation without a prefers-reduced-motion guard lib/clacky/default_skills/skill-creator/eval-viewer/viewer.html:275 — `.grades-toggle .arrow` moves (`transition: transform 0.15s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard lib/clacky/web/weixin-qr.html:94 — `.success-icon` moves (`animation: pop 0.3s ease-out`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard lib/clacky/web/app.css:413 — `.skel` moves (`animation: skel-shimmer 1.8s infinite linear`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard lib/clacky/web/app.css:422 — `[data-theme="dark"] .skel` moves (`animation: skel-shimmer 1.8s infinite linear`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard lib/clacky/web/app.css:431 — `[data-theme="dim"] .skel` moves (`animation: skel-shimmer 1.8s infinite linear`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard lib/clacky/web/app.css:440 — `[data-theme="warm"] .skel` moves (`animation: skel-shimmer 1.8s infinite linear`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard lib/clacky/web/app.css:449 — `[data-theme="bluedark"] .skel` moves (`animation: skel-shimmer 1.8s infinite linear`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard lib/clacky/web/app.css:975 — `.chat-section-chevron` moves (`transition: transform 0.2s ease, opacity 0.15s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard lib/clacky/web/app.css:1040 — `.btn-split-arrow svg` moves (`transition: transform 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard lib/clacky/web/app.css:1067 — `.btn-split-menu` moves (`transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.15s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard lib/clacky/web/app.css:1082 — `.btn-split-dropdown:hover .btn-split-menu` moves (`transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard lib/clacky/web/app.css:1248 — `.cmd-palette` moves (`transition: transform 0.16s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard lib/clacky/web/app.css:1725 — `.session-actions-btn` moves (`transition: background .15s, color .15s, width .15s, opacity .15s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard lib/clacky/web/app.css:1762 — `.session-actions-menu` moves (`animation: fadeIn 0.15s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard lib/clacky/web/app.css:1772 — `.session-context-menu` moves (`animation: fadeIn 0.15s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard lib/clacky/web/app.css:1871 — `.session-actions-submenu` moves (`animation: fadeIn 0.15s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard lib/clacky/web/app.css:2232 — `.btn-create-task` moves (`transition: background-color 0.2s ease, transform 0.15s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard lib/clacky/web/app.css:2687 — `.agent-card` moves (`transition: border-color 0.14s, background-color 0.14s, transform 0.14s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard lib/clacky/web/app.css:2872 — `.new-session-advanced-caret` moves (`transition: transform 0.15s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard lib/clacky/web/app.css:4194 — `.msg-time` moves (`transition: opacity 0.15s, transform 0.15s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard lib/clacky/web/app.css:4636 — `.feedback-dot` moves (`transition: background 0.15s, transform 0.15s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard lib/clacky/web/app.css:4871 — `.error-raw-detail summary::before` moves (`transition: transform 0.15s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
D2 · Cognitive Complexity · (anonymous) · ×22
  • (anonymous)::_renderHistoryEvent (cognitive 92) REDACTED:2072 — (anonymous)::_renderHistoryEvent has cognitive complexity 92 (threshold 15). Drivers by points: if/else 26 (59 pts), boolean chains 22, ternaries 2 (6 pts), error handling 1 (4 pts), match/switch 1 (nesting depth added 40). 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.
  • (anonymous)::_fetchHistory (cognitive 89) REDACTED:2289 — (anonymous)::_fetchHistory has cognitive complexity 89 (threshold 15). Drivers by points: if/else 38 (62 pts), boolean chains 19, error handling 2 (4 pts), ternaries 2 (4 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • (anonymous)::updateInfoBar (cognitive 81) REDACTED:4629 — (anonymous)::updateInfoBar has cognitive complexity 81 (threshold 15). Drivers by points: if/else 31 (43 pts), ternaries 12 (26 pts), boolean chains 12 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • (anonymous)::commitSearch (cognitive 33) REDACTED:3722 — (anonymous)::commitSearch has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 7, ternaries 2 (4 pts), error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • (anonymous)::add (cognitive 30) REDACTED:3460 — (anonymous)::add has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (25 pts), ternaries 3, boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • (anonymous)::appendTokenUsage (cognitive 30) REDACTED:5014 — (anonymous)::appendTokenUsage has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 10, ternaries 7 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • (anonymous)::_renderSessionItem (cognitive 29) REDACTED:3045 — (anonymous)::_renderSessionItem has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 12, ternaries 10, if/else 6 (7 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • (anonymous)::patch (cognitive 27) REDACTED:3529 — (anonymous)::patch has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 6 (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.
  • (anonymous)::_completeToolItem (cognitive 24) REDACTED:2013 — (anonymous)::_completeToolItem has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 6, error handling 1 (2 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.
  • (anonymous)::renderList (cognitive 24) REDACTED:4063 — (anonymous)::renderList has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • (anonymous)::_sendMessage (cognitive 23) REDACTED:1315 — (anonymous)::_sendMessage has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (13 pts), ternaries 5 (8 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • (anonymous)::_toggleToolItemDetails (cognitive 22) REDACTED:1817 — (anonymous)::_toggleToolItemDetails has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 5 (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.
  • (anonymous)::_renderSignal (cognitive 22) REDACTED:4813 — (anonymous)::_renderSignal has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • (anonymous)::_compactWorkingDir (cognitive 21) REDACTED:3259 — (anonymous)::_compactWorkingDir has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 4 (10 pts), if/else 5 (8 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • (anonymous)::appendMsg (cognitive 21) REDACTED:5131 — (anonymous)::appendMsg has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • (anonymous)::_docTypeIcon (cognitive 19) REDACTED:701 — (anonymous)::_docTypeIcon has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 11, if/else 8. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • (anonymous)::_renderSearchResults (cognitive 18) REDACTED:3809 — (anonymous)::_renderSearchResults has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • (anonymous)::_ansiToHtml (cognitive 17) REDACTED:1853 — (anonymous)::_ansiToHtml has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • (anonymous)::install (cognitive 17) lib/clacky/web/features/extensions/store.js:305 — (anonymous)::install has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 6, ternaries 2 (3 pts), error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • (anonymous)::_lineDiff (cognitive 16) REDACTED:1742 — (anonymous)::_lineDiff has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (6 pts), if/else 3 (4 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • (anonymous)::_buildDisplayText (cognitive 16) REDACTED:5325 — (anonymous)::_buildDisplayText has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 7 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • (anonymous)::_pollInstallStatus (cognitive 16) lib/clacky/web/features/extensions/store.js:449 — (anonymous)::_pollInstallStatus 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.
AC6 · Visual & motion safety · Focus outline removed in CSS without a · ×18
  • Focus outline removed in CSS without a :focus replacement lib/clacky/web/app.css:1337 — `.search-input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement lib/clacky/web/app.css:1413 — `.search-date` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement lib/clacky/web/app.css:1964 — `.session-rename-input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement lib/clacky/web/app.css:2825 — `.new-session-textarea` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement lib/clacky/web/app.css:3402 — `.wt-search-input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement lib/clacky/web/app.css:3647 — `.wv-code .cm-editor.cm-focused` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement lib/clacky/web/app.css:4313 — `.msg-user-edit-textarea` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement lib/clacky/web/app.css:4961 — `.todo-panel.is-open .todo-trigger` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement lib/clacky/web/app.css:6809 — `.skill-ac-item.active` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement lib/clacky/web/app.css:7279 — `#user-input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement lib/clacky/web/app.css:8790 — `.dp-address-input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement lib/clacky/web/app.css:8937 — `.dp-name-input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement lib/clacky/web/app.css:9663 — `.skill-import-input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement lib/clacky/web/app.css:11131 — `.code-editor-body .cm-editor.cm-focused` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement lib/clacky/web/app.css:12322 — `.brand-support-qr-btn` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement lib/clacky/web/app.css:14116 — `.archive-search-input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement lib/clacky/web/app.css:15355 — `.settings-accent-swatch` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement lib/clacky/web/design-sample.css:241 — `.composer textarea` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
D1 · Cyclomatic Complexity · (anonymous) · ×16
  • (anonymous)::_docTypeIcon (cyclomatic 113) REDACTED:701 — (anonymous)::_docTypeIcon has cyclomatic complexity 113 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • (anonymous)::_fetchHistory (cyclomatic 63) REDACTED:2289 — (anonymous)::_fetchHistory has cyclomatic complexity 63 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • (anonymous)::_renderHistoryEvent (cyclomatic 61) REDACTED:2072 — (anonymous)::_renderHistoryEvent has cyclomatic complexity 61 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • (anonymous)::updateInfoBar (cyclomatic 50) REDACTED:4629 — (anonymous)::updateInfoBar has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • (anonymous)::_renderSessionItem (cyclomatic 31) REDACTED:3045 — (anonymous)::_renderSessionItem has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • (anonymous)::appendTokenUsage (cyclomatic 28) REDACTED:5014 — (anonymous)::appendTokenUsage has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • (anonymous)::commitSearch (cyclomatic 26) REDACTED:3722 — (anonymous)::commitSearch 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.
  • (anonymous)::_sendMessage (cyclomatic 22) REDACTED:1315 — (anonymous)::_sendMessage 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.
  • (anonymous)::_renderSignal (cyclomatic 20) REDACTED:4813 — (anonymous)::_renderSignal 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.
  • (anonymous)::_renderEditWriteDiff (cyclomatic 19) REDACTED:1784 — (anonymous)::_renderEditWriteDiff has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • (anonymous)::patch (cyclomatic 19) REDACTED:3529 — (anonymous)::patch has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • (anonymous)::install (cyclomatic 19) lib/clacky/web/features/extensions/store.js:305 — (anonymous)::install 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.
  • (anonymous)::_completeToolItem (cyclomatic 18) REDACTED:2013 — (anonymous)::_completeToolItem 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.
  • (anonymous)::add (cyclomatic 18) REDACTED:3460 — (anonymous)::add 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.
  • (anonymous)::_buildDisplayText (cyclomatic 17) REDACTED:5325 — (anonymous)::_buildDisplayText has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • (anonymous)::renderList (cyclomatic 16) REDACTED:4063 — (anonymous)::renderList 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.
D17 · Explicit Debt · TodoComment · ×12
  • TodoComment lib/clacky/agent/tool_executor.rb:178 — # Inject TODO reminder for non-todo_manager tools — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lib/clacky/agent/tool_executor.rb:303 — # Inject TODO reminder into tool results for non-todo_manager tools — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lib/clacky/agent/tool_executor.rb:307 — # @return [Object] Result with optional TODO reminder — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lib/clacky/agent/message_compressor_helper.rb:879 — # Completed tasks (from TODO results) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lib/clacky/extension/patch_loader.rb:149 — # TODO: your fix here. Examples: — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lib/clacky/media/dashscope.rb:20 — # --- Endpoint migration TODO (2026-06) --------------------------------- — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lib/clacky/server/channel/user_adapter_loader.rb:135 — # TODO: pull your credentials out of `data` — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lib/clacky/server/channel/user_adapter_loader.rb:147 — # TODO: connect to your platform and loop, calling on_message.call(event) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lib/clacky/server/channel/user_adapter_loader.rb:152 — # TODO: close connections / stop the read loop — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lib/clacky/server/channel/user_adapter_loader.rb:158 — # TODO: call your platform's send API — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lib/clacky/ui2/layout_manager.rb:612 — # todo — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment spec/clacky/brand_skill_spec.rb:292 — # TODO: These two tests conflict with the CLACKY_TEST guard added to — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
S1 · Web-Security Posture · Weak hash algorithm · ×10
  • Weak hash algorithm REDACTED:324 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`Digest::SHA256` or `OpenSSL::Digest.new("SHA256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm REDACTED:325 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`Digest::SHA256` or `OpenSSL::Digest.new("SHA256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm REDACTED:326 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`Digest::SHA256` or `OpenSSL::Digest.new("SHA256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm REDACTED:352 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`Digest::SHA256` or `OpenSSL::Digest.new("SHA256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm REDACTED:309 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`Digest::SHA256` or `OpenSSL::Digest.new("SHA256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm REDACTED:221 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`Digest::SHA256` or `OpenSSL::Digest.new("SHA256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm REDACTED:350 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`Digest::SHA256` or `OpenSSL::Digest.new("SHA256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm REDACTED:103 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`Digest::SHA256` or `OpenSSL::Digest.new("SHA256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm REDACTED:37 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`Digest::SHA256` or `OpenSSL::Digest.new("SHA256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm REDACTED:264 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`Digest::SHA256` or `OpenSSL::Digest.new("SHA256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
D35 · Change Coupling · Change coupling · ×9
  • Change coupling: channel_config.rb ↔ view.js lib/clacky/server/channel/channel_config.rb:1 — `lib/clacky/server/channel/channel_config.rb` and `lib/clacky/web/features/channels/view.js` change together 91% of the time (10 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `17f8e3ac` feat(channel): add built-in QQ bot adapter (#615); `bb651107` feat(channel): add global toggle for IM progress cards (#589) (#599); `3c0fb2e2` feat(channels): add process_messages toggle for tool-call narration a… — run `git show` on any of them.
  • Change coupling: REDACTED ↔ view.js lib/clacky/default_extensions/ext-studio/api/handler.rb:1 — `lib/clacky/default_extensions/ext-studio/api/handler.rb` and `lib/clacky/default_extensions/ext-studio/panels/studio/view.js` change together 75% of the time (15 of the 20 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) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 15 shared commits counted here, the most recent 3 are `7837dcf0` fix: show marketplace takedown state instead of an unusable unpublish…; `f187ec8a` fix(ext-studio): show complete brand distribution for owners (#556); `a05e0c0f` fix(ext-studio): validate extension version input (C-5727) (#514) — run `git show` on any of them.
  • Change coupling: REDACTED ↔ ui_interface.rb REDACTED:1 — `REDACTED` and `lib/clacky/ui_interface.rb` change together 63% of the time (17 of the 27 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 17 shared commits counted here, the most recent 3 are `71d7d854` Feat/web ask user countdown (#644); `70992162` feat: add search ui results; `e0ee7e7a` feat: expose task mappings in core events (#496) — run `git show` on any of them.
  • Change coupling: session_registry.rb ↔ REDACTED lib/clacky/server/session_registry.rb:1 — `lib/clacky/server/session_registry.rb` and `REDACTED` change together 57% of the time (29 of the 51 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) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 29 shared commits counted here, the most recent 3 are `71d7d854` Feat/web ask user countdown (#644); `f0d4d6b6` feat: Add optional input steering with pending-message controls for C…; `303025bd` feat: surface awaiting-feedback and just-finished session states in s… — run `git show` on any of them.
  • Change coupling: bot.rb ↔ channel_manager.rb lib/clacky/server/channel/adapters/feishu/bot.rb:1 — `lib/clacky/server/channel/adapters/feishu/bot.rb` and `lib/clacky/server/channel/channel_manager.rb` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `02b2e610` Feat/feishu card messaging (#582); `7b4800f8` feat: replace group buffer with live chat history API (#288); `81201116` feat: support feishu group chat history with sender identification (#… — run `git show` on any of them.
  • Change coupling: input_area.rb ↔ screen_buffer.rb lib/clacky/ui2/components/input_area.rb:1 — `lib/clacky/ui2/components/input_area.rb` and `lib/clacky/ui2/screen_buffer.rb` change together 50% of the time (7 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `f0d4d6b6` feat: Add optional input steering with pending-message controls for C…; `fe3bf3ef` fix: encoding for cat; `ef0caf59` feat: add tab completion for slash commands — run `git show` on any of them.
  • Change coupling: screen_buffer.rb ↔ ui_controller.rb lib/clacky/ui2/screen_buffer.rb:1 — `lib/clacky/ui2/screen_buffer.rb` and `lib/clacky/ui2/ui_controller.rb` change together 50% of the time (7 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `f0d4d6b6` feat: Add optional input steering with pending-message controls for C…; `e98def3e` fix: resolve UI2 output re-rendering on modal close and height changes; `7cdefb7b` feat: add Ctrl+O toggle expand in diff view — run `git show` on any of them.
  • Change coupling: command_suggestions.rb ↔ ui_controller.rb lib/clacky/ui2/components/command_suggestions.rb:1 — `lib/clacky/ui2/components/command_suggestions.rb` and `lib/clacky/ui2/ui_controller.rb` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `f0d4d6b6` feat: Add optional input steering with pending-message controls for C…; `68f83193` feat: add /think reasoning effort switcher to TUI; `1ede59c1` feat: add /goal Ralph-style standing goal loop with judge-driven auto… — run `git show` on any of them.
  • Change coupling: loader.rb ↔ verifier.rb lib/clacky/extension/loader.rb:1 — `lib/clacky/extension/loader.rb` and `lib/clacky/extension/verifier.rb` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `2b417fbd` feat: extract computer-use into a default-off extension; `86d2ff33` feat: add tools ext; `0d52b16b` feat: add avatar — run `git show` on any of them.
D3 · God Classes · FunctionTooLong · ×8
  • FunctionTooLong: sessions.showDirectoryPicker REDACTED:6064 — FunctionTooLong — showDirectoryPicker runs 623 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 523 over it, 6.23× 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: ws-dispatcher._dispatchEvent lib/clacky/web/ws-dispatcher.js:202 — FunctionTooLong — _dispatchEvent runs 360 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 260 over it, 3.60× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: view.createExtensionsPanel lib/clacky/default_extensions/ext-studio/panels/studio/view.js:1750 — FunctionTooLong — createExtensionsPanel 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: view.openReadmeEditModal lib/clacky/default_extensions/ext-studio/panels/studio/view.js:1290 — FunctionTooLong — openReadmeEditModal runs 148 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 48 over it, 1.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: viewer.html.renderBenchmark lib/clacky/default_skills/skill-creator/eval-viewer/viewer.html:1114 — FunctionTooLong — renderBenchmark runs 142 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 42 over it, 1.42× 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: view.createPublishPanel lib/clacky/default_extensions/ext-studio/panels/studio/view.js:1490 — FunctionTooLong — createPublishPanel runs 132 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 32 over it, 1.32× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: view.runPublishFlow lib/clacky/default_extensions/ext-studio/panels/studio/view.js:747 — FunctionTooLong — runPublishFlow runs 124 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 24 over it, 1.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: view.createSkillsPanel lib/clacky/default_extensions/ext-studio/panels/studio/view.js:2014 — FunctionTooLong — createSkillsPanel runs 122 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 22 over it, 1.22× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×7
  • Duplicated block (10 lines × 2) lib/clacky/message_format/anthropic.rb:280 — lib/clacky/message_format/anthropic.rb:280-289 | lib/clacky/message_format/bedrock.rb:173-182 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (10 lines × 2) lib/clacky/server/http_server.rb:1888 — lib/clacky/server/http_server.rb:1888-1897 | lib/clacky/server/http_server.rb:1913-1922 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) lib/clacky/server/http_server.rb:3619 — lib/clacky/server/http_server.rb:3619-3628 | lib/clacky/server/http_server.rb:3637-3646 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) lib/clacky/server/http_server.rb:6292 — lib/clacky/server/http_server.rb:6292-6301 | lib/clacky/server/http_server.rb:6369-6378 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) lib/clacky/ui2/layout_manager.rb:687 — lib/clacky/ui2/layout_manager.rb:687-696 | lib/clacky/ui2/line_editor.rb:315-324 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (10 lines × 2) lib/clacky/agent/memory_updater.rb:75 — lib/clacky/agent/memory_updater.rb:75-84 | lib/clacky/agent/skill_evolution.rb:51-60 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) lib/clacky/tools/terminal.rb:598 — lib/clacky/tools/terminal.rb:598-607 | lib/clacky/tools/terminal/persistent_session.rb:188-199 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D6 · Cohesion (LCOM4) · Low cohesion · ×7
  • Low cohesion: Agent (LCOM4 9) REDACTED:32 — Agent's methods fall into 9 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 9 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: HttpServer (LCOM4 6) lib/clacky/server/http_server.rb:181 — HttpServer's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: ApiExtension (LCOM4 5) lib/clacky/extension/api_extension.rb:25 — ApiExtension's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: AgentProfile (LCOM4 4) lib/clacky/agent_profile.rb:21 — AgentProfile's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: ConfigMenuDialog (LCOM4 4) lib/clacky/rich_ui/components/dialogs/config_menu_dialog.rb:8 — ConfigMenuDialog's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: BaseComponent (LCOM4 4) lib/clacky/ui2/components/base_component.rb:9 — BaseComponent's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: ScreenBuffer (LCOM4 4) lib/clacky/ui2/screen_buffer.rb:10 — ScreenBuffer's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
R10 · Code Duplication · Duplicated block (13 lines × 2 locations) · ×7
  • Duplicated block (13 lines × 2 locations) lib/clacky/default_extensions/ext-studio/panels/studio/view.js:458 — lib/clacky/default_extensions/ext-studio/panels/studio/view.js:458 · lib/clacky/default_extensions/ext-studio/panels/studio/view.js:474 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (13 lines × 2 locations) lib/clacky/default_extensions/ext-studio/panels/studio/view.js:1496 — lib/clacky/default_extensions/ext-studio/panels/studio/view.js:1496 · lib/clacky/default_extensions/ext-studio/panels/studio/view.js:1512 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (13 lines × 2 locations) lib/clacky/default_extensions/git/panels/git/view.js:154 — lib/clacky/default_extensions/git/panels/git/view.js:154 · lib/clacky/web/features/workspace/view.js:785 — 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) lib/clacky/default_extensions/git/panels/git/view.js:111 — lib/clacky/default_extensions/git/panels/git/view.js:111 · lib/clacky/default_extensions/preview/panels/preview/view.js:38 — 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 (13 lines × 2 locations) lib/clacky/web/components/composer.js:32 — lib/clacky/web/components/composer.js:32 · lib/clacky/web/components/mentions.js:99 — 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.
  • Duplicated block (13 lines × 2 locations) lib/clacky/web/features/channels/view.js:217 — lib/clacky/web/features/channels/view.js:217 · lib/clacky/web/features/mcp/view.js:113 — 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) lib/clacky/web/features/extensions/store.js:120 — lib/clacky/web/features/extensions/store.js:120 · lib/clacky/web/features/extensions/store.js:186 — 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.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×6
  • Duplicated block (9 lines × 2) lib/clacky/agent/time_machine.rb:421 — lib/clacky/agent/time_machine.rb:421-429 | lib/clacky/agent/time_machine.rb:447-455 — 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) lib/clacky/default_skills/channel-manager/discord_setup.rb:62 — lib/clacky/default_skills/channel-manager/discord_setup.rb:62-70 | lib/clacky/default_skills/channel-manager/weixin_setup.rb:87-95 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) lib/clacky/server/http_server.rb:1901 — lib/clacky/server/http_server.rb:1901-1909 | lib/clacky/server/http_server.rb:1929-1937 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/clacky/server/http_server.rb:1901` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) lib/clacky/server/http_server.rb:4237 — lib/clacky/server/http_server.rb:4237-4245 | lib/clacky/server/http_server.rb:4266-4274 — 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) lib/clacky/tools/trash_manager.rb:442 — lib/clacky/tools/trash_manager.rb:442-450 | lib/clacky/tools/trash_manager.rb:477-485 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) lib/clacky/openai_responses_stream_aggregator.rb:283 — lib/clacky/openai_responses_stream_aggregator.rb:283-291 | lib/clacky/openai_stream_aggregator.rb:146-154 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×6
  • Duplicated block (8 lines × 2) lib/clacky/anthropic_stream_aggregator.rb:47 — lib/clacky/anthropic_stream_aggregator.rb:47-54 | lib/clacky/bedrock_stream_aggregator.rb:52-59 — 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 (8 lines × 2) lib/clacky/server/http_server.rb:127 — lib/clacky/server/http_server.rb:127-134 | lib/clacky/server/web_ui_controller.rb:517-524 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) lib/clacky/server/http_server.rb:1784 — lib/clacky/server/http_server.rb:1784-1791 | lib/clacky/server/http_server.rb:1828-1835 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/clacky/server/http_server.rb:1784` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) lib/clacky/server/http_server.rb:6330 — lib/clacky/server/http_server.rb:6330-6337 | lib/clacky/server/http_server.rb:6357-6364 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `lib/clacky/server/http_server.rb:6327` calls `mkdir_p` and `lib/clacky/server/http_server.rb:6353` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 2) lib/clacky/tools/terminal.rb:1337 — lib/clacky/tools/terminal.rb:1337-1344 | lib/clacky/tools/terminal.rb:1359-1366 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) lib/clacky/default_skills/skill-creator/scripts/run_eval.py:277 — lib/clacky/default_skills/skill-creator/scripts/run_eval.py:277-284 | lib/clacky/default_skills/skill-creator/scripts/run_loop.py:260-267 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `lib/clacky/default_skills/skill-creator/scripts/run_eval.py:275` calls `add_argument` and `lib/clacky/default_skills/skill-creator/scripts/run_loop.py:259` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
R10 · Code Duplication · Duplicated block (15 lines × 2 locations) · ×6
  • Duplicated block (15 lines × 2 locations) lib/clacky/web/app.js:584 — lib/clacky/web/app.js:584 · lib/clacky/web/app.js:616 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (15 lines × 2 locations) lib/clacky/web/features/archive/store.js:18 — lib/clacky/web/features/archive/store.js:18 · lib/clacky/web/features/new-session/store.js:33 — 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 (15 lines × 2 locations) lib/clacky/web/features/brand/store.js:18 — lib/clacky/web/features/brand/store.js:18 · lib/clacky/web/features/share/store.js:25 — 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 (15 lines × 2 locations) lib/clacky/web/features/skills/store.js:273 — lib/clacky/web/features/skills/store.js:273 · lib/clacky/web/features/skills/store.js:290 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (15 lines × 2 locations) lib/clacky/web/features/skills/view.js:717 — lib/clacky/web/features/skills/view.js:717 · lib/clacky/web/features/tasks/view.js:192 — 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 (15 lines × 2 locations) lib/clacky/web/settings.js:786 — lib/clacky/web/settings.js:786 · lib/clacky/web/settings.js:816 — 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.
D35 · Change Coupling · Change-coupling hub · ×5
  • Change-coupling hub: json_ui_controller.rb → REDACTED, plain_ui_controller.rb, channel_ui_controller.rb, web_ui_controller.rb, ui_controller.rb, REDACTED lib/clacky/json_ui_controller.rb — `lib/clacky/json_ui_controller.rb` changes together with 6 other files — `REDACTED`, `lib/clacky/plain_ui_controller.rb`, `lib/clacky/server/channel/channel_ui_controller.rb`, `lib/clacky/server/web_ui_controller.rb`, `lib/clacky/ui2/ui_controller.rb`, `REDACTED` — none of which declares a dependency on it: one file is the hub of 6 separate couplings, not 6 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 6.
  • Change-coupling hub: i18n.js → channel_config.rb, model-picker.js, view.js, view.js, view.js, store.js, view.js, view.js, ws-dispatcher.js lib/clacky/web/i18n.js — `lib/clacky/web/i18n.js` changes together with 9 other files — `lib/clacky/server/channel/channel_config.rb`, `lib/clacky/web/components/model-picker.js`, `lib/clacky/web/features/billing/view.js`, `lib/clacky/web/features/brand/view.js`, `lib/clacky/web/features/channels/view.js`, `lib/clacky/web/features/extensions/store.js`, `lib/clacky/web/features/extensions/view.js`, `lib/clacky/web/features/skills/view.js`, `lib/clacky/web/ws-dispatcher.js` — none of which declares a dependency on it: one file is the hub of 9 separate couplings, not 9 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 9.
  • Change-coupling hub: plain_ui_controller.rb → REDACTED, channel_ui_controller.rb, web_ui_controller.rb, ui_controller.rb, REDACTED lib/clacky/plain_ui_controller.rb — `lib/clacky/plain_ui_controller.rb` changes together with 5 other files — `REDACTED`, `lib/clacky/server/channel/channel_ui_controller.rb`, `lib/clacky/server/web_ui_controller.rb`, `lib/clacky/ui2/ui_controller.rb`, `REDACTED` — none of which declares a dependency on it: one file is the hub of 5 separate couplings, not 5 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 5.
  • Change-coupling hub: http_server.rb → json_ui_controller.rb, message_history.rb, plain_ui_controller.rb, channel_ui_controller.rb, ext.js, view.js, view.js, store.js, view.js, ws-dispatcher.js lib/clacky/server/http_server.rb — `lib/clacky/server/http_server.rb` changes together with 10 other files — `lib/clacky/json_ui_controller.rb`, `lib/clacky/message_history.rb`, `lib/clacky/plain_ui_controller.rb`, `lib/clacky/server/channel/channel_ui_controller.rb`, `lib/clacky/web/core/ext.js`, `lib/clacky/web/features/brand/view.js`, `lib/clacky/web/features/channels/view.js`, `lib/clacky/web/features/extensions/store.js`, `lib/clacky/web/features/skills/view.js`, `lib/clacky/web/ws-dispatcher.js` — none of which declares a dependency on it: one file is the hub of 10 separate couplings, not 10 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 10.
  • Change-coupling hub: web_ui_controller.rb → REDACTED, channel_ui_controller.rb, REDACTED lib/clacky/server/web_ui_controller.rb — `lib/clacky/server/web_ui_controller.rb` changes together with 3 other files — `REDACTED`, `lib/clacky/server/channel/channel_ui_controller.rb`, `REDACTED` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×5
  • Duplicated block (5 lines × 2) REDACTED:620 — REDACTED:620-625 | REDACTED:677-681 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:620` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) lib/clacky/plain_ui_controller.rb:25 — lib/clacky/plain_ui_controller.rb:25-29 | lib/clacky/server/web_ui_controller.rb:189-193 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) lib/clacky/server/http_server.rb:5596 — lib/clacky/server/http_server.rb:5596-5604 | lib/clacky/server/http_server.rb:5645-5649 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/clacky/server/http_server.rb:5596` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (5 lines × 2) lib/clacky/server/http_server.rb:3338 — lib/clacky/server/http_server.rb:3338-3342 | lib/clacky/server/http_server.rb:3371-3375 — 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) lib/clacky/default_skills/skill-creator/scripts/run_eval.py:267 — lib/clacky/default_skills/skill-creator/scripts/run_eval.py:267-271 | lib/clacky/default_skills/skill-creator/scripts/run_loop.py:246-250 — 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.
D15 · Churn × Complexity Hotspots · Repeated repair · ×4
  • Repeated repair: lib/clacky/extension/packager.rb lib/clacky/extension/packager.rb:258 — lib/clacky/extension/packager.rb changed 9 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is ExtensionPackager.download_once at line 258), 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: wrap download errors so CDN fallback fires”; “fix(extension): fall back to secondary CDN host on zip download failure”; “fix: increase extension pack max zip size from 50MB to 80MB”; “fix(ext): exclude gitignored and VCS files from extension packs”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 14:22:30 +08:00' --until='2026-10-21 14:22:30 +08:00' --full-history --no-merges -- lib/clacky/extension/packager.rb`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: lib/clacky/extension/verifier.rb lib/clacky/extension/verifier.rb:154 — lib/clacky/extension/verifier.rb changed 7 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is ExtensionVerifier.reference_issues at line 154), 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(extensions): harden developer guidance and align manifest validation (#524)”; “fix(ext-studio): validate extension version input (C-5727) (#514)”; “fix(extension): whitelist config top-level key in verifier”; “fix(extension): include hidden in verifier AGENT_KEYS (#430)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 14:22:30 +08:00' --until='2026-10-21 14:22:30 +08:00' --full-history --no-merges -- lib/clacky/extension/verifier.rb`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: lib/clacky/default_extensions/advisor/panels/advisor/view.js lib/clacky/default_extensions/advisor/panels/advisor/view.js:346 — lib/clacky/default_extensions/advisor/panels/advisor/view.js changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is view.Clacky.ext.subscribe("ext.advisor.done") at line 346), 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(advisor): send structured options instead of raw model text (C-5763) (#503)”; “fix(advisor): fill composer via Composer.setText for contenteditable input”; “fix(advisor): keep recommendation card state per session (C-5764) (#502)”; “fix: advisor dismiss button permanently suppresses suggestions until refresh (#501)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 14:22:30 +08:00' --until='2026-10-21 14:22:30 +08:00' --full-history --no-merges -- lib/clacky/default_extensions/advisor/panels/advisor/view.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: lib/clacky/web/features/workspace/store.js lib/clacky/web/features/workspace/store.js:114 — lib/clacky/web/features/workspace/store.js changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is fetchDefaultApp at line 114), 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: refresh file tree via store bus for pure-mode safety”; “fix(workspace): resolve file://~/ tilde paths from chat links”; “fix(web): surface git tab badge eagerly via generic onAttach hook”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 14:22:30 +08:00' --until='2026-10-21 14:22:30 +08:00' --full-history --no-merges -- lib/clacky/web/features/workspace/store.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
X17 · Uncapped recursion over a caller-supplied document · Recursive walk over a caller-supplied document has no depth cap · ×4
  • Recursive walk over a caller-supplied document has no depth cap lib/clacky/message_history.rb:547 — `append` is public, takes a document from its caller (line 48) and hands it to `deep_sanitize_utf8`, which walks `obj` as a `Hash` and calls itself at line 547 (`self.deep_sanitize_utf8`) with a piece of `obj` (and at line 550) — and nowhere in `deep_sanitize_utf8` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends stack per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A walk like this one raises `SystemStackError` past about 3,800 levels on the main thread and about 1,000 on a `Thread` — where Puma serves requests and Sidekiq runs jobs (MRI 3.3 and 4.0). `JSON.parse` stops at 100 levels by default, but the other parsers a caller may use do not: `YAML.safe_load` builds 1,400 levels from 2.8 KB, `Oj.load` 100,000, REXML 200,000, and `JSON.load` on json 2.7 (Ruby 3.3's default) or `JSON.parse(…, max_nesting: false)` 58,000. `SystemStackError` is not a `StandardError`: a bare `rescue` or `rescue => e` around the call does not stop it. Thread a depth argument through `deep_sanitize_utf8` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap lib/clacky/client.rb:966 — `deep_clone` is public and takes `obj` — which it walks as a `Hash` — from its caller, and it calls itself at line 966 (`self.deep_clone`) with a piece of `obj` (and at line 967) — and nowhere in `deep_clone` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends stack per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A walk like this one raises `SystemStackError` past about 3,800 levels on the main thread and about 1,000 on a `Thread` — where Puma serves requests and Sidekiq runs jobs (MRI 3.3 and 4.0). `JSON.parse` stops at 100 levels by default, but the other parsers a caller may use do not: `YAML.safe_load` builds 1,400 levels from 2.8 KB, `Oj.load` 100,000, REXML 200,000, and `JSON.load` on json 2.7 (Ruby 3.3's default) or `JSON.parse(…, max_nesting: false)` 58,000. `SystemStackError` is not a `StandardError`: a bare `rescue` or `rescue => e` around the call does not stop it. Thread a depth argument through `deep_clone` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap REDACTED:2029 — `redact_value` is public and takes `obj` — which it walks as a `Hash` — from its caller, and it calls itself at line 2029 (`self.redact_value`) with a piece of `obj` (and at line 2031) — and nowhere in `redact_value` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends stack per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A walk like this one raises `SystemStackError` past about 3,800 levels on the main thread and about 1,000 on a `Thread` — where Puma serves requests and Sidekiq runs jobs (MRI 3.3 and 4.0). `JSON.parse` stops at 100 levels by default, but the other parsers a caller may use do not: `YAML.safe_load` builds 1,400 levels from 2.8 KB, `Oj.load` 100,000, REXML 200,000, and `JSON.load` on json 2.7 (Ruby 3.3's default) or `JSON.parse(…, max_nesting: false)` 58,000. `SystemStackError` is not a `StandardError`: a bare `rescue` or `rescue => e` around the call does not stop it. Thread a depth argument through `redact_value` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap lib/clacky/message_format/open_ai.rb:399 — `deep_clone` is public and takes `obj` — which it walks as a `Hash` — from its caller, and it calls itself at line 399 (`self.deep_clone`) with a piece of `obj` (and at line 400) — and nowhere in `deep_clone` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends stack per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A walk like this one raises `SystemStackError` past about 3,800 levels on the main thread and about 1,000 on a `Thread` — where Puma serves requests and Sidekiq runs jobs (MRI 3.3 and 4.0). `JSON.parse` stops at 100 levels by default, but the other parsers a caller may use do not: `YAML.safe_load` builds 1,400 levels from 2.8 KB, `Oj.load` 100,000, REXML 200,000, and `JSON.load` on json 2.7 (Ruby 3.3's default) or `JSON.parse(…, max_nesting: false)` 58,000. `SystemStackError` is not a `StandardError`: a bare `rescue` or `rescue => e` around the call does not stop it. Thread a depth argument through `deep_clone` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
D29 · Static Analysis (SAST) · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×3
  • Duplicated block (14 lines × 2) lib/clacky/client.rb:709 — lib/clacky/client.rb:709-722 | lib/clacky/client.rb:726-739 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) REDACTED:641 — REDACTED:641-654 | lib/clacky/server/channel/adapters/telegram/adapter.rb:365-378 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) lib/clacky/server/http_server.rb:2064 — lib/clacky/server/http_server.rb:2064-2077 | lib/clacky/server/http_server.rb:2281-2294 — 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 (13 lines × 2) · ×3
  • Duplicated block (13 lines × 2) lib/clacky/default_parsers/docx_parser.rb:122 — lib/clacky/default_parsers/docx_parser.rb:122-134 | lib/clacky/default_parsers/pptx_parser.rb:32-44 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (13 lines × 2) lib/clacky/default_skills/channel-manager/discord_setup.rb:96 — lib/clacky/default_skills/channel-manager/discord_setup.rb:96-108 | lib/clacky/default_skills/channel-manager/weixin_setup.rb:150-162 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (13 lines × 2) lib/clacky/server/channel/adapters/dingtalk/stream_client.rb:67 — lib/clacky/server/channel/adapters/dingtalk/stream_client.rb:67-79 | lib/clacky/server/channel/adapters/feishu/ws_client.rb:90-105 — 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 (7 lines × 2) · ×3
  • Duplicated block (7 lines × 2) REDACTED:629 — REDACTED:629-635 | REDACTED:683-689 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) lib/clacky/server/http_server.rb:4382 — lib/clacky/server/http_server.rb:4382-4388 | lib/clacky/server/http_server.rb:4406-4412 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) lib/clacky/server/channel/adapters/discord/gateway_client.rb:227 — lib/clacky/server/channel/adapters/discord/gateway_client.rb:227-233 | lib/clacky/server/channel/adapters/qq/gateway_client.rb:291-297 — `lib/clacky/server/channel/adapters/discord/gateway_client.rb` and `lib/clacky/server/channel/adapters/qq/gateway_client.rb` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 5 separate duplicated blocks between them, totalling at least 79 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. 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 (20 lines × 2 locations) · ×3
  • Duplicated block (20 lines × 2 locations) lib/clacky/web/components/custom-select.js:22 — lib/clacky/web/components/custom-select.js:22 · lib/clacky/web/settings.js:647 — 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 (20 lines × 2 locations) lib/clacky/web/features/billing/store.js:46 — lib/clacky/web/features/billing/store.js:46 · lib/clacky/web/settings.js:2947 — 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 (20 lines × 2 locations) lib/clacky/web/settings.js:1036 — lib/clacky/web/settings.js:1036 · lib/clacky/web/settings.js:1289 — 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 (14 lines × 2 locations) · ×3
  • Duplicated block (14 lines × 2 locations) lib/clacky/web/app.js:643 — lib/clacky/web/app.js:643 · lib/clacky/web/app.js:690 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2 locations) lib/clacky/web/features/archive/store.js:109 — lib/clacky/web/features/archive/store.js:109 · lib/clacky/web/features/archive/store.js:131 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (14 lines × 2 locations) lib/clacky/web/features/new-session/view.js:501 — lib/clacky/web/features/new-session/view.js:501 · REDACTED:970 — 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.
AC3 · Page structure · Page without a main landmark · ×2
  • Page without a main landmark lib/clacky/default_skills/skill-creator/eval-viewer/viewer.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark lib/clacky/web/weixin-qr.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
D1 · Cyclomatic Complexity · showDirectoryPicker · ×2
  • showDirectoryPicker::(anonymous)::navigateTo (cyclomatic 31) REDACTED:6667 — showDirectoryPicker::(anonymous)::navigateTo has cyclomatic complexity 31 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • showDirectoryPicker::(anonymous)::fetchDirs (cyclomatic 28) REDACTED:6091 — showDirectoryPicker::(anonymous)::fetchDirs 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 · (anonymous) (cyclomatic 24) · ×2
  • (anonymous) (cyclomatic 24) lib/clacky/web/features/mcp/store.js:15 — (anonymous) has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 18 function items inside it that branch (probe, toggle, remove, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
  • (anonymous) (cyclomatic 24) lib/clacky/web/features/backup/store.js:11 — (anonymous) has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 12 function items inside it that branch (fetchArchive, restore, _emit, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · showDirectoryPicker · ×2
  • showDirectoryPicker::(anonymous)::fetchDirs (cognitive 31) REDACTED:6091 — showDirectoryPicker::(anonymous)::fetchDirs has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 14, if/else 9 (12 pts), ternaries 2 (5 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • showDirectoryPicker::(anonymous)::navigateTo (cognitive 29) REDACTED:6667 — showDirectoryPicker::(anonymous)::navigateTo has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 12, if/else 9 (10 pts), ternaries 5 (6 pts), error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · (anonymous) (cognitive 24) · ×2
  • (anonymous) (cognitive 24) lib/clacky/web/features/mcp/store.js:15 — (anonymous) has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 9, if/else 9, error handling 5, ternaries 1. None of this is in the body itself: all 24 points belong to 18 function items inside it that branch (probe, toggle, remove, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
  • (anonymous) (cognitive 24) lib/clacky/web/features/backup/store.js:11 — (anonymous) has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 9, error handling 7 (8 pts), if/else 5, ternaries 2 (nesting depth added 1). None of this is in the body itself: all 24 points belong to 12 function items inside it that branch (fetchArchive, restore, _emit, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · (anonymous)._render (cognitive 17) · ×2
  • (anonymous)._render (cognitive 17) lib/clacky/web/skills.js:244 — (anonymous)._render has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 6, ternaries 2. Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 289, 261, 256, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
  • (anonymous)._render (cognitive 17) lib/clacky/web/features/archive/view.js:151 — (anonymous)._render has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 5 (9 pts), if/else 5, boolean chains 3 (nesting depth added 4). Of this number, 16 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D31 · IaC & Container Security · Medium IaC · ×2
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×2
  • Duplicated block (16 lines × 2) REDACTED:353 — REDACTED:353-368 | REDACTED:1079-1094 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (16 lines × 2) lib/clacky/mcp/registry.rb:182 — lib/clacky/mcp/registry.rb:182-197 | lib/clacky/mcp/skill_provider.rb:44-59 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `lib/clacky/mcp/registry.rb:200` calls `default_description_for` and `lib/clacky/mcp/skill_provider.rb:61` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×2
  • Duplicated block (12 lines × 2) lib/clacky/server/channel/adapters/discord/gateway_client.rb:73 — lib/clacky/server/channel/adapters/discord/gateway_client.rb:73-84 | lib/clacky/server/channel/adapters/qq/gateway_client.rb:98-109 — `lib/clacky/server/channel/adapters/discord/gateway_client.rb` and `lib/clacky/server/channel/adapters/qq/gateway_client.rb` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 5 separate duplicated blocks between them, totalling at least 79 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (12 lines × 2) lib/clacky/default_skills/skill-creator/scripts/run_eval.py:44 — lib/clacky/default_skills/skill-creator/scripts/run_eval.py:44-55 | lib/clacky/default_skills/skill-creator/scripts/run_eval.py:146-157 — 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 (11 lines × 2) · ×2
  • Duplicated block (11 lines × 2) lib/clacky/server/browser_manager.rb:66 — lib/clacky/server/browser_manager.rb:66-76 | lib/clacky/server/browser_manager.rb:95-105 — 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) lib/clacky/server/channel/adapters/feishu/bot.rb:951 — lib/clacky/server/channel/adapters/feishu/bot.rb:951-961 | lib/clacky/server/channel/adapters/feishu/bot.rb:980-990 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/clacky/server/channel/adapters/feishu/bot.rb:951` 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 (6 lines × 2) · ×2
  • Duplicated block (6 lines × 2) lib/clacky/ui2/layout_manager.rb:679 — lib/clacky/ui2/layout_manager.rb:679-684 | lib/clacky/ui2/line_editor.rb:306-312 — 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) lib/clacky/ui2/components/input_area.rb:1090 — lib/clacky/ui2/components/input_area.rb:1090-1095 | lib/clacky/ui2/line_editor.rb:144-149 — 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 (7 lines × 4) · ×2
  • Duplicated block (7 lines × 4) lib/clacky/anthropic_stream_aggregator.rb:140 — lib/clacky/anthropic_stream_aggregator.rb:140-146 | lib/clacky/bedrock_stream_aggregator.rb:137-143 | lib/clacky/openai_responses_stream_aggregator.rb:265-271 | lib/clacky/openai_stream_aggregator.rb:128-134 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once.
  • Duplicated block (7 lines × 4) lib/clacky/server/channel/adapters/discord/gateway_client.rb:262 — lib/clacky/server/channel/adapters/discord/gateway_client.rb:262-268 | lib/clacky/server/channel/adapters/feishu/ws_client.rb:299-305 | lib/clacky/server/channel/adapters/qq/gateway_client.rb:327-334 | REDACTED:263-269 — `lib/clacky/server/channel/adapters/discord/gateway_client.rb` and `lib/clacky/server/channel/adapters/qq/gateway_client.rb` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 5 separate duplicated blocks between them, totalling at least 79 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. 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 (21 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (21 matched lines × 2 locations) lib/clacky/web/features/new-session/store.js:112 — lib/clacky/web/features/new-session/store.js:112 · lib/clacky/web/features/new-session/store.js:201 — the two spans are one implementation copied and then locally edited — 101 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 (21 matched lines × 2 locations) lib/clacky/web/features/workspace/store.js:97 — lib/clacky/web/features/workspace/store.js:97 · lib/clacky/web/features/workspace/store.js:141 — the two spans are one implementation copied and then locally edited — 153 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 (19 lines × 2 locations) · ×2
  • Duplicated block (19 lines × 2 locations) lib/clacky/default_extensions/git/panels/git/view.js:111 — lib/clacky/default_extensions/git/panels/git/view.js:111 · lib/clacky/default_extensions/time_machine/panels/time_machine/view.js:180 — 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 (19 lines × 2 locations) REDACTED:4174 — REDACTED:4174 · REDACTED:4486 — 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 (15 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (15 matched lines × 2 locations) lib/clacky/web/components/mentions.js:490 — lib/clacky/web/components/mentions.js:490 · lib/clacky/web/skills.js:520 — the two spans are one implementation copied and then locally edited — 116 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 (15 matched lines × 2 locations) lib/clacky/web/components/onboard.js:275 — lib/clacky/web/components/onboard.js:275 · lib/clacky/web/settings.js:1100 — the two spans are one implementation copied and then locally edited — 98 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 (12 lines × 2 locations) · ×2
  • Duplicated block (12 lines × 2 locations) lib/clacky/default_extensions/ext-studio/panels/studio/view.js:1996 — lib/clacky/default_extensions/ext-studio/panels/studio/view.js:1996 · lib/clacky/default_extensions/ext-studio/panels/studio/view.js:2157 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (12 lines × 2 locations) lib/clacky/web/components/mentions.js:392 — lib/clacky/web/components/mentions.js:392 · lib/clacky/web/components/mentions.js:433 — 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.
AC4 · Keyboard semantics · Modal dialog does not manage focus · ×1
  • Modal dialog does not manage focus lib/clacky/web/features/channels/view.js:364 — This <div role="dialog"> is a modal dialog, but focus is moved into it, but nothing keeps it there: Tab walks out to the page behind, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
AC7 · A11y enforcement · Accessibility enforcement below the top rung · ×1
  • Accessibility enforcement below the top rung — No accessibility enforcement found — no automated accessibility check runs over the HTML your app renders. Assert the accessibility invariants over that HTML in the test suite you already have (parse the output and assert, or drive a browser), and gate that test in CI so a regression blocks the merge. What was searched, so you can tell an absence from a miss: the 38 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 · HttpServer._dispatch_rest (cyclomatic 239) · ×1
  • HttpServer._dispatch_rest (cyclomatic 239) lib/clacky/server/http_server.rb:664 — HttpServer._dispatch_rest has cyclomatic complexity 239 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · ws-dispatcher._dispatchEvent (cyclomatic 175) · ×1
  • ws-dispatcher._dispatchEvent (cyclomatic 175) lib/clacky/web/ws-dispatcher.js:202 — ws-dispatcher._dispatchEvent has cyclomatic complexity 175 (threshold 15). Of this number, 166 points are the body's own statements and 9 belong to 6 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sessions.showDirectoryPicker (cyclomatic 145) · ×1
  • sessions.showDirectoryPicker (cyclomatic 145) REDACTED:6064 — sessions.showDirectoryPicker has cyclomatic complexity 145 (threshold 15). Most of this is not in the body itself: 1 of the 145 points is its own statement and the rest belongs to 38 function literals inside it that branch (lines 6667, 6091, 6493, …). 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)._humanCron (cyclomatic 99) · ×1
  • (anonymous)._humanCron (cyclomatic 99) lib/clacky/web/features/tasks/view.js:15 — (anonymous)._humanCron has cyclomatic complexity 99 (threshold 15). Of this number, 81 points are the body's own statements and 18 belong to 7 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Agent.run (cyclomatic 96) · ×1
  • Agent.run (cyclomatic 96) REDACTED:523 — Agent.run has cyclomatic complexity 96 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 93) · ×1
  • (anonymous) (cyclomatic 93) lib/clacky/web/features/share/view.js:17 — (anonymous) has cyclomatic complexity 93 (threshold 15). Most of this is not in the body itself: 1 of the 93 points is its own statement and the rest belongs to 63 function items inside it that branch (_receiptRows, _paintReceiptRow, openStage, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · viewer.html.renderBenchmark (cyclomatic 79) · ×1
  • viewer.html.renderBenchmark (cyclomatic 79) lib/clacky/default_skills/skill-creator/eval-viewer/viewer.html:1114 — viewer.html.renderBenchmark has cyclomatic complexity 79 (threshold 15). Of this number, 66 points are the body's own statements and 13 belong to 7 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 71) · ×1
  • (anonymous) (cyclomatic 71) lib/clacky/web/features/trash/store.js:15 — (anonymous) has cyclomatic complexity 71 (threshold 15). Most of this is not in the body itself: 1 of the 71 points is its own statement and the rest belongs to 36 function items inside it that branch (loadFiles, loadSessions, restoreSession, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · LlmCaller.call_llm (cyclomatic 65) · ×1
  • LlmCaller.call_llm (cyclomatic 65) lib/clacky/agent/llm_caller.rb:48 — LlmCaller.call_llm has cyclomatic complexity 65 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 63) · ×1
  • (anonymous) (cyclomatic 63) lib/clacky/web/features/skills/store.js:25 — (anonymous) has cyclomatic complexity 63 (threshold 15). Most of this is not in the body itself: 5 of the 63 points are its own statements and the rest belongs to 33 function items inside it that branch (loadBrandSkills, deleteBrandSkill, importSkill, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · Agent.append_user_input (cyclomatic 62) · ×1
  • Agent.append_user_input (cyclomatic 62) REDACTED:963 — Agent.append_user_input has cyclomatic complexity 62 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Agent.act (cyclomatic 59) · ×1
  • Agent.act (cyclomatic 59) REDACTED:1585 — Agent.act has cyclomatic complexity 59 (threshold 15). To reduce it, separate the cases: extract each independent 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 · HttpServer.on_ws_message (cyclomatic 54) · ×1
  • HttpServer.on_ws_message (cyclomatic 54) lib/clacky/server/http_server.rb:7893 — HttpServer.on_ws_message has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 54) · ×1
  • (anonymous) (cyclomatic 54) lib/clacky/web/features/archive/store.js:12 — (anonymous) has cyclomatic complexity 54 (threshold 15). Most of this is not in the body itself: 1 of the 54 points is its own statement and the rest belongs to 19 function items inside it that branch (load, unarchive, archiveSession, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · Browser.do_user_act (cyclomatic 52) · ×1
  • Browser.do_user_act (cyclomatic 52) lib/clacky/tools/browser.rb:347 — Browser.do_user_act has cyclomatic complexity 52 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · (anonymous)._bindCardEvents (cyclomatic 50) · ×1
  • (anonymous)._bindCardEvents (cyclomatic 50) lib/clacky/web/settings.js:1078 — (anonymous)._bindCardEvents has cyclomatic complexity 50 (threshold 15). Most of this is not in the body itself: 10 of the 50 points are its own statements and the rest belongs to 29 function items inside it that branch (onSelect, _currentProvider, a function literal at line 1300, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · ChannelManager.handle_command (cyclomatic 48) · ×1
  • ChannelManager.handle_command (cyclomatic 48) lib/clacky/server/channel/channel_manager.rb:373 — ChannelManager.handle_command has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · (anonymous)._apply (cyclomatic 48) · ×1
  • (anonymous)._apply (cyclomatic 48) lib/clacky/web/app.js:272 — (anonymous)._apply has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SessionRegistry.list (cyclomatic 46) · ×1
  • SessionRegistry.list (cyclomatic 46) lib/clacky/server/session_registry.rb:216 — SessionRegistry.list has cyclomatic complexity 46 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ScreenBuffer.read_key (cyclomatic 45) · ×1
  • ScreenBuffer.read_key (cyclomatic 45) lib/clacky/ui2/screen_buffer.rb:173 — ScreenBuffer.read_key has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · (anonymous)._showCreateProjectModal (cyclomatic 44) · ×1
  • (anonymous)._showCreateProjectModal (cyclomatic 44) lib/clacky/web/projects.js:754 — (anonymous)._showCreateProjectModal has cyclomatic complexity 44 (threshold 15). Most of this is not in the body itself: 1 of the 44 points is its own statement and the rest belongs to 27 function items inside it that branch (a function literal at line 756, (anonymous)::onFolderAreaClick, (anonymous)::saveHandler, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · (anonymous).populate (cyclomatic 44) · ×1
  • (anonymous).populate (cyclomatic 44) lib/clacky/web/components/model-picker.js:584 — (anonymous).populate has cyclomatic complexity 44 (threshold 15). Most of this is not in the body itself: 10 of the 44 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 646, a function literal at line 664, (anonymous)::switchVariant, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · InputArea.handle_key (cyclomatic 43) · ×1
  • InputArea.handle_key (cyclomatic 43) lib/clacky/ui2/components/input_area.rb:182 — InputArea.handle_key has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HttpServer.start (cyclomatic 42) · ×1
  • HttpServer.start (cyclomatic 42) lib/clacky/server/http_server.rb:300 — HttpServer.start has cyclomatic complexity 42 (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 · (anonymous)._initSearchSettings (cyclomatic 42) · ×1
  • (anonymous)._initSearchSettings (cyclomatic 42) lib/clacky/web/settings.js:1723 — (anonymous)._initSearchSettings has cyclomatic complexity 42 (threshold 15). Of this number, 16 points are the body's own statements and 26 belong to 7 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 40) · ×1
  • (anonymous) (cyclomatic 40) lib/clacky/web/features/profile/store.js:15 — (anonymous) has cyclomatic complexity 40 (threshold 15). Most of this is not in the body itself: 1 of the 40 points is its own statement and the rest belongs to 19 function items inside it that branch (_loadMemories, deleteMemory, curateProfile, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · HttpServer.api_store_extensions_installed (cyclomatic 38) · ×1
  • HttpServer.api_store_extensions_installed (cyclomatic 38) lib/clacky/server/http_server.rb:2914 — HttpServer.api_store_extensions_installed has cyclomatic complexity 38 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · (anonymous)._renderMediaDetail (cyclomatic 38) · ×1
  • (anonymous)._renderMediaDetail (cyclomatic 38) lib/clacky/web/settings.js:2500 — (anonymous)._renderMediaDetail has cyclomatic complexity 38 (threshold 15). Of this number, 17 points are the body's own statements and 21 belong to 10 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SessionSerializer.restore_session (cyclomatic 37) · ×1
  • SessionSerializer.restore_session (cyclomatic 37) lib/clacky/agent/session_serializer.rb:16 — SessionSerializer.restore_session has cyclomatic complexity 37 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · SessionRegistry.build_enriched_row (cyclomatic 37) · ×1
  • SessionRegistry.build_enriched_row (cyclomatic 37) lib/clacky/server/session_registry.rb:366 — SessionRegistry.build_enriched_row has cyclomatic complexity 37 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · UIController.show_model_edit_form (cyclomatic 37) · ×1
  • UIController.show_model_edit_form (cyclomatic 37) lib/clacky/ui2/ui_controller.rb:2187 — UIController.show_model_edit_form has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 37) · ×1
  • (anonymous) (cyclomatic 37) lib/clacky/web/features/share/store.js:16 — (anonymous) has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 1 of the 37 points is its own statement and the rest belongs to 21 function items inside it that branch (_hydrateBrand, setScorecard, curStats, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · SessionSerializer.parse_chunk_md_to_rounds (cyclomatic 35) · ×1
  • SessionSerializer.parse_chunk_md_to_rounds (cyclomatic 35) lib/clacky/agent/session_serializer.rb:436 — SessionSerializer.parse_chunk_md_to_rounds has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Terminal.read_until_marker (cyclomatic 35) · ×1
  • Terminal.read_until_marker (cyclomatic 35) lib/clacky/tools/terminal.rb:1252 — Terminal.read_until_marker has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · view.runPublishFlow (cyclomatic 35) · ×1
  • view.runPublishFlow (cyclomatic 35) lib/clacky/default_extensions/ext-studio/panels/studio/view.js:747 — view.runPublishFlow has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 1 of the 35 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 849, 816, 748, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 35) · ×1
  • (anonymous) (cyclomatic 35) lib/clacky/web/features/workspace/store.js:12 — (anonymous) has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 1 of the 35 points is its own statement and the rest belongs to 22 function items inside it that branch (fetchDefaultApp, setSession, fetchEntries, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · OpenAI.apply_reasoning_params (cyclomatic 34) · ×1
  • OpenAI.apply_reasoning_params (cyclomatic 34) lib/clacky/message_format/open_ai.rb:260 — OpenAI.apply_reasoning_params has cyclomatic complexity 34 (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 · view.openReadmeEditModal (cyclomatic 34) · ×1
  • view.openReadmeEditModal (cyclomatic 34) lib/clacky/default_extensions/ext-studio/panels/studio/view.js:1290 — view.openReadmeEditModal has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 3 of the 34 points are its own statements and the rest belongs to 10 function items inside it that branch (uploadScreenshot, screenshotErrorText, renderPreview, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · (anonymous).renderTabbedSlot (cyclomatic 33) · ×1
  • (anonymous).renderTabbedSlot (cyclomatic 33) lib/clacky/web/core/ext.js:584 — (anonymous).renderTabbedSlot has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 13 of the 33 points are its own statements and the rest belongs to 14 function items inside it that branch (a function literal at line 641, activate, scrollTabsWithWheel, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · (anonymous)._renderBrandStatus (cyclomatic 32) · ×1
  • (anonymous)._renderBrandStatus (cyclomatic 32) lib/clacky/web/settings.js:2033 — (anonymous)._renderBrandStatus has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 15 of the 32 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 2082, 2082, 2131). 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)._renderContextBar (cyclomatic 32) · ×1
  • (anonymous)._renderContextBar (cyclomatic 32) lib/clacky/web/features/new-session/view.js:803 — (anonymous)._renderContextBar has cyclomatic complexity 32 (threshold 15). Of this number, 31 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between 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 · Adapter.handle_frame (cyclomatic 31) · ×1
  • Adapter.handle_frame (cyclomatic 31) lib/clacky/server/channel/adapters/dingtalk/adapter.rb:153 — Adapter.handle_frame has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HttpServer.api_store_extension_detail (cyclomatic 31) · ×1
  • HttpServer.api_store_extension_detail (cyclomatic 31) lib/clacky/server/http_server.rb:3022 — HttpServer.api_store_extension_detail has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HttpServer.api_update_model (cyclomatic 31) · ×1
  • HttpServer.api_update_model (cyclomatic 31) lib/clacky/server/http_server.rb:6913 — HttpServer.api_update_model has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 31) · ×1
  • (anonymous) (cyclomatic 31) lib/clacky/web/features/billing/store.js:16 — (anonymous) has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 1 of the 31 points is its own statement and the rest belongs to 22 function items inside it that branch (load, _getExchangeRate, _setExchangeRate, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · FileProcessor.detect_image_mime_type (cyclomatic 30) · ×1
  • FileProcessor.detect_image_mime_type (cyclomatic 30) lib/clacky/utils/file_processor.rb:468 — FileProcessor.detect_image_mime_type has cyclomatic complexity 30 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Agent.think (cyclomatic 29) · ×1
  • Agent.think (cyclomatic 29) REDACTED:1377 — Agent.think has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HttpServer.run_agent_task (cyclomatic 29) · ×1
  • HttpServer.run_agent_task (cyclomatic 29) lib/clacky/server/http_server.rb:8332 — HttpServer.run_agent_task has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UIController.handle_key (cyclomatic 29) · ×1
  • UIController.handle_key (cyclomatic 29) lib/clacky/ui2/ui_controller.rb:1698 — UIController.handle_key has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · (anonymous)._renderGrouped (cyclomatic 29) · ×1
  • (anonymous)._renderGrouped (cyclomatic 29) lib/clacky/web/projects.js:364 — (anonymous)._renderGrouped has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 1 of the 29 points is its own statement and the rest belongs to 7 function literals inside it that branch (lines 367, 370, 452, …). 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 · ChannelManager.route_message (cyclomatic 28) · ×1
  • ChannelManager.route_message (cyclomatic 28) lib/clacky/server/channel/channel_manager.rb:250 — ChannelManager.route_message has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · run_loop.run_loop (cyclomatic 28) · ×1
  • run_loop.run_loop (cyclomatic 28) lib/clacky/default_skills/skill-creator/scripts/run_loop.py:48 — run_loop.run_loop 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 · (anonymous)._docTypeIcon (cyclomatic 28) · ×1
  • (anonymous)._docTypeIcon (cyclomatic 28) lib/clacky/web/features/new-session/view.js:359 — (anonymous)._docTypeIcon has cyclomatic complexity 28 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 28) · ×1
  • (anonymous) (cyclomatic 28) lib/clacky/web/features/channels/store.js:14 — (anonymous) has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 1 of the 28 points is its own statement and the rest belongs to 18 function items inside it that branch (_emit, load, toggle, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · (anonymous)._renderSessionList (cyclomatic 28) · ×1
  • (anonymous)._renderSessionList (cyclomatic 28) lib/clacky/web/features/billing/view.js:1009 — (anonymous)._renderSessionList has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 13 of the 28 points are its own statements and the rest belongs to one function literal inside it that branches (line 1020). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · LayoutManager.char_display_width (cyclomatic 27) · ×1
  • LayoutManager.char_display_width (cyclomatic 27) lib/clacky/ui2/layout_manager.rb:678 — LayoutManager.char_display_width has cyclomatic complexity 27 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · LineEditor.calculate_display_width (cyclomatic 27) · ×1
  • LineEditor.calculate_display_width (cyclomatic 27) lib/clacky/ui2/line_editor.rb:156 — LineEditor.calculate_display_width has cyclomatic complexity 27 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: one other method here (LineEditor.char_display_width) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · LineEditor.char_display_width (cyclomatic 27) · ×1
  • LineEditor.char_display_width (cyclomatic 27) lib/clacky/ui2/line_editor.rb:305 — LineEditor.char_display_width has cyclomatic complexity 27 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: one other method here (LineEditor.calculate_display_width) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · (anonymous)._saveModalModel (cyclomatic 27) · ×1
  • (anonymous)._saveModalModel (cyclomatic 27) lib/clacky/web/settings.js:540 — (anonymous)._saveModalModel has cyclomatic complexity 27 (threshold 15). Of this number, 25 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between 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 · (anonymous).attach (cyclomatic 27) · ×1
  • (anonymous).attach (cyclomatic 27) lib/clacky/web/components/mentions.js:574 — (anonymous).attach has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 3 of the 27 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 592, 616, 628, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 27) · ×1
  • (anonymous) (cyclomatic 27) lib/clacky/web/features/tasks/store.js:15 — (anonymous) has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 3 of the 27 points are its own statements and the rest belongs to 15 function items inside it that branch (_openSessionWith, toggleEnabled, _emit, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · MessageCompressorHelper.display_files_for_archive (cyclomatic 26) · ×1
  • MessageCompressorHelper.display_files_for_archive (cyclomatic 26) lib/clacky/agent/message_compressor_helper.rb:710 — MessageCompressorHelper.display_files_for_archive has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ToolExecutor.show_edit_preview (cyclomatic 26) · ×1
  • ToolExecutor.show_edit_preview (cyclomatic 26) lib/clacky/agent/tool_executor.rb:388 — ToolExecutor.show_edit_preview has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Adapter.handle_message_event (cyclomatic 26) · ×1
  • Adapter.handle_message_event (cyclomatic 26) lib/clacky/server/channel/adapters/feishu/adapter.rb:215 — Adapter.handle_message_event has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Preview.serve_preview_proxy (cyclomatic 26) · ×1
  • Preview.serve_preview_proxy (cyclomatic 26) lib/clacky/server/preview.rb:225 — Preview.serve_preview_proxy has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · (anonymous)._parseHash (cyclomatic 26) · ×1
  • (anonymous)._parseHash (cyclomatic 26) lib/clacky/web/app.js:171 — (anonymous)._parseHash has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 26) · ×1
  • (anonymous) (cyclomatic 26) lib/clacky/web/features/version/store.js:13 — (anonymous) has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to 15 function items inside it that branch (_handleWsEvent, _emit, checkVersion, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · (anonymous)._wireDom (cyclomatic 26) · ×1
  • (anonymous)._wireDom (cyclomatic 26) lib/clacky/web/features/extensions/view.js:740 — (anonymous)._wireDom has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 11 of the 26 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 779, a function literal at line 810, a function literal at line 750, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · (anonymous)._renderHeatmap (cyclomatic 26) · ×1
  • (anonymous)._renderHeatmap (cyclomatic 26) lib/clacky/web/features/billing/view.js:721 — (anonymous)._renderHeatmap has cyclomatic complexity 26 (threshold 15). Of this number, 14 points are the body's own statements and 12 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 · HistoryNavigation.replay_history_window (cyclomatic 25) · ×1
  • HistoryNavigation.replay_history_window (cyclomatic 25) lib/clacky/agent/history_navigation.rb:46 — HistoryNavigation.replay_history_window has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DashScope.generate_video (cyclomatic 25) · ×1
  • DashScope.generate_video (cyclomatic 25) lib/clacky/media/dashscope.rb:329 — DashScope.generate_video has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · RichUIController.show_model_edit_form (cyclomatic 25) · ×1
  • RichUIController.show_model_edit_form (cyclomatic 25) lib/clacky/rich_ui/rich_ui_controller.rb:790 — RichUIController.show_model_edit_form has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · HttpServer.platform_safe_fields (cyclomatic 25) · ×1
  • HttpServer.platform_safe_fields (cyclomatic 25) lib/clacky/server/http_server.rb:5029 — HttpServer.platform_safe_fields has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · FileReader.format_result (cyclomatic 25) · ×1
  • FileReader.format_result (cyclomatic 25) lib/clacky/tools/file_reader.rb:256 — FileReader.format_result has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · SessionSerializer._replay_single_message (cyclomatic 24) · ×1
  • SessionSerializer._replay_single_message (cyclomatic 24) lib/clacky/agent/session_serializer.rb:752 — SessionSerializer._replay_single_message has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SessionSerializer.replay_one_subagent_transcript (cyclomatic 24) · ×1
  • SessionSerializer.replay_one_subagent_transcript (cyclomatic 24) lib/clacky/agent/session_serializer.rb:911 — SessionSerializer.replay_one_subagent_transcript has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Adapter.handle_raw_message (cyclomatic 24) · ×1
  • Adapter.handle_raw_message (cyclomatic 24) lib/clacky/server/channel/adapters/wecom/adapter.rb:78 — Adapter.handle_raw_message has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HttpServer.dispatch (cyclomatic 24) · ×1
  • HttpServer.dispatch (cyclomatic 24) lib/clacky/server/http_server.rb:575 — HttpServer.dispatch has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · view.createExtensionsPanel.localCard (cyclomatic 24) · ×1
  • view.createExtensionsPanel.localCard (cyclomatic 24) lib/clacky/default_extensions/ext-studio/panels/studio/view.js:1835 — view.createExtensionsPanel.localCard has cyclomatic complexity 24 (threshold 15). Of this number, 22 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent 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 · chat-navigator._renderPreview (cyclomatic 24) · ×1
  • chat-navigator._renderPreview (cyclomatic 24) lib/clacky/web/components/chat-navigator.js:174 — chat-navigator._renderPreview has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · (anonymous).init (cyclomatic 24) · ×1
  • (anonymous).init (cyclomatic 24) lib/clacky/web/components/custom-select.js:48 — (anonymous).init has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 5 of the 24 points are its own statements and the rest belongs to 8 function items inside it that branch (setValue, a function literal at line 118, close, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · (anonymous)._detailContent (cyclomatic 24) · ×1
  • (anonymous)._detailContent (cyclomatic 24) lib/clacky/web/features/extensions/view.js:526 — (anonymous)._detailContent has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · createExtensionsPanel.localCard (cyclomatic 24) · ×1
  • createExtensionsPanel.localCard (cyclomatic 24) lib/clacky/default_extensions/ext-studio/panels/studio/view.js:1835 — createExtensionsPanel.localCard has cyclomatic complexity 24 (threshold 15). Of this number, 22 points are the body's own statements and 2 belong to 10 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CostTracker.track_cost (cyclomatic 23) · ×1
  • CostTracker.track_cost (cyclomatic 23) lib/clacky/agent/cost_tracker.rb:36 — CostTracker.track_cost has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Adapter.handle_message (cyclomatic 23) · ×1
  • Adapter.handle_message (cyclomatic 23) lib/clacky/server/channel/adapters/discord/adapter.rb:126 — Adapter.handle_message has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Browser.execute_user_browser (cyclomatic 23) · ×1
  • Browser.execute_user_browser (cyclomatic 23) lib/clacky/tools/browser.rb:282 — Browser.execute_user_browser has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · improve_description.improve_description (cyclomatic 23) · ×1
  • improve_description.improve_description (cyclomatic 23) lib/clacky/default_skills/skill-creator/scripts/improve_description.py:114 — improve_description.improve_description has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · quick_validate.validate_skill (cyclomatic 23) · ×1
  • quick_validate.validate_skill (cyclomatic 23) lib/clacky/default_skills/skill-creator/scripts/quick_validate.py:12 — quick_validate.validate_skill has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · run_eval.run_single_query (cyclomatic 23) · ×1
  • run_eval.run_single_query (cyclomatic 23) lib/clacky/default_skills/skill-creator/scripts/run_eval.py:74 — run_eval.run_single_query has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · view.createMeetingSession.renderUI (cyclomatic 23) · ×1
  • view.createMeetingSession.renderUI (cyclomatic 23) lib/clacky/default_extensions/meeting/panels/meeting/view.js:569 — view.createMeetingSession.renderUI has cyclomatic complexity 23 (threshold 15). Of this number, 13 points are the body's own statements and 10 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · chat-navigator._loadIndex (cyclomatic 23) · ×1
  • chat-navigator._loadIndex (cyclomatic 23) lib/clacky/web/components/chat-navigator.js:355 — chat-navigator._loadIndex has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · (anonymous)._handleKey (cyclomatic 23) · ×1
  • (anonymous)._handleKey (cyclomatic 23) lib/clacky/web/components/mentions.js:495 — (anonymous)._handleKey has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · createMeetingSession.renderUI (cyclomatic 23) · ×1
  • createMeetingSession.renderUI (cyclomatic 23) lib/clacky/default_extensions/meeting/panels/meeting/view.js:569 — createMeetingSession.renderUI has cyclomatic complexity 23 (threshold 15). Of this number, 13 points are the body's own statements and 10 belong to 14 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MessageCompressorHelper.render_message_sections (cyclomatic 22) · ×1
  • MessageCompressorHelper.render_message_sections (cyclomatic 22) lib/clacky/agent/message_compressor_helper.rb:645 — MessageCompressorHelper.render_message_sections 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 · AgentConfig.initialize (cyclomatic 22) · ×1
  • AgentConfig.initialize (cyclomatic 22) lib/clacky/agent_config.rb:171 — AgentConfig.initialize has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · AgentProfile.all (cyclomatic 22) · ×1
  • AgentProfile.all (cyclomatic 22) lib/clacky/agent_profile.rb:92 — AgentProfile.all 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 · Adapter.extract_files (cyclomatic 22) · ×1
  • Adapter.extract_files (cyclomatic 22) lib/clacky/server/channel/adapters/weixin/adapter.rb:460 — Adapter.extract_files 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 · InlineInput.handle_key (cyclomatic 22) · ×1
  • InlineInput.handle_key (cyclomatic 22) lib/clacky/ui2/components/inline_input.rb:44 — InlineInput.handle_key has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · InputArea.build_sessionbar_content (cyclomatic 22) · ×1
  • InputArea.build_sessionbar_content (cyclomatic 22) lib/clacky/ui2/components/input_area.rb:1167 — InputArea.build_sessionbar_content 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 · generate_report.generate_html (cyclomatic 22) · ×1
  • generate_report.generate_html (cyclomatic 22) lib/clacky/default_skills/skill-creator/scripts/generate_report.py:16 — generate_report.generate_html 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 · code-editor.open (cyclomatic 22) · ×1
  • code-editor.open (cyclomatic 22) lib/clacky/web/components/code-editor.js:325 — code-editor.open 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 · (anonymous)._initModal (cyclomatic 22) · ×1
  • (anonymous)._initModal (cyclomatic 22) lib/clacky/web/settings.js:677 — (anonymous)._initModal has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 16 function items inside it that branch (onSelect, a function literal at line 852, a function literal at line 691, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · (anonymous)._renderMediaRow (cyclomatic 22) · ×1
  • (anonymous)._renderMediaRow (cyclomatic 22) lib/clacky/web/settings.js:2419 — (anonymous)._renderMediaRow has cyclomatic complexity 22 (threshold 15). Of this number, 19 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · (anonymous)._submit (cyclomatic 22) · ×1
  • (anonymous)._submit (cyclomatic 22) lib/clacky/web/features/new-session/view.js:871 — (anonymous)._submit has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · AnthropicStreamAggregator.handle (cyclomatic 21) · ×1
  • AnthropicStreamAggregator.handle (cyclomatic 21) lib/clacky/anthropic_stream_aggregator.rb:29 — AnthropicStreamAggregator.handle has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · ApiExtension.create_session (cyclomatic 21) · ×1
  • ApiExtension.create_session (cyclomatic 21) lib/clacky/extension/api_extension.rb:277 — ApiExtension.create_session 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 · OpenAICompat.generate_video (cyclomatic 21) · ×1
  • OpenAICompat.generate_video (cyclomatic 21) lib/clacky/media/openai_compat.rb:163 — OpenAICompat.generate_video has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PlainUIController.show_tool_call (cyclomatic 21) · ×1
  • PlainUIController.show_tool_call (cyclomatic 21) lib/clacky/plain_ui_controller.rb:24 — PlainUIController.show_tool_call 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 · Adapter.attachment_to_file (cyclomatic 21) · ×1
  • Adapter.attachment_to_file (cyclomatic 21) REDACTED:495 — Adapter.attachment_to_file has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HttpServer.api_add_model (cyclomatic 21) · ×1
  • HttpServer.api_add_model (cyclomatic 21) lib/clacky/server/http_server.rb:6830 — HttpServer.api_add_model 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 · HttpServer.api_rename_session (cyclomatic 21) · ×1
  • HttpServer.api_rename_session (cyclomatic 21) lib/clacky/server/http_server.rb:7399 — HttpServer.api_rename_session has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Grep.execute (cyclomatic 21) · ×1
  • Grep.execute (cyclomatic 21) lib/clacky/tools/grep.rb:66 — Grep.execute has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ModalComponent.show_menu_mode (cyclomatic 21) · ×1
  • ModalComponent.show_menu_mode (cyclomatic 21) lib/clacky/ui2/components/modal_component.rb:113 — ModalComponent.show_menu_mode 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 · aggregate_benchmark.load_run_results (cyclomatic 21) · ×1
  • aggregate_benchmark.load_run_results (cyclomatic 21) lib/clacky/default_skills/skill-creator/scripts/aggregate_benchmark.py:67 — aggregate_benchmark.load_run_results 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 · view.createMeetingSession.startVadRecording (cyclomatic 21) · ×1
  • view.createMeetingSession.startVadRecording (cyclomatic 21) lib/clacky/default_extensions/meeting/panels/meeting/view.js:245 — view.createMeetingSession.startVadRecording has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 2 of the 21 points are its own statements and the rest belongs to 5 function items inside it that branch (tick, a function literal at line 273, newRecorder, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · (anonymous)._register (cyclomatic 21) · ×1
  • (anonymous)._register (cyclomatic 21) lib/clacky/web/core/ext.js:156 — (anonymous)._register has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · (anonymous).createViewer.openTab (cyclomatic 21) · ×1
  • (anonymous).createViewer.openTab (cyclomatic 21) lib/clacky/web/features/workspace/view.js:1503 — (anonymous).createViewer.openTab 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 · (anonymous)._wire (cyclomatic 21) · ×1
  • (anonymous)._wire (cyclomatic 21) lib/clacky/web/features/archive/view.js:310 — (anonymous)._wire has cyclomatic complexity 21 (threshold 15). Of this number, 12 points are the body's own statements and 9 belong to 7 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · createMeetingSession.startVadRecording (cyclomatic 21) · ×1
  • createMeetingSession.startVadRecording (cyclomatic 21) lib/clacky/default_extensions/meeting/panels/meeting/view.js:245 — createMeetingSession.startVadRecording has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 2 of the 21 points are its own statements and the rest belongs to 5 function items inside it that branch (tick, newRecorder::onstop, newRecorder::ondataavailable, …). 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 · ChunkIndex.scan_chunk_index (cyclomatic 20) · ×1
  • ChunkIndex.scan_chunk_index (cyclomatic 20) lib/clacky/agent/chunk_index.rb:39 — ChunkIndex.scan_chunk_index has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AgentConfig.media_state (cyclomatic 20) · ×1
  • AgentConfig.media_state (cyclomatic 20) lib/clacky/agent_config.rb:934 — AgentConfig.media_state 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 · Volcengine.generate_video (cyclomatic 20) · ×1
  • Volcengine.generate_video (cyclomatic 20) lib/clacky/media/volcengine.rb:72 — Volcengine.generate_video 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 · MessageParser.parse_message_event (cyclomatic 20) · ×1
  • MessageParser.parse_message_event (cyclomatic 20) lib/clacky/server/channel/adapters/feishu/message_parser.rb:48 — MessageParser.parse_message_event 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 · Adapter.process_update (cyclomatic 20) · ×1
  • Adapter.process_update (cyclomatic 20) lib/clacky/server/channel/adapters/telegram/adapter.rb:232 — Adapter.process_update 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 · HttpServer.update_sidecar_config (cyclomatic 20) · ×1
  • HttpServer.update_sidecar_config (cyclomatic 20) lib/clacky/server/http_server.rb:2152 — HttpServer.update_sidecar_config 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 · HttpServer.api_session_files (cyclomatic 20) · ×1
  • HttpServer.api_session_files (cyclomatic 20) lib/clacky/server/http_server.rb:5546 — HttpServer.api_session_files 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 · HttpServer.api_update_settings (cyclomatic 20) · ×1
  • HttpServer.api_update_settings (cyclomatic 20) lib/clacky/server/http_server.rb:6696 — HttpServer.api_update_settings 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 · Browser.visit_node (cyclomatic 20) · ×1
  • Browser.visit_node (cyclomatic 20) lib/clacky/tools/browser.rb:769 — Browser.visit_node 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 · generate_review.build_run (cyclomatic 20) · ×1
  • generate_review.build_run (cyclomatic 20) lib/clacky/default_skills/skill-creator/eval-viewer/generate_review.py:85 — generate_review.build_run 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 · view.runBindingFlow (cyclomatic 20) · ×1
  • view.runBindingFlow (cyclomatic 20) lib/clacky/default_extensions/ext-studio/panels/studio/view.js:659 — view.runBindingFlow has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 697, 680). 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 · chat-navigator._renderTicks (cyclomatic 20) · ×1
  • chat-navigator._renderTicks (cyclomatic 20) lib/clacky/web/components/chat-navigator.js:118 — chat-navigator._renderTicks 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 · (anonymous)._loadChats (cyclomatic 20) · ×1
  • (anonymous)._loadChats (cyclomatic 20) lib/clacky/web/components/mentions.js:289 — (anonymous)._loadChats has cyclomatic complexity 20 (threshold 15). Of this number, 14 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · (anonymous).fileIconSvg (cyclomatic 20) · ×1
  • (anonymous).fileIconSvg (cyclomatic 20) lib/clacky/web/features/workspace/view.js:201 — (anonymous).fileIconSvg 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 · (anonymous)._bindOnce (cyclomatic 20) · ×1
  • (anonymous)._bindOnce (cyclomatic 20) lib/clacky/web/features/new-session/view.js:934 — (anonymous)._bindOnce has cyclomatic complexity 20 (threshold 15). Of this number, 12 points are the body's own statements and 8 belong to 9 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · (anonymous)._applyHeaderLogo (cyclomatic 20) · ×1
  • (anonymous)._applyHeaderLogo (cyclomatic 20) lib/clacky/web/features/brand/view.js:214 — (anonymous)._applyHeaderLogo has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 2 of the 20 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 215, (anonymous)::onload, a function literal at line 224, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · (anonymous)._renderCostTrend (cyclomatic 20) · ×1
  • (anonymous)._renderCostTrend (cyclomatic 20) lib/clacky/web/features/billing/view.js:848 — (anonymous)._renderCostTrend has cyclomatic complexity 20 (threshold 15). Of this number, 16 points are the body's own statements and 4 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 · BedrockStreamAggregator.handle (cyclomatic 19) · ×1
  • BedrockStreamAggregator.handle (cyclomatic 19) lib/clacky/bedrock_stream_aggregator.rb:39 — BedrockStreamAggregator.handle has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · CLI.server (cyclomatic 19) · ×1
  • CLI.server (cyclomatic 19) lib/clacky/cli.rb:1429 — CLI.server has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FeishuSetup.run (cyclomatic 19) · ×1
  • FeishuSetup.run (cyclomatic 19) lib/clacky/default_skills/channel-manager/feishu_setup.rb:25 — FeishuSetup.run has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Anthropic.build_request_body (cyclomatic 19) · ×1
  • Anthropic.build_request_body (cyclomatic 19) lib/clacky/message_format/anthropic.rb:85 — Anthropic.build_request_body has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · WSClient.connect_and_listen (cyclomatic 19) · ×1
  • WSClient.connect_and_listen (cyclomatic 19) lib/clacky/server/channel/adapters/feishu/ws_client.rb:66 — WSClient.connect_and_listen has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WSClient.handle_message (cyclomatic 19) · ×1
  • WSClient.handle_message (cyclomatic 19) REDACTED:204 — WSClient.handle_message has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HistoryCollector.show_user_message (cyclomatic 19) · ×1
  • HistoryCollector.show_user_message (cyclomatic 19) lib/clacky/server/http_server.rb:70 — HistoryCollector.show_user_message has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · view.createPublishPanel.loadPublished (cyclomatic 19) · ×1
  • view.createPublishPanel.loadPublished (cyclomatic 19) lib/clacky/default_extensions/ext-studio/panels/studio/view.js:1559 — view.createPublishPanel.loadPublished has cyclomatic complexity 19 (threshold 15). Of this number, 11 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · (anonymous).init (cyclomatic 19) · ×1
  • (anonymous).init (cyclomatic 19) lib/clacky/web/features/version/view.js:263 — (anonymous).init has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 2 of the 19 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 300, 292, 266, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 19) · ×1
  • (anonymous) (cyclomatic 19) lib/clacky/web/features/skills/view.js:17 — (anonymous) has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 10 function items inside it that branch (toggleImportBar, a function literal at line 927, onPanelShow, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · (anonymous)._renderCombinedChart (cyclomatic 19) · ×1
  • (anonymous)._renderCombinedChart (cyclomatic 19) lib/clacky/web/features/billing/view.js:935 — (anonymous)._renderCombinedChart has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 9 of the 19 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 948, 942, 943). 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 · createPublishPanel.loadPublished (cyclomatic 19) · ×1
  • createPublishPanel.loadPublished (cyclomatic 19) lib/clacky/default_extensions/ext-studio/panels/studio/view.js:1559 — createPublishPanel.loadPublished has cyclomatic complexity 19 (threshold 15). Of this number, 11 points are the body's own statements and 8 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MessageCompressorHelper.compress_messages_if_needed (cyclomatic 18) · ×1
  • MessageCompressorHelper.compress_messages_if_needed (cyclomatic 18) lib/clacky/agent/message_compressor_helper.rb:125 — MessageCompressorHelper.compress_messages_if_needed 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 · TimeMachine.task_diff_files (cyclomatic 18) · ×1
  • TimeMachine.task_diff_files (cyclomatic 18) lib/clacky/agent/time_machine.rb:438 — TimeMachine.task_diff_files 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 · AgentConfig.ocr_state (cyclomatic 18) · ×1
  • AgentConfig.ocr_state (cyclomatic 18) lib/clacky/agent_config.rb:1000 — AgentConfig.ocr_state 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 · ChannelManager.show_model_list (cyclomatic 18) · ×1
  • ChannelManager.show_model_list (cyclomatic 18) lib/clacky/server/channel/channel_manager.rb:574 — ChannelManager.show_model_list has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HttpServer.api_create_session (cyclomatic 18) · ×1
  • HttpServer.api_create_session (cyclomatic 18) lib/clacky/server/http_server.rb:1030 — HttpServer.api_create_session 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 · HttpServer.api_internal_ocr_image (cyclomatic 18) · ×1
  • HttpServer.api_internal_ocr_image (cyclomatic 18) lib/clacky/server/http_server.rb:2427 — HttpServer.api_internal_ocr_image 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 · HttpServer.api_file_action (cyclomatic 18) · ×1
  • HttpServer.api_file_action (cyclomatic 18) lib/clacky/server/http_server.rb:4644 — HttpServer.api_file_action 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 · WebUIController.show_user_message (cyclomatic 18) · ×1
  • WebUIController.show_user_message (cyclomatic 18) lib/clacky/server/web_ui_controller.rb:138 — WebUIController.show_user_message 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 · Terminal.wait_and_package (cyclomatic 18) · ×1
  • Terminal.wait_and_package (cyclomatic 18) lib/clacky/tools/terminal.rb:491 — Terminal.wait_and_package 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 · TodoManager.format_call (cyclomatic 18) · ×1
  • TodoManager.format_call (cyclomatic 18) lib/clacky/tools/todo_manager.rb:84 — TodoManager.format_call 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 · ModalComponent.collect_field_input (cyclomatic 18) · ×1
  • ModalComponent.collect_field_input (cyclomatic 18) lib/clacky/ui2/components/modal_component.rb:259 — ModalComponent.collect_field_input 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 · TerminalDetector.query_terminal_background_color (cyclomatic 18) · ×1
  • TerminalDetector.query_terminal_background_color (cyclomatic 18) lib/clacky/ui2/terminal_detector.rb:44 — TerminalDetector.query_terminal_background_color 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 · FileProcessor.parse_tar_listing (cyclomatic 18) · ×1
  • FileProcessor.parse_tar_listing (cyclomatic 18) lib/clacky/utils/file_processor.rb:343 — FileProcessor.parse_tar_listing 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 · GitignoreParser.match_pattern? (cyclomatic 18) · ×1
  • GitignoreParser.match_pattern? (cyclomatic 18) lib/clacky/utils/gitignore_parser.rb:104 — GitignoreParser.match_pattern? 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 · (anonymous).renderSlot (cyclomatic 18) · ×1
  • (anonymous).renderSlot (cyclomatic 18) lib/clacky/web/core/ext.js:539 — (anonymous).renderSlot has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 554, 553). 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)._wire (cyclomatic 18) · ×1
  • (anonymous)._wire (cyclomatic 18) lib/clacky/web/features/trash/view.js:480 — (anonymous)._wire has cyclomatic complexity 18 (threshold 15). Of this number, 14 points are the body's own statements and 4 belong to 8 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · (anonymous)._renderAgents (cyclomatic 18) · ×1
  • (anonymous)._renderAgents (cyclomatic 18) lib/clacky/web/features/new-session/view.js:91 — (anonymous)._renderAgents has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 98, 165). 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)._render (cyclomatic 18) · ×1
  • (anonymous)._render (cyclomatic 18) lib/clacky/web/features/billing/view.js:118 — (anonymous)._render has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to 6 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · SessionSerializer.extract_display_files_from_text (cyclomatic 17) · ×1
  • SessionSerializer.extract_display_files_from_text (cyclomatic 17) lib/clacky/agent/session_serializer.rb:617 — SessionSerializer.extract_display_files_from_text has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · TimeMachine.task_file_diff (cyclomatic 17) · ×1
  • TimeMachine.task_file_diff (cyclomatic 17) lib/clacky/agent/time_machine.rb:484 — TimeMachine.task_file_diff has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · BrandConfig.refresh_distribution! (cyclomatic 17) · ×1
  • BrandConfig.refresh_distribution! (cyclomatic 17) REDACTED:423 — BrandConfig.refresh_distribution! has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · BrandConfig.upload_extension! (cyclomatic 17) · ×1
  • BrandConfig.upload_extension! (cyclomatic 17) REDACTED:651 — BrandConfig.upload_extension! has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · BrandConfig.to_yaml (cyclomatic 17) · ×1
  • BrandConfig.to_yaml (cyclomatic 17) REDACTED:1680 — BrandConfig.to_yaml has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · CLI.agent (cyclomatic 17) · ×1
  • CLI.agent (cyclomatic 17) lib/clacky/cli.rb:65 — CLI.agent has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · OpenAICompat.generate_image (cyclomatic 17) · ×1
  • OpenAICompat.generate_image (cyclomatic 17) lib/clacky/media/openai_compat.rb:33 — OpenAICompat.generate_image has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · OpenAIResponsesStreamAggregator.handle (cyclomatic 17) · ×1
  • OpenAIResponsesStreamAggregator.handle (cyclomatic 17) lib/clacky/openai_responses_stream_aggregator.rb:49 — OpenAIResponsesStreamAggregator.handle has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · HttpServer.mcp_validate_spec (cyclomatic 17) · ×1
  • HttpServer.mcp_validate_spec (cyclomatic 17) lib/clacky/server/http_server.rb:4341 — HttpServer.mcp_validate_spec 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 · HttpServer.api_browse_dirs (cyclomatic 17) · ×1
  • HttpServer.api_browse_dirs (cyclomatic 17) lib/clacky/server/http_server.rb:5616 — HttpServer.api_browse_dirs has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · HttpServer.api_switch_session_submodel (cyclomatic 17) · ×1
  • HttpServer.api_switch_session_submodel (cyclomatic 17) lib/clacky/server/http_server.rb:7531 — HttpServer.api_switch_session_submodel 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 · HttpServer.handle_user_message (cyclomatic 17) · ×1
  • HttpServer.handle_user_message (cyclomatic 17) lib/clacky/server/http_server.rb:8070 — HttpServer.handle_user_message has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Terminal.execute (cyclomatic 17) · ×1
  • Terminal.execute (cyclomatic 17) lib/clacky/tools/terminal.rb:207 — Terminal.execute has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · view.refresh (cyclomatic 17) · ×1
  • view.refresh (cyclomatic 17) lib/clacky/default_extensions/git/panels/git/view.js:445 — view.refresh has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · view.openRel (cyclomatic 17) · ×1
  • view.openRel (cyclomatic 17) lib/clacky/default_extensions/preview/panels/preview/view.js:247 — view.openRel 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 · (anonymous)._render (cyclomatic 17) · ×1
  • (anonymous)._render (cyclomatic 17) lib/clacky/web/skills.js:244 — (anonymous)._render has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 289, 261, 256, …). 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)._loadRemoteModels (cyclomatic 17) · ×1
  • (anonymous)._loadRemoteModels (cyclomatic 17) lib/clacky/web/settings.js:982 — (anonymous)._loadRemoteModels has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · (anonymous).init (cyclomatic 17) · ×1
  • (anonymous).init (cyclomatic 17) lib/clacky/web/settings.js:2825 — (anonymous).init has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 2873, a function literal at line 2894, a function literal at line 2850, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · (anonymous)._startDeviceLogin (cyclomatic 17) · ×1
  • (anonymous)._startDeviceLogin (cyclomatic 17) lib/clacky/web/components/onboard.js:417 — (anonymous)._startDeviceLogin has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · (anonymous)._notifyDesktop (cyclomatic 17) · ×1
  • (anonymous)._notifyDesktop (cyclomatic 17) lib/clacky/web/components/notify.js:139 — (anonymous)._notifyDesktop has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between 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 · (anonymous).createViewer.buildImageTab (cyclomatic 17) · ×1
  • (anonymous).createViewer.buildImageTab (cyclomatic 17) lib/clacky/web/features/workspace/view.js:1230 — (anonymous).createViewer.buildImageTab has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to 16 function items inside it that branch (fitScale, a function literal at line 1347, endDrag, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · (anonymous)._renderSkillTile (cyclomatic 17) · ×1
  • (anonymous)._renderSkillTile (cyclomatic 17) lib/clacky/web/features/skills/view.js:277 — (anonymous)._renderSkillTile has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to 7 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · (anonymous)._renderContributes (cyclomatic 17) · ×1
  • (anonymous)._renderContributes (cyclomatic 17) lib/clacky/web/features/extensions/view.js:640 — (anonymous)._renderContributes has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 650, 645). 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 · Agent.consume_steering_inputs (cyclomatic 16) · ×1
  • Agent.consume_steering_inputs (cyclomatic 16) REDACTED:1335 — Agent.consume_steering_inputs has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · Agent.extract_subagent_transcript (cyclomatic 16) · ×1
  • Agent.extract_subagent_transcript (cyclomatic 16) REDACTED:2477 — Agent.extract_subagent_transcript has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Agent.resolve_vision_images (cyclomatic 16) · ×1
  • Agent.resolve_vision_images (cyclomatic 16) REDACTED:2685 — Agent.resolve_vision_images 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 · SessionSerializer.to_session_data (cyclomatic 16) · ×1
  • SessionSerializer.to_session_data (cyclomatic 16) lib/clacky/agent/session_serializer.rb:237 — SessionSerializer.to_session_data has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · AgentConfig.load (cyclomatic 16) · ×1
  • AgentConfig.load (cyclomatic 16) lib/clacky/agent_config.rb:253 — AgentConfig.load has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BrandConfig.install_brand_skill! (cyclomatic 16) · ×1
  • BrandConfig.install_brand_skill! (cyclomatic 16) REDACTED:1125 — BrandConfig.install_brand_skill! has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · HttpTransport.dispatch_post (cyclomatic 16) · ×1
  • HttpTransport.dispatch_post (cyclomatic 16) lib/clacky/mcp/http_transport.rb:85 — HttpTransport.dispatch_post has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · OpenAICompat.generate_speech (cyclomatic 16) · ×1
  • OpenAICompat.generate_speech (cyclomatic 16) lib/clacky/media/openai_compat.rb:267 — OpenAICompat.generate_speech has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · Adapter.detect_image_mime (cyclomatic 16) · ×1
  • Adapter.detect_image_mime (cyclomatic 16) lib/clacky/server/channel/adapters/weixin/adapter.rb:558 — Adapter.detect_image_mime has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Browser.compress_snapshot (cyclomatic 16) · ×1
  • Browser.compress_snapshot (cyclomatic 16) lib/clacky/tools/browser.rb:858 — Browser.compress_snapshot 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 · FileReader.read_text_file (cyclomatic 16) · ×1
  • FileReader.read_text_file (cyclomatic 16) lib/clacky/tools/file_reader.rb:148 — FileReader.read_text_file has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Terminal.format_result (cyclomatic 16) · ×1
  • Terminal.format_result (cyclomatic 16) lib/clacky/tools/terminal.rb:1589 — Terminal.format_result has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · UIController.show_config_modal (cyclomatic 16) · ×1
  • UIController.show_config_modal (cyclomatic 16) lib/clacky/ui2/ui_controller.rb:1875 — UIController.show_config_modal 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 · FileProcessor.rewrite_local_image_urls (cyclomatic 16) · ×1
  • FileProcessor.rewrite_local_image_urls (cyclomatic 16) lib/clacky/utils/file_processor.rb:632 — FileProcessor.rewrite_local_image_urls has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · LimitStack._push_one (cyclomatic 16) · ×1
  • LimitStack._push_one (cyclomatic 16) lib/clacky/utils/limit_stack.rb:108 — LimitStack._push_one 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 · view.renderDiffText (cyclomatic 16) · ×1
  • view.renderDiffText (cyclomatic 16) lib/clacky/default_extensions/git/panels/git/view.js:278 — view.renderDiffText has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · code-editor._parseDelimited (cyclomatic 16) · ×1
  • code-editor._parseDelimited (cyclomatic 16) lib/clacky/web/components/code-editor.js:140 — code-editor._parseDelimited 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 · (anonymous)._updateLatestExchangeRate (cyclomatic 16) · ×1
  • (anonymous)._updateLatestExchangeRate (cyclomatic 16) lib/clacky/web/settings.js:3009 — (anonymous)._updateLatestExchangeRate has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · toast (cyclomatic 16) · ×1
  • toast (cyclomatic 16) lib/clacky/web/app.js:752 — toast has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 belong to 6 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · (anonymous).vendorBadge (cyclomatic 16) · ×1
  • (anonymous).vendorBadge (cyclomatic 16) lib/clacky/web/components/model-picker.js:81 — (anonymous).vendorBadge has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · (anonymous)._renderBadge (cyclomatic 16) · ×1
  • (anonymous)._renderBadge (cyclomatic 16) lib/clacky/web/features/version/view.js:33 — (anonymous)._renderBadge has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · (anonymous)._onChanged (cyclomatic 16) · ×1
  • (anonymous)._onChanged (cyclomatic 16) lib/clacky/web/features/version/view.js:210 — (anonymous)._onChanged 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 · (anonymous)._openProjectPopover (cyclomatic 16) · ×1
  • (anonymous)._openProjectPopover (cyclomatic 16) lib/clacky/web/features/new-session/view.js:681 — (anonymous)._openProjectPopover has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 682, 739, 701, …). 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)._renderServer (cyclomatic 16) · ×1
  • (anonymous)._renderServer (cyclomatic 16) lib/clacky/web/features/mcp/view.js:63 — (anonymous)._renderServer has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · (anonymous)._renderActions (cyclomatic 16) · ×1
  • (anonymous)._renderActions (cyclomatic 16) lib/clacky/web/features/extensions/view.js:600 — (anonymous)._renderActions has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · runPublishFlow · ×1
  • runPublishFlow::(anonymous)::submit (cyclomatic 16) lib/clacky/default_extensions/ext-studio/panels/studio/view.js:849 — runPublishFlow::(anonymous)::submit has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D17 · Explicit Debt · XxxComment · ×1
  • XxxComment lib/clacky/tools/security.rb:17 — # /xxx ./ ... Blocked: outside project directory" dance). — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D2 · Cognitive Complexity · _dispatchEvent (cognitive 246) · ×1
  • _dispatchEvent (cognitive 246) lib/clacky/web/ws-dispatcher.js:202 — _dispatchEvent has cognitive complexity 246 (threshold 15). Drivers by points: if/else 75 (160 pts), boolean chains 53, ternaries 11 (30 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 105). Of this number, 219 points are the body's own statements and 27 belong to 10 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · viewer.html.renderBenchmark (cognitive 181) · ×1
  • viewer.html.renderBenchmark (cognitive 181) lib/clacky/default_skills/skill-creator/eval-viewer/viewer.html:1114 — viewer.html.renderBenchmark has cognitive complexity 181 (threshold 15). Drivers by points: if/else 23 (58 pts), loops 12 (48 pts), ternaries 11 (46 pts), boolean chains 29 (nesting depth added 106). Of this number, 169 points are the body's own statements and 12 belong to 7 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · HttpServer._dispatch_rest (cognitive 141) · ×1
  • HttpServer._dispatch_rest (cognitive 141) lib/clacky/server/http_server.rb:664 — HttpServer._dispatch_rest has cognitive complexity 141 (threshold 15). Drivers by points: if/else 71 (73 pts), boolean chains 67, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · sessions.showDirectoryPicker (cognitive 141) · ×1
  • sessions.showDirectoryPicker (cognitive 141) REDACTED:6064 — sessions.showDirectoryPicker has cognitive complexity 141 (threshold 15). Drivers by points: if/else 65 (70 pts), boolean chains 54, ternaries 9 (10 pts), error handling 5 (7 pts) (nesting depth added 8). None of this is in the body itself: all 141 points belong to 38 function literals inside it that branch (lines 6091, 6667, 6877, …). 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 · LlmCaller.call_llm (cognitive 127) · ×1
  • LlmCaller.call_llm (cognitive 127) lib/clacky/agent/llm_caller.rb:48 — LlmCaller.call_llm has cognitive complexity 127 (threshold 15). Drivers by points: if/else 29 (79 pts), boolean chains 25, error handling 6 (13 pts), ternaries 2 (6 pts), match/switch 1 (4 pts) (nesting depth added 64). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Agent.run (cognitive 106) · ×1
  • Agent.run (cognitive 106) REDACTED:523 — Agent.run has cognitive complexity 106 (threshold 15). Drivers by points: if/else 41 (57 pts), boolean chains 30, ternaries 5 (12 pts), error handling 3 (4 pts), match/switch 2 (3 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 88) · ×1
  • (anonymous) (cognitive 88) lib/clacky/web/features/share/view.js:17 — (anonymous) has cognitive complexity 88 (threshold 15). Drivers by points: if/else 30 (33 pts), boolean chains 30, ternaries 12 (16 pts), loops 6 (7 pts), match/switch 1, other 1 (nesting depth added 8). None of this is in the body itself: all 88 points belong to 63 function items inside it that branch (_receiptRows, _paintReceiptRow, _wrapLines, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · (anonymous)._humanCron (cognitive 80) · ×1
  • (anonymous)._humanCron (cognitive 80) lib/clacky/web/features/tasks/view.js:15 — (anonymous)._humanCron has cognitive complexity 80 (threshold 15). Drivers by points: ternaries 24 (50 pts), if/else 31 (36 pts), boolean chains 19 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Agent.append_user_input (cognitive 79) · ×1
  • Agent.append_user_input (cognitive 79) REDACTED:963 — Agent.append_user_input has cognitive complexity 79 (threshold 15). Drivers by points: if/else 26 (41 pts), boolean chains 30, ternaries 5 (7 pts), error handling 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Agent.act (cognitive 72) · ×1
  • Agent.act (cognitive 72) REDACTED:1585 — Agent.act has cognitive complexity 72 (threshold 15). Drivers by points: if/else 33 (47 pts), boolean chains 17, ternaries 3 (7 pts), error handling 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · run_eval.run_single_query (cognitive 71) · ×1
  • run_eval.run_single_query (cognitive 71) lib/clacky/default_skills/skill-creator/scripts/run_eval.py:74 — run_eval.run_single_query has cognitive complexity 71 (threshold 15). Drivers by points: if/else 14 (48 pts), error handling 3 (12 pts), loops 4 (10 pts), boolean chains 1 (nesting depth added 49). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · (anonymous) (cognitive 71) · ×1
  • (anonymous) (cognitive 71) lib/clacky/web/features/trash/store.js:15 — (anonymous) has cognitive complexity 71 (threshold 15). Drivers by points: boolean chains 38, if/else 20 (21 pts), error handling 9, ternaries 2, other 1 (nesting depth added 1). None of this is in the body itself: all 71 points belong to 36 function items inside it that branch (restoreSession, loadFiles, loadSessions, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · (anonymous)._renderMediaDetail (cognitive 61) · ×1
  • (anonymous)._renderMediaDetail (cognitive 61) lib/clacky/web/settings.js:2500 — (anonymous)._renderMediaDetail has cognitive complexity 61 (threshold 15). Drivers by points: boolean chains 19, ternaries 7 (19 pts), if/else 10 (18 pts), error handling 2 (5 pts) (nesting depth added 23). Of this number, 28 points are the body's own statements and 33 belong to 10 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · (anonymous) (cognitive 60) · ×1
  • (anonymous) (cognitive 60) lib/clacky/web/features/skills/store.js:25 — (anonymous) has cognitive complexity 60 (threshold 15). Drivers by points: boolean chains 26, if/else 20, error handling 12, ternaries 2. Most of this is not in the body itself: 4 of the 60 points are its own statements and the rest belongs to 33 function items inside it that branch (loadBrandSkills, deleteBrandSkill, importSkill, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · aggregate_benchmark.load_run_results (cognitive 58) · ×1
  • aggregate_benchmark.load_run_results (cognitive 58) lib/clacky/default_skills/skill-creator/scripts/aggregate_benchmark.py:67 — aggregate_benchmark.load_run_results has cognitive complexity 58 (threshold 15). Drivers by points: if/else 11 (31 pts), error handling 4 (15 pts), loops 4 (10 pts), boolean chains 2 (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SessionSerializer.parse_chunk_md_to_rounds (cognitive 57) · ×1
  • SessionSerializer.parse_chunk_md_to_rounds (cognitive 57) lib/clacky/agent/session_serializer.rb:436 — SessionSerializer.parse_chunk_md_to_rounds has cognitive complexity 57 (threshold 15). Drivers by points: if/else 29 (43 pts), boolean chains 5, error handling 2 (5 pts), ternaries 3 (4 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 57) · ×1
  • (anonymous) (cognitive 57) lib/clacky/web/features/archive/store.js:12 — (anonymous) has cognitive complexity 57 (threshold 15). Drivers by points: boolean chains 23, if/else 21 (23 pts), error handling 6 (7 pts), ternaries 3 (4 pts) (nesting depth added 4). None of this is in the body itself: all 57 points belong to 19 function items inside it that branch (load, unarchive, archiveSession, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · Browser.do_user_act (cognitive 56) · ×1
  • Browser.do_user_act (cognitive 56) lib/clacky/tools/browser.rb:347 — Browser.do_user_act has cognitive complexity 56 (threshold 15). Drivers by points: if/else 16 (26 pts), boolean chains 25, match/switch 3 (5 pts) (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · run_loop.run_loop (cognitive 55) · ×1
  • run_loop.run_loop (cognitive 55) lib/clacky/default_skills/skill-creator/scripts/run_loop.py:48 — run_loop.run_loop has cognitive complexity 55 (threshold 15). Drivers by points: if/else 23 (44 pts), ternaries 5 (9 pts), boolean chains 1, loops 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous)._renderBrandStatus (cognitive 54) · ×1
  • (anonymous)._renderBrandStatus (cognitive 54) lib/clacky/web/settings.js:2033 — (anonymous)._renderBrandStatus has cognitive complexity 54 (threshold 15). Drivers by points: if/else 23 (37 pts), boolean chains 8, ternaries 2 (7 pts), error handling 1 (2 pts) (nesting depth added 20). Of this number, 32 points are the body's own statements and 22 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous).populate (cognitive 52) · ×1
  • (anonymous).populate (cognitive 52) lib/clacky/web/components/model-picker.js:584 — (anonymous).populate has cognitive complexity 52 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 15, ternaries 7 (15 pts), error handling 1 (nesting depth added 13). Of this number, 17 points are the body's own statements and 35 belong to 8 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UIController.show_model_edit_form (cognitive 50) · ×1
  • UIController.show_model_edit_form (cognitive 50) lib/clacky/ui2/ui_controller.rb:2187 — UIController.show_model_edit_form has cognitive complexity 50 (threshold 15). Drivers by points: if/else 13 (21 pts), ternaries 13 (18 pts), boolean chains 11 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HttpServer.api_update_model (cognitive 49) · ×1
  • HttpServer.api_update_model (cognitive 49) lib/clacky/server/http_server.rb:6913 — HttpServer.api_update_model has cognitive complexity 49 (threshold 15). Drivers by points: if/else 30 (44 pts), boolean chains 4, error handling 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChannelManager.handle_command (cognitive 48) · ×1
  • ChannelManager.handle_command (cognitive 48) lib/clacky/server/channel/channel_manager.rb:373 — ChannelManager.handle_command has cognitive complexity 48 (threshold 15). Drivers by points: if/else 20 (38 pts), boolean chains 5, ternaries 2 (4 pts), match/switch 1 (nesting depth added 20). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Terminal.read_until_marker (cognitive 48) · ×1
  • Terminal.read_until_marker (cognitive 48) lib/clacky/tools/terminal.rb:1252 — Terminal.read_until_marker has cognitive complexity 48 (threshold 15). Drivers by points: if/else 24 (36 pts), boolean chains 11, error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OpenAI.apply_reasoning_params (cognitive 46) · ×1
  • OpenAI.apply_reasoning_params (cognitive 46) lib/clacky/message_format/open_ai.rb:260 — OpenAI.apply_reasoning_params has cognitive complexity 46 (threshold 15). Drivers by points: if/else 25 (32 pts), match/switch 4 (12 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · HttpServer.start (cognitive 46) · ×1
  • HttpServer.start (cognitive 46) lib/clacky/server/http_server.rb:300 — HttpServer.start has cognitive complexity 46 (threshold 15). Drivers by points: if/else 21, error handling 8 (10 pts), boolean chains 8, ternaries 5 (7 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · HttpServer.api_store_extension_detail (cognitive 46) · ×1
  • HttpServer.api_store_extension_detail (cognitive 46) lib/clacky/server/http_server.rb:3022 — HttpServer.api_store_extension_detail has cognitive complexity 46 (threshold 15). Drivers by points: ternaries 9 (26 pts), boolean chains 12, if/else 7 (8 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Adapter.extract_files (cognitive 45) · ×1
  • Adapter.extract_files (cognitive 45) lib/clacky/server/channel/adapters/weixin/adapter.rb:460 — Adapter.extract_files has cognitive complexity 45 (threshold 15). Drivers by points: ternaries 6 (20 pts), if/else 10 (18 pts), error handling 2 (5 pts), boolean chains 1, match/switch 1 (nesting depth added 25). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · (anonymous)._showCreateProjectModal (cognitive 45) · ×1
  • (anonymous)._showCreateProjectModal (cognitive 45) lib/clacky/web/projects.js:754 — (anonymous)._showCreateProjectModal has cognitive complexity 45 (threshold 15). Drivers by points: if/else 24 (25 pts), boolean chains 12, ternaries 7, error handling 1 (nesting depth added 1). None of this is in the body itself: all 45 points belong to 27 function items inside it that branch (a function literal at line 756, (anonymous)::onFolderAreaClick, (anonymous)::_updateFolderArea, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · generate_review.build_run (cognitive 44) · ×1
  • generate_review.build_run (cognitive 44) lib/clacky/default_skills/skill-creator/eval-viewer/generate_review.py:85 — generate_review.build_run has cognitive complexity 44 (threshold 15). Drivers by points: if/else 11 (27 pts), error handling 3 (10 pts), loops 4 (6 pts), boolean chains 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous)._apply (cognitive 44) · ×1
  • (anonymous)._apply (cognitive 44) lib/clacky/web/app.js:272 — (anonymous)._apply has cognitive complexity 44 (threshold 15). Drivers by points: if/else 15 (22 pts), boolean chains 10, ternaries 3 (7 pts), error handling 2 (4 pts), match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InputArea.handle_key (cognitive 43) · ×1
  • InputArea.handle_key (cognitive 43) lib/clacky/ui2/components/input_area.rb:182 — InputArea.handle_key has cognitive complexity 43 (threshold 15). Drivers by points: if/else 15 (36 pts), boolean chains 4, match/switch 2 (3 pts) (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · createMeetingSession.renderUI (cognitive 43) · ×1
  • createMeetingSession.renderUI (cognitive 43) lib/clacky/default_extensions/meeting/panels/meeting/view.js:569 — createMeetingSession.renderUI has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (25 pts), ternaries 5 (10 pts), boolean chains 5, error handling 1 (3 pts) (nesting depth added 19). Of this number, 22 points are the body's own statements and 21 belong to 14 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · improve_description.improve_description (cognitive 42) · ×1
  • improve_description.improve_description (cognitive 42) lib/clacky/default_skills/skill-creator/scripts/improve_description.py:114 — improve_description.improve_description has cognitive complexity 42 (threshold 15). Drivers by points: if/else 11 (15 pts), ternaries 5 (14 pts), loops 4 (10 pts), boolean chains 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ScreenBuffer.read_key (cognitive 41) · ×1
  • ScreenBuffer.read_key (cognitive 41) lib/clacky/ui2/screen_buffer.rb:173 — ScreenBuffer.read_key has cognitive complexity 41 (threshold 15). Drivers by points: if/else 16 (30 pts), boolean chains 4, match/switch 2 (4 pts), error handling 1 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HttpServer.on_ws_message (cognitive 40) · ×1
  • HttpServer.on_ws_message (cognitive 40) lib/clacky/server/http_server.rb:7893 — HttpServer.on_ws_message has cognitive complexity 40 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 14, ternaries 2 (4 pts), error handling 2 (3 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.
D2 · Cognitive Complexity · generate_report.generate_html (cognitive 40) · ×1
  • generate_report.generate_html (cognitive 40) lib/clacky/default_skills/skill-creator/scripts/generate_report.py:16 — generate_report.generate_html has cognitive complexity 40 (threshold 15). Drivers by points: ternaries 11 (23 pts), loops 7 (12 pts), if/else 4 (5 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · run_eval._read_ndjson_lines (cognitive 40) · ×1
  • run_eval._read_ndjson_lines (cognitive 40) lib/clacky/default_skills/skill-creator/scripts/run_eval.py:39 — run_eval._read_ndjson_lines has cognitive complexity 40 (threshold 15). Drivers by points: if/else 6 (20 pts), error handling 2 (11 pts), loops 3 (9 pts) (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · view.runPublishFlow (cognitive 39) · ×1
  • view.runPublishFlow (cognitive 39) lib/clacky/default_extensions/ext-studio/panels/studio/view.js:747 — view.runPublishFlow has cognitive complexity 39 (threshold 15). Drivers by points: if/else 20 (25 pts), boolean chains 9, ternaries 4, error handling 1 (nesting depth added 5). None of this is in the body itself: all 39 points belong to 6 function literals inside it that branch (lines 849, 816, 748, …). 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).renderTabbedSlot (cognitive 39) · ×1
  • (anonymous).renderTabbedSlot (cognitive 39) lib/clacky/web/core/ext.js:584 — (anonymous).renderTabbedSlot has cognitive complexity 39 (threshold 15). Drivers by points: if/else 19 (23 pts), boolean chains 9, ternaries 5, error handling 1 (2 pts) (nesting depth added 5). Most of this is not in the body itself: 12 of the 39 points are its own statements and the rest belongs to 14 function items inside it that branch (activate, a function literal at line 641, scrollTabsWithWheel, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · (anonymous) (cognitive 39) · ×1
  • (anonymous) (cognitive 39) lib/clacky/web/features/profile/store.js:15 — (anonymous) has cognitive complexity 39 (threshold 15). Drivers by points: boolean chains 20, if/else 8, error handling 6, ternaries 5. None of this is in the body itself: all 39 points belong to 19 function items inside it that branch (_loadMemories, deleteMemory, curateProfile, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · (anonymous)._wireDom (cognitive 39) · ×1
  • (anonymous)._wireDom (cognitive 39) lib/clacky/web/features/extensions/view.js:740 — (anonymous)._wireDom has cognitive complexity 39 (threshold 15). Drivers by points: if/else 20 (34 pts), boolean chains 5 (nesting depth added 14). Most of this is not in the body itself: 11 of the 39 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 779, a function literal at line 810, a function literal at line 750, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · ChunkIndex.scan_chunk_index (cognitive 38) · ×1
  • ChunkIndex.scan_chunk_index (cognitive 38) lib/clacky/agent/chunk_index.rb:39 — ChunkIndex.scan_chunk_index has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (22 pts), ternaries 2 (6 pts), boolean chains 5, error handling 1 (4 pts), loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SessionSerializer._replay_single_message (cognitive 38) · ×1
  • SessionSerializer._replay_single_message (cognitive 38) lib/clacky/agent/session_serializer.rb:752 — SessionSerializer._replay_single_message has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 9, error handling 1 (3 pts), ternaries 1 (2 pts), match/switch 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HttpServer.run_agent_task (cognitive 38) · ×1
  • HttpServer.run_agent_task (cognitive 38) lib/clacky/server/http_server.rb:8332 — HttpServer.run_agent_task has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (17 pts), ternaries 4 (11 pts), boolean chains 7, error handling 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SessionRegistry.list (cognitive 38) · ×1
  • SessionRegistry.list (cognitive 38) lib/clacky/server/session_registry.rb:216 — SessionRegistry.list has cognitive complexity 38 (threshold 15). Drivers by points: if/else 18 (23 pts), boolean chains 13, ternaries 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · MessageCompressorHelper.render_message_sections (cognitive 36) · ×1
  • MessageCompressorHelper.render_message_sections (cognitive 36) lib/clacky/agent/message_compressor_helper.rb:645 — MessageCompressorHelper.render_message_sections has cognitive complexity 36 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 3 (9 pts), boolean chains 8, error handling 1 (4 pts), match/switch 1 (nesting depth added 16). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · SessionSerializer.restore_session (cognitive 35) · ×1
  • SessionSerializer.restore_session (cognitive 35) lib/clacky/agent/session_serializer.rb:16 — SessionSerializer.restore_session has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 25, if/else 7 (9 pts), ternaries 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · Adapter.start (cognitive 35) · ×1
  • Adapter.start (cognitive 35) lib/clacky/server/channel/adapters/weixin/adapter.rb:246 — Adapter.start has cognitive complexity 35 (threshold 15). Drivers by points: if/else 4 (12 pts), error handling 4 (11 pts), ternaries 2 (10 pts), boolean chains 1, loops 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous)._renderContextBar (cognitive 35) · ×1
  • (anonymous)._renderContextBar (cognitive 35) lib/clacky/web/features/new-session/view.js:803 — (anonymous)._renderContextBar has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 11 (14 pts), boolean chains 11, if/else 8 (10 pts) (nesting depth added 5). Of this number, 34 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · Adapter.handle_message_event (cognitive 34) · ×1
  • Adapter.handle_message_event (cognitive 34) lib/clacky/server/channel/adapters/feishu/adapter.rb:215 — Adapter.handle_message_event has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 6, ternaries 2 (6 pts), error handling 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous)._handleKey (cognitive 34) · ×1
  • (anonymous)._handleKey (cognitive 34) lib/clacky/web/components/mentions.js:495 — (anonymous)._handleKey has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (26 pts), boolean chains 4, ternaries 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 · (anonymous) (cognitive 34) · ×1
  • (anonymous) (cognitive 34) lib/clacky/web/features/workspace/store.js:12 — (anonymous) has cognitive complexity 34 (threshold 15). Drivers by points: if/else 17, boolean chains 11, ternaries 5, error handling 1. None of this is in the body itself: all 34 points belong to 22 function items inside it that branch (fetchDefaultApp, setSession, fetchEntries, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · openReadmeEditModal (cognitive 34) · ×1
  • openReadmeEditModal (cognitive 34) lib/clacky/default_extensions/ext-studio/panels/studio/view.js:1290 — openReadmeEditModal has cognitive complexity 34 (threshold 15). Drivers by points: if/else 19 (20 pts), boolean chains 8, ternaries 4, error handling 2 (nesting depth added 1). Most of this is not in the body itself: 2 of the 34 points are its own statements and the rest belongs to 12 function items inside it that branch (uploadScreenshot, screenshotErrorText, renderPreview, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · view.createExtensionsPanel.localCard (cognitive 33) · ×1
  • view.createExtensionsPanel.localCard (cognitive 33) lib/clacky/default_extensions/ext-studio/panels/studio/view.js:1835 — view.createExtensionsPanel.localCard has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 10 (17 pts), if/else 12 (14 pts), boolean chains 2 (nesting depth added 9). Of this number, 29 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · view.createMeetingSession.renderUI (cognitive 33) · ×1
  • view.createMeetingSession.renderUI (cognitive 33) lib/clacky/default_extensions/meeting/panels/meeting/view.js:569 — view.createMeetingSession.renderUI has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 5, error handling 1 (3 pts) (nesting depth added 14). Most of this is not in the body itself: 12 of the 33 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 660, addTerm, parseTerms, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · (anonymous)._applyHeaderLogo (cognitive 33) · ×1
  • (anonymous)._applyHeaderLogo (cognitive 33) lib/clacky/web/features/brand/view.js:214 — (anonymous)._applyHeaderLogo has cognitive complexity 33 (threshold 15). Drivers by points: if/else 17 (26 pts), boolean chains 3, error handling 2, ternaries 1 (2 pts) (nesting depth added 10). Most of this is not in the body itself: 1 of the 33 points is its own statement and the rest belongs to 5 function items inside it that branch (a function literal at line 215, (anonymous)::onload, a function literal at line 224, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · HttpServer.update_sidecar_config (cognitive 32) · ×1
  • HttpServer.update_sidecar_config (cognitive 32) lib/clacky/server/http_server.rb:2152 — HttpServer.update_sidecar_config has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 5, ternaries 2 (4 pts), error handling 1, match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous)._renderGrouped (cognitive 32) · ×1
  • (anonymous)._renderGrouped (cognitive 32) lib/clacky/web/projects.js:364 — (anonymous)._renderGrouped has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 12, ternaries 4 (7 pts) (nesting depth added 4). None of this is in the body itself: all 32 points belong to 7 function literals inside it that branch (lines 452, 367, 370, …). 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 32) · ×1
  • (anonymous) (cognitive 32) lib/clacky/web/features/billing/store.js:16 — (anonymous) has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 10, ternaries 5 (6 pts), error handling 5 (nesting depth added 2). None of this is in the body itself: all 32 points belong to 22 function items inside it that branch (load, _getExchangeRate, clearData, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · createExtensionsPanel.localCard (cognitive 32) · ×1
  • createExtensionsPanel.localCard (cognitive 32) lib/clacky/default_extensions/ext-studio/panels/studio/view.js:1835 — createExtensionsPanel.localCard has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 10 (16 pts), if/else 12 (14 pts), boolean chains 2 (nesting depth added 8). Of this number, 28 points are the body's own statements and 4 belong to 10 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CLI.server (cognitive 31) · ×1
  • CLI.server (cognitive 31) lib/clacky/cli.rb:1429 — CLI.server has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17 (29 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HttpServer.api_store_extensions_installed (cognitive 31) · ×1
  • HttpServer.api_store_extensions_installed (cognitive 31) lib/clacky/server/http_server.rb:2914 — HttpServer.api_store_extensions_installed has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 25, ternaries 3, if/else 2, error handling 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · GitignoreParser.match_pattern? (cognitive 31) · ×1
  • GitignoreParser.match_pattern? (cognitive 31) lib/clacky/utils/gitignore_parser.rb:104 — GitignoreParser.match_pattern? has cognitive complexity 31 (threshold 15). Drivers by points: if/else 18 (31 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous)._saveModalModel (cognitive 31) · ×1
  • (anonymous)._saveModalModel (cognitive 31) lib/clacky/web/settings.js:540 — (anonymous)._saveModalModel has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 11, ternaries 6 (nesting depth added 3). Of this number, 28 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: 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 · _parseDelimited (cognitive 31) · ×1
  • _parseDelimited (cognitive 31) lib/clacky/web/components/code-editor.js:140 — _parseDelimited has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (24 pts), ternaries 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HistoryNavigation.replay_history_window (cognitive 30) · ×1
  • HistoryNavigation.replay_history_window (cognitive 30) lib/clacky/agent/history_navigation.rb:46 — HistoryNavigation.replay_history_window has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 13, if/else 7 (9 pts), ternaries 3 (7 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Adapter.handle_frame (cognitive 30) · ×1
  • Adapter.handle_frame (cognitive 30) lib/clacky/server/channel/adapters/dingtalk/adapter.rb:153 — Adapter.handle_frame has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 12, error handling 2, ternaries 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · (anonymous) (cognitive 30) · ×1
  • (anonymous) (cognitive 30) lib/clacky/web/features/share/store.js:16 — (anonymous) has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 14, if/else 10, ternaries 4, error handling 2. None of this is in the body itself: all 30 points belong to 21 function items inside it that branch (_hydrateBrand, setScorecard, _emit, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · (anonymous)._renderHeatmap (cognitive 30) · ×1
  • (anonymous)._renderHeatmap (cognitive 30) lib/clacky/web/features/billing/view.js:721 — (anonymous)._renderHeatmap has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 7, boolean chains 6, loops 2 (3 pts) (nesting depth added 6). Of this number, 15 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, 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 · CostTracker.track_cost (cognitive 29) · ×1
  • CostTracker.track_cost (cognitive 29) lib/clacky/agent/cost_tracker.rb:36 — CostTracker.track_cost has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (22 pts), ternaries 1 (4 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlainUIController.show_tool_call (cognitive 29) · ×1
  • PlainUIController.show_tool_call (cognitive 29) lib/clacky/plain_ui_controller.rb:24 — PlainUIController.show_tool_call has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 7 (13 pts), if/else 6 (8 pts), boolean chains 5, error handling 1 (2 pts), 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.
D2 · Cognitive Complexity · HttpServer.api_internal_ocr_image (cognitive 29) · ×1
  • HttpServer.api_internal_ocr_image (cognitive 29) lib/clacky/server/http_server.rb:2427 — HttpServer.api_internal_ocr_image has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (17 pts), ternaries 2 (6 pts), boolean chains 5, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InputArea.build_sessionbar_content (cognitive 29) · ×1
  • InputArea.build_sessionbar_content (cognitive 29) lib/clacky/ui2/components/input_area.rb:1167 — InputArea.build_sessionbar_content has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 4 (11 pts), if/else 9 (10 pts), boolean chains 6, match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TerminalDetector.query_terminal_background_color (cognitive 29) · ×1
  • TerminalDetector.query_terminal_background_color (cognitive 29) lib/clacky/ui2/terminal_detector.rb:44 — TerminalDetector.query_terminal_background_color has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (16 pts), error handling 6 (10 pts), loops 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · quick_validate.validate_skill (cognitive 29) · ×1
  • quick_validate.validate_skill (cognitive 29) lib/clacky/default_skills/skill-creator/scripts/quick_validate.py:12 — quick_validate.validate_skill has cognitive complexity 29 (threshold 15). Drivers by points: if/else 19 (26 pts), boolean chains 2, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous).init (cognitive 29) · ×1
  • (anonymous).init (cognitive 29) lib/clacky/web/components/custom-select.js:48 — (anonymous).init has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 8, ternaries 3 (5 pts) (nesting depth added 4). Most of this is not in the body itself: 4 of the 29 points are its own statements and the rest belongs to 8 function items inside it that branch (setValue, a function literal at line 107, a function literal at line 118, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · (anonymous).createViewer.openTab (cognitive 29) · ×1
  • (anonymous).createViewer.openTab (cognitive 29) lib/clacky/web/features/workspace/view.js:1503 — (anonymous).createViewer.openTab has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 5, ternaries 2 (4 pts), error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 29) · ×1
  • (anonymous) (cognitive 29) lib/clacky/web/features/tasks/store.js:15 — (anonymous) has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14, boolean chains 7, error handling 3 (4 pts), ternaries 3 (4 pts) (nesting depth added 2). Most of this is not in the body itself: 2 of the 29 points are its own statements and the rest belongs to 15 function items inside it that branch (_openSessionWith, toggleEnabled, _emit, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · (anonymous)._wire (cognitive 29) · ×1
  • (anonymous)._wire (cognitive 29) lib/clacky/web/features/archive/view.js:310 — (anonymous)._wire has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 5, ternaries 1 (3 pts) (nesting depth added 9). Most of this is not in the body itself: 13 of the 29 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 366, a function literal at line 319, onSelect, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · Preview.serve_preview_proxy (cognitive 28) · ×1
  • Preview.serve_preview_proxy (cognitive 28) lib/clacky/server/preview.rb:225 — Preview.serve_preview_proxy has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 6, error handling 2, ternaries 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · FileReader.format_result (cognitive 28) · ×1
  • FileReader.format_result (cognitive 28) lib/clacky/tools/file_reader.rb:256 — FileReader.format_result has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 17, if/else 5 (6 pts), ternaries 3 (5 pts) (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · Terminal.wait_and_package (cognitive 28) · ×1
  • Terminal.wait_and_package (cognitive 28) lib/clacky/tools/terminal.rb:491 — Terminal.wait_and_package has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 4 (9 pts), boolean chains 3, match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FileProcessor.parse_tar_listing (cognitive 28) · ×1
  • FileProcessor.parse_tar_listing (cognitive 28) lib/clacky/utils/file_processor.rb:343 — FileProcessor.parse_tar_listing has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 8 (16 pts), if/else 2 (5 pts), error handling 2 (3 pts), loops 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous)._bindCardEvents · ×1
  • (anonymous)._bindCardEvents::onSelect (cognitive 28) lib/clacky/web/settings.js:1096 — (anonymous)._bindCardEvents::onSelect has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 4 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous)._parseHash (cognitive 28) · ×1
  • (anonymous)._parseHash (cognitive 28) lib/clacky/web/app.js:171 — (anonymous)._parseHash has cognitive complexity 28 (threshold 15). Drivers by points: if/else 18, ternaries 4 (6 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · (anonymous) (cognitive 28) · ×1
  • (anonymous) (cognitive 28) lib/clacky/web/features/skills/view.js:17 — (anonymous) has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 5, error handling 1 (3 pts) (nesting depth added 9). None of this is in the body itself: all 28 points belong to 10 function items inside it that branch (toggleImportBar, a function literal at line 927, onPanelShow, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · DashScope.generate_video (cognitive 27) · ×1
  • DashScope.generate_video (cognitive 27) lib/clacky/media/dashscope.rb:329 — DashScope.generate_video has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 6, error handling 2 (3 pts), loops 1, match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · RichUIController.show_model_edit_form (cognitive 27) · ×1
  • RichUIController.show_model_edit_form (cognitive 27) lib/clacky/rich_ui/rich_ui_controller.rb:790 — RichUIController.show_model_edit_form has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 9 (11 pts), boolean chains 8, if/else 7 (8 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · LayoutManager.char_display_width (cognitive 27) · ×1
  • LayoutManager.char_display_width (cognitive 27) lib/clacky/ui2/layout_manager.rb:678 — LayoutManager.char_display_width has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 25, if/else 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · LineEditor.calculate_display_width (cognitive 27) · ×1
  • LineEditor.calculate_display_width (cognitive 27) lib/clacky/ui2/line_editor.rb:156 — LineEditor.calculate_display_width has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 25, if/else 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: one other method here (LineEditor.char_display_width) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · LineEditor.char_display_width (cognitive 27) · ×1
  • LineEditor.char_display_width (cognitive 27) lib/clacky/ui2/line_editor.rb:305 — LineEditor.char_display_width has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 25, if/else 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: one other method here (LineEditor.calculate_display_width) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · (anonymous)._bindOnce (cognitive 27) · ×1
  • (anonymous)._bindOnce (cognitive 27) lib/clacky/web/features/new-session/view.js:934 — (anonymous)._bindOnce has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 8). Most of this is not in the body itself: 11 of the 27 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 996, getWorkingDir, fetchSkills, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · (anonymous) (cognitive 27) · ×1
  • (anonymous) (cognitive 27) lib/clacky/web/features/channels/store.js:14 — (anonymous) has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 15, if/else 9, error handling 2, ternaries 1. None of this is in the body itself: all 27 points belong to 18 function items inside it that branch (_emit, load, toggle, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · Agent.fork_subagent (cognitive 26) · ×1
  • Agent.fork_subagent (cognitive 26) REDACTED:2293 — Agent.fork_subagent has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (24 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MessageCompressorHelper.display_files_for_archive (cognitive 26) · ×1
  • MessageCompressorHelper.display_files_for_archive (cognitive 26) lib/clacky/agent/message_compressor_helper.rb:710 — MessageCompressorHelper.display_files_for_archive has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 14, if/else 11 (12 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · SessionSerializer.replay_one_subagent_transcript (cognitive 26) · ×1
  • SessionSerializer.replay_one_subagent_transcript (cognitive 26) lib/clacky/agent/session_serializer.rb:911 — SessionSerializer.replay_one_subagent_transcript has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 15, if/else 4 (5 pts), error handling 1 (3 pts), ternaries 1 (2 pts), match/switch 1 (nesting depth added 4). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · Adapter.start (cognitive 26) · ×1
  • Adapter.start (cognitive 26) lib/clacky/server/channel/adapters/telegram/adapter.rb:91 — Adapter.start has cognitive complexity 26 (threshold 15). Drivers by points: error handling 4 (11 pts), ternaries 2 (9 pts), if/else 1 (5 pts), loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HttpServer.api_update_settings (cognitive 26) · ×1
  • HttpServer.api_update_settings (cognitive 26) lib/clacky/server/http_server.rb:6696 — HttpServer.api_update_settings has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (17 pts), error handling 3 (6 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · HttpServer.api_add_model (cognitive 26) · ×1
  • HttpServer.api_add_model (cognitive 26) lib/clacky/server/http_server.rb:6830 — HttpServer.api_add_model has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 4, error handling 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · view.openRel (cognitive 26) · ×1
  • view.openRel (cognitive 26) lib/clacky/default_extensions/preview/panels/preview/view.js:247 — view.openRel has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 5, ternaries 1 (4 pts), error handling 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous)._loadChats (cognitive 26) · ×1
  • (anonymous)._loadChats (cognitive 26) lib/clacky/web/components/mentions.js:289 — (anonymous)._loadChats has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 7, ternaries 1 (2 pts), error handling 1 (nesting depth added 6). Of this number, 17 points are the body's own statements and 9 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 26) · ×1
  • (anonymous) (cognitive 26) lib/clacky/web/features/version/store.js:13 — (anonymous) has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 6, error handling 5, ternaries 1 (nesting depth added 1). None of this is in the body itself: all 26 points belong to 15 function items inside it that branch (_handleWsEvent, _emit, checkVersion, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · PlatformHttpClient.stream_download (cognitive 25) · ×1
  • PlatformHttpClient.stream_download (cognitive 25) lib/clacky/platform_http_client.rb:156 — PlatformHttpClient.stream_download has cognitive complexity 25 (threshold 15). Drivers by points: error handling 5 (15 pts), if/else 4 (6 pts), boolean chains 3, 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.
D2 · Cognitive Complexity · ChannelManager.route_message (cognitive 25) · ×1
  • ChannelManager.route_message (cognitive 25) lib/clacky/server/channel/channel_manager.rb:250 — ChannelManager.route_message has cognitive complexity 25 (threshold 15). Drivers by points: if/else 17 (20 pts), boolean chains 4, 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.
D2 · Cognitive Complexity · HttpServer.dispatch (cognitive 25) · ×1
  • HttpServer.dispatch (cognitive 25) lib/clacky/server/http_server.rb:575 — HttpServer.dispatch has cognitive complexity 25 (threshold 15). Drivers by points: if/else 19, error handling 2 (3 pts), boolean chains 2, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · Grep.execute (cognitive 25) · ×1
  • Grep.execute (cognitive 25) lib/clacky/tools/grep.rb:66 — Grep.execute has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (16 pts), error handling 3 (4 pts), ternaries 2 (3 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · FileProcessor.detect_image_mime_type (cognitive 25) · ×1
  • FileProcessor.detect_image_mime_type (cognitive 25) lib/clacky/utils/file_processor.rb:468 — FileProcessor.detect_image_mime_type has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 22, if/else 2, match/switch 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · view.runBindingFlow (cognitive 25) · ×1
  • view.runBindingFlow (cognitive 25) lib/clacky/default_extensions/ext-studio/panels/studio/view.js:659 — view.runBindingFlow has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, ternaries 2 (5 pts), error handling 2 (3 pts), loops 1 (nesting depth added 8). None of this is in the body itself: all 25 points belong to 2 function literals inside it that branch (lines 680, 697). 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 · _renderTicks (cognitive 25) · ×1
  • _renderTicks (cognitive 25) lib/clacky/web/components/chat-navigator.js:118 — _renderTicks has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 8, if/else 6 (8 pts), ternaries 3 (5 pts), loops 3 (4 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AgentConfig.load (cognitive 24) · ×1
  • AgentConfig.load (cognitive 24) lib/clacky/agent_config.rb:253 — AgentConfig.load has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 5 (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 · AgentConfig.media_state (cognitive 24) · ×1
  • AgentConfig.media_state (cognitive 24) lib/clacky/agent_config.rb:934 — AgentConfig.media_state has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 8 (11 pts), boolean chains 7, if/else 6 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Adapter.handle_message (cognitive 24) · ×1
  • Adapter.handle_message (cognitive 24) lib/clacky/server/channel/adapters/discord/adapter.rb:126 — Adapter.handle_message has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 5, error handling 2 (3 pts), ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Adapter.handle_raw_message (cognitive 24) · ×1
  • Adapter.handle_raw_message (cognitive 24) lib/clacky/server/channel/adapters/wecom/adapter.rb:78 — Adapter.handle_raw_message has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 6, error handling 2 (3 pts), ternaries 2, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TodoManager.format_call (cognitive 24) · ×1
  • TodoManager.format_call (cognitive 24) lib/clacky/tools/todo_manager.rb:84 — TodoManager.format_call has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 4 (10 pts), if/else 5 (7 pts), boolean chains 6, match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · (anonymous)._setAsDefault (cognitive 24) · ×1
  • (anonymous)._setAsDefault (cognitive 24) lib/clacky/web/settings.js:1485 — (anonymous)._setAsDefault has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 2, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _loadIndex (cognitive 24) · ×1
  • _loadIndex (cognitive 24) lib/clacky/web/components/chat-navigator.js:355 — _loadIndex has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 7, error handling 1, loops 1, ternaries 1 (nesting depth added 4). Of this number, 23 points are the body's own statements and 1 belongs to 7 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Agent.think (cognitive 23) · ×1
  • Agent.think (cognitive 23) REDACTED:1377 — Agent.think has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 4, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Agent.resolve_vision_images (cognitive 23) · ×1
  • Agent.resolve_vision_images (cognitive 23) REDACTED:2685 — Agent.resolve_vision_images has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 3 (7 pts), boolean chains 6, error handling 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 · CLI.run (cognitive 23) · ×1
  • CLI.run (cognitive 23) lib/clacky/default_extensions/computer-use/skills/computer-use/bin/computer.rb:56 — CLI.run has cognitive complexity 23 (threshold 15). Drivers by points: error handling 5 (15 pts), boolean chains 3, if/else 3, ternaries 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Adapter.attachment_to_file (cognitive 23) · ×1
  • Adapter.attachment_to_file (cognitive 23) REDACTED:495 — Adapter.attachment_to_file has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 8, ternaries 2 (4 pts), error handling 1, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WSClient.handle_message (cognitive 23) · ×1
  • WSClient.handle_message (cognitive 23) REDACTED:204 — WSClient.handle_message has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 7, error handling 1, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Adapter.extract_text (cognitive 23) · ×1
  • Adapter.extract_text (cognitive 23) lib/clacky/server/channel/adapters/weixin/adapter.rb:418 — Adapter.extract_text has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (19 pts), boolean chains 3, match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · HttpServer.mcp_validate_spec (cognitive 23) · ×1
  • HttpServer.mcp_validate_spec (cognitive 23) lib/clacky/server/http_server.rb:4341 — HttpServer.mcp_validate_spec has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 3, match/switch 1, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HttpServer.api_session_files (cognitive 23) · ×1
  • HttpServer.api_session_files (cognitive 23) lib/clacky/server/http_server.rb:5546 — HttpServer.api_session_files has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 5 (6 pts), boolean chains 4, error handling 3 (4 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Browser.visit_node (cognitive 23) · ×1
  • Browser.visit_node (cognitive 23) lib/clacky/tools/browser.rb:769 — Browser.visit_node has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 9, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InputArea.handle_enter (cognitive 23) · ×1
  • InputArea.handle_enter (cognitive 23) lib/clacky/ui2/components/input_area.rb:830 — InputArea.handle_enter has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (18 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MessageCompressorHelper.compress_messages_if_needed (cognitive 22) · ×1
  • MessageCompressorHelper.compress_messages_if_needed (cognitive 22) lib/clacky/agent/message_compressor_helper.rb:125 — MessageCompressorHelper.compress_messages_if_needed has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 5 (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 · Client.extract_upstream_error (cognitive 22) · ×1
  • Client.extract_upstream_error (cognitive 22) lib/clacky/client.rb:906 — Client.extract_upstream_error has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (13 pts), error handling 2 (6 pts), boolean chains 3 (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 · Glob.format_result (cognitive 22) · ×1
  • Glob.format_result (cognitive 22) lib/clacky/tools/glob.rb:136 — Glob.format_result has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModalComponent.show_menu_mode (cognitive 22) · ×1
  • ModalComponent.show_menu_mode (cognitive 22) lib/clacky/ui2/components/modal_component.rb:113 — ModalComponent.show_menu_mode has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, ternaries 1 (3 pts), error handling 1 (2 pts), match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · LimitStack._push_one (cognitive 22) · ×1
  • LimitStack._push_one (cognitive 22) lib/clacky/utils/limit_stack.rb:108 — LimitStack._push_one has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 6, ternaries 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous)._initSearchSettings · ×1
  • (anonymous)._initSearchSettings::_syncKeyVisibility (cognitive 22) lib/clacky/web/settings.js:1751 — (anonymous)._initSearchSettings::_syncKeyVisibility has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 6 (11 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)._onChanged (cognitive 22) · ×1
  • (anonymous)._onChanged (cognitive 22) lib/clacky/web/features/version/view.js:210 — (anonymous)._onChanged has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (17 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous).init (cognitive 22) · ×1
  • (anonymous).init (cognitive 22) lib/clacky/web/features/version/view.js:263 — (anonymous).init has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 5 (nesting depth added 6). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 9 function literals inside it that branch (lines 300, 266, 292, …). 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 · createMeetingSession.startVadRecording (cognitive 22) · ×1
  • createMeetingSession.startVadRecording (cognitive 22) lib/clacky/default_extensions/meeting/panels/meeting/view.js:245 — createMeetingSession.startVadRecording has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 4, ternaries 3 (4 pts), loops 1 (nesting depth added 4). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 5 function items inside it that branch (tick, newRecorder::onstop, newRecorder::ondataavailable, …). 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 · AnthropicStreamAggregator.handle (cognitive 21) · ×1
  • AnthropicStreamAggregator.handle (cognitive 21) lib/clacky/anthropic_stream_aggregator.rb:29 — AnthropicStreamAggregator.handle has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 5, match/switch 3 (5 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ApiExtension.create_session (cognitive 21) · ×1
  • ApiExtension.create_session (cognitive 21) lib/clacky/extension/api_extension.rb:277 — ApiExtension.create_session has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 5, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · OpenAICompat.generate_video (cognitive 21) · ×1
  • OpenAICompat.generate_video (cognitive 21) lib/clacky/media/openai_compat.rb:163 — OpenAICompat.generate_video has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12, boolean chains 4, ternaries 2 (3 pts), error handling 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · Anthropic.build_request_body (cognitive 21) · ×1
  • Anthropic.build_request_body (cognitive 21) lib/clacky/message_format/anthropic.rb:85 — Anthropic.build_request_body has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (18 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Browser.compress_snapshot (cognitive 21) · ×1
  • Browser.compress_snapshot (cognitive 21) lib/clacky/tools/browser.rb:858 — Browser.compress_snapshot has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 8 (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 · Wrap.format_line (cognitive 21) · ×1
  • Wrap.format_line (cognitive 21) REDACTED:14 — Wrap.format_line has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UIController.show_tool_call (cognitive 21) · ×1
  • UIController.show_tool_call (cognitive 21) lib/clacky/ui2/ui_controller.rb:555 — UIController.show_tool_call has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 3 (6 pts), error handling 1 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FileProcessor.rewrite_local_image_urls (cognitive 21) · ×1
  • FileProcessor.rewrite_local_image_urls (cognitive 21) lib/clacky/utils/file_processor.rb:632 — FileProcessor.rewrite_local_image_urls has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 9 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · view.refresh (cognitive 21) · ×1
  • view.refresh (cognitive 21) lib/clacky/default_extensions/git/panels/git/view.js:445 — view.refresh has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 7, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · chat-navigator._renderPreview (cognitive 21) · ×1
  • chat-navigator._renderPreview (cognitive 21) lib/clacky/web/components/chat-navigator.js:174 — chat-navigator._renderPreview has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 13, ternaries 5 (6 pts), if/else 2 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · (anonymous)._renderMediaRow (cognitive 21) · ×1
  • (anonymous)._renderMediaRow (cognitive 21) lib/clacky/web/settings.js:2419 — (anonymous)._renderMediaRow has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 15, if/else 6. Of this number, 17 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · (anonymous).init (cognitive 21) · ×1
  • (anonymous).init (cognitive 21) lib/clacky/web/settings.js:2825 — (anonymous).init has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 5, error handling 2 (3 pts) (nesting depth added 4). Most of this is not in the body itself: 2 of the 21 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 2873, a function literal at line 2894, a function literal at line 2850, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · (anonymous)._register (cognitive 21) · ×1
  • (anonymous)._register (cognitive 21) lib/clacky/web/core/ext.js:156 — (anonymous)._register has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 10, ternaries 6, if/else 4 (5 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · open (cognitive 21) · ×1
  • open (cognitive 21) lib/clacky/web/components/code-editor.js:325 — open has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 10, boolean chains 6, if/else 5. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · (anonymous)._wire (cognitive 21) · ×1
  • (anonymous)._wire (cognitive 21) lib/clacky/web/features/trash/view.js:480 — (anonymous)._wire has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 4, ternaries 2 (4 pts) (nesting depth added 4). Of this number, 15 points are the body's own statements and 6 belong to 8 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · (anonymous)._renderAgents (cognitive 21) · ×1
  • (anonymous)._renderAgents (cognitive 21) lib/clacky/web/features/new-session/view.js:91 — (anonymous)._renderAgents has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9, ternaries 4 (7 pts), boolean chains 5 (nesting depth added 3). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 98, 165). 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 · AgentConfig.initialize (cognitive 20) · ×1
  • AgentConfig.initialize (cognitive 20) lib/clacky/agent_config.rb:171 — AgentConfig.initialize has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 13, ternaries 7. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · AgentConfig.ocr_state (cognitive 20) · ×1
  • AgentConfig.ocr_state (cognitive 20) lib/clacky/agent_config.rb:1000 — AgentConfig.ocr_state has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (6 pts), ternaries 4 (5 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · AgentProfile.all (cognitive 20) · ×1
  • AgentProfile.all (cognitive 20) lib/clacky/agent_profile.rb:92 — AgentProfile.all has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9, boolean chains 8, ternaries 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · BrandConfig.decrypt_all_scripts (cognitive 20) · ×1
  • BrandConfig.decrypt_all_scripts (cognitive 20) REDACTED:1503 — BrandConfig.decrypt_all_scripts has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3, error handling 2 (3 pts), ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MessageParser.parse_message_event (cognitive 20) · ×1
  • MessageParser.parse_message_event (cognitive 20) lib/clacky/server/channel/adapters/feishu/message_parser.rb:48 — MessageParser.parse_message_event has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 3 (4 pts), boolean chains 2, error handling 1, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HttpServer.api_file_action (cognitive 20) · ×1
  • HttpServer.api_file_action (cognitive 20) lib/clacky/server/http_server.rb:4644 — HttpServer.api_file_action has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 2, error handling 1, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HttpServer.platform_safe_fields (cognitive 20) · ×1
  • HttpServer.platform_safe_fields (cognitive 20) lib/clacky/server/http_server.rb:5029 — HttpServer.platform_safe_fields has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 16, ternaries 1 (2 pts), if/else 1, match/switch 1 (nesting depth added 1). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Terminal.execute (cognitive 20) · ×1
  • Terminal.execute (cognitive 20) lib/clacky/tools/terminal.rb:207 — Terminal.execute has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 6, error handling 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModalComponent.collect_field_input (cognitive 20) · ×1
  • ModalComponent.collect_field_input (cognitive 20) lib/clacky/ui2/components/modal_component.rb:259 — ModalComponent.collect_field_input has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (16 pts), error handling 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · view.createPublishPanel.loadPublished (cognitive 20) · ×1
  • view.createPublishPanel.loadPublished (cognitive 20) lib/clacky/default_extensions/ext-studio/panels/studio/view.js:1559 — view.createPublishPanel.loadPublished has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 5, ternaries 5, error handling 2 (3 pts) (nesting depth added 2). Of this number, 10 points are the body's own statements and 10 belong to 2 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · (anonymous)._openModal (cognitive 20) · ×1
  • (anonymous)._openModal (cognitive 20) lib/clacky/web/settings.js:344 — (anonymous)._openModal has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 8, if/else 4 (6 pts), ternaries 3 (6 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous)._activateLicense (cognitive 20) · ×1
  • (anonymous)._activateLicense (cognitive 20) lib/clacky/web/settings.js:2165 — (anonymous)._activateLicense has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 3, error handling 1 (nesting depth added 6). Of this number, 13 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch 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)._renderBadge (cognitive 20) · ×1
  • (anonymous)._renderBadge (cognitive 20) lib/clacky/web/features/version/view.js:33 — (anonymous)._renderBadge has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 1, 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 · (anonymous)._renderSkillTile (cognitive 20) · ×1
  • (anonymous)._renderSkillTile (cognitive 20) lib/clacky/web/features/skills/view.js:277 — (anonymous)._renderSkillTile has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 5, ternaries 2 (4 pts) (nesting depth added 3). Of this number, 19 points are the body's own statements and 1 belongs to 7 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · (anonymous)._docTypeIcon (cognitive 20) · ×1
  • (anonymous)._docTypeIcon (cognitive 20) lib/clacky/web/features/new-session/view.js:359 — (anonymous)._docTypeIcon has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 12, if/else 8. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · (anonymous)._submit (cognitive 20) · ×1
  • (anonymous)._submit (cognitive 20) lib/clacky/web/features/new-session/view.js:871 — (anonymous)._submit has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 9, if/else 7, ternaries 4. Of this number, 17 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · (anonymous)._detailContent (cognitive 20) · ×1
  • (anonymous)._detailContent (cognitive 20) lib/clacky/web/features/extensions/view.js:526 — (anonymous)._detailContent has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 14, boolean chains 6. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · createPublishPanel.loadPublished (cognitive 20) · ×1
  • createPublishPanel.loadPublished (cognitive 20) lib/clacky/default_extensions/ext-studio/panels/studio/view.js:1559 — createPublishPanel.loadPublished has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 5, ternaries 5, error handling 2 (3 pts) (nesting depth added 2). Of this number, 10 points are the body's own statements and 10 belong to 3 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · BrandConfig.refresh_distribution! (cognitive 19) · ×1
  • BrandConfig.refresh_distribution! (cognitive 19) REDACTED:423 — BrandConfig.refresh_distribution! has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 10, if/else 8 (9 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · BrandConfig.upload_extension! (cognitive 19) · ×1
  • BrandConfig.upload_extension! (cognitive 19) REDACTED:651 — BrandConfig.upload_extension! has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 5, error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · Volcengine.generate_video (cognitive 19) · ×1
  • Volcengine.generate_video (cognitive 19) lib/clacky/media/volcengine.rb:72 — Volcengine.generate_video has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12, boolean chains 3, ternaries 3, error handling 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · Adapter.process_update (cognitive 19) · ×1
  • Adapter.process_update (cognitive 19) lib/clacky/server/channel/adapters/telegram/adapter.rb:232 — Adapter.process_update has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 6, ternaries 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · ChannelManager.show_model_list (cognitive 19) · ×1
  • ChannelManager.show_model_list (cognitive 19) lib/clacky/server/channel/channel_manager.rb:574 — ChannelManager.show_model_list has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 5, ternaries 2 (5 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HistoryCollector.show_user_message (cognitive 19) · ×1
  • HistoryCollector.show_user_message (cognitive 19) lib/clacky/server/http_server.rb:70 — HistoryCollector.show_user_message has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10, boolean chains 7, ternaries 1 (2 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · HttpServer.api_create_session (cognitive 19) · ×1
  • HttpServer.api_create_session (cognitive 19) lib/clacky/server/http_server.rb:1030 — HttpServer.api_create_session has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 5, ternaries 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · HttpServer.api_serve_local_image (cognitive 19) · ×1
  • HttpServer.api_serve_local_image (cognitive 19) lib/clacky/server/http_server.rb:4718 — HttpServer.api_serve_local_image has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 3, ternaries 1 (3 pts), error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HttpServer.api_rename_session (cognitive 19) · ×1
  • HttpServer.api_rename_session (cognitive 19) lib/clacky/server/http_server.rb:7399 — HttpServer.api_rename_session has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11, boolean chains 5, ternaries 1 (2 pts), error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · HttpServer.api_switch_session_submodel (cognitive 19) · ×1
  • HttpServer.api_switch_session_submodel (cognitive 19) lib/clacky/server/http_server.rb:7531 — HttpServer.api_switch_session_submodel has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 3 (5 pts), boolean chains 3, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SessionRegistry.build_enriched_row (cognitive 19) · ×1
  • SessionRegistry.build_enriched_row (cognitive 19) lib/clacky/server/session_registry.rb:366 — SessionRegistry.build_enriched_row has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 17, ternaries 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · Browser.execute_user_browser (cognitive 19) · ×1
  • Browser.execute_user_browser (cognitive 19) lib/clacky/tools/browser.rb:282 — Browser.execute_user_browser has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (9 pts), match/switch 1 (nesting depth added 4). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Terminal.start_reader_thread (cognitive 19) · ×1
  • Terminal.start_reader_thread (cognitive 19) lib/clacky/tools/terminal.rb:962 — Terminal.start_reader_thread has cognitive complexity 19 (threshold 15). Drivers by points: error handling 8 (13 pts), if/else 4 (5 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UIController.show_token_usage (cognitive 19) · ×1
  • UIController.show_token_usage (cognitive 19) lib/clacky/ui2/ui_controller.rb:342 — UIController.show_token_usage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (14 pts), ternaries 2 (3 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, 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 · UIController.handle_key (cognitive 19) · ×1
  • UIController.handle_key (cognitive 19) lib/clacky/ui2/ui_controller.rb:1698 — UIController.handle_key has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 4, ternaries 1 (2 pts), match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FileIgnoreHelper._walk_recursive (cognitive 19) · ×1
  • FileIgnoreHelper._walk_recursive (cognitive 19) lib/clacky/utils/file_ignore_helper.rb:198 — FileIgnoreHelper._walk_recursive has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 4, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sessions.document.addEventListener("click") (cognitive 19) · ×1
  • sessions.document.addEventListener("click") (cognitive 19) REDACTED:5837 — sessions.document.addEventListener("click") has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 2 (nesting depth added 9). 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 · (anonymous) (cognitive 19) · ×1
  • (anonymous) (cognitive 19) REDACTED:5837 — (anonymous) has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 2 (nesting depth added 9). 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 · (anonymous).renderSlot (cognitive 19) · ×1
  • (anonymous).renderSlot (cognitive 19) lib/clacky/web/core/ext.js:539 — (anonymous).renderSlot has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 7 (nesting depth added 1). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 554, 553). 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)._startDeviceLogin (cognitive 19) · ×1
  • (anonymous)._startDeviceLogin (cognitive 19) lib/clacky/web/components/onboard.js:417 — (anonymous)._startDeviceLogin has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (7 pts), ternaries 1 (2 pts), error handling 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · (anonymous)._handleKeydown (cognitive 19) · ×1
  • (anonymous)._handleKeydown (cognitive 19) lib/clacky/web/components/composer.js:366 — (anonymous)._handleKeydown has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous)._renderCostTrend (cognitive 19) · ×1
  • (anonymous)._renderCostTrend (cognitive 19) lib/clacky/web/features/billing/view.js:848 — (anonymous)._renderCostTrend has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 9, boolean chains 7, if/else 3. Of this number, 15 points are the body's own statements and 4 belong to 7 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · (anonymous)._renderSessionList (cognitive 19) · ×1
  • (anonymous)._renderSessionList (cognitive 19) lib/clacky/web/features/billing/view.js:1009 — (anonymous)._renderSessionList has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 14, ternaries 4, if/else 1. Most of this is not in the body itself: 4 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 1020). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · SessionSerializer.parse_piped_entries (cognitive 18) · ×1
  • SessionSerializer.parse_piped_entries (cognitive 18) lib/clacky/agent/session_serializer.rb:681 — SessionSerializer.parse_piped_entries has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), error handling 1 (2 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TimeMachine.task_diff_files (cognitive 18) · ×1
  • TimeMachine.task_diff_files (cognitive 18) lib/clacky/agent/time_machine.rb:438 — TimeMachine.task_diff_files has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, boolean chains 8. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · TimeMachine.task_file_diff (cognitive 18) · ×1
  • TimeMachine.task_file_diff (cognitive 18) lib/clacky/agent/time_machine.rb:484 — TimeMachine.task_file_diff has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 7, ternaries 4 (6 pts), if/else 5 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · ToolExecutor.show_edit_preview (cognitive 18) · ×1
  • ToolExecutor.show_edit_preview (cognitive 18) lib/clacky/agent/tool_executor.rb:388 — ToolExecutor.show_edit_preview has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 10, if/else 7, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · AgentConfig.find_model_by_type (cognitive 18) · ×1
  • AgentConfig.find_model_by_type (cognitive 18) lib/clacky/agent_config.rb:702 — AgentConfig.find_model_by_type has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 8 (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 · CLI.agent (cognitive 18) · ×1
  • CLI.agent (cognitive 18) lib/clacky/cli.rb:65 — CLI.agent has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 2, error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · WSClient.connect_and_listen (cognitive 18) · ×1
  • WSClient.connect_and_listen (cognitive 18) lib/clacky/server/channel/adapters/feishu/ws_client.rb:66 — WSClient.connect_and_listen has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 2 (4 pts), error handling 2, loops 2, match/switch 1 (2 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 · HttpServer.api_brand_status (cognitive 18) · ×1
  • HttpServer.api_brand_status (cognitive 18) lib/clacky/server/http_server.rb:2614 — HttpServer.api_brand_status has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HttpServer.api_browse_dirs (cognitive 18) · ×1
  • HttpServer.api_browse_dirs (cognitive 18) lib/clacky/server/http_server.rb:5616 — HttpServer.api_browse_dirs has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (6 pts), error handling 3 (4 pts), ternaries 4, boolean chains 3, loops 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · Terminal.format_call (cognitive 18) · ×1
  • Terminal.format_call (cognitive 18) lib/clacky/tools/terminal.rb:1548 — Terminal.format_call has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 6, ternaries 2 (5 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils.parse_skill_md (cognitive 18) · ×1
  • utils.parse_skill_md (cognitive 18) lib/clacky/default_skills/skill-creator/scripts/utils.py:7 — utils.parse_skill_md has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · view.createDebugPanel.renderVerify (cognitive 18) · ×1
  • view.createDebugPanel.renderVerify (cognitive 18) lib/clacky/default_extensions/ext-studio/panels/studio/view.js:1055 — view.createDebugPanel.renderVerify has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4, ternaries 1 (nesting depth added 5). Of this number, 15 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch 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).createSession (cognitive 18) · ×1
  • (anonymous).createSession (cognitive 18) lib/clacky/web/features/new-session/store.js:149 — (anonymous).createSession has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 5, ternaries 2 (3 pts), error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous)._renderDetail (cognitive 18) · ×1
  • (anonymous)._renderDetail (cognitive 18) lib/clacky/web/features/extensions/view.js:400 — (anonymous)._renderDetail has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createDebugPanel.renderVerify (cognitive 18) · ×1
  • createDebugPanel.renderVerify (cognitive 18) lib/clacky/default_extensions/ext-studio/panels/studio/view.js:1055 — createDebugPanel.renderVerify has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4, ternaries 1 (nesting depth added 5). Of this number, 15 points are the body's own statements and 3 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TimeMachine.get_task_history (cognitive 17) · ×1
  • TimeMachine.get_task_history (cognitive 17) lib/clacky/agent/time_machine.rb:557 — TimeMachine.get_task_history has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 5, ternaries 1 (3 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ToolExecutor.format_tool_prompt (cognitive 17) · ×1
  • ToolExecutor.format_tool_prompt (cognitive 17) lib/clacky/agent/tool_executor.rb:126 — ToolExecutor.format_tool_prompt has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), error handling 3 (4 pts), boolean chains 3, ternaries 1 (2 pts), match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BedrockStreamAggregator.handle (cognitive 17) · ×1
  • BedrockStreamAggregator.handle (cognitive 17) lib/clacky/bedrock_stream_aggregator.rb:39 — BedrockStreamAggregator.handle has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 6, match/switch 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 · BrandConfig.upload_skill! (cognitive 17) · ×1
  • BrandConfig.upload_skill! (cognitive 17) REDACTED:555 — BrandConfig.upload_skill! has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 5, error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · HttpTransport.dispatch_post (cognitive 17) · ×1
  • HttpTransport.dispatch_post (cognitive 17) lib/clacky/mcp/http_transport.rb:85 — HttpTransport.dispatch_post has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Registry.load_config (cognitive 17) · ×1
  • Registry.load_config (cognitive 17) lib/clacky/mcp/registry.rb:164 — Registry.load_config has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, error handling 1, match/switch 1, ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OpenAICompat.generate_image (cognitive 17) · ×1
  • OpenAICompat.generate_image (cognitive 17) lib/clacky/media/openai_compat.rb:33 — OpenAICompat.generate_image has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, boolean chains 3, error handling 2, ternaries 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · OpenAICompat.generate_transcription (cognitive 17) · ×1
  • OpenAICompat.generate_transcription (cognitive 17) lib/clacky/media/openai_compat.rb:337 — OpenAICompat.generate_transcription has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), error handling 2 (4 pts), boolean chains 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Adapter.enrich_with_doc_content (cognitive 17) · ×1
  • Adapter.enrich_with_doc_content (cognitive 17) lib/clacky/server/channel/adapters/feishu/adapter.rb:320 — Adapter.enrich_with_doc_content has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (7 pts), error handling 3 (6 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HttpServer.api_brand_skill_install (cognitive 17) · ×1
  • HttpServer.api_brand_skill_install (cognitive 17) lib/clacky/server/http_server.rb:3317 — HttpServer.api_brand_skill_install has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (15 pts), error handling 1, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HttpServer.api_session_messages (cognitive 17) · ×1
  • HttpServer.api_session_messages (cognitive 17) lib/clacky/server/http_server.rb:7175 — HttpServer.api_session_messages has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (15 pts), error handling 1, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WebUIController.show_user_message (cognitive 17) · ×1
  • WebUIController.show_user_message (cognitive 17) lib/clacky/server/web_ui_controller.rb:138 — WebUIController.show_user_message has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, boolean chains 6. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · Terminal.format_result (cognitive 17) · ×1
  • Terminal.format_result (cognitive 17) lib/clacky/tools/terminal.rb:1589 — Terminal.format_result has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 4, ternaries 3 (4 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · viewer.html.renderGrades (cognitive 17) · ×1
  • viewer.html.renderGrades (cognitive 17) lib/clacky/default_skills/skill-creator/eval-viewer/viewer.html:858 — viewer.html.renderGrades has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 5 (8 pts), boolean chains 5, if/else 2 (3 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sessions._downloadSessionBundle (cognitive 17) · ×1
  • sessions._downloadSessionBundle (cognitive 17) REDACTED:7025 — sessions._downloadSessionBundle has cognitive complexity 17 (threshold 15). Drivers by points: error handling 4 (7 pts), if/else 5 (6 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous)._openModalDuplicate (cognitive 17) · ×1
  • (anonymous)._openModalDuplicate (cognitive 17) lib/clacky/web/settings.js:448 — (anonymous)._openModalDuplicate has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 5 (6 pts), ternaries 2 (3 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · (anonymous)._saveModel (cognitive 17) · ×1
  • (anonymous)._saveModel (cognitive 17) lib/clacky/web/settings.js:1368 — (anonymous)._saveModel has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 4, error handling 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · (anonymous)._updateLatestExchangeRate (cognitive 17) · ×1
  • (anonymous)._updateLatestExchangeRate (cognitive 17) lib/clacky/web/settings.js:3009 — (anonymous)._updateLatestExchangeRate has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, if/else 7, error handling 2, ternaries 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · (anonymous)._bindCustomDropdown · ×1
  • (anonymous)._bindCustomDropdown::onSelect (cognitive 17) lib/clacky/web/components/onboard.js:266 — (anonymous)._bindCustomDropdown::onSelect has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous).vendorBadge (cognitive 17) · ×1
  • (anonymous).vendorBadge (cognitive 17) lib/clacky/web/components/model-picker.js:81 — (anonymous).vendorBadge has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 5, ternaries 2 (3 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · (anonymous).attach (cognitive 17) · ×1
  • (anonymous).attach (cognitive 17) lib/clacky/web/components/mentions.js:574 — (anonymous).attach has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 6 (nesting depth added 1). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 592, 616, 628, …). 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).fileIconSvg (cognitive 17) · ×1
  • (anonymous).fileIconSvg (cognitive 17) lib/clacky/web/features/workspace/view.js:201 — (anonymous).fileIconSvg has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, boolean chains 6. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · (anonymous).reconcileEntries (cognitive 17) · ×1
  • (anonymous).reconcileEntries (cognitive 17) lib/clacky/web/features/workspace/view.js:594 — (anonymous).reconcileEntries has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 3, boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous).createViewer.buildImageTab (cognitive 17) · ×1
  • (anonymous).createViewer.buildImageTab (cognitive 17) lib/clacky/web/features/workspace/view.js:1230 — (anonymous).createViewer.buildImageTab has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10, boolean chains 5, ternaries 2. Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 16 function items inside it that branch (fitScale, a function literal at line 1329, a function literal at line 1347, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · (anonymous)._humanCron · ×1
  • (anonymous)._humanCron::dowLabel (cognitive 17) lib/clacky/web/features/tasks/view.js:41 — (anonymous)._humanCron::dowLabel has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 5, boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · runPublishFlow · ×1
  • runPublishFlow::(anonymous)::submit (cognitive 17) lib/clacky/default_extensions/ext-studio/panels/studio/view.js:849 — runPublishFlow::(anonymous)::submit has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 5, error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · MessageCompressorHelper.get_recent_messages_with_tool_pairs (cognitive 16) · ×1
  • MessageCompressorHelper.get_recent_messages_with_tool_pairs (cognitive 16) lib/clacky/agent/message_compressor_helper.rb:384 — MessageCompressorHelper.get_recent_messages_with_tool_pairs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SessionSerializer.extract_display_files_from_text (cognitive 16) · ×1
  • SessionSerializer.extract_display_files_from_text (cognitive 16) lib/clacky/agent/session_serializer.rb:617 — SessionSerializer.extract_display_files_from_text has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 7, error handling 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · BrandConfig.install_brand_skill! (cognitive 16) · ×1
  • BrandConfig.install_brand_skill! (cognitive 16) REDACTED:1125 — BrandConfig.install_brand_skill! has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, boolean chains 5, error handling 1, loops 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · BrandConfig.to_yaml (cognitive 16) · ×1
  • BrandConfig.to_yaml (cognitive 16) REDACTED:1680 — BrandConfig.to_yaml has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, boolean chains 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · SkillProvider.load_servers (cognitive 16) · ×1
  • SkillProvider.load_servers (cognitive 16) lib/clacky/mcp/skill_provider.rb:31 — SkillProvider.load_servers has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, error handling 1, match/switch 1, ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OpenAIStreamAggregator.handle (cognitive 16) · ×1
  • OpenAIStreamAggregator.handle (cognitive 16) lib/clacky/openai_stream_aggregator.rb:43 — OpenAIStreamAggregator.handle has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BrowserManager.mcp_call (cognitive 16) · ×1
  • BrowserManager.mcp_call (cognitive 16) lib/clacky/server/browser_manager.rb:166 — BrowserManager.mcp_call has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 2 (4 pts), error handling 2 (3 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Adapter.detect_image_mime (cognitive 16) · ×1
  • Adapter.detect_image_mime (cognitive 16) lib/clacky/server/channel/adapters/weixin/adapter.rb:558 — Adapter.detect_image_mime has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, if/else 6. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · HttpServer.api_store_extensions_brand (cognitive 16) · ×1
  • HttpServer.api_store_extensions_brand (cognitive 16) lib/clacky/server/http_server.rb:2821 — HttpServer.api_store_extensions_brand has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 7 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HttpServer.api_publish_my_skill (cognitive 16) · ×1
  • HttpServer.api_publish_my_skill (cognitive 16) lib/clacky/server/http_server.rb:6445 — HttpServer.api_publish_my_skill has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 3, error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · HttpServer.api_update_project (cognitive 16) · ×1
  • HttpServer.api_update_project (cognitive 16) lib/clacky/server/http_server.rb:7263 — HttpServer.api_update_project has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), error handling 2 (3 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · HttpServer.handle_user_message (cognitive 16) · ×1
  • HttpServer.handle_user_message (cognitive 16) lib/clacky/server/http_server.rb:8070 — HttpServer.handle_user_message has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 4, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · Master.run (cognitive 16) · ×1
  • Master.run (cognitive 16) lib/clacky/server/server_master.rb:54 — Master.run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 1, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Skill.sanitize_frontmatter (cognitive 16) · ×1
  • Skill.sanitize_frontmatter (cognitive 16) lib/clacky/skill.rb:538 — Skill.sanitize_frontmatter has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FileReader.read_text_file (cognitive 16) · ×1
  • FileReader.read_text_file (cognitive 16) lib/clacky/tools/file_reader.rb:148 — FileReader.read_text_file has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, ternaries 3 (4 pts), boolean chains 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · view.createMeetingSession.startVadRecording (cognitive 16) · ×1
  • view.createMeetingSession.startVadRecording (cognitive 16) lib/clacky/default_extensions/meeting/panels/meeting/view.js:245 — view.createMeetingSession.startVadRecording has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 4, loops 1, ternaries 1 (nesting depth added 3). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 5 function items inside it that branch (tick, newRecorder, rms, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · (anonymous)._initDOMBindings (cognitive 16) · ×1
  • (anonymous)._initDOMBindings (cognitive 16) lib/clacky/web/skills.js:440 — (anonymous)._initDOMBindings has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 4). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 496, 448, 466, …). 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)._renderProviderFilter (cognitive 16) · ×1
  • (anonymous)._renderProviderFilter (cognitive 16) lib/clacky/web/settings.js:110 — (anonymous)._renderProviderFilter has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 3 (4 pts), boolean chains 3 (nesting depth added 3). Of this number, 10 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · (anonymous)._initModal · ×1
  • (anonymous)._initModal::onSelect (cognitive 16) lib/clacky/web/settings.js:703 — (anonymous)._initModal::onSelect 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 · (anonymous)._loadRemoteModels (cognitive 16) · ×1
  • (anonymous)._loadRemoteModels (cognitive 16) lib/clacky/web/settings.js:982 — (anonymous)._loadRemoteModels has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 4, ternaries 2, error handling 1. Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · (anonymous)._initSearchSettings (cognitive 16) · ×1
  • (anonymous)._initSearchSettings (cognitive 16) lib/clacky/web/settings.js:1723 — (anonymous)._initSearchSettings has cognitive complexity 16 (threshold 15). Drivers by points: if/else 19 (24 pts), ternaries 9 (15 pts), boolean chains 11, error handling 3 (5 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous)._pollDevice (cognitive 16) · ×1
  • (anonymous)._pollDevice (cognitive 16) lib/clacky/web/components/onboard.js:454 — (anonymous)._pollDevice has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (6 pts), ternaries 3 (6 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous)._testAndSave (cognitive 16) · ×1
  • (anonymous)._testAndSave (cognitive 16) lib/clacky/web/components/onboard.js:491 — (anonymous)._testAndSave has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (7 pts), if/else 5 (6 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous)._notifyDesktop (cognitive 16) · ×1
  • (anonymous)._notifyDesktop (cognitive 16) lib/clacky/web/components/notify.js:139 — (anonymous)._notifyDesktop has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 7, error handling 4, if/else 3, boolean chains 2. Of this number, 10 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · (anonymous).text · ×1
  • (anonymous).text::walk (cognitive 16) lib/clacky/web/components/composer.js:61 — (anonymous).text::walk has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous)._switchTab (cognitive 16) · ×1
  • (anonymous)._switchTab (cognitive 16) lib/clacky/web/features/trash/view.js:127 — (anonymous)._switchTab has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 6 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous)._brandDetailContent (cognitive 16) · ×1
  • (anonymous)._brandDetailContent (cognitive 16) lib/clacky/web/features/skills/view.js:579 — (anonymous)._brandDetailContent has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 7 (8 pts), if/else 5, boolean chains 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · (anonymous)._renderMarkdown (cognitive 16) · ×1
  • (anonymous)._renderMarkdown (cognitive 16) lib/clacky/web/features/profile/view.js:41 — (anonymous)._renderMarkdown has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 1, loops 1 (nesting depth added 5). Of this number, 13 points are the body's own statements and 3 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch 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)._openProjectPopover (cognitive 16) · ×1
  • (anonymous)._openProjectPopover (cognitive 16) lib/clacky/web/features/new-session/view.js:681 — (anonymous)._openProjectPopover has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 6 (8 pts), boolean chains 4, if/else 4 (nesting depth added 2). None of this is in the body itself: all 16 points belong to 5 function literals inside it that branch (lines 682, 739, 693, …). 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).testConnection (cognitive 16) · ×1
  • (anonymous).testConnection (cognitive 16) lib/clacky/web/features/model-tester/store.js:18 — (anonymous).testConnection has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7, boolean chains 6, ternaries 1 (2 pts), error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · (anonymous)._onStatus (cognitive 16) · ×1
  • (anonymous)._onStatus (cognitive 16) lib/clacky/web/features/brand/view.js:17 — (anonymous)._onStatus has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous)._renderActivationBanner (cognitive 16) · ×1
  • (anonymous)._renderActivationBanner (cognitive 16) lib/clacky/web/features/brand/view.js:65 — (anonymous)._renderActivationBanner has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, if/else 5 (6 pts), ternaries 2 (4 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D22 · Internal API Consistency · Redundant model switching logic across Agent and AgentConfig. The Agent class exposes `switch_model_by_id`, which duplicates the capability already present in `AgentConfig`. Furthermore, `AgentConfig` offers both `switch_model_by_id` and `switch_model_by_name`, while `Agent` only offers `switch_model_by_id`. This creates an inconsistent API surface where the configuration object has more granular control methods than the agent object that uses it. · ×1
  • Redundant model switching logic across Agent and AgentConfig. The Agent class exposes `switch_model_by_id`, which duplicates the capability already present in `AgentConfig`. Furthermore, `AgentConfig` offers both `switch_model_by_id` and `switch_model_by_name`, while `Agent` only offers `switch_model_by_id`. This creates an inconsistent API surface where the configuration object has more granular control methods than the agent object that uses it. — Remove `switch_model_by_id` from `Agent`. Agents should delegate model switching to `AgentConfig` or a dedicated `ModelManager`. If `Agent` needs to switch models, it should call the config method. Ensure `AgentConfig` standardizes on one primary switching method (e.g., `set_model(name)` or `set_model(id)`) to avoid internal confusion, or keep both but ensure `Agent` exposes the same set for parity. (signatures: Clacky.Agent.switch_model_by_id(id) | Clacky.AgentConfig.switch_model_by_id(id) | Clacky.AgentConfig.switch_model_by_name(name))
D22 · Internal API Consistency · Inconsistent object construction patterns. `Agent` has a complex `initialize` method with 7 arguments, but also provides a class method `from_session` that reconstructs an agent from session data. This is a valid factory pattern, but it contrasts with other types in the API (like `GoalState` which has `from_h`) and `AccessKey` (which has `from_file`, `from_env`). While not strictly an error, the existence of `from_session` implies that `initialize` is not the primary way to create an Agent in many contexts, yet it remains the public constructor. This splits the mental model of 'how do I create an Agent?' between a raw initializer and a specific factory. · ×1
  • Inconsistent object construction patterns. `Agent` has a complex `initialize` method with 7 arguments, but also provides a class method `from_session` that reconstructs an agent from session data. This is a valid factory pattern, but it contrasts with other types in the API (like `GoalState` which has `from_h`) and `AccessKey` (which has `from_file`, `from_env`). While not strictly an error, the existence of `from_session` implies that `initialize` is not the primary way to create an Agent in many contexts, yet it remains the public constructor. This splits the mental model of 'how do I create an Agent?' between a raw initializer and a specific factory. — If `from_session` is the primary creation path, consider making `initialize` private or protected. Alternatively, if `initialize` is the standard, ensure all creation paths (like `from_session`) clearly delegate to it without exposing a separate 'magic' constructor. The current state is acceptable but slightly fragmented. (signatures: Clacky.Agent.from_session(client, config, session_data, ui, profile) | Clacky.Agent.initialize(client, config, working_dir, ui, profile, session_id, source))
D22 · Internal API Consistency · Inconsistent accessor naming for configuration values. `AgentConfig` uses standard Ruby-style getters/setters (`api_key`, `api_key=`) for some properties, but other properties like `ask_user_timeout_seconds` are listed as Properties without explicit setter signatures in the summary (though likely present). More importantly, `ClackyEnv` uses methods like `default_api_key()` and `lite_api_key()` instead of properties. This mixes property-style access in `AgentConfig` with method-style access in `ClackyEnv` for similar configuration retrieval tasks. · ×1
  • Inconsistent accessor naming for configuration values. `AgentConfig` uses standard Ruby-style getters/setters (`api_key`, `api_key=`) for some properties, but other properties like `ask_user_timeout_seconds` are listed as Properties without explicit setter signatures in the summary (though likely present). More importantly, `ClackyEnv` uses methods like `default_api_key()` and `lite_api_key()` instead of properties. This mixes property-style access in `AgentConfig` with method-style access in `ClackyEnv` for similar configuration retrieval tasks. — Standardize on properties for simple configuration values across `AgentConfig` and `ClackyEnv`. If `ClackyEnv` needs to compute values, use methods, but if they are simple lookups, use properties to match `AgentConfig`. Alternatively, if `AgentConfig` is mutable and `ClackyEnv` is static, the distinction is valid, but the naming `default_api_key()` vs `api_key` property is slightly jarring. (signatures: Clacky.AgentConfig.api_key | Clacky.AgentConfig.api_key= | Clacky.AgentConfig.base_url | Clacky.AgentConfig.base_url=)
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D35 · Change Coupling · Change coupling clique · ×1
  • Change coupling clique: REDACTED, providers.rb, model_pricing.rb REDACTED — 3 files — `REDACTED`, `lib/clacky/providers.rb`, `lib/clacky/utils/model_pricing.rb` — all change together with no explicit dependency: a fully-connected co-change clique, not 3 separate couplings. They share one concern (thin parallel siblings over a common abstraction), so extract the shared part into ONE unit and the whole clique's coupling clears at once — you do not need to break each pair individually.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Edited copy of a member (18 corresponding lines) · ×1
  • Edited copy of a member (18 corresponding lines) lib/clacky/ui2/layout_manager.rb:679 — lib/clacky/ui2/layout_manager.rb:679-696 | lib/clacky/ui2/line_editor.rb:306-324 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (6 members, 50+ identical tokens) lib/clacky/extension/loader.rb:391 — lib/clacky/extension/loader.rb:391-416 | lib/clacky/extension/loader.rb:477-516 | lib/clacky/extension/loader.rb:520-537 | lib/clacky/extension/loader.rb:541-564 | lib/clacky/extension/loader.rb:568-585 | lib/clacky/extension/loader.rb:589-610 — 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) · ×1
  • Members sharing a duplicated core (5 members, 50+ identical tokens) REDACTED:232 — REDACTED:232-298 | REDACTED:343-381 | REDACTED:1041-1068 | REDACTED:1074-1118 | REDACTED:1890-1942 — 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.
D4 · Code Duplication · Duplicated block (24–34 lines × 2) · ×1
  • Duplicated block (24–34 lines × 2) lib/clacky/rich_ui/rich_ui_controller.rb:516 — lib/clacky/rich_ui/rich_ui_controller.rb:516-539 | lib/clacky/ui2/ui_controller.rb:1929-1962 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `lib/clacky/rich_ui/rich_ui_controller.rb:516` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `lib/clacky/rich_ui/rich_ui_controller.rb:540` calls `show_warning` and `lib/clacky/ui2/ui_controller.rb:1964` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (32–33 lines × 2) · ×1
  • Duplicated block (32–33 lines × 2) lib/clacky/server/channel/adapters/discord/gateway_client.rb:87 — lib/clacky/server/channel/adapters/discord/gateway_client.rb:87-118 | lib/clacky/server/channel/adapters/qq/gateway_client.rb:112-144 — `lib/clacky/server/channel/adapters/discord/gateway_client.rb` and `lib/clacky/server/channel/adapters/qq/gateway_client.rb` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 5 separate duplicated blocks between them, totalling at least 79 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. 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–27 lines × 2) · ×1
  • Duplicated block (19–27 lines × 2) lib/clacky/message_format/anthropic.rb:200 — lib/clacky/message_format/anthropic.rb:200-226 | lib/clacky/message_format/bedrock.rb:125-143 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (22–24 lines × 2) · ×1
  • Duplicated block (22–24 lines × 2) lib/clacky/client.rb:292 — lib/clacky/client.rb:292-313 | lib/clacky/client.rb:350-373 — 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 (20–24 lines × 2) · ×1
  • Duplicated block (20–24 lines × 2) lib/clacky/media/dashscope.rb:373 — lib/clacky/media/dashscope.rb:373-396 | lib/clacky/media/volcengine.rb:124-143 — 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.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×1
  • Duplicated block (20 lines × 2) lib/clacky/default_skills/channel-manager/install_feishu_skills.rb:51 — lib/clacky/default_skills/channel-manager/install_feishu_skills.rb:51-70 | lib/clacky/default_skills/onboard/scripts/install_builtin_skills.rb:38-57 — 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 (18–19 lines × 2) · ×1
  • Duplicated block (18–19 lines × 2) lib/clacky/server/channel/adapters/discord/gateway_client.rb:237 — lib/clacky/server/channel/adapters/discord/gateway_client.rb:237-254 | lib/clacky/server/channel/adapters/qq/gateway_client.rb:301-319 — `lib/clacky/server/channel/adapters/discord/gateway_client.rb` and `lib/clacky/server/channel/adapters/qq/gateway_client.rb` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 5 separate duplicated blocks between them, totalling at least 79 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D4 · Code Duplication · Duplicated block (17–18 lines × 2) · ×1
  • Duplicated block (17–18 lines × 2) lib/clacky/ui2/components/input_area.rb:407 — lib/clacky/ui2/components/input_area.rb:407-424 | lib/clacky/ui2/line_editor.rb:218-234 — 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 (18 lines × 2) · ×1
  • Duplicated block (18 lines × 2) lib/clacky/ui2/components/input_area.rb:1105 — lib/clacky/ui2/components/input_area.rb:1105-1122 | lib/clacky/ui2/line_editor.rb:340-357 — 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 (14–16 lines × 2) · ×1
  • Duplicated block (14–16 lines × 2) lib/clacky/message_format/open_ai.rb:178 — lib/clacky/message_format/open_ai.rb:178-193 | lib/clacky/message_format/open_ai_responses.rb:240-253 — 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.
D4 · Code Duplication · Duplicated block (13–14 lines × 5) · ×1
  • Duplicated block (13–14 lines × 5) REDACTED:235 — REDACTED:235-247 | REDACTED:350-363 | REDACTED:1043-1055 | REDACTED:1076-1089 | REDACTED:1914-1926 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:235` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×1
  • Duplicated block (13–14 lines × 2) lib/clacky/server/channel/adapters/feishu/ws_client.rb:94 — lib/clacky/server/channel/adapters/feishu/ws_client.rb:94-107 | REDACTED:142-154 — 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 (13 lines × 6) · ×1
  • Duplicated block (13 lines × 6) lib/clacky/extension/loader.rb:391 — lib/clacky/extension/loader.rb:391-403 | lib/clacky/extension/loader.rb:477-489 | lib/clacky/extension/loader.rb:520-532 | lib/clacky/extension/loader.rb:541-553 | lib/clacky/extension/loader.rb:568-580 | lib/clacky/extension/loader.rb:589-601 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `lib/clacky/extension/loader.rb:492` calls `join` and `lib/clacky/extension/loader.rb:405` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (9–13 lines × 2) · ×1
  • Duplicated block (9–13 lines × 2) REDACTED:487 — REDACTED:487-495 | REDACTED:1102-1114 — 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 (11–12 lines × 2) · ×1
  • Duplicated block (11–12 lines × 2) REDACTED:825 — REDACTED:825-835 | REDACTED:862-873 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:825` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (8–12 lines × 2) · ×1
  • Duplicated block (8–12 lines × 2) lib/clacky/server/session_registry.rb:230 — lib/clacky/server/session_registry.rb:230-237 | lib/clacky/server/session_registry.rb:347-358 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/clacky/server/session_registry.rb:230` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×1
  • Duplicated block (10–11 lines × 2) lib/clacky/server/http_server.rb:1762 — lib/clacky/server/http_server.rb:1762-1771 | lib/clacky/server/http_server.rb:1795-1805 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×1
  • Duplicated block (8–9 lines × 2) lib/clacky/server/http_server.rb:5578 — lib/clacky/server/http_server.rb:5578-5586 | lib/clacky/server/http_server.rb:5633-5640 — 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–9 lines × 2) · ×1
  • Duplicated block (7–9 lines × 2) lib/clacky/server/http_server.rb:7474 — lib/clacky/server/http_server.rb:7474-7482 | lib/clacky/server/http_server.rb:7538-7544 — 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) lib/clacky/tools/trash_manager.rb:416 — lib/clacky/tools/trash_manager.rb:416-420 | lib/clacky/tools/trash_manager.rb:447-451 | lib/clacky/tools/trash_manager.rb:482-486 — 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 (12 lines × 3) · ×1
  • Duplicated block (12 lines × 3) lib/clacky/anthropic_stream_aggregator.rb:108 — lib/clacky/anthropic_stream_aggregator.rb:108-119 | lib/clacky/bedrock_stream_aggregator.rb:110-121 | lib/clacky/openai_stream_aggregator.rb:113-124 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×1
  • Duplicated block (7 lines × 3) lib/clacky/default_skills/skill-creator/scripts/run_eval.py:45 — lib/clacky/default_skills/skill-creator/scripts/run_eval.py:45-51 | lib/clacky/default_skills/skill-creator/scripts/run_eval.py:119-125 | lib/clacky/default_skills/skill-creator/scripts/run_eval.py:147-153 — 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.
P12 · CI test-gate honesty · Test suite runs only after the merge · ×1
  • Test suite runs only after the merge — `REDACTED` run(s) the test suite, but no workflow that runs tests is triggered by a pull request (or a merge queue) — so the suite reports on code that is already on the default branch. A red build there blocks nothing and the only remedy is a revert. Add the pull-request trigger to the workflow that runs your suite so the gate applies before the merge, not after it.
R1 · Type Safety · Type Safety · ×1
  • Type Safety — 0 typed · 83 plain JS — the untyped files are lib/clacky/default_extensions/advisor/panels/advisor/view.js, lib/clacky/default_extensions/ext-studio/panels/studio/view.js, lib/clacky/default_extensions/git/panels/git/view.js, lib/clacky/default_extensions/meeting/panels/meeting/view.js, lib/clacky/default_extensions/preview/panels/preview/view.js, lib/clacky/default_extensions/time_machine/panels/time_machine/view.js (+77 more).
R10 · Code Duplication · Duplication concentrated across 15 sibling directories (34 clone groups) · ×1
  • Duplication concentrated across 15 sibling directories (34 clone groups) lib/clacky/web/features/channels/view.js:235 — 34 duplicated blocks under lib/clacky/web/features/ have copies in at least two of the sibling directories archive, backup, billing, brand, channels, extensions (+9 more sibling(s) not listed) — 29 of them are reported below, and 5 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 34 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 34 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 34 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 2 sibling directories (10 clone groups) · ×1
  • Duplication concentrated across 2 sibling directories (10 clone groups) lib/clacky/default_extensions/git/panels/git/view.js:154 — 10 duplicated blocks under lib/clacky/ have copies in at least two of the sibling directories default_extensions, web — 4 of them are reported below, and 6 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 10 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 10 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 10 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 2 sibling directories (6 clone groups) · ×1
  • Duplication concentrated across 2 sibling directories (6 clone groups) lib/clacky/web/components/code-editor.js:337 — 6 duplicated blocks under lib/clacky/web/ have copies in at least two of the sibling directories components, features — 3 of them are reported below, and 3 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 6 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 6 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 6 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplicated block (46 lines × 2 locations) · ×1
  • Duplicated block (46 lines × 2 locations) lib/clacky/web/features/new-session/view.js:377 — lib/clacky/web/features/new-session/view.js:377 · REDACTED:780 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (31 lines × 2 locations) · ×1
  • Duplicated block (31 lines × 2 locations) lib/clacky/web/features/new-session/view.js:469 — lib/clacky/web/features/new-session/view.js:469 · REDACTED:927 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (23 lines × 2 locations) · ×1
  • Duplicated block (23 lines × 2 locations) lib/clacky/web/features/channels/view.js:235 — lib/clacky/web/features/channels/view.js:235 · lib/clacky/web/features/mcp/view.js:131 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block with local edits (20 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (20 matched lines × 2 locations) lib/clacky/web/app.js:892 — lib/clacky/web/app.js:892 · lib/clacky/web/core/aside.js:265 — the two spans are one implementation copied and then locally edited — 144 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 (18 lines × 4 locations) · ×1
  • Duplicated block (18 lines × 4 locations) lib/clacky/web/features/channels/store.js:18 — lib/clacky/web/features/channels/store.js:18 · lib/clacky/web/features/mcp/store.js:18 · lib/clacky/web/features/share/store.js:27 · lib/clacky/web/features/skills/store.js:37 — the 4 copies are spread across 4 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. There is one copy in each of 4 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
R10 · Code Duplication · Duplicated block (18 lines × 2 locations) · ×1
  • Duplicated block (18 lines × 2 locations) lib/clacky/web/settings.js:1212 — lib/clacky/web/settings.js:1212 · lib/clacky/web/settings.js:1324 — 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) lib/clacky/web/app.js:81 — lib/clacky/web/app.js:81 · lib/clacky/web/features/new-session/view.js:290 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (16 lines × 7 locations) · ×1
  • Duplicated block (16 lines × 7 locations) lib/clacky/web/features/backup/store.js:15 — lib/clacky/web/features/backup/store.js:15 · lib/clacky/web/features/channels/store.js:20 · lib/clacky/web/features/extensions/store.js:61 · lib/clacky/web/features/mcp/store.js:20 · +3 more site(s) not listed — the 7 copies are spread across 7 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. There is one copy in each of 7 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
R10 · Code Duplication · Duplicated block (15 lines × 4 locations) · ×1
  • Duplicated block (15 lines × 4 locations) lib/clacky/web/features/billing/store.js:26 — lib/clacky/web/features/billing/store.js:26 · lib/clacky/web/features/brand/store.js:21 · lib/clacky/web/features/trash/store.js:24 · lib/clacky/web/features/workspace/store.js:16 — the 4 copies are spread across 4 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. There is one copy in each of 4 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
R10 · Code Duplication · Duplicated block (13 lines × 3 locations) · ×1
  • Duplicated block (13 lines × 3 locations) lib/clacky/web/features/new-session/store.js:33 — lib/clacky/web/features/new-session/store.js:33 · lib/clacky/web/features/profile/store.js:16 · lib/clacky/web/features/workspace/store.js:16 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R2 · Cyclomatic Complexity · Complex function _dispatchEvent (cyclomatic 164, cognitive 219) · ×1
  • Complex function _dispatchEvent (cyclomatic 164, cognitive 219) lib/clacky/web/ws-dispatcher.js:202 — _dispatchEvent has cyclomatic complexity 164 and cognitive complexity 219; 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 _docTypeIcon (cyclomatic 113, cognitive 19) · ×1
  • Complex function _docTypeIcon (cyclomatic 113, cognitive 19) REDACTED:701 — _docTypeIcon has cyclomatic complexity 113 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 _humanCron (cyclomatic 81, cognitive 80) · ×1
  • Complex function _humanCron (cyclomatic 81, cognitive 80) lib/clacky/web/features/tasks/view.js:15 — _humanCron has cyclomatic complexity 81 and cognitive complexity 80; 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 _fetchHistory (cyclomatic 63, cognitive 89) · ×1
  • Complex function _fetchHistory (cyclomatic 63, cognitive 89) REDACTED:2289 — _fetchHistory has cyclomatic complexity 63 and cognitive complexity 89; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function _renderHistoryEvent (cyclomatic 61, cognitive 92) · ×1
  • Complex function _renderHistoryEvent (cyclomatic 61, cognitive 92) REDACTED:2072 — _renderHistoryEvent has cyclomatic complexity 61 and cognitive complexity 92; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function updateInfoBar (cyclomatic 50, cognitive 81) · ×1
  • Complex function updateInfoBar (cyclomatic 50, cognitive 81) REDACTED:4629 — updateInfoBar has cyclomatic complexity 50 and cognitive complexity 81; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function _apply (cyclomatic 48, cognitive 44) · ×1
  • Complex function _apply (cyclomatic 48, cognitive 44) lib/clacky/web/app.js:272 — _apply has cyclomatic complexity 48 and cognitive complexity 44; 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 _renderContextBar (cyclomatic 31, cognitive 34) · ×1
  • Complex function _renderContextBar (cyclomatic 31, cognitive 34) lib/clacky/web/features/new-session/view.js:803 — _renderContextBar has cyclomatic complexity 31 and cognitive complexity 34; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 31, cognitive 30) · ×1
  • Complex function (anonymous) (cyclomatic 31, cognitive 30) lib/clacky/web/components/model-picker.js:646 — (anonymous) has cyclomatic complexity 31 and cognitive complexity 30; 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 _renderSessionItem (cyclomatic 31, cognitive 29) · ×1
  • Complex function _renderSessionItem (cyclomatic 31, cognitive 29) REDACTED:3045 — _renderSessionItem has cyclomatic complexity 31 and cognitive complexity 29; 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 navigateTo (cyclomatic 31, cognitive 29) · ×1
  • Complex function navigateTo (cyclomatic 31, cognitive 29) REDACTED:6667 — navigateTo has cyclomatic complexity 31 and cognitive complexity 29; 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 fetchDirs (cyclomatic 28, cognitive 31) · ×1
  • Complex function fetchDirs (cyclomatic 28, cognitive 31) REDACTED:6091 — fetchDirs has cyclomatic complexity 28 and cognitive complexity 31; 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 appendTokenUsage (cyclomatic 28, cognitive 30) · ×1
  • Complex function appendTokenUsage (cyclomatic 28, cognitive 30) REDACTED:5014 — appendTokenUsage has cyclomatic complexity 28 and cognitive complexity 30; 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 _docTypeIcon (cyclomatic 28, cognitive 20) · ×1
  • Complex function _docTypeIcon (cyclomatic 28, cognitive 20) lib/clacky/web/features/new-session/view.js:359 — _docTypeIcon has cyclomatic complexity 28 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 commitSearch (cyclomatic 26, cognitive 33) · ×1
  • Complex function commitSearch (cyclomatic 26, cognitive 33) REDACTED:3722 — commitSearch has cyclomatic complexity 26 and cognitive complexity 33; 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 _parseHash (cyclomatic 26, cognitive 28) · ×1
  • Complex function _parseHash (cyclomatic 26, cognitive 28) lib/clacky/web/app.js:171 — _parseHash has cyclomatic complexity 26 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function _saveModalModel (cyclomatic 25, cognitive 28) · ×1
  • Complex function _saveModalModel (cyclomatic 25, cognitive 28) lib/clacky/web/settings.js:540 — _saveModalModel has cyclomatic complexity 25 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function _renderPreview (cyclomatic 24, cognitive 21) · ×1
  • Complex function _renderPreview (cyclomatic 24, cognitive 21) lib/clacky/web/components/chat-navigator.js:174 — _renderPreview has cyclomatic complexity 24 and cognitive complexity 21; 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 _detailContent (cyclomatic 24, cognitive 20) · ×1
  • Complex function _detailContent (cyclomatic 24, cognitive 20) lib/clacky/web/features/extensions/view.js:526 — _detailContent has cyclomatic complexity 24 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 _handleKey (cyclomatic 23, cognitive 34) · ×1
  • Complex function _handleKey (cyclomatic 23, cognitive 34) lib/clacky/web/components/mentions.js:495 — _handleKey has cyclomatic complexity 23 and cognitive complexity 34; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 6488 lines of code REDACTED:1 — REDACTED has 6488 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/clacky/web/i18n.js · ×1
  • lib/clacky/web/i18n.js: 2879 lines of code lib/clacky/web/i18n.js:1 — lib/clacky/web/i18n.js has 2879 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/clacky/web/settings.js · ×1
  • lib/clacky/web/settings.js: 2806 lines of code lib/clacky/web/settings.js:1 — lib/clacky/web/settings.js has 2806 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/clacky/default_extensions/ext-studio/panels/studio/view.js · ×1
  • lib/clacky/default_extensions/ext-studio/panels/studio/view.js: 2208 lines of code lib/clacky/default_extensions/ext-studio/panels/studio/view.js:1 — lib/clacky/default_extensions/ext-studio/panels/studio/view.js has 2208 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/clacky/web/features/workspace/view.js · ×1
  • lib/clacky/web/features/workspace/view.js: 1739 lines of code lib/clacky/web/features/workspace/view.js:1 — lib/clacky/web/features/workspace/view.js has 1739 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/clacky/web/projects.js · ×1
  • lib/clacky/web/projects.js: 1048 lines of code lib/clacky/web/projects.js:1 — lib/clacky/web/projects.js has 1048 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/clacky/web/features/billing/view.js · ×1
  • lib/clacky/web/features/billing/view.js: 1005 lines of code lib/clacky/web/features/billing/view.js:1 — lib/clacky/web/features/billing/view.js has 1005 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/clacky/web/features/skills/view.js · ×1
  • lib/clacky/web/features/skills/view.js: 970 lines of code lib/clacky/web/features/skills/view.js:1 — lib/clacky/web/features/skills/view.js has 970 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/clacky/web/app.js · ×1
  • lib/clacky/web/app.js: 962 lines of code lib/clacky/web/app.js:1 — lib/clacky/web/app.js has 962 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/clacky/web/features/new-session/view.js · ×1
  • lib/clacky/web/features/new-session/view.js: 937 lines of code lib/clacky/web/features/new-session/view.js:1 — lib/clacky/web/features/new-session/view.js has 937 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/clacky/default_extensions/meeting/panels/meeting/view.js · ×1
  • lib/clacky/default_extensions/meeting/panels/meeting/view.js: 878 lines of code lib/clacky/default_extensions/meeting/panels/meeting/view.js:1 — lib/clacky/default_extensions/meeting/panels/meeting/view.js has 878 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/clacky/web/features/extensions/view.js · ×1
  • lib/clacky/web/features/extensions/view.js: 793 lines of code lib/clacky/web/features/extensions/view.js:1 — lib/clacky/web/features/extensions/view.js has 793 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/clacky/web/core/ext.js · ×1
  • lib/clacky/web/core/ext.js: 757 lines of code lib/clacky/web/core/ext.js:1 — lib/clacky/web/core/ext.js has 757 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/clacky/web/components/model-picker.js · ×1
  • lib/clacky/web/components/model-picker.js: 739 lines of code lib/clacky/web/components/model-picker.js:1 — lib/clacky/web/components/model-picker.js has 739 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/clacky/web/ws-dispatcher.js · ×1
  • lib/clacky/web/ws-dispatcher.js: 737 lines of code lib/clacky/web/ws-dispatcher.js:1 — lib/clacky/web/ws-dispatcher.js has 737 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/clacky/web/components/mentions.js · ×1
  • lib/clacky/web/components/mentions.js: 591 lines of code lib/clacky/web/components/mentions.js:1 — lib/clacky/web/components/mentions.js has 591 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/clacky/web/features/share/view.js · ×1
  • lib/clacky/web/features/share/view.js: 581 lines of code lib/clacky/web/features/share/view.js:1 — lib/clacky/web/features/share/view.js has 581 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/clacky/default_extensions/git/panels/git/view.js · ×1
  • lib/clacky/default_extensions/git/panels/git/view.js: 578 lines of code lib/clacky/default_extensions/git/panels/git/view.js:1 — lib/clacky/default_extensions/git/panels/git/view.js has 578 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/clacky/default_extensions/time_machine/panels/time_machine/view.js · ×1
  • lib/clacky/default_extensions/time_machine/panels/time_machine/view.js: 578 lines of code lib/clacky/default_extensions/time_machine/panels/time_machine/view.js:1 — lib/clacky/default_extensions/time_machine/panels/time_machine/view.js has 578 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · spec/support/workspace_tab_menu_test.js · ×1
  • spec/support/workspace_tab_menu_test.js: 566 lines of code spec/support/workspace_tab_menu_test.js:1 — spec/support/workspace_tab_menu_test.js has 566 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/clacky/web/skills.js · ×1
  • lib/clacky/web/skills.js: 535 lines of code lib/clacky/web/skills.js:1 — lib/clacky/web/skills.js has 535 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 526 lines of code REDACTED:1 — REDACTED has 526 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/clacky/web/components/onboard.js · ×1
  • lib/clacky/web/components/onboard.js: 500 lines of code lib/clacky/web/components/onboard.js:1 — lib/clacky/web/components/onboard.js has 500 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/clacky/web/components/chat-navigator.js · ×1
  • lib/clacky/web/components/chat-navigator.js: 499 lines of code lib/clacky/web/components/chat-navigator.js:1 — lib/clacky/web/components/chat-navigator.js has 499 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/clacky/web/features/trash/view.js · ×1
  • lib/clacky/web/features/trash/view.js: 489 lines of code lib/clacky/web/features/trash/view.js:1 — lib/clacky/web/features/trash/view.js has 489 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/clacky/web/features/channels/view.js · ×1
  • lib/clacky/web/features/channels/view.js: 468 lines of code lib/clacky/web/features/channels/view.js:1 — lib/clacky/web/features/channels/view.js has 468 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/clacky/web/features/extensions/store.js · ×1
  • lib/clacky/web/features/extensions/store.js: 462 lines of code lib/clacky/web/features/extensions/store.js:1 — lib/clacky/web/features/extensions/store.js has 462 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/clacky/web/features/tasks/view.js · ×1
  • lib/clacky/web/features/tasks/view.js: 458 lines of code lib/clacky/web/features/tasks/view.js:1 — lib/clacky/web/features/tasks/view.js has 458 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/clacky/default_extensions/advisor/panels/advisor/view.js · ×1
  • lib/clacky/default_extensions/advisor/panels/advisor/view.js: 435 lines of code lib/clacky/default_extensions/advisor/panels/advisor/view.js:1 — lib/clacky/default_extensions/advisor/panels/advisor/view.js has 435 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/clacky/default_extensions/preview/panels/preview/view.js · ×1
  • lib/clacky/default_extensions/preview/panels/preview/view.js: 430 lines of code lib/clacky/default_extensions/preview/panels/preview/view.js:1 — lib/clacky/default_extensions/preview/panels/preview/view.js has 430 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/clacky/web/components/code-editor.js · ×1
  • lib/clacky/web/components/code-editor.js: 406 lines of code lib/clacky/web/components/code-editor.js:1 — lib/clacky/web/components/code-editor.js has 406 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/clacky/web/components/composer.js · ×1
  • lib/clacky/web/components/composer.js: 405 lines of code lib/clacky/web/components/composer.js:1 — lib/clacky/web/components/composer.js has 405 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R7 · Dead Code · Dead file (~2415 LoC) · ×1
  • Dead file (~2415 LoC) lib/clacky/default_extensions/ext-studio/panels/studio/view.js — no import path from any entry point (56 application, 0 tooling, 21 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~966 LoC) · ×1
  • Dead file (~966 LoC) lib/clacky/default_extensions/meeting/panels/meeting/view.js — no import path from any entry point (56 application, 0 tooling, 21 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~643 LoC) · ×1
  • Dead file (~643 LoC) lib/clacky/default_extensions/time_machine/panels/time_machine/view.js — no import path from any entry point (56 application, 0 tooling, 21 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~636 LoC) · ×1
  • Dead file (~636 LoC) lib/clacky/default_extensions/git/panels/git/view.js — no import path from any entry point (56 application, 0 tooling, 21 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~479 LoC) · ×1
  • Dead file (~479 LoC) lib/clacky/default_extensions/advisor/panels/advisor/view.js — no import path from any entry point (56 application, 0 tooling, 21 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~475 LoC) · ×1
  • Dead file (~475 LoC) lib/clacky/default_extensions/preview/panels/preview/view.js — no import path from any entry point (56 application, 0 tooling, 21 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
S1 · Web-Security Posture · Third-party script without Subresource Integrity · ×1
  • Third-party script without Subresource Integrity lib/clacky/web/weixin-qr.html:139 — `https://cdn.jsdelivr.net/npm/qrcodejs@1.0.0/qrcode.min.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session.
SC1 · Supply-chain hygiene · JavaScript dependencies are not locked · ×1
  • JavaScript dependencies are not locked — No package-lock.json / yarn.lock / pnpm-lock.yaml / bun.lock — JS installs aren't reproducible (SSDF PW.4.4). Commit your package manager's lockfile and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
X13 · Undrained process stream · Redirected process stream is never drained (deadlock) · ×1
  • Redirected process stream is never drained (deadlock) lib/clacky/mcp/stdio_transport.rb:37 — `Open3.popen3` always pipes both `stdout` and `stderr`, and here `@stderr` (its stderr) is read to its end — but nothing in this scope ever reads `@stdout` (its stdout). A read to the end returns only at EOF, which the child cannot reach once it fills the unread stdout pipe and blocks on the write (measured with Ruby 3.4 on Linux: 10 bytes finishes, 60 KB hangs forever). Ruby's own Open3 documentation names this deadlock. Use `Open3.capture3`, which drains both, read the two together (a thread per stream, or `IO.select`), or stop piping the one you do not want — `Open3.popen2` leaves stderr to the parent and `Open3.popen2e` merges it into stdout.
Minor — 130 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×25
  • Duplicated predicate lib/clacky/web/features/archive/view.js:249 — `!dropdown || dropdown.dataset.built === "1"` appears character-identically in 2 files — lib/clacky/web/features/archive/view.js, lib/clacky/web/features/trash/view.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/clacky/web/features/extensions/view.js:310 — `!e.target.closest(".ext-row-more") && !e.target.closest(".ext-row-menu")` appears character-identically in 2 files — lib/clacky/web/features/extensions/view.js, lib/clacky/web/features/skills/view.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/clacky/default_extensions/ext-studio/panels/studio/view.js:437 — `(typeof I18n !== "undefined" && I18n.lang && I18n.lang()) || "en"` appears character-identically in 2 files — lib/clacky/default_extensions/ext-studio/panels/studio/view.js, lib/clacky/default_extensions/meeting/panels/meeting/view.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/clacky/web/features/extensions/view.js:264 — `_menuBtn === btn && _menuEl && !_menuEl.hidden` appears character-identically in 4 files — lib/clacky/web/features/extensions/view.js, lib/clacky/web/features/mcp/view.js, lib/clacky/web/features/skills/view.js, lib/clacky/web/features/tasks/view.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/clacky/default_extensions/ext-studio/panels/studio/view.js:707 — `data.verification_uri_complete || data.verification_uri` appears character-identically in 2 files — lib/clacky/default_extensions/ext-studio/panels/studio/view.js, lib/clacky/web/components/onboard.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/clacky/default_extensions/git/panels/git/view.js:117 — `k.startsWith("on") && typeof v === "function"` appears character-identically in 3 files — lib/clacky/default_extensions/git/panels/git/view.js, lib/clacky/default_extensions/preview/panels/preview/view.js, lib/clacky/default_extensions/time_machine/panels/time_machine/view.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/clacky/web/features/skills/store.js:93 — `lower.includes("timeout") || lower.includes("network error") || lower.includes("execution expired") || lower.includes("failed to open")` appears character-identically in 2 files — lib/clacky/web/features/skills/store.js, lib/clacky/web/settings.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/clacky/web/app.js:560 — `overlay.parentNode !== document.body || overlay.nextSibling` appears character-identically in 2 files — lib/clacky/web/app.js, lib/clacky/web/projects.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/clacky/default_extensions/git/panels/git/view.js:161 — `releaseAsideWidth || !window.Clacky || !Clacky.Aside || !Clacky.Aside.requestWidth` appears character-identically in 2 files — lib/clacky/default_extensions/git/panels/git/view.js, lib/clacky/web/features/workspace/view.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/clacky/web/components/composer.js:227 — `sel && sel.rangeCount && el.contains(sel.anchorNode)` appears character-identically in 2 files — lib/clacky/web/components/composer.js, lib/clacky/web/components/quote-select.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/clacky/web/components/onboard.js:232 — `translated && translated !== v.label_key` appears character-identically in 2 files — lib/clacky/web/components/onboard.js, lib/clacky/web/settings.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/clacky/web/features/version/view.js:146 — `typeof Brand !== "undefined" && Brand.branded` appears character-identically in 2 files — lib/clacky/web/features/version/view.js, lib/clacky/web/settings.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/clacky/web/features/archive/view.js:64 — `typeof Projects !== "undefined" && Projects.all` appears character-identically in 2 files — lib/clacky/web/features/archive/view.js, lib/clacky/web/features/new-session/view.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/clacky/default_extensions/advisor/panels/advisor/view.js:210 — `window.Clacky && Clacky.Modal && Clacky.Modal.toast` appears character-identically in 2 files — lib/clacky/default_extensions/advisor/panels/advisor/view.js, lib/clacky/default_extensions/ext-studio/panels/studio/view.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/clacky/ui2/layout_manager.rb:680 — `(code >= 0x1100 && code <= 0x115F) || (code >= 0x2329 && code <= 0x232A) || (code >= 0x2E80 && code <= 0x303E) || (code >= 0x3040 && code <=…` appears character-identically in 2 files — lib/clacky/ui2/layout_manager.rb, lib/clacky/ui2/line_editor.rb. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/clacky/ui2/components/input_area.rb:1118 — `@cursor_position == segment_end && segment_end == line.length` appears character-identically in 2 files — lib/clacky/ui2/components/input_area.rb, lib/clacky/ui2/line_editor.rb. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/clacky/ui2/components/input_area.rb:418 — `@cursor_position >= segment[:end] && idx == wrapped_segments.size - 1` appears character-identically in 2 files — lib/clacky/ui2/components/input_area.rb, lib/clacky/ui2/line_editor.rb. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/clacky/ui2/components/input_area.rb:414 — `@cursor_position >= segment[:start] && @cursor_position < segment[:end]` appears character-identically in 2 files — lib/clacky/ui2/components/input_area.rb, lib/clacky/ui2/line_editor.rb. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/clacky/ui2/components/input_area.rb:1109 — `@cursor_position >= segment_start && @cursor_position < segment_end` appears character-identically in 2 files — lib/clacky/ui2/components/input_area.rb, lib/clacky/ui2/line_editor.rb. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/clacky/agent_profile.rb:184 — `File.exist?(user_path) && !File.zero?(user_path)` appears character-identically in 2 files — lib/clacky/agent_profile.rb, lib/clacky/server/http_server.rb. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/clacky/agent/message_compressor_helper.rb:437 — `MessageFormat::OpenAI.tool_result_message?(msg) || MessageFormat::Anthropic.tool_result_message?(msg)` appears character-identically in 2 files — lib/clacky/agent/message_compressor_helper.rb, lib/clacky/message_history.rb. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/clacky/plain_ui_controller.rb:30 — `args_data[:context] || args_data["context"]` appears character-identically in 3 files — lib/clacky/plain_ui_controller.rb, lib/clacky/server/channel/channel_ui_controller.rb, lib/clacky/server/web_ui_controller.rb. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/clacky/utils/parser_manager.rb:83 — `basename.start_with?(".") || basename.end_with?(".bak")` appears character-identically in 2 files — lib/clacky/utils/parser_manager.rb, lib/clacky/utils/searcher_manager.rb. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/clacky/message_format/anthropic.rb:426 — `block.dig(:image_url, :url) || block[:url]` appears character-identically in 2 files — lib/clacky/message_format/anthropic.rb, lib/clacky/message_format/bedrock.rb. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/clacky/agent/history_navigation.rb:220 — `block.is_a?(Hash) && %w[image image_url].include?((block[:type] || block["type"]).to_s)` appears character-identically in 2 files — lib/clacky/agent/history_navigation.rb, lib/clacky/agent/message_compressor_helper.rb. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
D29 · Static Analysis (SAST) · REDACTED · ×22
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
X7 · Silent fallback defaults · Silent fallback default in rescue · ×19
  • Silent fallback default in rescue lib/clacky/agent/skill_manager.rb:542 — `parse_memory_frontmatter` rescues every error into `{}` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the rescue or above the method, and the row stops firing.
  • Silent fallback default in rescue lib/clacky/agent/time_machine.rb:550 — `read_text_safe` rescues every error into `""` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the rescue or above the method, and the row stops firing.
  • Silent fallback default in rescue REDACTED:973 — `installed_brand_extensions` rescues every error into `{}` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the rescue or above the method, and the row stops firing.
  • Silent fallback default in rescue REDACTED:1609 — `installed_brand_skills` rescues every error into `{}` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the rescue or above the method, and the row stops firing.
  • Silent fallback default in rescue REDACTED:1629 — `load_upload_meta` rescues every error into `{}` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the rescue or above the method, and the row stops firing.
  • Silent fallback default in rescue lib/clacky/default_skills/onboard/scripts/import_external_skills.rb:152 — `read_description` rescues every error into `'No description'` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the rescue or above the method, and the row stops firing.
  • Silent fallback default in rescue lib/clacky/default_skills/skill-add/scripts/install_from_zip.rb:245 — `extract_description` rescues every error into `"No description"` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the rescue or above the method, and the row stops firing.
  • Silent fallback default in rescue lib/clacky/extension/loader.rb:247 — `read_switch_state` rescues every error into `{}` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the rescue or above the method, and the row stops firing.
  • Silent fallback default in rescue lib/clacky/extension/packager.rb:344 — `manifest_id` rescues every error into `""` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the rescue or above the method, and the row stops firing.
  • Silent fallback default in rescue lib/clacky/proxy_config.rb:60 — `load_proxy_url` rescues every error into `""` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the rescue or above the method, and the row stops firing.
  • Silent fallback default in rescue lib/clacky/rich_ui/rich_ui_controller.rb:750 — `terminal_width` rescues every error into `120` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the rescue or above the method, and the row stops firing.
  • Silent fallback default in rescue REDACTED:189 — `load_raw` rescues every error into `{}` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the rescue or above the method, and the row stops firing.
  • Silent fallback default in rescue lib/clacky/server/http_server.rb:2982 — `fetch_batch_market_data` rescues every error into `{}` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the rescue or above the method, and the row stops firing.
  • Silent fallback default in rescue lib/clacky/server/http_server.rb:2998 — `installed_extension_containers` rescues every error into `{}` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the rescue or above the method, and the row stops firing.
  • Silent fallback default in rescue lib/clacky/tools/browser.rb:707 — `extract_snapshot` rescues every error into `{}` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the rescue or above the method, and the row stops firing.
  • Silent fallback default in rescue lib/clacky/tools/grep.rb:309 — `search_file` rescues every error into `[]` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the rescue or above the method, and the row stops firing.
  • Silent fallback default in rescue lib/clacky/tools/terminal.rb:1390 — `log_size` rescues every error into `0` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the rescue or above the method, and the row stops firing.
  • Silent fallback default in rescue lib/clacky/tools/trash_manager.rb:315 — `_dir_size` rescues every error into `0` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the rescue or above the method, and the row stops firing.
  • Silent fallback default in rescue lib/clacky/tools/trash_manager.rb:365 — `cleanup_files_trash` rescues every error into `0` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the rescue or above the method, and the row stops firing.
X6 · Hand-rolled structured-format parsing · Hand-rolled JSON/XML parsing via regex · ×15
  • Hand-rolled JSON/XML parsing via regex REDACTED:565 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Ruby code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex REDACTED:570 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Ruby code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex REDACTED:571 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Ruby code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex REDACTED:572 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Ruby code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex REDACTED:573 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Ruby code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex REDACTED:574 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Ruby code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex lib/clacky/agent/message_compressor.rb:140 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Ruby code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex lib/clacky/default_extensions/advisor/hooks/advisor.rb:43 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Ruby code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex lib/clacky/tools/web_search.rb:263 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Ruby code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex lib/clacky/tools/web_search.rb:264 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Ruby code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex lib/clacky/tools/web_search.rb:353 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Ruby code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex lib/clacky/tools/web_search.rb:360 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Ruby code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex lib/clacky/tools/web_search.rb:370 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Ruby code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex lib/clacky/tools/web_search.rb:371 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Ruby code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex lib/clacky/tools/web_fetch.rb:193 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Ruby code already uses a real parser in the same package; use it here too.
M4 · Documentation accuracy · README/code drift · ×7
  • README/code drift docs/engineering-article.md:314 — docs/engineering-article.md names `benchmark/runner.rb`, but no file or folder `benchmark/runner.rb` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/mcp-architecture.md:89 — docs/mcp-architecture.md names `lib/clacky/tools/mcp_call.rb`, but no file or folder `lib/clacky/tools/mcp_call.rb` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/rich_ui_guide.md:96 — docs/rich_ui_guide.md names `extensions/viewport_selection.rb`, but no file or folder `extensions/viewport_selection.rb` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/rich_ui_guide.md:104 — docs/rich_ui_guide.md names `extensions/markdown_table_adapter.rb`, but no file or folder `extensions/markdown_table_adapter.rb` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/rich_ui_guide.md:219 — docs/rich_ui_guide.md names `extensions/transcript_plain.rb`, but no file or folder `extensions/transcript_plain.rb` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/rich_ui_refactor_plan.md:130 — docs/rich_ui_refactor_plan.md names `lib/clacky/rich_ui/extensions/viewport_selection.rb`, but no file or folder `lib/clacky/rich_ui/extensions/viewport_selection.rb` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/rich_ui_refactor_plan.md:151 — docs/rich_ui_refactor_plan.md names `extensions/markdown_table_adapter.rb`, but no file or folder `extensions/markdown_table_adapter.rb` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
X7 · Silent fallback defaults · Silent fallback default on parse failure · ×7
  • Silent fallback default on parse failure REDACTED:369 — `parse_annotations` answers `[]` when `ParserError` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the rescue or above the method, and the row stops firing.
  • Silent fallback default on parse failure lib/clacky/media/dashscope.rb:591 — `endpoint_base` answers `"https://dashscope.aliyuncs.com"` when `InvalidURIError` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the rescue or above the method, and the row stops firing.
  • Silent fallback default on parse failure lib/clacky/media/volcengine.rb:378 — `endpoint_base` answers `"https://ark.cn-beijing.volces.com"` when `InvalidURIError` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the rescue or above the method, and the row stops firing.
  • Silent fallback default on parse failure lib/clacky/rich_ui/view_renderer.rb:79 — `normalize_tool_args` answers `{}` when `ParserError` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the rescue or above the method, and the row stops firing.
  • Silent fallback default on parse failure lib/clacky/server/http_server.rb:1215 — `parse_exchange_rate_date` answers `""` when `ArgumentError` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the rescue or above the method, and the row stops firing.
  • Silent fallback default on parse failure lib/clacky/server/http_server.rb:8684 — `parse_json_body` answers `{}` when `ParserError` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the rescue or above the method, and the row stops firing.
  • Silent fallback default on parse failure lib/clacky/server/scheduler.rb:255 — `load_runs` answers `[]` when `ParserError` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the rescue or above the method, and the row stops firing.
D34 · Knowledge Freshness · Orphaned file · ×5
  • Orphaned file lib/clacky/rich_ui/components/dialogs/approval_dialog.rb:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file lib/clacky/rich_ui/components/dialogs/form_dialog.rb:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file lib/clacky/rich_ui/components/sidebar.rb:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file lib/clacky/rich_ui/components/sidebar_panels.rb:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file lib/clacky/rich_ui/components/dialogs/config_menu_dialog.rb:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
X23 · Unguarded diagnostic materialisation · Diagnostic log message is built whether or not it is wanted · ×4
  • Diagnostic log message is built whether or not it is wanted REDACTED:138 — `debug` at line 138 is called with an argument built by `item.to_json` (line 138), whose cost grows with the collection it walks. Ruby evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `debug?` test, no debug flag, no block the logger calls only when the level is on.
  • Diagnostic log message is built whether or not it is wanted REDACTED:236 — `debug` at line 236 is called with an argument built by `upload_resp.to_json` (line 236), whose cost grows with the collection it walks. Ruby evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `debug?` test, no debug flag, no block the logger calls only when the level is on.
  • Diagnostic log message is built whether or not it is wanted lib/clacky/server/channel/adapters/weixin/adapter.rb:390 — `debug` at line 390 is called with an argument built by `item_list.to_json` (line 390), whose cost grows with the collection it walks. Ruby evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `debug?` test, no debug flag, no block the logger calls only when the level is on.
  • Diagnostic log message is built whether or not it is wanted lib/clacky/server/channel/adapters/weixin/adapter.rb:479 — `debug` at line 479 is called with an argument built by `effective_cdn_media.to_json` (line 479), whose cost grows with the collection it walks. Ruby evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `debug?` test, no debug flag, no block the logger calls only when the level is on.
D16 · Bus Factor · Off-boarding risk · ×3
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 53 significant file(s) lose their only recent owner: lib/clacky/agent/skill_manager.rb, lib/clacky/ui2/layout_manager.rb, lib/clacky/agent/tool_executor.rb, REDACTED, lib/clacky/server/scheduler.rb, lib/clacky/server/browser_manager.rb, lib/clacky/ui2/progress_handle.rb, REDACTED (+45 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 6 significant file(s) lose their only recent owner: REDACTED, lib/clacky/server/preview.rb, REDACTED, lib/clacky/server/dir_picker.rb, lib/clacky/server/project_manager.rb, REDACTED. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 3 significant file(s) lose their only recent owner: lib/clacky/media/dashscope.rb, lib/clacky/agent/history_navigation.rb, lib/clacky/agent/chunk_index.rb. Pair on, review, or document these before any departure.
D19 · Documentation Quality · Documentation · ×3
  • Documentation: no project overview README.md — The opening paragraph is the project's value proposition ('OpenClacky matches Claude Code on capability at comparable cost...') and an overview of why it exists, but no actual document states what the project does or what it contains. Add a one-paragraph overview section describing each core feature (skills, memory, sub-agents, browser automation) so readers can judge for themselves.
  • Documentation: contradicts the code docs/engineering-article.md — The engineering article describes an architecture that is no longer valid — the first two generations of agent design are long gone, and the seven-engineering-decisions section references a non-existent Decision 7. Update the document to reflect the current state of each decision.
  • Documentation: no project overview docs/session-observation-hooks.md — The document describes task lifecycle hooks but does not explain what an observer hook or session hook actually does. Add a short overview of each hook type and its purpose so readers can determine which ones apply to their use case.
IC1 · Incompleteness & stubs · Disabled test · ×2
  • Disabled test spec/clacky/rich_ui_controller_spec.rb:8 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test spec/clacky/server/http_server_preview_spec.rb:284 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
X7 · Silent fallback defaults · Silent fallback default in catch · ×2
  • Silent fallback default in catch lib/clacky/web/core/aside.js:47 — `currentWidth` swallows every exception into `return 0` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch REDACTED:6053 — `loadDirectoryFavorites` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 1 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (63 single-owned of 215 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 215 of the 279 production source files in this repository met that bar). They are anonymized user #4 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: lib/clacky/default_skills/channel-manager/import_lark_skills.rb.
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 `(repository root)` (114313 LoC, 840 module-visible types across 58 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.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D34 · Knowledge Freshness · Orphaned files with no living knowledge · ×1
  • Orphaned files with no living knowledge — 5 of 215 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 215 of the 279 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: lib/clacky/rich_ui/components/dialogs/approval_dialog.rb, lib/clacky/rich_ui/components/dialogs/form_dialog.rb, lib/clacky/rich_ui/components/sidebar.rb, lib/clacky/rich_ui/components/sidebar_panels.rb, lib/clacky/rich_ui/components/dialogs/config_menu_dialog.rb. Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
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.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 1/2 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST — No static application security testing detected. For this repository's stack, add brakeman for Rails apps, otherwise `semgrep --config=auto` or CodeQL's ruby pack as a CI step. What was searched, so you can tell an absence from a miss: the 5062 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
X2 · Cancellation propagation · Not all async functions that make a request accept an AbortSignal · ×1
  • Not all async functions that make a request accept an AbortSignal — Only 5/167 async functions that make a cancellable request (fetch, axios, ky, ofetch) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
X5 · Nullable reference types · Ruby's type checker does not check nil everywhere · ×1
  • Ruby's type checker does not check nil everywhere — This repository commits no Sorbet configuration (`sorbet/config`) and no `Steepfile`, so nothing type-checks its 263 Ruby product file(s): a nilable value reaches a method call silently and raises `NoMethodError: undefined method … for nil` the first time it is nil. A `# typed:` sigil does nothing without a `sorbet/config` beside the code; a Steep run configured only on a command line is not something this check can read.
X7 · Silent fallback defaults · Silent fallback default on lookup miss · ×1
  • Silent fallback default on lookup miss lib/clacky/agent/chunk_index.rb:20 — `chunk_file_version` answers `"missing"` when `ENOENT` is raised, with no log or raise — a missing file, record or key silently becomes that value. Log the miss or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the rescue or above the method, and the row stops firing.
X9 · Subsumed condition operand · Subsumed condition operand · ×1
  • Subsumed condition operand lib/clacky/web/features/new-session/view.js:363 — `lower.endsWith(".tar.gz")` can never decide this `||` — every value satisfying `lower.endsWith(".tar.gz")` also satisfies `lower.endsWith(".gz")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Minor — 1 finding(s)
D12 · Dependency Hygiene · Outdated · ×1
  • Outdated: rubocop — `rubocop` is resolved to 1.50.2 in the committed REDACTED but 1.92.0 is the current release on rubygems.org, and it already satisfies the `"~> 1.21"` requirement declared in Gemfile — so the lockfile is behind this repository's own declared range. This build is therefore missing every fix published since, including any security fix. Run `bundle update rubocop` and commit the updated REDACTED.

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-018f764791ae41fc87dcdfda827d7fa0/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-018f764791ae41fc87dcdfda827d7fa0/tree.json --exit-code 0 --source .0artifacts/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 .71artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm .2artifacts/raw/osv-scanner.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .6artifacts/raw/trivy-config.json
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.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 Dependenciesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm .0artifacts/raw/osv-scanner.json

Run 01a15d37-a4e7-73ab-8960-ed75ce176699 · 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