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

Tailcallhq/forgecode

Measured 29 September 2026, 12:11 UTC

46% Weak
CriticalWeakAdequateStrongExemplary

Large · 116,552 LoC · 25 projects · rebuild ~0.7 person-years · weakest lens: Accessibility (30%)

Findings by grade

64 critical 292 serious 14 minor 52 could not be resolved — could be critical — see Limitations

This survey was produced by

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
29 September 2026, 12:11 UTC

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

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

42/47dimensions tool-verifieddeterministic · confidence 1.0 · 5 LLM-assisted, advisory
335findings with an exact file:lineof 370 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
47/127dimensions across the health lenses116552 LoC · 25 projects — wide & deep
Chapters

Executive summary

This large-scale asset, representing significant investment with a rebuild cost of approximately €110,000, currently operates at a weak overall standing of 46%. While the underlying code is robust and the architecture is sound, the system carries real business risk due to critical gaps in accessibility and maturity. The high confidence in this assessment means these findings are reliable and actionable, not speculative.

The most pressing issue is accessibility compliance, which sits at a dangerously low 30%. For a system of this size, this is not just a technical debt item but a legal and reputational liability. The current server-side rendering approach bypasses standard automated checks, leaving the team blind to user experience failures. Remediation here offers the highest leverage: fixing focus styles, respecting reduced-motion preferences, and improving color contrast can mitigate exposure without requiring a full rewrite. Ignoring this risks exclusion of users and potential regulatory penalties.

A secondary concern is operational maturity, rated at 44%. Although the code health and architecture are strong, the system lacks the documentation and testing rigor needed for a new team to maintain it safely. This creates a bottleneck where changes become slow and risky, increasing long-term maintenance costs. The low test-to-production code ratio further amplifies this, suggesting that regression bugs are more likely to slip through. Strengthening the toolchain to include accessibility checks in CI would address both maturity and compliance simultaneously.

What is genuinely good is the solid foundation of the codebase. The architecture is clean, and the domain modeling is excellent, meaning the core logic is stable and understandable. This strength provides a safe platform for targeted improvements. The best first step is to enforce accessibility standards in the development pipeline, ensuring that future changes do not degrade user experience. This focused effort protects the business value while leveraging the existing technical strength.

How the score is built — each lens's share of the headline Width is the lens's weight in the worst-heaviest fold (the weakest area pulls hardest); colour is that lens's own band. A lens fixes the score in proportion to its width.
Accessibility 30% · 45% weightMaturity 44% · 25% weightSecurity 57% · 14% weightReadiness 85% · 8% weightPerformance 85% · 4% weightCode Health 87% · 2% weightDomain Modelling 90% · 1% weightArchitecture 94% · 1% weightEvent Sourcing 100% · 0% weight

Raise Accessibility 30 → 70 (the Healthy floor) ⇒ headline 46 → ~58.

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

25 finding(s) are new versus the previous scan (2026-09-13) — surfaced by this scheduled scan itself, no pull request required.

  • D4 · Members sharing a duplicated core (4 members, 50+ identical tokens) crates/forge_repo/src/provider/anthropic.rs
  • D5 · Unstable project forge_api
  • D5 · Unstable project forge_infra
  • D5 · Unstable project forge_repo
  • D5 · Off the main sequence: forge_display
  • D5 · Off the main sequence: forge_json_repair
  • D5 · Off the main sequence: forge_select
  • D5 · Off the main sequence: forge_stream
  • D5 · Off the main sequence: forge_walker
  • D5 · Off the main sequence: forge_config
  • D5 · Off the main sequence: forge_fs
  • D5 · Off the main sequence: forge_eventsource_stream
  • D6 · Low cohesion: Context (LCOM4 4) crates/forge_domain/src/context.rs
  • D17 · TodoComment crates/forge_app/src/user_prompt.rs
  • D22 · Duplicate intent: Both methods appear to retrieve the list of available tools. The naming convention differs ('get' vs 'list') and they reside in different service layers (API vs App), suggesting a lack of clear separation of concerns or a redundant wrapper.
  • D22 · Duplicate intent: Both methods retrieve the list of available models. Similar to the tools issue, this duplication across API and App layers without clear distinction in signature or naming is inconsistent.
  • D22 · Duplicate intent: Both methods retrieve all provider-specific models. The identical naming across different types suggests a copy-paste pattern or lack of abstraction, but the existence of both implies potential redundancy or unclear ownership.
  • D22 · Inconsistent naming and signature for shell execution: The API exposes `execute_shell_command` and `execute_shell_command_raw`, while the underlying infrastructure exposes `execute_command` and `execute_command_raw`. The 'shell' prefix is inconsistent between layers. Additionally, the parameters differ significantly (API uses `working_dir` and no `env_vars` explicitly in the raw version, while Infra uses `env_vars` and `silent`), making the mapping unclear.
  • D22 · Duplicate intent: Both methods retrieve agent information. The API layer duplicates the repository method without a clear differentiator in the signature (both return generic Result).
  • D22 · Duplicate intent: Both methods resolve the provider for a given agent. The API layer duplicates the resolver's functionality.
  • D22 · Inconsistent return types for similar operations: `API.get_agent_model` returns `ModelId` directly, while `AgentProviderResolver.get_model` returns `Result`. This inconsistency in error handling (one throws/panics on failure, the other returns a Result) is confusing for API consumers.
  • D30 · REDACTED
  • D30 · REDACTED
  • D30 · REDACTED
  • PF3 · Sync-over-async blocking benchmarks/evals/semantic_search_quality/llm_judge.ts

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

Rebuild cost & value ~ Modeled — €35,000–€180,000
Cost to rebuild€35,000–€180,000 (0.4–1.1 person-years (590–1,871 h), ~1–2 engineers)
Domain complexityStandard — harder problems cost more per line
Quality factor0.7× (at 46% quality) — the last 20% of quality is most of the work
Size & shapeLarge · effort split not classified (source measured from disk; the effort-tier breakdown is a C#-only syntax walk)

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

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

Top priorities

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

1
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.
+13.4 pts · Medium effort · Visual & motion safety
2
Enforce accessibility in the toolchain: add an accessibility check that can read your UI — no component framework was detected and your pages are rendered by server-side templates, which neither the JSX/Vue ESLint plugins nor the HTML-template linters can parse; run axe/pa11y over the rendered pages, or assert the accessibility invariants over that rendered HTML in the test suite you already have, then assert with your test runner's axe binding (jest-axe, vitest-axe, cypress-axe or @axe-core/playwright) in tests, then gate axe/pa11y/Lighthouse in CI.
+13.3 pts · Medium effort · A11y enforcement
3
Resolve the 1 No ADRs found finding(s) in ADR Quality.
+6.0 pts · Low effort · ADR Quality

Diagnosis — what's actually going on

Value concentrated against a weak lens · High · Value at risk
This is a Large asset (~0.7 person-years to rebuild), and its weakest lens is Accessibility at 30%. The operational and business risk on an asset this size concentrates there — that's where remediation buys the most protection.
Evidence: valuation: Large, ~0.7 person-years rebuild (116,552 LoC) · weakest lens: Accessibility 30%
→ Direct remediation budget at Accessibility first — highest risk-reduction per euro on an asset this size.
Highest-leverage move · Medium · Leverage
Of everything flagged, the best return on effort is: 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. The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ 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.

Architecture — module dependency graph

Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways — a layering smell or cycle. A clean layered graph has none.

arch forge_api forge_api forge_app forge_app forge_api->forge_app forge_config forge_config forge_api->forge_config forge_domain forge_domain forge_api->forge_domain forge_infra forge_infra forge_api->forge_infra forge_repo forge_repo forge_api->forge_repo forge_services forge_services forge_api->forge_services forge_stream forge_stream forge_api->forge_stream forge_app->forge_config forge_display forge_display forge_app->forge_display forge_app->forge_domain forge_embed forge_embed forge_app->forge_embed forge_eventsource forge_eventsource forge_app->forge_eventsource forge_json_repair forge_json_repair forge_app->forge_json_repair forge_app->forge_stream forge_template forge_template forge_app->forge_template forge_config->forge_domain forge_domain->forge_json_repair forge_domain->forge_template forge_eventsource_stream forge_eventsource_stream forge_eventsource->forge_eventsource_stream forge_fs forge_fs forge_fs->forge_domain forge_infra->forge_app forge_infra->forge_config forge_infra->forge_domain forge_infra->forge_eventsource forge_infra->forge_fs forge_select forge_select forge_infra->forge_select forge_infra->forge_services forge_snaps forge_snaps forge_infra->forge_snaps forge_main forge_main forge_main->forge_api forge_main->forge_app forge_main->forge_config forge_main->forge_display forge_main->forge_domain forge_main->forge_embed forge_main->forge_fs forge_main->forge_select forge_spinner forge_spinner forge_main->forge_spinner forge_tracker forge_tracker forge_main->forge_tracker forge_repo->forge_app forge_repo->forge_config forge_repo->forge_domain forge_repo->forge_eventsource forge_repo->forge_eventsource_stream forge_repo->forge_fs forge_repo->forge_infra forge_repo->forge_json_repair forge_repo->forge_snaps forge_repo->forge_template forge_services->forge_app forge_services->forge_config forge_services->forge_domain forge_services->forge_eventsource forge_services->forge_fs forge_services->forge_snaps forge_services->forge_stream forge_snaps->forge_domain forge_snaps->forge_fs forge_spinner->forge_domain forge_tracker->forge_domain __more__ +5 more projects

Architecture — module dependency matrix

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

400 modules, 907 dependencies. 5 dependency cycles across 47 modules, marked above the diagonal.

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

Module dependency matrix. The row depends on the column; the number is how many type pairs create the dependency. A cell above the diagonal is part of a dependency cycle.
depends on →1 forge_app.dto.anthropic.error2 forge_config.config3 forge_domain.auth.auth_method4 forge_domain.auth.new_types5 forge_domain.env6 forge_domain.mcp7 forge_domain.transformer8 forge_app.dto.google.response9 forge_domain.conversation10 forge_domain.node11 forge_domain.tools.definition.name12 forge_domain.auth.credentials13 forge_domain.event14 forge_domain.tools.catalog15 forge_domain.tools.call.tool_call16 forge_domain.tools.result17 forge_repo.conversation.conversation_record18 forge_domain.message19 forge_domain.model20 forge_app.dto.openai.request21 forge_domain.context22 forge_app.dto.anthropic.request23 forge_app.dto.anthropic.response24 forge_domain.auth.auth_context25 forge_domain.provider26 forge_main.info27 forge_app.infra28 forge_domain.agent29 forge_domain.repo30 forge_api.api31 forge_app.services32 forge_app.tool_registry33 forge_domain.hook34 forge_infra.forge_infra35 forge_main.ui36 forge_repo.forge_repo37 forge_api.forge_api38 forge_app.orch_spec.orch_setup39 forge_services.forge_services40 forge_app.orch_spec.orch_runner
1 forge_app.dto.anthropic.error
2 forge_config.config
3 forge_domain.auth.auth_method
4 forge_domain.auth.new_types
5 forge_domain.env
6 forge_domain.mcp
7 forge_domain.transformer
8 forge_app.dto.google.response112
9 forge_domain.conversation131
10 forge_domain.node1
11 forge_domain.tools.definition.name1
12 forge_domain.auth.credentials411
13 forge_domain.event21
14 forge_domain.tools.catalog1221
15 forge_domain.tools.call.tool_call312
16 forge_domain.tools.result11123
17 forge_repo.conversation.conversation_record1111231531
18 forge_domain.message211117
19 forge_domain.model1
20 forge_app.dto.openai.request121125
21 forge_domain.context1223623142
22 forge_app.dto.anthropic.request112
23 forge_app.dto.anthropic.response11
24 forge_domain.auth.auth_context811
25 forge_domain.provider1211
26 forge_main.info12112
27 forge_app.infra11311111
28 forge_domain.agent112111
29 forge_domain.repo121112
30 forge_api.api1222111111
31 forge_app.services112211311111411
32 forge_app.tool_registry11111111
33 forge_domain.hook421111
34 forge_infra.forge_infra11121114
35 forge_main.ui111321113411
36 forge_repo.forge_repo122121112169
37 forge_api.forge_api112221111111
38 forge_app.orch_spec.orch_setup111111211
39 forge_services.forge_services2128
40 forge_app.orch_spec.orch_runner1211111111141
Dependency, pointing down the layeringAbove the diagonal — part of a cycleThe module itself
…p.dto.anthropic.errorforge_config.config…main.auth.auth_method…domain.auth.new_typesforge_domain.envforge_domain.mcp…ge_domain.transformer…p.dto.google.response…e_domain.conversationforge_domain.node…tools.definition.name…main.auth.credentialsforge_domain.event…_domain.tools.catalog….tools.call.tool_call…e_domain.tools.result…n.conversation_recordforge_domain.messageforge_domain.model…pp.dto.openai.requestforge_domain.context…dto.anthropic.request…to.anthropic.response…ain.auth.auth_contextforge_domain.providerforge_main.infoforge_app.infraforge_domain.agentforge_domain.repoforge_api.apiforge_app.services…rge_app.tool_registryforge_domain.hook…rge_infra.forge_infraforge_main.uiforge_repo.forge_repoforge_api.forge_api….orch_spec.orch_setup…rvices.forge_services…orch_spec.orch_runner…p.dto.anthropic.error1forge_config.config2…main.auth.auth_method3…domain.auth.new_types4forge_domain.env5forge_domain.mcp6…ge_domain.transformer7…p.dto.google.response8…e_domain.conversation9forge_domain.node10…tools.definition.name11…main.auth.credentials12forge_domain.event13…_domain.tools.catalog14….tools.call.tool_call15…e_domain.tools.result16…n.conversation_record17forge_domain.message18forge_domain.model19…pp.dto.openai.request20forge_domain.context21…dto.anthropic.request22…to.anthropic.response23…ain.auth.auth_context24forge_domain.provider25forge_main.info26forge_app.infra27forge_domain.agent28forge_domain.repo29forge_api.api30forge_app.services31…rge_app.tool_registry32forge_domain.hook33…rge_infra.forge_infra34forge_main.ui35forge_repo.forge_repo36forge_api.forge_api37….orch_spec.orch_setup38…rvices.forge_services39…orch_spec.orch_runner40112131114112112213121112311112315312111171121125122362314211211811121112112113111111121111211121222111111112211311111411111111114211111112111411132111341112212111216911222111111111111121121281211111111141+360 more modules (most-connected shown)

At a glance — Code Health · 87% · Strong ·

At a glance — Architecture · 94% · Exemplary ·

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

At a glance — Readiness · 85% · Strong ·

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

At a glance — Domain Modelling · 90% · Strong ·

At a glance — Event Sourcing · 100% · Exemplary ·

At a glance — Accessibility · 30% · Weak · gated by AC6 ·

At a glance — Performance · 85% · Strong ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A03:2021 — Injection57High / Critical
A06:2021 — Vulnerable & Outdated Components20High / Critical

Roadmap

First, address visual and motion safety by ensuring visible focus styles, respecting reduced motion preferences, and fixing low-contrast colors. Next, enforce accessibility in the toolchain by integrating automated checks like axe into your test suite and CI pipeline, as current server-side rendering prevents standard linting. Then, correct page structure issues by adding required landmarks, language attributes, and titles, while maintaining proper heading order. Finally, document significant architectural decisions in a dedicated folder and update the README to accurately reflect the project's current capabilities.

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

Do thisHelpsEffortDimension
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.+13.4 ptsMediumVisual & motion safety
Enforce accessibility in the toolchain: add an accessibility check that can read your UI — no component framework was detected and your pages are rendered by server-side templates, which neither the JSX/Vue ESLint plugins nor the HTML-template linters can parse; run axe/pa11y over the rendered pages, or assert the accessibility invariants over that rendered HTML in the test suite you already have, then assert with your test runner's axe binding (jest-axe, vitest-axe, cypress-axe or @axe-core/playwright) in tests, then gate axe/pa11y/Lighthouse in CI.+13.3 ptsMediumA11y enforcement
Resolve the 1 No ADRs found finding(s) in ADR Quality.+6.0 ptsLowADR Quality
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.+12.0 ptsMediumPage structure
Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree, with each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form).+7.3 ptsMediumArchitecture documentation
Reconcile the README with reality: README claims a ZSH `:` prefix plugin mode but the evidence shows no such feature.+7.3 ptsMediumDocumentation accuracy
Add a 'Testing' section to the root README — how to run the test suite.+6.0 ptsMediumDocumentation (README)
Resolve the 1 Orphaned knowledge finding(s) in Knowledge Freshness — start with oauth_callback.rs.+1.7 ptsLowKnowledge Freshness

File quality

Per-file score 0–10 — a quality signature. Of 101 files carrying findings, judged against the Production bar: 1% slop · 51% mixed · 48% near-clean.

FileScoreBandWorst signal
REDACTED0.4SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.6MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.8MixedStatic Analysis (SAST): High: REDACTED
crates/forge_app/src/operation.rs5.5MixedCyclomatic Complexity: ToolOperation::into_tool_output (cyclomatic 51)
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
crates/forge_walker/src/walker.rs6.0MixedExplicit Debt: TodoComment
crates/forge_services/src/tool_services/fs_patch.rs6.0MixedExplicit Debt: TodoComment
crates/forge_domain/src/context.rs6.0MixedExplicit Debt: TodoComment
crates/forge_app/src/services.rs6.0MixedExplicit Debt: TodoComment
crates/forge_app/src/orch.rs6.3MixedCognitive Complexity: Orchestrator::run (cognitive 28)
crates/forge_repo/src/conversation/conversation_record.rs6.7MixedExplicit Debt: TodoComment
crates/forge_domain/src/tools/catalog.rs6.7MixedExplicit Debt: TodoComment
crates/forge_app/src/user_prompt.rs6.7MixedExplicit Debt: TodoComment
crates/forge_infra/src/forge_infra.rs6.7MixedExplicit Debt: TodoComment
crates/forge_main/src/ui.rs7.0MixedCyclomatic Complexity: UI::handle_subcommands (cyclomatic 83)
crates/forge_select/src/preview.rs7.0MixedCyclomatic Complexity: forge_select::preview::run_select_ui_values (cyclomatic 43)
crates/forge_json_repair/src/parser.rs7.0MixedCyclomatic Complexity: JsonRepairParser::parse_string (cyclomatic 37)

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

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

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

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

Could not be resolved — 52

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. 42 of 47 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 — 47 dimensions across the health lenses
D1D2D3D4D5D6D9D13D15D16D17D19D20D21D22D26D28D29D30D34D35D36D43D44AC3AC6AC7AX10AX3AX4AX8AX9DM4DM5DM6ES1ES2M1M2M3M4P1P2P3P6P8PF3

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

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

Tools & methods

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

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

Every finding is locatable in findings.md. Run 01a0ed14-0f14-7702-b916-32ebece6f5a5.

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 READ here — but this repository measures it: a coverage step in CI (`cargo llvm-cov`) shows that coverage is collected and tracked in your own CI. The built-in collector has no runner for this ecosystem (.rs), so the analyzer could not read the number — a gap in the analyzer's language coverage, not an unmeasured repo. Not scored. To have the real number read, produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures. You can widen what we reach: optional: produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — then the real number is read on the next scan.
  • D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.rs) and this repository declares a Cargo test suite (repository root, 254 test files), but it was not re-run: no test result was produced. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
  • D12 Dependency Hygiene — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored — 43 direct Cargo declaration(s) were read, but the outdated signal needs crates.io, which could not be reached on this run, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
  • AX1 Captive dependencies — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • AX2 Stateful singletons — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • AX6 Interface segregation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • AXB1 Runtime evidence locked — no reproducible boot — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. The Runtime Evidence tier boots an app only via docker-compose, an Aspire AppHost, or a Dockerfile. None was found, so no live runtime a11y/egress/header evidence was collected. You can widen what we reach: add a docker-compose.yml (or an Aspire AppHost) that brings the app up with its dependencies. Watchdog then boots it in an isolated sandbox and gathers real runtime evidence — you change nothing in your pipeline (no CI step, no SDK).
  • C1 Data Protection — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
  • C2 Access Controls — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
  • C3 Audit Trail — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
  • C4 Data Retention — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
  • C5 Data-Subject Rights — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
  • DM3 Integration-event coupling — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored — a domain type leaking across a crate boundary cannot be told apart from source alone from a legitimate shared-kernel crate. Reported as guidance rather than measured.
  • DM7 Repository granularity — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored — detecting 'a repository per CHILD entity' needs the aggregate-root structure, which is not resolvable from source alone here. Reported as guidance rather than measured.
  • ED5 Idempotency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check finds retry-prone mutations by walking the repository's declared types, and NONE was loaded on this run, so it had nothing to look at. That is a limit of the analyzer's reach — it reads .NET projects — not a finding that this repository has no command handlers or message consumers.
  • GD1 Unfinished & placeholder code — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • P10 Library API & versioning — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads NuGet packaging and C# public API only, and no .NET project was loaded for this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • PF1 Benchmark discipline — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • PF2 Allocation hygiene — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • S1 Web-Security Posture — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
  • X1 Async correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X10 Duplicated predicate — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X12 Unreachable branch — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X13 Undrained process stream — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X14 Bypassable address classification — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X15 Unvalidated length from an untrusted reader — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X16 Unfloored truncation loop — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X17 Uncapped recursion over a caller-supplied document — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X18 Disposal-pattern correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X19 Unrestored process-global state — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X2 Cancellation propagation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X20 Mistyped argument guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X21 Side-effecting pattern guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X22 Contradicted release guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X23 Unguarded diagnostic materialisation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X24 Document value interpolated into markup unescaped — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X25 Inert configuration knob — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X26 Unsynchronised callback handoff — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X27 Collection changed while being enumerated — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X28 Index access outside its own emptiness guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X29 Per-element action decided by a fixed element — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X3 Exception handling — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X30 Support guard that admits what it rejects — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X32 Type resolved by simple name across every loaded assembly — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X4 Structured logging — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X5 Nullable reference types — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X6 Hand-rolled structured-format parsing — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X7 Silent fallback defaults — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.

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

Limitations & what we did not check

Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.

Per-dimension blind spots

For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • D13 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").
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
  • D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
  • D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
  • D22 Internal API Consistency: API-surface coherence is an LLM judgement over a sample of the public surface — consistency of intent across the whole API is approximated, not exhaustively verified.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • 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.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
  • DM4 Rich vs anemic domain model: Behaviour is detected as state mutation inside a method body — a method that enforces an invariant by validating-and-throwing without mutating reads as a query, and mutation delegated through an interface the scan can't resolve isn't credited; entities with zero public properties still drop out of the population. It detects that state changes, not whether the rule is correct.
  • DM6 Domain ↔ infrastructure boundary: Infrastructure reached through a hand-rolled wrapper, a domain-named facade, reflection, or a string-keyed service locator resolves to a non-infra type and isn't seen; the body scan is symbol resolution over syntax, not full dataflow. A clean result means "no resolved infra reference in a domain body", not a proof of purity.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • 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 Complexity6.2 / 10Adequate✓ Tool-verified

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

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

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

38 function(s) exceeded the cyclomatic complexity threshold of 15; the worst was UI::handle_subcommands at 83. A further 7 function(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 AppCommand::name at 46 — 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 functions was excluded, so the exclusion is disclosed nowhere in the file itself: crates/forge_domain/src/provider.rs (ProviderId::from_str at 42), crates/forge_app/src/tool_executor.rs (ToolExecutor::call_internal at 17), crates/forge_domain/src/tools/catalog.rs (ToolCatalog::description at 16). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

UI::handle_subcommands (cyclomatic 83) · ×4crates/forge_main/src/ui.rs:466
JsonRepairParser::parse_string (cyclomatic 37) · ×4crates/forge_json_repair/src/parser.rs:348
forge_app::utils::sanitize_gemini_schema (cyclomatic 45) · ×3crates/forge_app/src/utils.rs:626
forge_select::preview::run_select_ui_values (cyclomatic 43) · ×3crates/forge_select/src/preview.rs:289
forge_markdown_stream::table::wrap (cyclomatic 33) · ×3crates/forge_markdown_stream/src/table.rs:135

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

What to do

  1. Resolve the 4 UI finding(s) in Cyclomatic Complexity — start with ui.rs (4). — One of this dimension's main actionable groups (4 warning-level).
  2. Resolve the 4 JsonRepairParser finding(s) in Cyclomatic Complexity — start with parser.rs (4). — One of this dimension's main actionable groups (4 warning-level).
  3. Resolve the 3 forge_app finding(s) in Cyclomatic Complexity — start with utils.rs (2), response.rs. — One of this dimension's main actionable groups (3 warning-level).
  4. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D2 · Cognitive Complexity5.9 / 10Adequate✓ 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 5.9 / 10 · rule-coverage 100% · ceiling Prevented

69 function(s) exceeded the cognitive complexity threshold of 15; the worst was forge_app::utils::sanitize_gemini_schema at 107.

UI::handle_subcommands (cognitive 104) · ×10crates/forge_main/src/ui.rs:466
forge_markdown_stream::table::wrap (cognitive 99) · ×5crates/forge_markdown_stream/src/table.rs:135
forge_app::utils::sanitize_gemini_schema (cognitive 107) · ×4crates/forge_app/src/utils.rs:626
JsonRepairParser::parse_string (cognitive 83) · ×4crates/forge_json_repair/src/parser.rs:348
forge_select::preview::run_select_ui_values (cognitive 78) · ×4crates/forge_select/src/preview.rs:289

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

What to do

  1. Resolve the 10 UI finding(s) in Cognitive Complexity — start with ui.rs (10). — One of this dimension's main actionable groups (10 warning-level).
  2. Resolve the 5 forge_markdown_stream finding(s) in Cognitive Complexity — start with table.rs (3), utils.rs (2). — One of this dimension's main actionable groups (5 warning-level).
  3. Resolve the 4 forge_app finding(s) in Cognitive Complexity — start with utils.rs (2), todo_fmt.rs, response.rs. — One of this dimension's main actionable groups (4 warning-level).
  4. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D3 · God Classes9.1 / 10Stronggated by 31 serious findings✓ 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 9.1 / 10 · rule-coverage 100% · ceiling Prevented

31 god class(es) detected.

FileTooLong: src/ui.rs · ×10crates/forge_main/src/ui.rs
MethodTooLong: ToolOperation.into_tool_output · ×10crates/forge_app/src/operation.rs:235
FunctionTooLong: forge_select::preview::draw_preview_ui · ×6crates/forge_select/src/preview.rs:875
TooManyMethods: UI · ×2crates/forge_main/src/ui.rs:105
ClassTooLong: JsonRepairParser · ×2crates/forge_json_repair/src/parser.rs:5

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

What to do

  1. Resolve the 10 FileTooLong finding(s) in God Classes — start with ui.rs, preview.rs, strategy.rs. — One of this dimension's main actionable groups (10 warning-level).
  2. Resolve the 10 MethodTooLong finding(s) in God Classes — start with ui.rs (3), operation.rs, response.rs. — One of this dimension's main actionable groups (10 warning-level).
  3. Resolve the 6 FunctionTooLong finding(s) in God Classes — start with preview.rs (2), utils.rs, conversation_html.rs. — One of this dimension's main actionable groups (6 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.7 / 10Stronggated by 73 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.7 / 10 · rule-coverage 100% · ceiling Verified

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

Duplicated block (8 lines × 2) · ×9crates/forge_app/src/dto/openai/response.rs:349
Duplicated block (13 lines × 2) · ×7crates/forge_app/src/dto/openai/response.rs:384
Duplicated block (9 lines × 2) · ×5crates/forge_app/src/dto/openai/response.rs:360
Duplicated block (7 lines × 2) · ×5crates/forge_domain/src/message.rs:44
Duplicated block (5 lines × 2) · ×5crates/forge_domain/src/tool_order.rs:94

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

What to do

  1. Resolve the 9 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with openai.rs (3), response.rs, github_copilot_reasoning.rs. — One of this dimension's main actionable groups (9 warning-level).
  2. Resolve the 7 Duplicated block (13 lines × 2) finding(s) in Code Duplication — start with anthropic.rs (3), response.rs, user_prompt.rs. — One of this dimension's main actionable groups (7 warning-level).
  3. Resolve the 5 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with response.rs, schema_coercion.rs, template_engine.rs. — One of this dimension's main actionable groups (5 warning-level).
  4. Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

D5 · Coupling6.2 / 10Adequate✓ Tool-verified

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

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

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

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

25 production modules (Cargo+npm), 0 dependency cycle(s), 3 unstable depended-on module(s). Read from the build's own module declarations; 8 module(s) off the main sequence, with abstractness counted on 23 of the 25 (the rest declare no modelled class or interface, export only macros, or have no source directory of their own).

Off the main sequence: forge_display · ×8
Unstable project forge_api
Unstable project forge_infra
Unstable project forge_repo

What to do

  1. Resolve the 8 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (8 warning-level).
  2. Resolve the 1 Unstable project forge_api finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 Unstable project forge_infra finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
  4. Enforce Coupling in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D6 · Cohesion (LCOM4)9.9 / 10Stronggated by 1 serious finding✓ 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.9 / 10 · rule-coverage 100% · ceiling Verified

1 of 194 classes have LCOM4 above 3.

Low cohesion: Context (LCOM4 4)crates/forge_domain/src/context.rs:401

What to do

  1. Resolve the 1 Low cohesion finding(s) in Cohesion (LCOM4) — start with context.rs. — One of this dimension's main actionable groups (1 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.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

D13 · 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.

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

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

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

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

Top hotspots: crates/forge_domain/src/provider.rs (6×42=252); crates/forge_app/src/dto/anthropic/response.rs (5×17=85); crates/forge_repo/src/provider/openai_responses/repository.rs (2×16=32)

Hotspot: crates/forge_domain/src/provider.rs · ×3crates/forge_domain/src/provider.rs:194

What to do

  1. Resolve the 3 Hotspot finding(s) in Churn × Complexity Hotspots — start with provider.rs, response.rs, repository.rs. — One of this dimension's main actionable groups (3 warning-level).

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

D16 · Bus Factor9.5 / 10Exemplary✓ Tool-verified

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

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

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

14 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is crates/forge_json_repair/src/schema_coercion.rs. Counted over 288 of the 462 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 · ×2
Further sole-owners (lower concentration)

✓ On the Gold path — maintain.

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

D17 · Explicit Debt10.0 / 10Stronggated by 19 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

19 deducted task-comment markers across 116552 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 · ×19crates/forge_app/src/user_prompt.rs:595

What to do

  1. Resolve the 19 TodoComment finding(s) in Explicit Debt — start with agent_provider_resolver.rs (2), request.rs (2), user_prompt.rs. — One of this dimension's main actionable groups (19 warning-level).
  2. 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 QualityExemplary◐ Sampled · advisory

What it measures: Whether the project's documentation is clear, complete, and useful.

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.

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

The repository's root README is a clear one-page overview of Forge as an AI-enhanced terminal development environment with a shell-installation snippet and a table of contents covering Quickstart, Why Forge?, How Forge Works: Three Modes, ZSH Plugin, Command-Line Options, Advanced Configuration, and more. The benchmarks/README documents the benchmarks directory (a tooling tier), while the shell-plugin/, crates/forge_select/, skills/create-plan/, and bounty automation READMEs each document their own directories. All visible documents are well-structured with a consistent table of contents and clear headings; there is no single unshown section missing from any file. This is a well-structured best-practices document for writing detailed tool descriptions for Claude to use. It covers key principles (extremely detailed descriptions, comprehensive but concise, prioritize description over examples, register all tools in the registry), gives an example comparison with a clipped Good Tool Description Example section, and lists an outline of every named section present in the body. The content is focused on best practices rather than the project's own overview.

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

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

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

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

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

No architecture decision records were found.

No ADRs found

What to do

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

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

D21 · Naming ConsistencyExemplary◐ Sampled · advisory

What it measures: Whether names — types, methods, variables — are clear and consistent.

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.

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

0 naming inconsistencies across 0 sampled symbols.

✓ On the Gold path — maintain.

Detailed fixes: d21_recommendation.md.

D22 · Internal API ConsistencyAdequate◐ 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 Adequate / 10 · rule-coverage 100% · ceiling Verified

7 API inconsistencies across a 400-member sample of 466 exposed types.

Duplicate intent: Both methods appear to retrieve the list of available tools. The naming convention differs ('get' vs 'list') and they reside in different service layers (API vs App), suggesting a lack of clear separation of concerns or a redundant wrapper. · ×5
Inconsistent naming and signature for shell execution: The API exposes `execute_shell_command` and `execute_shell_command_raw`, while the underlying infrastructure exposes `execute_command` and `execute_command_raw`. The 'shell' prefix is inconsistent between layers. Additionally, the parameters differ significantly (API uses `working_dir` and no `env_vars` explicitly in the raw version, while Infra uses `env_vars` and `silent`), making the mapping unclear.
Inconsistent return types for similar operations: `API.get_agent_model` returns `ModelId` directly, while `AgentProviderResolver.get_model` returns `Result`. This inconsistency in error handling (one throws/panics on failure, the other returns a Result) is confusing for API consumers.

What to do

  1. Resolve the 5 Duplicate intent finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (5 warning-level).
  2. Resolve the 1 Inconsistent naming and signature for shell execution finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 Inconsistent return types for similar operations finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).

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

D26 · Project Cohesion8.4 / 10Strong✓ 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 8.4 / 10 · rule-coverage 100% · ceiling Documented

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

Projects may be oversized for their cohesion

What to do

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

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

D28 · Secrets (history)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

57 finding(s): 0 critical, 57 high, 0 medium, 0 low. 34 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) — `.forge/skills/write-release-notes/scripts/fetch-release-data.sh` (line 8), `scripts/benchmark.sh` (line 79), `scripts/list-all-porcelain.sh` (line 36), `scripts/test-zsh-utils.sh` (line 162, line 172, line 182, …), `shell-plugin/doctor.zsh` (line 196, lines 219–222, line 297, …) — 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 4 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

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

What to do

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

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

D30 · Dependency Vulnerabilities4.1 / 10Weak✓ Tool-verified

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

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

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

20 finding(s): 0 critical, 5 high, 15 medium, 0 low.

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 3 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (3). — One of this dimension's main actionable groups (3 issue-level).
  2. Resolve the 2 High vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
  3. Resolve the 6 Medium vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED (6). — One of this dimension's main actionable groups (6 warning-level).

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

D34 · Knowledge Freshness8.8 / 10Adequategated by 1 critical finding✓ 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 8.8 / 10 · rule-coverage 100% · ceiling Documented

36 of 288 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is crates/forge_main/src/oauth_callback.rs. Counted over 288 of the 462 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned knowledgecrates/forge_main/src/oauth_callback.rs
Further orphaned files (smaller)

What to do

  1. Resolve the 1 Orphaned knowledge finding(s) in Knowledge Freshness — start with oauth_callback.rs. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).

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

D35 · Change Coupling9.2 / 10Stronggated by 16 serious findings✓ 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 9.2 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: drop_tool_call.rs↔set_cache.rs 92%; orch.rs↔event.rs 88%; tool_executor.rs↔summary.rs 77%

Change coupling: drop_tool_call.rs ↔ set_cache.rs · ×12crates/forge_app/src/dto/openai/transformers/drop_tool_call.rs
Change-coupling hub: orch.rs → agent_executor.rs, compact_config.rs, event.rs, system_context.rs, conversation.rs, template.rs · ×4crates/forge_app/src/orch.rs

What to do

  1. Resolve the 12 Change coupling finding(s) in Change Coupling — start with services.rs (2), drop_tool_call.rs, tool_executor.rs. — One of this dimension's main actionable groups (12 warning-level).
  2. Resolve the 4 Change-coupling hub finding(s) in Change Coupling — start with orch.rs, fmt_input.rs, executor.rs. — One of this dimension's main actionable groups (4 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

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

What to do

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

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

D44 · Platform End-of-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 2 platform declaration(s) and 19 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.

AC3 · Page structure5.4 / 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>. — crates/forge_domain/src/snapshots/forge_domain__conversation_html__tests__conversation.snap.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.
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.

  • `.agent-conversation a` sets color: #2563eb on background-color: #dbeafe — 4.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. (×2) — crates/forge_domain/src/snapshots/forge_domain__conversation_html__tests__conversation.snap.html:16, crates/forge_domain/src/conversation_style.css:256

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 a11y linter (an accessibility check that can read your UI — no component framework was detected and your pages are rendered by server-side templates, which neither the JSX/Vue ESLint plugins nor the HTML-template linters can parse; run axe/pa11y over the rendered pages, or assert the accessibility invariants over that rendered HTML in the test suite you already have) and no axe/pa11y/Lighthouse in tests or CI. Start by running that check over your rendered pages in CI. What was searched, so you can tell an absence from a miss: the 1 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.

What to do

  • Enforce accessibility in the toolchain: add an accessibility check that can read your UI — no component framework was detected and your pages are rendered by server-side templates, which neither the JSX/Vue ESLint plugins nor the HTML-template linters can parse; run axe/pa11y over the rendered pages, or assert the accessibility invariants over that rendered HTML in the test suite you already have, then assert with your test runner's axe binding (jest-axe, vitest-axe, cypress-axe or @axe-core/playwright) in tests, then gate axe/pa11y/Lighthouse in CI.
AX10 · Code composition9.7 / 10Exemplary✓ Tool-verified

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

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

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

What to do

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

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

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

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

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

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

AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.

Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.

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

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

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

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

DM4 · Rich vs anemic domain model7.6 / 10Strong✓ Tool-verified

Other · Domain Modelling — Whether domain entities own their behaviour (invariant-enforcing commands) rather than being data-only structs driven by a foreign service.

Method: Roslyn (DDD-gated): entity method BODIES classified mutator-vs-query — only methods that mutate the entity's own declared state count as invariant-protecting behaviour, so a getter/passthrough doesn't rescue an anemic class. Deterministic, exhaustive over domain-layer entities.

Coverage: Population: entities by name/base convention; rich-vs-anemic judged by classifying each method body mutator-vs-query — logic-bearing domain types outside the convention are invisible.

  • `Walker` is a data-only domain entity with `pub` mutable state and no invariant-enforcing behaviour of its own, while the repo holds the logic in a foreign service/manager/use-case — the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants (or make it an immutable value object with private fields) rather than being driven from outside. — crates/forge_app/src/walker.rs:8

What to do

  • Move the domain logic onto the entity (invariant-enforcing `&mut self` commands) instead of a foreign service.
DM5 · Encapsulated state10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether a domain type's identity-bearing field stays immutable — a `pub` mutable field under a hand-rolled Hash/PartialEq breaks the value-identity invariant.

Method: Roslyn (DDD-gated): entities scanned for publicly writable state — public setters, and (C#/VB) own mutable collections handed out through an auto-property, a public field or a bare-field expression getter, where a computed/copying getter is never charged. One finding per entity; score softened when Marten/EF rehydration frameworks present. Deterministic, framework-aware.

Coverage: Population: entities by convention; encapsulation (setter shape) checked exhaustively within the set.

DM6 · Domain ↔ infrastructure boundary10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether the domain layer stays free of infrastructure dependencies — a domain aggregate fused to a persistence ORM (diesel/sea-orm/sqlx) on its own declaration (active-record) couples the domain to infrastructure. The clean-architecture dependency rule.

Method: Roslyn (DDD-gated): domain-layer types scanned for infrastructure usage in member SIGNATURES and inside method/accessor BODIES — resolved calls and object-creations into EF/Marten/HTTP/Mongo/Redis/message-bus types (not just a namespace allowlist). Deterministic, symbol-resolved, exhaustive over domain-layer bodies, DDD-native.

Coverage: Domain layer identified by NAMESPACE heuristic; infrastructure then resolved by symbol in member SIGNATURES and method/accessor BODIES — rename the layer and the check evaporates.

ES1 · Fold determinism10.0 / 10Exemplary✓ Tool-verified

Other · Event Sourcing — Whether the recovery-replay fold is deterministic — state derived purely from each event's own fields, no clock/random/IO on the replay path.

Method: Roslyn syntax scan (event-sourcing gated): Apply/When folds checked for forbidden tokens (DateTime.Now, Guid.NewGuid, Random, IO), stripped of comments/strings. Deterministic, hard fact per fold.

ES2 · Immutable events10.0 / 10Exemplary✓ Tool-verified

Other · Event Sourcing — Whether domain events stay immutable (private fields, set once) rather than carrying mutable state.

Method: Roslyn scan (event-sourcing gated): persisted events checked for public setters; immutability verified per property/field. Deterministic, hard fact.

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

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

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

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

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

What to do

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

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

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

M4 · Documentation accuracy1.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.

  • README claims a ZSH `:` prefix plugin mode but the evidence shows no such feature — searched for: `ZSH `:` prefix`. Each was matched case- and separator-insensitively against file and directory NAMES anywhere in the tree, and against the CONTENTS of manifest files (package.json, *.csproj, *.props, *.slnx, *.yml, Dockerfile); the README's own prose never counts, so a claim is never refuted by merely being made. Nothing outside that search was read — a footprint living only in a submodule, in a file type not listed here, or under a name none of those terms matches is not seen, and this row is then wrong.

What to do

  • Reconcile the README with reality: README claims a ZSH `:` prefix plugin mode but the evidence shows no such feature.
P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

What to do

  • Consider OpenTelemetry tracing/metrics (opentelemetry with tracing-opentelemetry) and a health-check endpoint (a /health route on your axum/actix router) for operability.
P3 · Security & performance tooling7.0 / 10Strong✓ Tool-verified

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

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

What to do

  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

PF3 · Async & latency hygiene8.5 / 10Strong✓ Tool-verified

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

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

  • `main` is async and calls readFileSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — benchmarks/evals/semantic_search_quality/llm_judge.ts:361

What to do

  • TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.

WCAG coverage — what static analysis assessed

Statically assessed 8 of 55 WCAG 2.2 Level A/AA success criteria (15%; ≈16% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 47 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
AC3 · Page structure1.4.4, 2.2.1, 2.4.1, 2.4.2, 3.1.1, 4.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 47 Level A/AA criteria need runtime or manual evaluation (WCAG-EM): 1.1.1, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 1.3.1, 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.1, 2.1.2, 2.1.4, 2.2.2, 2.3.1, 2.4.3, 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.2, 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 Health87%StrongSolid.
Architecture94%ExemplarySolid.
Maturity44%Weak — gated by M2, M4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness85%StrongSolid.
Security57%Adequate — gated by D29, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Domain Modelling90%StrongSolid.
Event Sourcing100%ExemplaryStrongest area.
Accessibility30%Weak — gated by AC6Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance85%StrongSolid.
Unscored — 1 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.

  • X9 Subsumed condition operand — 2 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 5 control(s) we could not find positive evidence for

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

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

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

  • AC1 Text alternatives — No image/media element found in the parsed markup — AC1 not applicable here.
  • AC2 Forms & labels — No form control/button found in the parsed markup — AC2 not applicable here.
  • AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
  • AC5 ARIA correctness — No ARIA usage found in the parsed markup — AC5 not applicable here.
  • AX1 Captive dependencies — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX2 Stateful singletons — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AXB1 Runtime evidence locked — no reproducible boot — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • D10 Test Quality — ~2055 lines of test source are present (.rs) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D11 Test Reliability — Test reliability not included — the .rs suite was found but not re-run
  • D12 Dependency Hygiene — Not scored — 43 direct Cargo declaration(s) were read, but the outdated signal needs crates.io, which could not be reached on this run, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
  • D14 License Compliance — Not scored — this repository's 844 shipped crate(s) were read from its REDACTED, but crates.io could not be asked for the licence of 10 of them (HTTP 429 Unknown Error), and a licence verdict over part of a dependency graph is not a licence verdict. Nothing is asserted about this repository's licensing in either direction.
  • 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.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout nor 2+ sibling source directories each declaring an aggregate root. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — No inline comments to assess — comment value is not applicable here.
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — symbol resolution incomplete — navigability not assessed
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
  • D32 Data Compliance (PII/GDPR) — 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.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not included — suite not readable by the collector
  • DM1 Aggregate boundaries — this Rust crate declares no domain aggregate (a struct with private state and its own command methods), so DM1's aggregate-boundary read has no population to be taken over
  • DM2 Strongly-typed ids — the crate defines newtype typed-ids but declares no domain aggregate that could carry an id — so DM2's adoption ratio has no population to be taken over
  • DM3 Integration-event coupling — not scored — a domain type leaking across a crate boundary cannot be told apart from source alone from a legitimate shared-kernel crate. Reported as guidance rather than measured
  • DM7 Repository granularity — not scored — detecting 'a repository per CHILD entity' needs the aggregate-root structure, which is not resolvable from source alone here. Reported as guidance rather than measured
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
  • ED5 Idempotency — This check finds retry-prone mutations (command handlers and message/event consumers) by walking the repository's declared types, and none was loaded here, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C# syntax, and none was loaded for this repository. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P10 Library API & versioning — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty — Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the Rust source, so there is no service whose uptime a failing dependency could take down
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
  • PF1 Benchmark discipline — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • PF2 Allocation hygiene — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X1 Async correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X10 Duplicated predicate — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X12 Unreachable branch — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X13 Undrained process stream — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X14 Bypassable address classification — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X15 Unvalidated length from an untrusted reader — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X16 Unfloored truncation loop — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X17 Uncapped recursion over a caller-supplied document — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X18 Disposal-pattern correctness — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X19 Unrestored process-global state — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X20 Mistyped argument guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X21 Side-effecting pattern guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X22 Contradicted release guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X23 Unguarded diagnostic materialisation — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X24 Document value interpolated into markup unescaped — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X25 Inert configuration knob — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X26 Unsynchronised callback handoff — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X27 Collection changed while being enumerated — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X28 Index access outside its own emptiness guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X29 Per-element action decided by a fixed element — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X3 Exception handling — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X30 Support guard that admits what it rejects — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X32 Type resolved by simple name across every loaded assembly — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X6 Hand-rolled structured-format parsing — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X7 Silent fallback defaults — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository

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 — 64 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 9 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · High CVE · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · High vulnerability · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D34 · Knowledge Freshness · Orphaned knowledge · ×1
  • Orphaned knowledge crates/forge_main/src/oauth_callback.rs — No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
DM4 · Rich vs anemic domain model · Anemic domain model · ×1
  • Anemic domain model: Walker crates/forge_app/src/walker.rs:8 — `Walker` is a data-only domain entity with `pub` mutable state and no invariant-enforcing behaviour of its own, while the repo holds the logic in a foreign service/manager/use-case — the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants (or make it an immutable value object with private fields) rather than being driven from outside.
Serious — 292 finding(s)
D17 · Explicit Debt · TodoComment · ×19
  • TodoComment crates/forge_app/src/user_prompt.rs:595 — // todo list — 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 crates/forge_app/src/services.rs:429 — // TODO: We should move Snapshot service to Services from infra — 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 crates/forge_app/src/compact.rs:46 — // TODO: Consider using `eviction.max(retention)` — 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 crates/forge_app/src/agent_provider_resolver.rs:35 — // TODO: Needs review, should we throw an err here? — 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 crates/forge_app/src/agent_provider_resolver.rs:62 — // TODO: Needs review, should we throw an err here? — 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 crates/forge_app/src/dto/anthropic/request.rs:407 — // TODO: verify this Thinking variants don't support cache control — 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 crates/forge_app/src/dto/openai/request.rs:161 — // TODO: should be an enum — 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 crates/forge_app/src/transformers/trim_context_summary.rs:40 — /// Todo operation - each todo_write is unique and won't be deduplicated — 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 crates/forge_domain/src/model.rs:33 — // TODO: add provider information to the model — 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 crates/forge_domain/src/context.rs:294 — //TODO: Rename to TextMessage — 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 crates/forge_domain/src/tools/catalog.rs:1188 — // TODO: This is an extremely slow operation — 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 crates/forge_infra/src/forge_infra.rs:38 — // TODO: Drop the "Service" suffix. Use names like ForgeFileReader, ForgeFileWriter, — 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 crates/forge_main/src/state.rs:6 — //TODO: UIState and ForgePrompt seem like the same thing and can be merged — 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 crates/forge_repo/src/conversation/conversation_record.rs:535 — // TODO: Move this deserialization logic into Conversation repo — 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 crates/forge_repo/src/provider/bedrock_cache.rs:16 — // TODO: Implement it on Context or Conversation instead of ConverseStreamInput — 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 crates/forge_services/src/policy.rs:69 — // TODO: Can return a diff later — 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 crates/forge_services/src/tool_services/fs_patch.rs:494 — // TODO: use forge_fs — 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 crates/forge_tracker/src/collect/posthog.rs:97 — // TODO: move http request to a dispatch — 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 crates/forge_walker/src/walker.rs:136 — // TODO: Convert to async and return a stream — 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.
D35 · Change Coupling · Change coupling · ×12
  • Change coupling: drop_tool_call.rs ↔ set_cache.rs crates/forge_app/src/dto/openai/transformers/drop_tool_call.rs — `crates/forge_app/src/dto/openai/transformers/drop_tool_call.rs` and `crates/forge_app/src/dto/openai/transformers/set_cache.rs` change together 92% of the time (12 of the 13 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 12 shared commits counted here, the most recent 3 are `8c0af00b` fix: add GitHub Copilot optimization headers for billing. (#2813); `3c27238e` refactor(commit): request commit messages with json schema structured…; `d529c960` refactor: streaming control via context (#2066) — run `git show` on any of them.
  • Change coupling: tool_executor.rs ↔ summary.rs crates/forge_app/src/tool_executor.rs — `crates/forge_app/src/tool_executor.rs` and `crates/forge_domain/src/compact/summary.rs` change together 77% of the time (10 of the 13 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 10 shared commits counted here, the most recent 3 are `9d5094fb` feat: subagent as task (#2508); `98732649` feat(tools): add multi_patch tool for batch file edits (#2840); `a7a77f7f` fix(semantic_search): remove extensions field (#2339) — run `git show` on any of them.
  • Change coupling: attachment.rs ↔ shell.rs crates/forge_services/src/attachment.rs — `crates/forge_services/src/attachment.rs` and `crates/forge_services/src/tool_services/shell.rs` change together 67% of the time (8 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 8 shared commits counted here, the most recent 3 are `4dd37a8b` feat(permissions): enable permission checks only in restricted mode (…; `038552d7` feat: support Streaming HTTP (#1864); `4c4c35e4` refactor: use `faker` to generate env in tests (#1767) — run `git show` on any of them.
  • Change coupling: services.rs ↔ repo.rs crates/forge_app/src/services.rs — `crates/forge_app/src/services.rs` and `crates/forge_domain/src/repo.rs` change together 64% of the time (7 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `6481375e` refactor(workspace): rename codebase to workspace in types and servic…; `e86205fc` fix(operation): use cdata for warning messages to prevent html escapi…; `5a805e25` feat: add conversation delete command (#2077) — run `git show` on any of them.
  • Change coupling: forge_api.rs ↔ app_config.rs crates/forge_api/src/forge_api.rs — `crates/forge_api/src/forge_api.rs` and `crates/forge_services/src/app_config.rs` change together 62% of the time (10 of the 16 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 10 shared commits counted here, the most recent 3 are `a387bfd0` refactor(config): replace get_default_provider/get_provider_model wit…; `bfd9f7fc` fix: atomic provider and model selection with proper cancellation han…; `da37b431` Feat(suggest-model): add suggest model command (#2511) — run `git show` on any of them.
  • Change coupling: services.rs ↔ lib.rs crates/forge_app/src/services.rs — `crates/forge_app/src/services.rs` and `crates/forge_services/src/lib.rs` change together 62% of the time (8 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `96509376` fix(sync): use env-based batch size for consistent file-read concurre…; `6e20da27` feat: ability to define provider per agent (#1705); `1a22db8b` feat: ability to define commands in MD (#1708) — run `git show` on any of them.
  • Change coupling: orch_setup.rs ↔ env.rs crates/forge_app/src/orch_spec/orch_setup.rs — `crates/forge_app/src/orch_spec/orch_setup.rs` and `crates/forge_infra/src/env.rs` change together 59% of the time (20 of the 34 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 20 shared commits counted here, the most recent 3 are `279ec190` feat(config): allow configuration of the base_path (#2864); `e75c7837` chore(provider): increase model cache TTL to one week (#2588); `e25c1c08` fix: add FIXME comments for EMFILE risk in unbounded parallel file re… — run `git show` on any of them.
  • Change coupling: forge_infra.rs ↔ attachment.rs crates/forge_infra/src/forge_infra.rs — `crates/forge_infra/src/forge_infra.rs` and `crates/forge_services/src/attachment.rs` change together 50% of the time (15 of the 30 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 15 shared commits counted here, the most recent 3 are `27124d74` fix(http): append debug request body chunks instead of overwriting (#…; `1b114a43` fix(sync): handle error conditions in sync gracefully (#2520); `b93403a8` refactor(context_engine): remove retry logic and simplify error handl… — run `git show` on any of them.
  • Change coupling: prompt.rs ↔ state.rs crates/forge_main/src/prompt.rs — `crates/forge_main/src/prompt.rs` and `crates/forge_main/src/state.rs` change together 50% of the time (9 of the 18 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `79cae5d7` feat: support for current working directory (#1174); `86901d15` refactor: update agent names to Forge and Fuse (#930); `577fb935` feat: allow user to select agents interactively (#919) — run `git show` on any of them.
  • Change coupling: banner.rs ↔ model.rs crates/forge_main/src/banner.rs — `crates/forge_main/src/banner.rs` and `crates/forge_main/src/model.rs` 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 `16f54bbc` feat(repl): bring REPL to feature parity with ZSH shell plugin (#2984); `c6dfcfb9` fix: correct command references from "/conversations" to "/conversati…; `75950bfb` feat: add `/usage` command (#1365) — run `git show` on any of them.
  • Change coupling: env.rs ↔ shell.rs crates/forge_infra/src/env.rs — `crates/forge_infra/src/env.rs` and `crates/forge_services/src/tool_services/shell.rs` 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 `d96f8f91` fix: add fallback from rbash to bash/zsh/sh for command execution (#2…; `4dd37a8b` feat(permissions): enable permission checks only in restricted mode (…; `038552d7` feat: support Streaming HTTP (#1864) — run `git show` on any of them.
  • Change coupling: operation.rs ↔ fs_read.rs crates/forge_app/src/operation.rs — `crates/forge_app/src/operation.rs` and `crates/forge_services/src/tool_services/fs_read.rs` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `29db91a4` fix(attachment): hash full file content instead of range content and …; `5ed3660d` feat(tools): enhance read tool description with detailed usage guidel…; `9298b626` fix: hash computation for externally modified files (#1979) — run `git show` on any of them.
D2 · Cognitive Complexity · UI · ×10
  • UI::handle_subcommands (cognitive 104) crates/forge_main/src/ui.rs:466 — UI::handle_subcommands has cognitive complexity 104 (threshold 15). Drivers by points: if/else 31 (73 pts), match/switch 9 (17 pts), loops 4 (13 pts), boolean chains 1 (nesting depth added 59). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • UI::select_model (cognitive 45) crates/forge_main/src/ui.rs:2904 — UI::select_model has cognitive complexity 45 (threshold 15). Drivers by points: if/else 20 (35 pts), loops 5 (7 pts), boolean chains 2, match/switch 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • UI::on_dump (cognitive 32) crates/forge_main/src/ui.rs:4067 — UI::on_dump has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (32 pts) (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • UI::on_show_models (cognitive 30) crates/forge_main/src/ui.rs:1426 — UI::on_show_models has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (26 pts), loops 2 (3 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.
  • UI::run_inner (cognitive 29) crates/forge_main/src/ui.rs:358 — UI::run_inner has cognitive complexity 29 (threshold 15). Drivers by points: match/switch 5 (14 pts), if/else 5 (13 pts), boolean chains 1, loops 1 (nesting depth added 17). 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.
  • UI::on_command (cognitive 27) crates/forge_main/src/ui.rs:2167 — UI::on_command has cognitive complexity 27 (threshold 15). Drivers by points: if/else 17 (26 pts), match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • UI::handle_api_key_input (cognitive 27) crates/forge_main/src/ui.rs:3085 — UI::handle_api_key_input has cognitive complexity 27 (threshold 15). Drivers by points: if/else 17 (25 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • UI::handle_chat_response (cognitive 25) crates/forge_main/src/ui.rs:4140 — UI::handle_chat_response has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (19 pts), match/switch 3 (5 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • UI::on_index (cognitive 21) crates/forge_main/src/ui.rs:4752 — UI::on_index has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (18 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • UI::on_show_mcp_servers (cognitive 19) crates/forge_main/src/ui.rs:1730 — UI::on_show_mcp_servers has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 3 (6 pts), boolean chains 2, match/switch 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.
D3 · God Classes · FileTooLong · ×10
  • FileTooLong: src/ui.rs crates/forge_main/src/ui.rs — FileTooLong — 3313 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 97% of them inside a single declaration: A (119-5211). The bar is 500 significant lines; this is 2813 over it, 6.63× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: src/preview.rs crates/forge_select/src/preview.rs — FileTooLong — 942 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 442 over it, 1.88× 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: auth/strategy.rs crates/forge_infra/src/auth/strategy.rs — FileTooLong — 770 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 270 over it, 1.54× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/services.rs crates/forge_app/src/services.rs — FileTooLong — 681 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 181 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: src/parser.rs crates/forge_json_repair/src/parser.rs — FileTooLong — 681 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 99% of them inside a single declaration: JsonRepairParser (2 blocks, 5-1073). The bar is 500 significant lines; this is 181 over it, 1.36× 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: conversation/conversation_record.rs crates/forge_repo/src/conversation/conversation_record.rs — FileTooLong — 675 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 175 over it, 1.35× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: provider/bedrock.rs crates/forge_repo/src/provider/bedrock.rs — FileTooLong — 661 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 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: tools/catalog.rs crates/forge_domain/src/tools/catalog.rs — FileTooLong — 586 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 86 over it, 1.17× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/context.rs crates/forge_domain/src/context.rs — FileTooLong — 505 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 5 over it, 1.01× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/utils.rs crates/forge_app/src/utils.rs — FileTooLong — 502 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 2 over it, 1.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.
D3 · God Classes · MethodTooLong · ×10
  • MethodTooLong: ToolOperation.into_tool_output crates/forge_app/src/operation.rs:235 — MethodTooLong — into_tool_output runs 343 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 243 over it, 3.43× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: UI.handle_subcommands crates/forge_main/src/ui.rs:466 — MethodTooLong — handle_subcommands runs 295 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 195 over it, 2.95× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: UI.on_command crates/forge_main/src/ui.rs:2167 — MethodTooLong — on_command runs 177 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 77 over it, 1.77× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ChatCompletionMessage.try_from crates/forge_app/src/dto/openai/response.rs:324 — MethodTooLong — try_from runs 168 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 68 over it, 1.68× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ToolExecutor.call_internal crates/forge_app/src/tool_executor.rs:151 — MethodTooLong — call_internal runs 154 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 54 over it, 1.54× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: JsonRepairParser.parse_string crates/forge_json_repair/src/parser.rs:348 — MethodTooLong — parse_string runs 143 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 43 over it, 1.43× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Orchestrator.run crates/forge_app/src/orch.rs:245 — MethodTooLong — run runs 133 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 33 over it, 1.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: UI.select_model crates/forge_main/src/ui.rs:2904 — MethodTooLong — select_model runs 114 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 14 over it, 1.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Renderer.render_event crates/forge_markdown_stream/src/renderer.rs:126 — MethodTooLong — render_event runs 114 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 14 over it, 1.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ForgeApp.chat crates/forge_app/src/app.rs:60 — MethodTooLong — chat runs 103 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 3 over it, 1.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×9
  • Duplicated block (8 lines × 2) crates/forge_app/src/dto/openai/response.rs:349 — crates/forge_app/src/dto/openai/response.rs:349-356 | crates/forge_app/src/dto/openai/response.rs:416-424 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/forge_app/src/dto/openai/transformers/github_copilot_reasoning.rs:20 — crates/forge_app/src/dto/openai/transformers/github_copilot_reasoning.rs:20-27 | crates/forge_app/src/dto/openai/transformers/reasoning_content.rs:21-28 — 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) crates/forge_domain/src/conversation_html.rs:29 — crates/forge_domain/src/conversation_html.rs:29-36 | crates/forge_domain/src/conversation_html.rs:110-117 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/forge_eventsource_stream/src/event_stream.rs:246 — crates/forge_eventsource_stream/src/event_stream.rs:246-253 | crates/forge_eventsource_stream/src/event_stream.rs:274-281 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/forge_repo/src/provider/openai.rs:73 — crates/forge_repo/src/provider/openai.rs:73-80 | crates/forge_repo/src/provider/openai_responses/repository.rs:77-84 — before extracting anything, compare `crates/forge_repo/src/provider/openai.rs` and `crates/forge_repo/src/provider/openai_responses/repository.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) crates/forge_repo/src/provider/openai.rs:113 — crates/forge_repo/src/provider/openai.rs:113-120 | crates/forge_repo/src/provider/openai_responses/repository.rs:117-124 — before extracting anything, compare `crates/forge_repo/src/provider/openai.rs` and `crates/forge_repo/src/provider/openai_responses/repository.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) crates/forge_services/src/tool_services/fs_patch.rs:271 — crates/forge_services/src/tool_services/fs_patch.rs:271-278 | crates/forge_services/src/tool_services/fs_patch.rs:294-301 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/forge_repo/src/provider/openai.rs:331 — crates/forge_repo/src/provider/openai.rs:331-339 | crates/forge_repo/src/provider/openai_responses/repository.rs:712-719 — before extracting anything, compare `crates/forge_repo/src/provider/openai.rs` and `crates/forge_repo/src/provider/openai_responses/repository.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) crates/forge_main/src/ui.rs:4580 — crates/forge_main/src/ui.rs:4580-4587 | crates/forge_main/src/ui.rs:4590-4597 — 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.
D5 · Coupling · Off the main sequence · ×8
  • Off the main sequence: forge_display — forge_display: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
  • Off the main sequence: forge_json_repair — forge_json_repair: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
  • Off the main sequence: forge_select — forge_select: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
  • Off the main sequence: forge_stream — forge_stream: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
  • Off the main sequence: forge_walker — forge_walker: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
  • Off the main sequence: forge_config — forge_config: abstractness 0.00, instability 0.14, distance 0.86 — zone of pain — concrete and depended on by 6 project(s), so it's rigid to change.
  • Off the main sequence: forge_fs — forge_fs: abstractness 0.00, instability 0.17, distance 0.83 — zone of pain — concrete and depended on by 5 project(s), so it's rigid to change.
  • Off the main sequence: forge_eventsource_stream — forge_eventsource_stream: abstractness 0.20, instability 0.00, distance 0.80 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×7
  • Duplicated block (13 lines × 2) crates/forge_app/src/dto/openai/response.rs:384 — crates/forge_app/src/dto/openai/response.rs:384-396 | crates/forge_app/src/dto/openai/response.rs:451-463 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/forge_app/src/user_prompt.rs:76 — crates/forge_app/src/user_prompt.rs:76-88 | crates/forge_app/src/user_prompt.rs:122-134 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/forge_repo/src/provider/anthropic.rs:267 — crates/forge_repo/src/provider/anthropic.rs:267-279 | crates/forge_repo/src/provider/google.rs:101-113 — before extracting anything, compare `crates/forge_repo/src/provider/anthropic.rs` and `crates/forge_repo/src/provider/google.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) crates/forge_repo/src/provider/anthropic.rs:284 — crates/forge_repo/src/provider/anthropic.rs:284-296 | crates/forge_repo/src/provider/google.rs:124-136 — before extracting anything, compare `crates/forge_repo/src/provider/anthropic.rs` and `crates/forge_repo/src/provider/google.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) crates/forge_repo/src/provider/bedrock.rs:722 — crates/forge_repo/src/provider/bedrock.rs:722-734 | crates/forge_repo/src/provider/bedrock.rs:856-868 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/forge_services/src/tool_services/fs_search.rs:330 — crates/forge_services/src/tool_services/fs_search.rs:330-342 | crates/forge_services/src/tool_services/fs_search.rs:368-380 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/forge_repo/src/provider/anthropic.rs:302 — crates/forge_repo/src/provider/anthropic.rs:302-314 | crates/forge_repo/src/provider/openai_responses/repository.rs:382-394 — 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.
D3 · God Classes · FunctionTooLong · ×6
  • FunctionTooLong: forge_select::preview::draw_preview_ui crates/forge_select/src/preview.rs:875 — FunctionTooLong — forge_select::preview::draw_preview_ui runs 247 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 147 over it, 2.47× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: forge_select::preview::run_select_ui_values crates/forge_select/src/preview.rs:289 — FunctionTooLong — forge_select::preview::run_select_ui_values runs 235 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 135 over it, 2.35× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: forge_app::utils::sanitize_gemini_schema crates/forge_app/src/utils.rs:626 — FunctionTooLong — forge_app::utils::sanitize_gemini_schema runs 142 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 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: forge_domain::conversation_html::create_conversation_context_section crates/forge_domain/src/conversation_html.rs:288 — FunctionTooLong — forge_domain::conversation_html::create_conversation_context_section runs 127 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 27 over it, 1.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: forge_services::tool_services::fs_patch::apply_replacement crates/forge_services/src/tool_services/fs_patch.rs:202 — FunctionTooLong — forge_services::tool_services::fs_patch::apply_replacement runs 114 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 14 over it, 1.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: forge_markdown_stream::table::wrap crates/forge_markdown_stream/src/table.rs:135 — FunctionTooLong — forge_markdown_stream::table::wrap runs 110 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D30 · Dependency Vulnerabilities · Medium vulnerability · ×6
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D2 · Cognitive Complexity · forge_markdown_stream · ×5
  • forge_markdown_stream::table::wrap (cognitive 99) crates/forge_markdown_stream/src/table.rs:135 — forge_markdown_stream::table::wrap has cognitive complexity 99 (threshold 15). Drivers by points: if/else 27 (78 pts), loops 4 (15 pts), boolean chains 6 (nesting depth added 62). 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.
  • forge_markdown_stream::table::split_word_at_width (cognitive 59) crates/forge_markdown_stream/src/table.rs:304 — forge_markdown_stream::table::split_word_at_width has cognitive complexity 59 (threshold 15). Drivers by points: if/else 14 (46 pts), loops 3 (11 pts), boolean chains 2 (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.
  • forge_markdown_stream::table::render_table (cognitive 25) crates/forge_markdown_stream/src/table.rs:10 — forge_markdown_stream::table::render_table has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 5 (8 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.
  • forge_markdown_stream::utils::collapse_ansi_codes (cognitive 22) crates/forge_markdown_stream/src/utils.rs:340 — forge_markdown_stream::utils::collapse_ansi_codes has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • forge_markdown_stream::utils::parse_atoms (cognitive 16) crates/forge_markdown_stream/src/utils.rs:261 — forge_markdown_stream::utils::parse_atoms has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 2 (5 pts), 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.
D22 · Internal API Consistency · Duplicate intent · ×5
  • Duplicate intent: Both methods appear to retrieve the list of available tools. The naming convention differs ('get' vs 'list') and they reside in different service layers (API vs App), suggesting a lack of clear separation of concerns or a redundant wrapper. — Unify to a single source of truth. If `ForgeApp` is the core domain service, expose `list_tools` there and have `API.get_tools` delegate to it. Standardize on 'list' for collections. (signatures: API.get_tools(): Result | ForgeApp.list_tools(): Result)
  • Duplicate intent: Both methods retrieve the list of available models. Similar to the tools issue, this duplication across API and App layers without clear distinction in signature or naming is inconsistent. — Unify to `ForgeApp.get_models` and have the API layer delegate. Ensure the return type is consistent (e.g., a specific Model list type rather than generic Result). (signatures: API.get_models(): Result | ForgeApp.get_models(): Result)
  • Duplicate intent: Both methods retrieve all provider-specific models. The identical naming across different types suggests a copy-paste pattern or lack of abstraction, but the existence of both implies potential redundancy or unclear ownership. — Consolidate into `ForgeApp.get_all_provider_models`. The API layer should not duplicate this logic unless it adds specific filtering not present in the app layer, which is not indicated by the signature. (signatures: API.get_all_provider_models(): Result | ForgeApp.get_all_provider_models(): Result)
  • Duplicate intent: Both methods retrieve agent information. The API layer duplicates the repository method without a clear differentiator in the signature (both return generic Result). — Remove `API.get_agent_infos` if it simply delegates to the repository. If it adds transformation, rename to `API.get_agent_details` or similar to indicate the added value. (signatures: API.get_agent_infos(): Result | AgentRepository.get_agent_infos(): Result)
  • Duplicate intent: Both methods resolve the provider for a given agent. The API layer duplicates the resolver's functionality. — Have `API.get_agent_provider` delegate to `AgentProviderResolver.get_provider`. Ensure the return type is consistent. (signatures: API.get_agent_provider(agent_id: AgentId): Result | AgentProviderResolver.get_provider(agent_id: AgentId): Result)
D30 · Dependency Vulnerabilities · Medium advisory (unmaintained) · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×5
  • Duplicated block (9 lines × 2) crates/forge_app/src/dto/openai/response.rs:360 — crates/forge_app/src/dto/openai/response.rs:360-368 | crates/forge_app/src/dto/openai/response.rs:428-436 — 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) crates/forge_json_repair/src/schema_coercion.rs:77 — crates/forge_json_repair/src/schema_coercion.rs:77-85 | crates/forge_json_repair/src/schema_coercion.rs:88-96 — 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) crates/forge_app/src/template_engine.rs:27 — crates/forge_app/src/template_engine.rs:27-35 | crates/forge_app/src/template_engine.rs:43-54 — 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) crates/forge_repo/src/agent.rs:89 — crates/forge_repo/src/agent.rs:89-97 | crates/forge_services/src/command.rs:77-85 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (9 lines × 2) crates/forge_app/src/operation.rs:250 — crates/forge_app/src/operation.rs:250-258 | crates/forge_app/src/operation.rs:283-291 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×5
  • Duplicated block (7 lines × 2) crates/forge_domain/src/message.rs:44 — crates/forge_domain/src/message.rs:44-50 | crates/forge_domain/src/message.rs:72-78 — 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) crates/forge_domain/src/policies/policy.rs:39 — crates/forge_domain/src/policies/policy.rs:39-46 | crates/forge_domain/src/policies/policy.rs:48-54 — 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) crates/forge_spinner/src/lib.rs:151 — crates/forge_spinner/src/lib.rs:151-157 | crates/forge_spinner/src/lib.rs:166-172 — 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) crates/forge_infra/src/http.rs:273 — crates/forge_infra/src/http.rs:273-279 | crates/forge_repo/src/provider/utils.rs:11-17 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) crates/forge_app/src/operation.rs:533 — crates/forge_app/src/operation.rs:533-539 | crates/forge_app/src/operation.rs:541-547 — 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 × 2) · ×5
  • Duplicated block (5 lines × 2) crates/forge_domain/src/tool_order.rs:94 — crates/forge_domain/src/tool_order.rs:94-98 | crates/forge_domain/src/tool_order.rs:108-112 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/forge_main/src/ui.rs:2495 — crates/forge_main/src/ui.rs:2495-2499 | crates/forge_main/src/ui.rs:4516-4520 — 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) crates/forge_markdown_stream/src/theme.rs:294 — crates/forge_markdown_stream/src/theme.rs:294-298 | crates/forge_markdown_stream/src/theme.rs:341-345 — 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) crates/forge_select/src/preview.rs:757 — crates/forge_select/src/preview.rs:757-761 | crates/forge_select/src/preview.rs:784-788 — 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) crates/forge_select/src/preview.rs:790 — crates/forge_select/src/preview.rs:790-794 | crates/forge_select/src/preview.rs:917-921 — 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.
D1 · Cyclomatic Complexity · UI · ×4
  • UI::handle_subcommands (cyclomatic 83) crates/forge_main/src/ui.rs:466 — UI::handle_subcommands has cyclomatic complexity 83 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This file is where this pass's cyclomatic complexity CONCENTRATES: crates/forge_main/src/ui.rs holds 4 of the 38 functions over the threshold — including the worst — and 123 of the 436 points over it (28%), 2× the next-largest file (crates/forge_select/src/preview.rs at 61). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
  • UI::on_command (cyclomatic 56) crates/forge_main/src/ui.rs:2167 — UI::on_command has cyclomatic complexity 56 (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. This file is where this pass's cyclomatic complexity CONCENTRATES: crates/forge_main/src/ui.rs holds 4 of the 38 functions over the threshold — including the worst — and 123 of the 436 points over it (28%), 2× the next-largest file (crates/forge_select/src/preview.rs at 61). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
  • UI::select_model (cyclomatic 24) crates/forge_main/src/ui.rs:2904 — UI::select_model has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This file is where this pass's cyclomatic complexity CONCENTRATES: crates/forge_main/src/ui.rs holds 4 of the 38 functions over the threshold — including the worst — and 123 of the 436 points over it (28%), 2× the next-largest file (crates/forge_select/src/preview.rs at 61). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
  • UI::handle_chat_response (cyclomatic 20) crates/forge_main/src/ui.rs:4140 — UI::handle_chat_response has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This file is where this pass's cyclomatic complexity CONCENTRATES: crates/forge_main/src/ui.rs holds 4 of the 38 functions over the threshold — including the worst — and 123 of the 436 points over it (28%), 2× the next-largest file (crates/forge_select/src/preview.rs at 61). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · JsonRepairParser · ×4
  • JsonRepairParser::parse_string (cyclomatic 37) crates/forge_json_repair/src/parser.rs:348 — JsonRepairParser::parse_string 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.
  • JsonRepairParser::parse_unquoted_string (cyclomatic 25) crates/forge_json_repair/src/parser.rs:694 — JsonRepairParser::parse_unquoted_string 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.
  • JsonRepairParser::parse_number (cyclomatic 18) crates/forge_json_repair/src/parser.rs:595 — JsonRepairParser::parse_number 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.
  • JsonRepairParser::parse_object (cyclomatic 17) crates/forge_json_repair/src/parser.rs:195 — JsonRepairParser::parse_object 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.
D2 · Cognitive Complexity · forge_app · ×4
  • forge_app::utils::sanitize_gemini_schema (cognitive 107) crates/forge_app/src/utils.rs:626 — forge_app::utils::sanitize_gemini_schema has cognitive complexity 107 (threshold 15). Drivers by points: if/else 23 (64 pts), loops 8 (26 pts), boolean chains 10, match/switch 3 (7 pts) (nesting depth added 63). 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.
  • forge_app::utils::enforce_strict_schema (cognitive 28) crates/forge_app/src/utils.rs:448 — forge_app::utils::enforce_strict_schema has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 4, loops 1 (2 pts), match/switch 1 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • forge_app::fmt::todo_fmt::format_todos_diff (cognitive 20) crates/forge_app/src/fmt/todo_fmt.rs:56 — forge_app::fmt::todo_fmt::format_todos_diff has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 1 (4 pts), loops 2, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • forge_app::dto::anthropic::response::get_context_length (cognitive 16) crates/forge_app/src/dto/anthropic/response.rs:81 — forge_app::dto::anthropic::response::get_context_length has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, 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 · JsonRepairParser · ×4
  • JsonRepairParser::parse_string (cognitive 83) crates/forge_json_repair/src/parser.rs:348 — JsonRepairParser::parse_string has cognitive complexity 83 (threshold 15). Drivers by points: if/else 27 (61 pts), loops 3 (10 pts), boolean chains 8, match/switch 1 (4 pts) (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • JsonRepairParser::parse_unquoted_string (cognitive 47) crates/forge_json_repair/src/parser.rs:694 — JsonRepairParser::parse_unquoted_string has cognitive complexity 47 (threshold 15). Drivers by points: if/else 15 (32 pts), loops 5 (9 pts), boolean chains 6 (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • JsonRepairParser::parse_object (cognitive 33) crates/forge_json_repair/src/parser.rs:195 — JsonRepairParser::parse_object has cognitive complexity 33 (threshold 15). Drivers by points: if/else 16 (28 pts), boolean chains 4, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • JsonRepairParser::parse_number (cognitive 28) crates/forge_json_repair/src/parser.rs:595 — JsonRepairParser::parse_number has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (22 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · forge_select · ×4
  • forge_select::preview::run_select_ui_values (cognitive 78) crates/forge_select/src/preview.rs:289 — forge_select::preview::run_select_ui_values has cognitive complexity 78 (threshold 15). Drivers by points: if/else 23 (58 pts), match/switch 4 (13 pts), boolean chains 5, loops 2 (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • forge_select::preview::draw_preview_ui (cognitive 57) crates/forge_select/src/preview.rs:875 — forge_select::preview::draw_preview_ui has cognitive complexity 57 (threshold 15). Drivers by points: if/else 19 (39 pts), loops 5 (8 pts), match/switch 4 (7 pts), boolean chains 3 (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.
  • forge_select::preview::wrap_ansi_line (cognitive 27) crates/forge_select/src/preview.rs:1193 — forge_select::preview::wrap_ansi_line has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (22 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • forge_select::preview::handle_key_event (cognitive 18) crates/forge_select/src/preview.rs:622 — forge_select::preview::handle_key_event has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (8 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 · forge_domain · ×4
  • forge_domain::conversation_html::create_conversation_context_section (cognitive 55) crates/forge_domain/src/conversation_html.rs:288 — forge_domain::conversation_html::create_conversation_context_section has cognitive complexity 55 (threshold 15). Drivers by points: if/else 23 (49 pts), match/switch 2 (5 pts), boolean chains 1 (nesting depth added 29). 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.
  • forge_domain::conversation_html::create_info_table (cognitive 24) crates/forge_domain/src/conversation_html.rs:136 — forge_domain::conversation_html::create_info_table has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (21 pts), match/switch 1 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • forge_domain::compact::summary::extract_tool_info (cognitive 21) crates/forge_domain/src/compact/summary.rs:339 — forge_domain::compact::summary::extract_tool_info has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (11 pts), match/switch 2 (7 pts), loops 1 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • forge_domain::compact::strategy::find_sequence_preserving_last_n (cognitive 16) crates/forge_domain/src/compact/strategy.rs:81 — forge_domain::compact::strategy::find_sequence_preserving_last_n has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D35 · Change Coupling · Change-coupling hub · ×4
  • Change-coupling hub: orch.rs → agent_executor.rs, compact_config.rs, event.rs, system_context.rs, conversation.rs, template.rs crates/forge_app/src/orch.rs — `crates/forge_app/src/orch.rs` changes together with 6 other files — `crates/forge_app/src/agent_executor.rs`, `crates/forge_domain/src/compact/compact_config.rs`, `crates/forge_domain/src/event.rs`, `crates/forge_domain/src/system_context.rs`, `crates/forge_services/src/conversation.rs`, `crates/forge_services/src/template.rs` — 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: fmt_input.rs → operation.rs, tool_executor.rs, summary.rs crates/forge_app/src/fmt/fmt_input.rs — `crates/forge_app/src/fmt/fmt_input.rs` changes together with 3 other files — `crates/forge_app/src/operation.rs`, `crates/forge_app/src/tool_executor.rs`, `crates/forge_domain/src/compact/summary.rs` — 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.
  • Change-coupling hub: executor.rs → operation.rs, attachment.rs, shell.rs crates/forge_infra/src/executor.rs — `crates/forge_infra/src/executor.rs` changes together with 3 other files — `crates/forge_app/src/operation.rs`, `crates/forge_services/src/attachment.rs`, `crates/forge_services/src/tool_services/shell.rs` — 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.
  • Change-coupling hub: api.rs → command_generator.rs, services.rs, repo.rs, app_config.rs, conversation.rs crates/forge_api/src/api.rs — `crates/forge_api/src/api.rs` changes together with 5 other files — `crates/forge_app/src/command_generator.rs`, `crates/forge_app/src/services.rs`, `crates/forge_domain/src/repo.rs`, `crates/forge_services/src/app_config.rs`, `crates/forge_services/src/conversation.rs` — 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.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×4
  • Duplicated block (12 lines × 2) crates/forge_json_repair/src/parser.rs:616 — crates/forge_json_repair/src/parser.rs:616-627 | crates/forge_json_repair/src/parser.rs:634-645 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/forge_json_repair/src/schema_coercion.rs:167 — crates/forge_json_repair/src/schema_coercion.rs:167-178 | crates/forge_json_repair/src/schema_coercion.rs:370-381 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/forge_main/src/ui.rs:516 — crates/forge_main/src/ui.rs:516-527 | crates/forge_main/src/ui.rs:2107-2118 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/forge_infra/src/auth/strategy.rs:185 — crates/forge_infra/src/auth/strategy.rs:185-196 | crates/forge_infra/src/auth/strategy.rs:710-725 — 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 (10 lines × 2) · ×4
  • Duplicated block (10 lines × 2) crates/forge_json_repair/src/parser.rs:598 — crates/forge_json_repair/src/parser.rs:598-607 | crates/forge_json_repair/src/parser.rs:614-623 — 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) crates/forge_repo/src/provider/bedrock.rs:735 — crates/forge_repo/src/provider/bedrock.rs:735-744 | crates/forge_repo/src/provider/bedrock.rs:869-878 — 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) crates/forge_select/src/multi.rs:33 — crates/forge_select/src/multi.rs:33-42 | crates/forge_select/src/select.rs:87-96 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (10 lines × 2) crates/forge_repo/src/provider/openai_responses/response.rs:206 — crates/forge_repo/src/provider/openai_responses/response.rs:206-215 | crates/forge_repo/src/provider/openai_responses/response.rs:234-243 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×4
  • Duplicated block (6 lines × 2) crates/forge_infra/src/auth/strategy.rs:464 — crates/forge_infra/src/auth/strategy.rs:464-469 | crates/forge_repo/src/provider/provider_repo.rs:516-524 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) crates/forge_main/src/ui.rs:1043 — crates/forge_main/src/ui.rs:1043-1048 | crates/forge_main/src/ui.rs:1116-1121 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/forge_main/src/ui.rs:1398 — crates/forge_main/src/ui.rs:1398-1403 | crates/forge_main/src/ui.rs:3558-3563 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/forge_app/src/utils.rs:103 — crates/forge_app/src/utils.rs:103-108 | crates/forge_fs/src/lib.rs:30-35 — 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.
D1 · Cyclomatic Complexity · forge_app · ×3
  • forge_app::utils::sanitize_gemini_schema (cyclomatic 45) crates/forge_app/src/utils.rs:626 — forge_app::utils::sanitize_gemini_schema 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.
  • forge_app::utils::enforce_strict_schema (cyclomatic 17) crates/forge_app/src/utils.rs:448 — forge_app::utils::enforce_strict_schema 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.
  • forge_app::dto::anthropic::response::get_context_length (cyclomatic 17) crates/forge_app/src/dto/anthropic/response.rs:81 — forge_app::dto::anthropic::response::get_context_length 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 · forge_select · ×3
  • forge_select::preview::run_select_ui_values (cyclomatic 43) crates/forge_select/src/preview.rs:289 — forge_select::preview::run_select_ui_values 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.
  • forge_select::preview::handle_key_event (cyclomatic 35) crates/forge_select/src/preview.rs:622 — forge_select::preview::handle_key_event has cyclomatic complexity 35 (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.
  • forge_select::preview::draw_preview_ui (cyclomatic 28) crates/forge_select/src/preview.rs:875 — forge_select::preview::draw_preview_ui 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 · forge_markdown_stream · ×3
  • forge_markdown_stream::table::wrap (cyclomatic 33) crates/forge_markdown_stream/src/table.rs:135 — forge_markdown_stream::table::wrap has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • forge_markdown_stream::utils::collapse_ansi_codes (cyclomatic 29) crates/forge_markdown_stream/src/utils.rs:340 — forge_markdown_stream::utils::collapse_ansi_codes has cyclomatic complexity 29 (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.
  • forge_markdown_stream::table::split_word_at_width (cyclomatic 17) crates/forge_markdown_stream/src/table.rs:304 — forge_markdown_stream::table::split_word_at_width 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.
D15 · Churn × Complexity Hotspots · Hotspot · ×3
  • Hotspot: crates/forge_domain/src/provider.rs crates/forge_domain/src/provider.rs:194 — crates/forge_domain/src/provider.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in ProviderId::from_str at line 194. 5 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-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 15:42:13 +05:30' --until='2026-09-29 15:42:13 +05:30' --full-history --no-merges -- crates/forge_domain/src/provider.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/forge_app/src/dto/anthropic/response.rs crates/forge_app/src/dto/anthropic/response.rs:81 — crates/forge_app/src/dto/anthropic/response.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in forge_app::dto::anthropic::response::get_context_length at line 81. 3 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-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 15:42:13 +05:30' --until='2026-09-29 15:42:13 +05:30' --full-history --no-merges -- crates/forge_app/src/dto/anthropic/response.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/forge_repo/src/provider/openai_responses/repository.rs crates/forge_repo/src/provider/openai_responses/repository.rs:155 — crates/forge_repo/src/provider/openai_responses/repository.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in OpenAIResponsesProvider::chat at line 155. 1 of those changes was a fix/bug commit, and the other 1 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-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 15:42:13 +05:30' --until='2026-09-29 15:42:13 +05:30' --full-history --no-merges -- crates/forge_repo/src/provider/openai_responses/repository.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D2 · Cognitive Complexity · forge_json_repair · ×3
  • forge_json_repair::schema_coercion::coerce_value_with_schema_object (cognitive 71) crates/forge_json_repair/src/schema_coercion.rs:38 — forge_json_repair::schema_coercion::coerce_value_with_schema_object has cognitive complexity 71 (threshold 15). Drivers by points: if/else 24 (55 pts), loops 4 (9 pts), boolean chains 7 (nesting depth added 36). 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.
  • forge_json_repair::schema_coercion::coerce_array_value (cognitive 25) crates/forge_json_repair/src/schema_coercion.rs:323 — forge_json_repair::schema_coercion::coerce_array_value has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 4 (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.
  • forge_json_repair::schema_coercion::try_coerce_string (cognitive 23) crates/forge_json_repair/src/schema_coercion.rs:243 — forge_json_repair::schema_coercion::try_coerce_string has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 3, match/switch 2 (3 pts) (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (4.2 · ×2
  • Low contrast colour pair in CSS (4.2:1) crates/forge_domain/src/snapshots/forge_domain__conversation_html__tests__conversation.snap.html:16 — `.agent-conversation a` sets color: #2563eb on background-color: #dbeafe — 4.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (4.2:1) crates/forge_domain/src/conversation_style.css:256 — `.agent-conversation a` sets color: #2563eb on background-color: #dbeafe — 4.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
D1 · Cyclomatic Complexity · forge_json_repair · ×2
  • forge_json_repair::schema_coercion::coerce_value_with_schema_object (cyclomatic 36) crates/forge_json_repair/src/schema_coercion.rs:38 — forge_json_repair::schema_coercion::coerce_value_with_schema_object has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • forge_json_repair::schema_coercion::try_coerce_string (cyclomatic 21) crates/forge_json_repair/src/schema_coercion.rs:243 — forge_json_repair::schema_coercion::try_coerce_string 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 · ChatCompletionMessage · ×2
  • ChatCompletionMessage::try_from (cyclomatic 28) crates/forge_app/src/dto/openai/response.rs:324 — ChatCompletionMessage::try_from 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.
  • ChatCompletionMessage::try_from (cyclomatic 17) crates/forge_app/src/dto/google/response.rs:451 — ChatCompletionMessage::try_from has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · forge_domain · ×2
  • forge_domain::compact::summary::extract_tool_info (cyclomatic 22) crates/forge_domain/src/compact/summary.rs:339 — forge_domain::compact::summary::extract_tool_info 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.
  • forge_domain::conversation_html::create_conversation_context_section (cyclomatic 20) crates/forge_domain/src/conversation_html.rs:288 — forge_domain::conversation_html::create_conversation_context_section 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.
D2 · Cognitive Complexity · ChatCompletionMessage · ×2
  • ChatCompletionMessage::try_from (cognitive 76) crates/forge_app/src/dto/openai/response.rs:324 — ChatCompletionMessage::try_from has cognitive complexity 76 (threshold 15). Drivers by points: if/else 18 (55 pts), loops 2 (10 pts), match/switch 4 (10 pts), boolean chains 1 (nesting depth added 51). 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.
  • ChatCompletionMessage::try_from (cognitive 35) crates/forge_app/src/dto/google/response.rs:451 — ChatCompletionMessage::try_from has cognitive complexity 35 (threshold 15). Drivers by points: if/else 15 (32 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · forge_main · ×2
  • forge_main::zsh::paste::wrap_tokens (cognitive 20) crates/forge_main/src/zsh/paste.rs:141 — forge_main::zsh::paste::wrap_tokens has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • forge_main::highlighter::highlight_mentions (cognitive 17) crates/forge_main/src/highlighter.rs:74 — forge_main::highlighter::highlight_mentions has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 4 (12 pts), if/else 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 10). 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.
D3 · God Classes · TooManyMethods · ×2
  • TooManyMethods: UI crates/forge_main/src/ui.rs:105 — TooManyMethods — 116 methods. The bar is 30 methods; this is 86 over it, 3.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: JsonRepairParser crates/forge_json_repair/src/parser.rs:5 — TooManyMethods — 48 methods. The bar is 30 methods; this is 18 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D3 · God Classes · ClassTooLong · ×2
  • ClassTooLong: JsonRepairParser crates/forge_json_repair/src/parser.rs:5 — ClassTooLong — 676 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 48 methods, 2 blocks, lines 5-1073. The bar is 400 significant lines; this is 276 over it, 1.69× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ForgeRepo crates/forge_repo/src/forge_repo.rs:41 — ClassTooLong — 416 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 1 methods, 28 blocks, lines 41-680. The bar is 400 significant lines; this is 16 over it, 1.04× 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.
D30 · Dependency Vulnerabilities · Medium CVE · ×2
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Medium advisory (unsound) · ×2
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×2
  • Duplicated block (22 lines × 2) crates/forge_app/src/operation.rs:463 — crates/forge_app/src/operation.rs:463-484 | crates/forge_app/src/operation.rs:486-507 — 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 (22 lines × 2) crates/forge_json_repair/src/schema_coercion.rs:135 — crates/forge_json_repair/src/schema_coercion.rs:135-156 | crates/forge_json_repair/src/schema_coercion.rs:338-359 — 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 (15 lines × 2) · ×2
  • Duplicated block (15 lines × 2) crates/forge_app/src/utils.rs:19 — crates/forge_app/src/utils.rs:19-33 | crates/forge_domain/src/tools/catalog.rs:1136-1150 — 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 (15 lines × 2) crates/forge_json_repair/src/parser.rs:196 — crates/forge_json_repair/src/parser.rs:196-210 | crates/forge_json_repair/src/parser.rs:274-288 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×2
  • Duplicated block (11 lines × 2) crates/forge_domain/src/conversation_html.rs:181 — crates/forge_domain/src/conversation_html.rs:181-191 | crates/forge_domain/src/conversation_html.rs:250-260 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/forge_main/src/ui.rs:4091 — crates/forge_main/src/ui.rs:4091-4101 | crates/forge_main/src/ui.rs:4115-4125 — 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 (10–11 lines × 2) · ×2
  • Duplicated block (10–11 lines × 2) crates/forge_main/src/conversation_selector.rs:72 — crates/forge_main/src/conversation_selector.rs:72-81 | crates/forge_main/src/ui.rs:2996-3006 — before extracting anything, compare `crates/forge_main/src/conversation_selector.rs` and `crates/forge_main/src/ui.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (10–11 lines × 2) crates/forge_main/src/ui.rs:1460 — crates/forge_main/src/ui.rs:1460-1470 | crates/forge_main/src/ui.rs:2959-2968 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×2
  • Duplicated block (7 lines × 3) crates/forge_app/src/operation.rs:302 — crates/forge_app/src/operation.rs:302-308 | crates/forge_app/src/operation.rs:475-481 | crates/forge_app/src/operation.rs:498-504 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (7 lines × 3) crates/forge_repo/src/provider/anthropic.rs:46 — crates/forge_repo/src/provider/anthropic.rs:46-52 | crates/forge_repo/src/provider/openai.rs:75-81 | crates/forge_repo/src/provider/openai_responses/repository.rs:79-85 — before extracting anything, compare `crates/forge_repo/src/provider/openai.rs` and `crates/forge_repo/src/provider/openai_responses/repository.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
AC3 · Page structure · Page without a main landmark · ×1
  • Page without a main landmark crates/forge_domain/src/snapshots/forge_domain__conversation_html__tests__conversation.snap.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
AC7 · A11y enforcement · Accessibility enforcement below the top rung · ×1
  • Accessibility enforcement below the top rung — No accessibility enforcement found — no a11y linter (an accessibility check that can read your UI — no component framework was detected and your pages are rendered by server-side templates, which neither the JSX/Vue ESLint plugins nor the HTML-template linters can parse; run axe/pa11y over the rendered pages, or assert the accessibility invariants over that rendered HTML in the test suite you already have) and no axe/pa11y/Lighthouse in tests or CI. Start by running that check over your rendered pages in CI. What was searched, so you can tell an absence from a miss: the 1 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 · ToolOperation · ×1
  • ToolOperation::into_tool_output (cyclomatic 51) crates/forge_app/src/operation.rs:235 — ToolOperation::into_tool_output has cyclomatic complexity 51 (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 · Renderer · ×1
  • Renderer::render_event (cyclomatic 36) crates/forge_markdown_stream/src/renderer.rs:126 — Renderer::render_event has cyclomatic complexity 36 (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 · ToolCatalog · ×1
  • ToolCatalog::to_content (cyclomatic 26) crates/forge_app/src/fmt/fmt_input.rs:9 — ToolCatalog::to_content has cyclomatic complexity 26 (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 · forge_fs · ×1
  • forge_fs::binary_detection::is_binary_internal (cyclomatic 19) crates/forge_fs/src/binary_detection.rs:43 — forge_fs::binary_detection::is_binary_internal 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.
D1 · Cyclomatic Complexity · Walker · ×1
  • Walker::get_blocking (cyclomatic 19) crates/forge_walker/src/walker.rs:118 — Walker::get_blocking 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 · Agent · ×1
  • Agent::apply_config (cyclomatic 18) crates/forge_app/src/agent.rs:95 — Agent::apply_config 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 · ContextSummary · ×1
  • ContextSummary::from (cyclomatic 17) crates/forge_domain/src/compact/summary.rs:218 — ContextSummary::from has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ToolCallFull · ×1
  • ToolCallFull::try_from_parts (cyclomatic 17) crates/forge_domain/src/tools/call/tool_call.rs:106 — ToolCallFull::try_from_parts 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 · ForgeCommandManager · ×1
  • ForgeCommandManager::parse (cyclomatic 17) crates/forge_main/src/model.rs:288 — ForgeCommandManager::parse 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. This is NOT this file's highest cyclomatic complexity: AppCommand::name (cyclomatic 46) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · OpenAIResponsesProvider · ×1
  • OpenAIResponsesProvider::get_headers_for_conversation (cyclomatic 17) crates/forge_repo/src/provider/openai_responses/repository.rs:76 — OpenAIResponsesProvider::get_headers_for_conversation 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 · forge_services · ×1
  • forge_services::tool_services::fs_patch::apply_replacement (cyclomatic 17) crates/forge_services/src/tool_services/fs_patch.rs:202 — forge_services::tool_services::fs_patch::apply_replacement 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 · Response · ×1
  • Response::into_domain (cyclomatic 16) crates/forge_repo/src/provider/openai_responses/response.rs:156 — Response::into_domain 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 · DiffFormat · ×1
  • DiffFormat::format (cyclomatic 16) crates/forge_display/src/diff.rs:50 — DiffFormat::format 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 · OpenAIProvider · ×1
  • OpenAIProvider::get_headers (cyclomatic 16) crates/forge_repo/src/provider/openai.rs:72 — OpenAIProvider::get_headers has cyclomatic complexity 16 (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 · ForgeProviderRepository · ×1
  • ForgeProviderRepository::migrate_env_to_file (cyclomatic 16) crates/forge_repo/src/provider/provider_repo.rs:337 — ForgeProviderRepository::migrate_env_to_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.
D2 · Cognitive Complexity · ToolOperation · ×1
  • ToolOperation::into_tool_output (cognitive 82) crates/forge_app/src/operation.rs:235 — ToolOperation::into_tool_output has cognitive complexity 82 (threshold 15). Drivers by points: if/else 19 (39 pts), loops 9 (26 pts), match/switch 7 (15 pts), boolean chains 2 (nesting depth added 45). 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 · ContextSummary · ×1
  • ContextSummary::from (cognitive 46) crates/forge_domain/src/compact/summary.rs:218 — ContextSummary::from has cognitive complexity 46 (threshold 15). Drivers by points: if/else 11 (32 pts), loops 3 (11 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Response · ×1
  • Response::into_domain (cognitive 43) crates/forge_repo/src/provider/openai_responses/response.rs:156 — Response::into_domain has cognitive complexity 43 (threshold 15). Drivers by points: if/else 11 (27 pts), match/switch 3 (11 pts), loops 2 (5 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffFormat · ×1
  • DiffFormat::format (cognitive 37) crates/forge_display/src/diff.rs:50 — DiffFormat::format has cognitive complexity 37 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 7 (16 pts), match/switch 1 (4 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ForgeProviderAuthService · ×1
  • ForgeProviderAuthService::refresh_provider_credential (cognitive 34) crates/forge_services/src/provider_auth.rs:149 — ForgeProviderAuthService::refresh_provider_credential has cognitive complexity 34 (threshold 15). Drivers by points: if/else 6 (21 pts), match/switch 2 (10 pts), loops 1 (3 pts) (nesting depth added 25). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ToolCallFull · ×1
  • ToolCallFull::try_from_parts (cognitive 33) crates/forge_domain/src/tools/call/tool_call.rs:106 — ToolCallFull::try_from_parts has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (28 pts), boolean chains 4, loops 1 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Orchestrator · ×1
  • Orchestrator::run (cognitive 28) crates/forge_app/src/orch.rs:245 — Orchestrator::run has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (22 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · forge_infra · ×1
  • forge_infra::auth::strategy::poll_for_tokens (cognitive 28) crates/forge_infra/src/auth/strategy.rs:794 — forge_infra::auth::strategy::poll_for_tokens has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (25 pts), boolean chains 2, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ZshRPrompt · ×1
  • ZshRPrompt::fmt (cognitive 26) crates/forge_main/src/zsh/rprompt.rs:98 — ZshRPrompt::fmt has cognitive complexity 26 (threshold 15). Drivers by points: if/else 17 (22 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · forge_services · ×1
  • forge_services::tool_services::fs_patch::apply_replacement (cognitive 25) crates/forge_services/src/tool_services/fs_patch.rs:202 — forge_services::tool_services::fs_patch::apply_replacement has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 2 (4 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Message · ×1
  • Message::from_domain (cognitive 24) crates/forge_repo/src/provider/bedrock.rs:762 — Message::from_domain has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (6 pts), match/switch 2 (3 pts), boolean chains 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 · ForgeCommandManager · ×1
  • ForgeCommandManager::parse (cognitive 24) crates/forge_main/src/model.rs:288 — ForgeCommandManager::parse has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 5, match/switch 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DoomLoopDetector · ×1
  • DoomLoopDetector::count_recent_pattern_repetitions (cognitive 22) crates/forge_app/src/hooks/doom_loop.rs:117 — DoomLoopDetector::count_recent_pattern_repetitions has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (20 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 · forge_fs · ×1
  • forge_fs::binary_detection::is_binary_internal (cognitive 22) crates/forge_fs/src/binary_detection.rs:43 — forge_fs::binary_detection::is_binary_internal has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 11, if/else 6 (9 pts), loops 1 (2 pts) (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 · ForgeMcpClient · ×1
  • ForgeMcpClient::create_connection (cognitive 21) crates/forge_infra/src/mcp_client.rs:95 — ForgeMcpClient::create_connection has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (5 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ForgeSkillRepository · ×1
  • ForgeSkillRepository::load_skills_from_dir (cognitive 21) crates/forge_repo/src/skill.rs:119 — ForgeSkillRepository::load_skills_from_dir has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (18 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ForgeFetch · ×1
  • ForgeFetch::check_robots_txt (cognitive 21) crates/forge_services/src/tool_services/fetch.rs:31 — ForgeFetch::check_robots_txt has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Walker · ×1
  • Walker::get_blocking (cognitive 21) crates/forge_walker/src/walker.rs:118 — Walker::get_blocking has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (16 pts), match/switch 3, boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · SanitizeToolIds · ×1
  • SanitizeToolIds::transform (cognitive 20) crates/forge_repo/src/provider/bedrock_sanitize_ids.rs:29 — SanitizeToolIds::transform has cognitive complexity 20 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 2 (5 pts), match/switch 1 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · forge_tool_macros · ×1
  • forge_tool_macros::derive_description (cognitive 19) crates/forge_tool_macros/src/lib.rs:16 — forge_tool_macros::derive_description has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Request · ×1
  • Request::from (cognitive 18) crates/forge_app/src/dto/google/request.rs:302 — Request::from has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), match/switch 3 (4 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TrimToolCallIds · ×1
  • TrimToolCallIds::transform (cognitive 18) crates/forge_app/src/dto/openai/transformers/trim_tool_call_ids.rs:12 — TrimToolCallIds::transform has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (6 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 · ForgeProviderRepository · ×1
  • ForgeProviderRepository::migrate_env_to_file (cognitive 18) crates/forge_repo/src/provider/provider_repo.rs:337 — ForgeProviderRepository::migrate_env_to_file has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 6, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · AgentExecutor · ×1
  • AgentExecutor::execute (cognitive 17) crates/forge_app/src/agent_executor.rs:42 — AgentExecutor::execute has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ContextMessage · ×1
  • ContextMessage::to_text (cognitive 17) crates/forge_domain/src/context.rs:113 — ContextMessage::to_text has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (6 pts), match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ForgeDirectoryReaderService · ×1
  • ForgeDirectoryReaderService::read_directory_files (cognitive 17) crates/forge_infra/src/fs_read_dir.rs:68 — ForgeDirectoryReaderService::read_directory_files has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, loops 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 · ForgePrompt · ×1
  • ForgePrompt::render_prompt_right (cognitive 17) crates/forge_main/src/prompt.rs:116 — ForgePrompt::render_prompt_right has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 3, match/switch 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 · ForgeFsSearch · ×1
  • ForgeFsSearch::search_content (cognitive 17) crates/forge_services/src/tool_services/fs_search.rs:421 — ForgeFsSearch::search_content has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ForgeHttpInfra · ×1
  • ForgeHttpInfra::new (cognitive 16) crates/forge_infra/src/http.rs:39 — ForgeHttpInfra::new has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 2 (4 pts), loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · from (cognitive 16) · ×1
  • Info::from (cognitive 16) crates/forge_main/src/info.rs:418 — Info::from has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Renderer · ×1
  • Renderer::render_event (cognitive 16) crates/forge_markdown_stream/src/renderer.rs:126 — Renderer::render_event has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (9 pts), if/else 4 (6 pts), match/switch 1 (nesting depth added 7). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D22 · Internal API Consistency · Inconsistent naming and signature for shell execution · ×1
  • Inconsistent naming and signature for shell execution: The API exposes `execute_shell_command` and `execute_shell_command_raw`, while the underlying infrastructure exposes `execute_command` and `execute_command_raw`. The 'shell' prefix is inconsistent between layers. Additionally, the parameters differ significantly (API uses `working_dir` and no `env_vars` explicitly in the raw version, while Infra uses `env_vars` and `silent`), making the mapping unclear. — Standardize on `execute_command` across layers. If 'shell' is a specific domain concept, use it consistently. Clarify the relationship between 'raw' and standard execution (e.g., does raw imply no shell wrapper or no env var handling?). Align parameter names. (signatures: API.execute_shell_command(command: str, working_dir: PathBuf): Result | API.execute_shell_command_raw(command: str): Result | CommandInfra.execute_command(command: String, working_dir: PathBuf, silent: bool, env_vars: String): Result | CommandInfra.execute_command_raw(command: str, working_dir: PathBuf, env_vars: String): Result)
D22 · Internal API Consistency · Inconsistent return types for similar operations · ×1
  • Inconsistent return types for similar operations: `API.get_agent_model` returns `ModelId` directly, while `AgentProviderResolver.get_model` returns `Result`. This inconsistency in error handling (one throws/panics on failure, the other returns a Result) is confusing for API consumers. — Standardize on returning `Result<ModelId>` for both to handle potential resolution failures gracefully. (signatures: API.get_agent_model(agent_id: AgentId): ModelId | AgentProviderResolver.get_model(agent_id: AgentId): Result)
D3 · God Classes · TooManyFields · ×1
  • TooManyFields: ForgeConfig crates/forge_config/src/config.rs:121 — TooManyFields — 50 stored fields beside 2 methods. The bar is 30 stored fields; this is 20 over it, 1.67× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
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
D4 · Code Duplication · Near-duplicate member pair (33 shared lines) · ×1
  • Near-duplicate member pair (33 shared lines) crates/forge_repo/src/provider/openai.rs:72 — crates/forge_repo/src/provider/openai.rs:72-128 | crates/forge_repo/src/provider/openai_responses/repository.rs:76-151 — These two members are variants of one another: 33 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/forge_repo/src/provider/anthropic.rs:368 — crates/forge_repo/src/provider/anthropic.rs:368-380 | crates/forge_repo/src/provider/bedrock.rs:1074-1087 | crates/forge_repo/src/provider/google.rs:200-212 | crates/forge_repo/src/provider/openai_responses/repository.rs:687-699 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Duplicated block (26–27 lines × 2) · ×1
  • Duplicated block (26–27 lines × 2) crates/forge_markdown_stream/src/table.rs:149 — crates/forge_markdown_stream/src/table.rs:149-175 | crates/forge_markdown_stream/src/table.rs:311-336 — 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 (24 lines × 2) · ×1
  • Duplicated block (24 lines × 2) crates/forge_services/src/tool_services/fs_patch.rs:514 — crates/forge_services/src/tool_services/fs_patch.rs:514-537 | crates/forge_services/src/tool_services/fs_patch.rs:576-599 — 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 (19–20 lines × 2) · ×1
  • Duplicated block (19–20 lines × 2) crates/forge_infra/src/mcp_client.rs:407 — crates/forge_infra/src/mcp_client.rs:407-425 | crates/forge_infra/src/mcp_client.rs:639-658 — 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 (17–18 lines × 2) · ×1
  • Duplicated block (17–18 lines × 2) crates/forge_infra/src/auth/strategy.rs:243 — crates/forge_infra/src/auth/strategy.rs:243-260 | crates/forge_infra/src/auth/strategy.rs:346-362 — 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 (16–18 lines × 2) · ×1
  • Duplicated block (16–18 lines × 2) crates/forge_main/src/conversation_selector.rs:58 — crates/forge_main/src/conversation_selector.rs:58-75 | crates/forge_main/src/ui.rs:530-545 — before extracting anything, compare `crates/forge_main/src/conversation_selector.rs` and `crates/forge_main/src/ui.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (14–17 lines × 2) · ×1
  • Duplicated block (14–17 lines × 2) crates/forge_main/src/ui.rs:3163 — crates/forge_main/src/ui.rs:3163-3179 | crates/forge_main/src/ui.rs:3186-3199 — 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 (14–16 lines × 2) · ×1
  • Duplicated block (14–16 lines × 2) crates/forge_main/src/conversation_selector.rs:54 — crates/forge_main/src/conversation_selector.rs:54-67 | crates/forge_main/src/ui.rs:2116-2131 — before extracting anything, compare `crates/forge_main/src/conversation_selector.rs` and `crates/forge_main/src/ui.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×1
  • Duplicated block (16 lines × 2) crates/forge_repo/src/provider/openai.rs:83 — crates/forge_repo/src/provider/openai.rs:83-98 | crates/forge_repo/src/provider/openai_responses/repository.rs:87-102 — before extracting anything, compare `crates/forge_repo/src/provider/openai.rs` and `crates/forge_repo/src/provider/openai_responses/repository.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (13–16 lines × 2) · ×1
  • Duplicated block (13–16 lines × 2) crates/forge_services/src/provider_auth.rs:37 — crates/forge_services/src/provider_auth.rs:37-52 | crates/forge_services/src/provider_auth.rs:124-136 — 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 (14 lines × 2) · ×1
  • Duplicated block (14 lines × 2) crates/forge_services/src/auth.rs:25 — crates/forge_services/src/auth.rs:25-38 | crates/forge_services/src/auth.rs:43-56 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (11 lines × 4) · ×1
  • Duplicated block (11 lines × 4) crates/forge_json_repair/src/schema_coercion.rs:135 — crates/forge_json_repair/src/schema_coercion.rs:135-145 | crates/forge_json_repair/src/schema_coercion.rs:167-177 | crates/forge_json_repair/src/schema_coercion.rs:338-348 | crates/forge_json_repair/src/schema_coercion.rs:370-380 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×1
  • Duplicated block (11 lines × 3) crates/forge_main/src/conversation_selector.rs:58 — crates/forge_main/src/conversation_selector.rs:58-68 | crates/forge_main/src/ui.rs:529-540 | crates/forge_main/src/ui.rs:2120-2132 — before extracting anything, compare `crates/forge_main/src/conversation_selector.rs` and `crates/forge_main/src/ui.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (6–10 lines × 3) · ×1
  • Duplicated block (6–10 lines × 3) crates/forge_app/src/dto/anthropic/response.rs:362 — crates/forge_app/src/dto/anthropic/response.rs:362-367 | crates/forge_app/src/dto/anthropic/response.rs:375-384 | crates/forge_app/src/dto/anthropic/response.rs:386-395 — 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.
D4 · Code Duplication · Duplicated block (9 lines × 4) · ×1
  • Duplicated block (9 lines × 4) crates/forge_repo/src/provider/anthropic.rs:372 — crates/forge_repo/src/provider/anthropic.rs:372-380 | crates/forge_repo/src/provider/bedrock.rs:1079-1087 | crates/forge_repo/src/provider/google.rs:204-212 | crates/forge_repo/src/provider/openai_responses/repository.rs:691-699 — before extracting anything, compare `crates/forge_repo/src/provider/anthropic.rs` and `crates/forge_repo/src/provider/google.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×1
  • Duplicated block (8–9 lines × 2) crates/forge_services/src/tool_services/fs_patch.rs:320 — crates/forge_services/src/tool_services/fs_patch.rs:320-327 | crates/forge_services/src/tool_services/fs_patch.rs:340-348 — 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–8 lines × 2) · ×1
  • Duplicated block (7–8 lines × 2) crates/forge_main/src/ui.rs:2174 — crates/forge_main/src/ui.rs:2174-2180 | crates/forge_main/src/ui.rs:2203-2210 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (6–7 lines × 2) · ×1
  • Duplicated block (6–7 lines × 2) crates/forge_main/src/ui.rs:1450 — crates/forge_main/src/ui.rs:1450-1456 | crates/forge_main/src/ui.rs:2951-2956 — 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) crates/forge_services/src/tool_services/fs_patch.rs:249 — crates/forge_services/src/tool_services/fs_patch.rs:249-254 | crates/forge_services/src/tool_services/fs_patch.rs:321-325 | crates/forge_services/src/tool_services/fs_patch.rs:341-345 — 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.
D5 · Coupling · Unstable project forge_api · ×1
  • Unstable project forge_api — forge_api has instability 0.88 with 1 dependents.
D5 · Coupling · Unstable project forge_infra · ×1
  • Unstable project forge_infra — forge_infra has instability 0.82 with 2 dependents.
D5 · Coupling · Unstable project forge_repo · ×1
  • Unstable project forge_repo — forge_repo has instability 0.91 with 1 dependents.
D6 · Cohesion (LCOM4) · Low cohesion · ×1
  • Low cohesion: Context (LCOM4 4) crates/forge_domain/src/context.rs:401 — Context'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.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×1
  • Sync-over-async blocking benchmarks/evals/semantic_search_quality/llm_judge.ts:361 — `main` is async and calls readFileSync — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Minor — 14 finding(s)
D16 · Bus Factor · Off-boarding risk · ×2
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 8 significant file(s) lose their only recent owner: crates/forge_json_repair/src/schema_coercion.rs, crates/forge_app/src/dto/openai/copilot_model.rs, crates/forge_repo/src/provider/bedrock_sanitize_ids.rs, crates/forge_app/src/dto/openai/transformers/trim_tool_call_ids.rs, crates/forge_app/src/dto/anthropic/transforms/sanitize_tool_ids.rs, crates/forge_infra/src/auth/mcp_credentials.rs, crates/forge_repo/src/provider/bedrock_cache.rs, crates/forge_app/src/dto/openai/transformers/default_reasoning_content.rs. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 4 significant file(s) lose their only recent owner: crates/forge_main/src/sync_display.rs, crates/forge_app/src/dto/anthropic/transforms/drop_invalid_toolcalls.rs, crates/forge_infra/src/walker.rs, crates/forge_main/src/logs.rs. Pair on, review, or document these before any departure.
X9 · Subsumed condition operand · Subsumed condition operand · ×2
  • Subsumed condition operand benchmarks/parse.ts:37 — `evalName.endsWith("task.yml")` can never decide this `||` — every value satisfying `evalName.endsWith("task.yml")` also satisfies `evalName.endsWith(".yml")`, 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.
  • Subsumed condition operand crates/forge_main/src/prompt.rs:433 — `actual.contains("HIGH")` can never decide this `||` — every value satisfying `actual.contains("HIGH")` also satisfies `actual.contains("HIG")`, 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.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 2 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 (14 single-owned of 288 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; 288 of the 462 production source files in this repository met that bar). They are anonymized user #3 (1 file(s)), 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.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 2 of 25 project(s) overshoot their size bounds, lowering Project Cohesion to 8.4/10. The most over is `crates/forge_app` (29835 LoC, 311 public types across 12 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.
D34 · Knowledge Freshness · Further orphaned files (smaller) · ×1
  • Further orphaned files (smaller) — 35 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: crates/forge_eventsource_stream/src/event_stream.rs, crates/forge_domain/src/tool_order.rs, crates/forge_app/src/terminal_context.rs, crates/forge_domain/src/policies/policy.rs, crates/forge_eventsource/src/event_source.rs, crates/forge_domain/src/message_pattern.rs, crates/forge_template/src/element.rs, crates/forge_app/src/transformers/dedupe_role.rs (and 27 more) (36 orphaned of 288 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; 288 of the 462 production source files in this repository met that bar). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
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.
M4 · Documentation accuracy · README/code drift · ×1
  • README/code drift — README claims a ZSH `:` prefix plugin mode but the evidence shows no such feature — searched for: `ZSH `:` prefix`. Each was matched case- and separator-insensitively against file and directory NAMES anywhere in the tree, and against the CONTENTS of manifest files (package.json, *.csproj, *.props, *.slnx, *.yml, Dockerfile); the README's own prose never counts, so a claim is never refuted by merely being made. Nothing outside that search was read — a footprint living only in a submodule, in a file type not listed here, or under a name none of those terms matches is not seen, and this row is then wrong.

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-e2bef107abb5411684084fb93af9aa52/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-e2bef107abb5411684084fb93af9aa52/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 .57artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update20artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update0artifacts/raw/trivy-fs.json

Run 01a0ed14-0f14-7702-b916-32ebece6f5a5 · 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